|
@@ -720,7 +720,7 @@ public class WbsSynchronousServiceImpl {
|
|
|
//没有选择未填报,但是表单查不到数据,表示这个节点有问题
|
|
|
if (i == 0 && !contractRanges.contains(WbsSyncTypeEnum.NOT_FILLED_IN.code)) {
|
|
|
errorMsg.append(editContractNode.getNodeName() + "(" + editContractNode.getPKeyId() + ")").append("未填报;");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
if (contractRanges.contains(WbsSyncTypeEnum.ALREADY_FILLED_IN_NOT_REPORTED.code) && (submit == null || submit == 0)) {
|
|
|
//已填报-未上报 102
|
|
|
isSync = true;
|
|
@@ -767,7 +767,7 @@ public class WbsSynchronousServiceImpl {
|
|
|
if (collect.contains(2) || collect.contains(3) || collect.contains(5)) {
|
|
|
if (collect.contains(2) && (templateNode.getHtmlUrl() == null || templateNode.getInitTableName() == null || templateNode.getExcelId() == null)) {
|
|
|
errorMsg.append(editContractNode.getNodeName() + "(" + editContractNode.getPKeyId() + ")").append("未配置清表;");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
editContractNode.setExcelId(templateNode.getExcelId());
|
|
|
editContractNode.setInitTableName(templateNode.getInitTableName());
|
|
|
editContractNode.setHtmlUrl(templateNode.getHtmlUrl());
|
|
@@ -847,12 +847,12 @@ public class WbsSynchronousServiceImpl {
|
|
|
wbsTreeContractExtend.setSyncTime(DateTime.now());
|
|
|
wbsTreeContractExtend.setAncestors(f.getAncestorsPId());
|
|
|
//施工
|
|
|
- if(Arrays.asList("1", "2", "3").contains(f.getTableOwner())){
|
|
|
+ if (Arrays.asList("1", "2", "3").contains(f.getTableOwner())) {
|
|
|
//
|
|
|
wbsTreeContractExtend.setType(1);
|
|
|
}
|
|
|
//监理
|
|
|
- if(Arrays.asList("4", "5", "6").contains(f.getTableOwner())){
|
|
|
+ if (Arrays.asList("4", "5", "6").contains(f.getTableOwner())) {
|
|
|
wbsTreeContractExtend.setType(2);
|
|
|
}
|
|
|
wbsTreeContractExtends.add(wbsTreeContractExtend);
|
|
@@ -870,12 +870,12 @@ public class WbsSynchronousServiceImpl {
|
|
|
wbsTreeContractExtend.setSyncTime(DateTime.now());
|
|
|
wbsTreeContractExtend.setAncestors(f.getAncestorsPId());
|
|
|
//施工
|
|
|
- if(Arrays.asList("1", "2", "3").contains(f.getTableOwner())){
|
|
|
+ if (Arrays.asList("1", "2", "3").contains(f.getTableOwner())) {
|
|
|
//
|
|
|
wbsTreeContractExtend.setType(1);
|
|
|
}
|
|
|
//监理
|
|
|
- if(Arrays.asList("4", "5", "6").contains(f.getTableOwner())){
|
|
|
+ if (Arrays.asList("4", "5", "6").contains(f.getTableOwner())) {
|
|
|
wbsTreeContractExtend.setType(2);
|
|
|
}
|
|
|
wbsTreeContractExtends.add(wbsTreeContractExtend);
|
|
@@ -934,7 +934,7 @@ public class WbsSynchronousServiceImpl {
|
|
|
System.err.println(errorMsg);
|
|
|
|
|
|
//添加记录
|
|
|
- if(CollectionUtil.isNotEmpty(wbsTreeContractExtends)){
|
|
|
+ if (CollectionUtil.isNotEmpty(wbsTreeContractExtends)) {
|
|
|
wbsTreeContractExtendService.saveOrUpdateBatch(wbsTreeContractExtends);
|
|
|
}
|
|
|
synchronousRecordMapper.update(null, Wrappers.<WbsTreeSynchronousRecord>lambdaUpdate()
|
|
@@ -1199,6 +1199,9 @@ public class WbsSynchronousServiceImpl {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ if (CollectionUtil.isEmpty(tempPKeyIds)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
//源项目电签和默认值信息
|
|
|
List<TextdictInfo> tempTextDictInfo = textdictInfoMapper.selectList(Wrappers.<TextdictInfo>lambdaQuery()
|
|
|
.eq(TextdictInfo::getProjectId, templateId)
|
|
@@ -1207,7 +1210,7 @@ public class WbsSynchronousServiceImpl {
|
|
|
//当前值同步默认值
|
|
|
.in(TextdictInfo::getType, 2, 4, 6));
|
|
|
if (CollectionUtil.isEmpty(tempTextDictInfo)) {
|
|
|
- throw new ServiceException("源数据无电签及默认值配置");
|
|
|
+ return;
|
|
|
}
|
|
|
Map<Integer, List<TextdictInfo>> tempTextDictInfoMap = tempTextDictInfo.stream().collect(Collectors.groupingBy(TextdictInfo::getType));
|
|
|
|
|
@@ -1258,13 +1261,10 @@ public class WbsSynchronousServiceImpl {
|
|
|
//调用其他类使事务生效
|
|
|
wbsSynchronousEViSaService.updateTextDictInfo(projectId, editPrivateIds, addData);
|
|
|
}
|
|
|
- } else {
|
|
|
- throw new ServiceException("模板为公共项目,无法同步电签");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 获取指定节点的所有最新节点
|
|
|
*/
|