Ver Fonte

同步-同步合同段-异常提示添加pkid

LHB há 3 semanas atrás
pai
commit
1291aaf31a

+ 9 - 9
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsSynchronousServiceImpl.java

@@ -438,7 +438,7 @@ public class WbsSynchronousServiceImpl {
                                 editPrivateNode.setInitTableName(templateNode.getInitTableName());
 
                                 if (StringUtil.isBlank(templateNode.getHtmlUrl())) {
-                                    throw new ServiceException(templateNode.getNodeName() + "HTML文件不存在");
+                                    throw new ServiceException(templateNode.getNodeName()  + "( " + templateNode.getPKeyId() + ")HTML文件不存在");
                                 }
                                 //封装Html路径 根据模板html copy一份到自己项目节点上
                                 String[] split = templateNode.getHtmlUrl().split("/");
@@ -455,7 +455,7 @@ public class WbsSynchronousServiceImpl {
 
                                 if (!file_in.exists() || file_in.length() == 0) {
                                     //如果本地服务器上没有
-                                    throw new ServiceException(templateNode.getNodeName() + "HTML文件不存在");
+                                    throw new ServiceException(templateNode.getNodeName() + "( " + templateNode.getPKeyId() + ")HTML文件不存在");
                                 }
                                 File file_out = ResourceUtil.getFile(htmlUrl);
                                 //查询父级文件夹
@@ -702,27 +702,27 @@ public class WbsSynchronousServiceImpl {
                                             case 1:
                                                 //判断是否已保存
                                                 if(StringUtils.isEmpty(editContractNode.getInitTableName())){
-                                                    throw new ServiceException(wbsTreeContract.getNodeName() + "--实体表不存在");
+                                                    throw new ServiceException(wbsTreeContract.getNodeName() + "( " + wbsTreeContract.getPKeyId() + ")--实体表不存在");
                                                 }
                                                 String isSave = "select count(0) from " + editContractNode.getInitTableName() + " where p_key_id = " + editContractNode.getPKeyId();
                                                 Integer i = jdbcTemplate.queryForObject(isSave, Integer.class);
 
                                                 //判断是否上报审批
-                                                Integer submit = informationQueryMap.get(editContractNode.getPKeyId());
+                                                Integer submit = informationQueryMap.get(editContractNode.getPId());
 
                                                 if (submit == null && contractRanges.contains(WbsSyncTypeEnum.NOT_FILLED_IN.code)) {
                                                     //未填报 101
                                                     isSync = true;
                                                 } else {
                                                     if (i == 0) {
-                                                        throw new ServiceException(editContractNode.getNodeName() + "--表单未查到填报信息");
+                                                        throw new ServiceException(editContractNode.getNodeName()  + "( " + wbsTreeContract.getPKeyId() + ")--表单未查到填报信息");
                                                     }
                                                     if (contractRanges.contains(WbsSyncTypeEnum.ALREADY_FILLED_IN_NOT_REPORTED.code)) {
                                                         //已填报-未上报 102
                                                         isSync = true;
                                                     } else {
                                                         if (submit == null) {
-                                                            throw new ServiceException(wbsTreeContract.getNodeName() + "--下表单未查到上报信息");
+                                                            throw new ServiceException(wbsTreeContract.getNodeName()  + "( " + wbsTreeContract.getPKeyId() + ")--下表单未查到上报信息");
                                                         }
                                                         if (submit == 1 && contractRanges.contains(WbsSyncTypeEnum.PENDING_APPROVAL.code)) {
                                                             //待审批 104
@@ -898,7 +898,7 @@ public class WbsSynchronousServiceImpl {
                 }
                 //如果现在还找不到当前节点的父节点就表示数据有问题
                 if (addPrivateParentNodes.isEmpty()) {
-                    throw new ServiceException(addPrivateNode.getNodeName() + "-找不到父节点");
+                    throw new ServiceException(addPrivateNode.getNodeName()  + "( " + addPrivateNode.getPKeyId() + ")-找不到父节点");
                 }
                 //当前新增节点的父节点
                 WbsTreePrivate parent = addPrivateParentNodes.get(0);
@@ -933,7 +933,7 @@ public class WbsSynchronousServiceImpl {
                             File file_in = ResourceUtil.getFile(tree.getHtmlUrl());
                             if (!file_in.exists() || file_in.length() == 0) {
                                 //如果本地服务器上没有
-                                throw new ServiceException(tree.getNodeName() + "HTML文件不存在");
+                                throw new ServiceException(tree.getNodeName() + "( " + tree.getPKeyId() + ")HTML文件不存在");
                             }
                             File file_out = ResourceUtil.getFile(htmlUrl);
                             //查询父级文件夹
@@ -1072,7 +1072,7 @@ public class WbsSynchronousServiceImpl {
                 //如果现在还找不到当前节点的父节点就表示数据有问题
                 if (addContractParentNodes.isEmpty()) {
                     //TODO
-                    throw new ServiceException(addContractNode.getNodeName() + "-找不到父节点");
+                    throw new ServiceException(addContractNode.getNodeName()  + "( " + addContractNode.getPKeyId() + ")-找不到父节点");
                 }
                 //当前新增节点的父节点
                 WbsTreeContract parent = addContractParentNodes.get(0);