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