Commit acba8ba4 authored by tanyang's avatar tanyang

Merge remote-tracking branch 'origin/V20230915' into V20230915

parents d62c8513 3da44058
...@@ -95,10 +95,9 @@ public class SysConfigController extends BaseController { ...@@ -95,10 +95,9 @@ public class SysConfigController extends BaseController {
@Log(title = "参数管理", businessType = BusinessType.INSERT) @Log(title = "参数管理", businessType = BusinessType.INSERT)
@PostMapping("/tenant/add") @PostMapping("/tenant/add")
public R<Void> tenantAdd(@Validated @RequestBody SysConfig config) { public R<Void> tenantAdd(@Validated @RequestBody SysConfig config) {
if (!configService.checkConfigKeyUnique(config)) { TenantHelper.ignore(() -> {
return R.fail("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); configService.insertTenantConfig(config);
} });
TenantHelper.ignore(()->configService.insertTenantConfig(config));
return R.ok(); return R.ok();
} }
...@@ -152,8 +151,6 @@ public class SysConfigController extends BaseController { ...@@ -152,8 +151,6 @@ public class SysConfigController extends BaseController {
} }
/** /**
* 获取大司空open 插件访问token * 获取大司空open 插件访问token
*/ */
...@@ -161,7 +158,7 @@ public class SysConfigController extends BaseController { ...@@ -161,7 +158,7 @@ public class SysConfigController extends BaseController {
@Log(title = "获取dsk访问token", businessType = BusinessType.OTHER) @Log(title = "获取dsk访问token", businessType = BusinessType.OTHER)
@GetMapping("/dsk/accessToken") @GetMapping("/dsk/accessToken")
public R<DskAccessTokenVO> dskAccessToken() { public R<DskAccessTokenVO> dskAccessToken() {
DskAccessTokenVO dskAccessTokenVO= configService.getDskAccessToken(); DskAccessTokenVO dskAccessTokenVO = configService.getDskAccessToken();
return R.ok(dskAccessTokenVO); return R.ok(dskAccessTokenVO);
} }
} }
...@@ -51,7 +51,7 @@ public class JskCombineInfoController extends BaseController { ...@@ -51,7 +51,7 @@ public class JskCombineInfoController extends BaseController {
* 集团成员列表 * 集团成员列表
*/ */
@PostMapping("/memberList") @PostMapping("/memberList")
public AjaxResult memberList(@RequestBody JskCombineSearchDto dto) throws Exception { public TableDataInfo memberList(@RequestBody JskCombineSearchDto dto) throws Exception {
return baseService.memberList(dto); return baseService.memberList(dto);
} }
......
...@@ -27,6 +27,10 @@ public class JskCombineSearchDto implements Serializable { ...@@ -27,6 +27,10 @@ public class JskCombineSearchDto implements Serializable {
* 筛选参数 * 筛选参数
*/ */
private String searchValue; private String searchValue;
/**
* 筛选参数
*/
private String keys;
/** /**
* 集团层级 * 集团层级
*/ */
...@@ -59,6 +63,10 @@ public class JskCombineSearchDto implements Serializable { ...@@ -59,6 +63,10 @@ public class JskCombineSearchDto implements Serializable {
* 科技型企业类型 * 科技型企业类型
*/ */
private List<String> companyTypes; private List<String> companyTypes;
/**
* 招标采购分类
*/
private List<String> subjectMatters;
/** /**
* 企业类型 * 企业类型
*/ */
......
...@@ -52,9 +52,13 @@ public class JskCombineInfoService { ...@@ -52,9 +52,13 @@ public class JskCombineInfoService {
@Resource @Resource
private RedisCache redisCache; private RedisCache redisCache;
public AjaxResult memberList(JskCombineSearchDto dto) { // public AjaxResult memberList(JskCombineSearchDto dto) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/combine/memberList", BeanUtil.beanToMap(dto, false, false)); // Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/combine/memberList", BeanUtil.beanToMap(dto, false, false));
return BeanUtil.toBean(map, AjaxResult.class); // return BeanUtil.toBean(map, AjaxResult.class);
// }
public TableDataInfo memberList(JskCombineSearchDto dto) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/combine/memberList", BeanUtil.beanToMap(dto, false, false));
return dskOpenApiUtil.responsePage(map);
} }
public R groupMemberCount(JskCombineSearchDto dto) { public R groupMemberCount(JskCombineSearchDto dto) {
......
...@@ -158,7 +158,9 @@ public class ExportService { ...@@ -158,7 +158,9 @@ public class ExportService {
Map<String, Object> dataMap = CommonUtils.assertAsMap(obj); Map<String, Object> dataMap = CommonUtils.assertAsMap(obj);
vo.setId(i++); vo.setId(i++);
vo.setCompanyName(MapUtil.getStr(dataMap, "companyName")); vo.setCompanyName(MapUtil.getStr(dataMap, "companyName"));
if (null!=pageDto.getKeys()){
vo.setCompanyName(MapUtil.getStr(dataMap, "companyName"));
}
StringBuilder domicile = new StringBuilder(); StringBuilder domicile = new StringBuilder();
if (null != dataMap.get("province")) { if (null != dataMap.get("province")) {
domicile.append(MapUtil.getStr(dataMap,"province")); domicile.append(MapUtil.getStr(dataMap,"province"));
...@@ -179,7 +181,7 @@ public class ExportService { ...@@ -179,7 +181,7 @@ public class ExportService {
//供应商 //供应商
vo.setSupplierCount(MapUtil.getInt(dataMap, "supplierCount")); vo.setSupplierCount(MapUtil.getInt(dataMap, "supplierCount"));
//债卷余额 //债卷余额
vo.setCreditBalance(MapUtil.getDouble(dataMap, "creditBalance")); vo.setCreditBalance(MapUtil.getDouble(dataMap, "bondBalance"));
//主体评级 //主体评级
vo.setBratingSubjectLevel(MapUtil.getStr(dataMap, "bratingSubjectLevel")); vo.setBratingSubjectLevel(MapUtil.getStr(dataMap, "bratingSubjectLevel"));
//行政级别 //行政级别
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="handleCancel()">取消</el-button> <el-button @click="handleCancel()">取消</el-button>
<el-button type="primary" @click="handleEXCEL">确认导出</el-button> <el-button type="primary" :loading="loading" @click="handleEXCEL">确认导出</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogExportVisible1" width="348px" append-to-body class="dialogExport1" @close="handleCancel2"> <el-dialog :visible.sync="dialogExportVisible1" width="348px" append-to-body class="dialogExport1" @close="handleCancel2">
...@@ -68,13 +68,15 @@ export default { ...@@ -68,13 +68,15 @@ export default {
exportTableData:[], exportTableData:[],
forData:[], forData:[],
value:'', value:'',
title:this.data.title title:this.data.title,
loading:false,
} }
}, },
watch: { watch: {
'data.exportEXCEL':{ 'data.exportEXCEL':{
handler(newValue, oldValue) { handler(newValue, oldValue) {
if(newValue === true){ if(newValue === true){
this.loading = false;
this.dialogExportVisible=false; this.dialogExportVisible=false;
this.dialogExportVisible1=true; this.dialogExportVisible1=true;
} }
...@@ -91,6 +93,7 @@ export default { ...@@ -91,6 +93,7 @@ export default {
}, },
methods: { methods: {
handleEXCEL(){ handleEXCEL(){
this.loading = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$emit('clickEXCEL',this.value,this.title) this.$emit('clickEXCEL',this.value,this.title)
}) })
......
...@@ -302,8 +302,8 @@ ...@@ -302,8 +302,8 @@
this.isSkeleton = false this.isSkeleton = false
this.tableLoading = false this.tableLoading = false
if(res.code === 200){ if(res.code === 200){
this.tableData = res.data.list this.tableData = res.rows
this.tableDataTotal = res.data.total this.tableDataTotal = res.total
}else { }else {
this.tableData = [] this.tableData = []
} }
...@@ -498,6 +498,10 @@ ...@@ -498,6 +498,10 @@
this.exportData.dialogExportVisible=true; this.exportData.dialogExportVisible=true;
}, },
clickEXCEL(value,title) { clickEXCEL(value,title) {
if(this.tableData.length === 0){
this.$message.error('当前信息列表数据为空,请重新筛选数据');
return
}
if(value > 2000){ if(value > 2000){
return return
} }
......
...@@ -315,6 +315,10 @@ ...@@ -315,6 +315,10 @@
this.exportData.dialogExportVisible=true; this.exportData.dialogExportVisible=true;
}, },
clickEXCEL(value,title) { clickEXCEL(value,title) {
if(this.tableData.length === 0){
this.$message.error('当前信息列表数据为空,请重新筛选数据');
return
}
if(value > 2000){ if(value > 2000){
return return
} }
......
...@@ -291,6 +291,10 @@ ...@@ -291,6 +291,10 @@
this.exportData.dialogExportVisible=true; this.exportData.dialogExportVisible=true;
}, },
clickEXCEL(value,title) { clickEXCEL(value,title) {
if(this.tableData.length === 0){
this.$message.error('当前信息列表数据为空,请重新筛选数据');
return
}
if(value > 2000){ if(value > 2000){
return return
} }
......
...@@ -1001,6 +1001,10 @@ export default { ...@@ -1001,6 +1001,10 @@ export default {
this.exportData.dialogExportVisible=true; this.exportData.dialogExportVisible=true;
}, },
clickEXCEL(value,title) { clickEXCEL(value,title) {
if(this.tableData.length === 0){
this.$message.error('当前信息列表数据为空,请重新筛选数据');
return
}
if(value > 2000){ if(value > 2000){
return return
} }
......
...@@ -3044,6 +3044,10 @@ export default { ...@@ -3044,6 +3044,10 @@ export default {
this.exportData.dialogExportVisible=true; this.exportData.dialogExportVisible=true;
}, },
clickEXCEL(value,title) { clickEXCEL(value,title) {
if(this.tableData.length === 0){
this.$message.error('当前信息列表数据为空,请重新筛选数据');
return
}
if(value > 2000){ if(value > 2000){
return return
} }
......
...@@ -848,6 +848,10 @@ export default { ...@@ -848,6 +848,10 @@ export default {
this.exportData.dialogExportVisible=true; this.exportData.dialogExportVisible=true;
}, },
clickEXCEL(value,title) { clickEXCEL(value,title) {
if(this.tableData.length === 0){
this.$message.error('当前信息列表数据为空,请重新筛选数据');
return
}
if(value > 2000){ if(value > 2000){
return return
} }
......
...@@ -686,6 +686,10 @@ export default { ...@@ -686,6 +686,10 @@ export default {
this.exportData.dialogExportVisible=true; this.exportData.dialogExportVisible=true;
}, },
clickEXCEL(value,title) { clickEXCEL(value,title) {
if(this.tableData.length === 0){
this.$message.error('当前信息列表数据为空,请重新筛选数据');
return
}
if(value > 2000){ if(value > 2000){
return return
} }
......
...@@ -61,7 +61,7 @@ public interface ISysConfigService { ...@@ -61,7 +61,7 @@ public interface ISysConfigService {
* @param config 参数配置信息 * @param config 参数配置信息
* @return 结果 * @return 结果
*/ */
String insertTenantConfig(SysConfig config); void insertTenantConfig(SysConfig config);
/** /**
* 修改参数配置 * 修改参数配置
......
...@@ -31,6 +31,7 @@ import com.dsk.system.domain.SysTenant; ...@@ -31,6 +31,7 @@ import com.dsk.system.domain.SysTenant;
import com.dsk.system.mapper.SysConfigMapper; import com.dsk.system.mapper.SysConfigMapper;
import com.dsk.system.mapper.SysTenantMapper; import com.dsk.system.mapper.SysTenantMapper;
import com.dsk.system.service.ISysConfigService; import com.dsk.system.service.ISysConfigService;
import jodd.bean.BeanException;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.CachePut;
...@@ -150,24 +151,33 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService { ...@@ -150,24 +151,33 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
* @return 结果 * @return 结果
*/ */
@Override @Override
public String insertTenantConfig(SysConfig config) { public void insertTenantConfig(SysConfig config) {
List<SysConfig> list = new ArrayList<>(); //重复验证
SysConfig bean = new SysConfig(); boolean exists = baseMapper.exists(Wrappers.<SysConfig>lambdaQuery().eq(SysConfig::getConfigKey, config.getConfigKey()));
BeanUtil.copyProperties(config, bean); if(exists){
bean.setTenantId(TenantConstants.DEFAULT_TENANT_ID); throw new BeanException("当前配置键已存在!");
}
List<SysConfig> list = new ArrayList<>();
SysConfig admin = new SysConfig();
BeanUtil.copyProperties(config, admin);
admin.setTenantId(TenantConstants.DEFAULT_TENANT_ID);
list.add(admin);
List<SysTenant> sysTenants = tenantMapper.selectList(); List<SysTenant> sysTenants = tenantMapper.selectList();
if (!CollectionUtils.isEmpty(sysTenants)) {
if (CollectionUtils.isEmpty(sysTenants)) { for (SysTenant sysTenant : sysTenants) {
SysConfig bean = new SysConfig();
BeanUtil.copyProperties(config, bean);
bean.setTenantId(sysTenant.getTenantId());
list.add(bean);
}
} }
int row = baseMapper.insert(config); boolean b = baseMapper.insertBatch(list);
if (row > 0) { if (!b) {
return config.getConfigValue(); throw new ServiceException("操作失败");
} }
throw new ServiceException("操作失败");
} }
/** /**
...@@ -300,7 +310,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService { ...@@ -300,7 +310,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
public List<SysConfig> queryListByKey(String keyName) { public List<SysConfig> queryListByKey(String keyName) {
LambdaQueryWrapper<SysConfig> dsk = new LambdaQueryWrapper<SysConfig>().likeRight(SysConfig::getConfigKey, keyName); LambdaQueryWrapper<SysConfig> dsk = new LambdaQueryWrapper<SysConfig>().likeRight(SysConfig::getConfigKey, keyName);
return TenantHelper.ignore(()->baseMapper.selectList(dsk)); return TenantHelper.ignore(() -> baseMapper.selectList(dsk));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment