微调
This commit is contained in:
@@ -179,6 +179,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean updateCustomReportTemplate(ReportTemplateParam.UpdateReportTemplateParam reportTemplateParam) {
|
public boolean updateCustomReportTemplate(ReportTemplateParam.UpdateReportTemplateParam reportTemplateParam) {
|
||||||
checkName(reportTemplateParam, true);
|
checkName(reportTemplateParam, true);
|
||||||
MultipartFile fileContent = reportTemplateParam.getFileContent();
|
MultipartFile fileContent = reportTemplateParam.getFileContent();
|
||||||
@@ -200,6 +201,20 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
excelRptTemp.setUpdateTime(LocalDateTime.now());
|
excelRptTemp.setUpdateTime(LocalDateTime.now());
|
||||||
excelRptTempMapper.updateById(excelRptTemp);
|
excelRptTempMapper.updateById(excelRptTemp);
|
||||||
|
|
||||||
|
//多模板绑定部门进行修改
|
||||||
|
//1、根据模板主键删除绑定的部门数据
|
||||||
|
LambdaQueryWrapper<SysDeptTemp> lambdaQuery = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQuery.eq(SysDeptTemp::getTempId, excelRptTemp.getId());
|
||||||
|
deptTempMapper.delete(lambdaQuery);
|
||||||
|
//2、新增部门
|
||||||
|
String[] deptIdArr = reportTemplateParam.getValueTitle().split(StrUtil.COMMA);
|
||||||
|
for (String bindDeptId : deptIdArr) {
|
||||||
|
SysDeptTemp sysDeptTemp = new SysDeptTemp();
|
||||||
|
sysDeptTemp.setTempId(excelRptTemp.getId());
|
||||||
|
sysDeptTemp.setDeptId(bindDeptId);
|
||||||
|
sysDeptTemp.setActivation(DataStateEnum.ENABLE.getCode());
|
||||||
|
deptTempMapper.insert(sysDeptTemp);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -809,6 +824,9 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* map key转大写
|
||||||
|
*/
|
||||||
public static <V> Map<String, V> convertKeysToUpperCase(Map<String, V> originalMap) {
|
public static <V> Map<String, V> convertKeysToUpperCase(Map<String, V> originalMap) {
|
||||||
Map<String, V> newMap = new HashMap<>();
|
Map<String, V> newMap = new HashMap<>();
|
||||||
for (Map.Entry<String, V> entry : originalMap.entrySet()) {
|
for (Map.Entry<String, V> entry : originalMap.entrySet()) {
|
||||||
@@ -906,8 +924,7 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
//处理台账信息
|
//处理台账信息
|
||||||
Map<String, String> finalTerminalMap;
|
Map<String, String> finalTerminalMap;
|
||||||
if (CollUtil.isNotEmpty(terminalList)) {
|
if (CollUtil.isNotEmpty(terminalList)) {
|
||||||
finalTerminalMap = commTerminalGeneralClient.getCustomDetailByLineId(reportSearchParam.getLineId()).getData();
|
finalTerminalMap = convertKeysToUpperCase(commTerminalGeneralClient.getCustomDetailByLineId(reportSearchParam.getLineId()).getData());
|
||||||
convertKeysToUpperCase(finalTerminalMap);
|
|
||||||
}else {
|
}else {
|
||||||
finalTerminalMap = new HashMap<>();
|
finalTerminalMap = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user