|
|
@@ -5650,13 +5650,6 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
} else {
|
|
|
item.setNextAssignee(nextAssignee);
|
|
|
}
|
|
|
- //被服务单位处理
|
|
|
- String servedUnitName = item.getServedUnitName();
|
|
|
- CwWorkClientBaseDTO cwWorkClientBaseDTO = cwWorkClientBaseMapper.queryByName(servedUnitName);
|
|
|
- if (cwWorkClientBaseDTO == null) {
|
|
|
- result.add("第" + (actualIndex) + "条,报告名为" + item.getReportName() + "的数据存在以下问题:被服务单位未找到");
|
|
|
- continue;
|
|
|
- }
|
|
|
//现场负责人若没填写,则默认为上传人
|
|
|
if (StringUtils.isBlank(item.getRealCreate())) {
|
|
|
item.setRealCreate(userDTO.getId());
|
|
|
@@ -5683,8 +5676,8 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
String realHeader = item.getRealHeader();
|
|
|
|
|
|
if (
|
|
|
- !projectMasterId.equals(signatureAnnotator1)
|
|
|
- && !projectMasterId.equals(signatureAnnotator2)
|
|
|
+ !Objects.equals(projectMasterId, signatureAnnotator1)
|
|
|
+ && !Objects.equals(projectMasterId, signatureAnnotator2)
|
|
|
&& !Objects.equals(realHeader, signatureAnnotator1)
|
|
|
&& !Objects.equals(realHeader, signatureAnnotator2)
|
|
|
) {
|
|
|
@@ -5716,15 +5709,36 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
String projectMasterId = project.getProjectMasterId();
|
|
|
String realHeader = project.getRealHeader();
|
|
|
if (
|
|
|
- !projectMasterId.equals(signatureAnnotator1)
|
|
|
- && !projectMasterId.equals(signatureAnnotator2)
|
|
|
- && !realHeader.equals(signatureAnnotator1)
|
|
|
- && !realHeader.equals(signatureAnnotator2)
|
|
|
+ !Objects.equals(projectMasterId, signatureAnnotator1)
|
|
|
+ && !Objects.equals(projectMasterId, signatureAnnotator2)
|
|
|
+ && !Objects.equals(realHeader, signatureAnnotator1)
|
|
|
+ && !Objects.equals(realHeader, signatureAnnotator2)
|
|
|
) {
|
|
|
result.add("第" + (actualIndex) + "条,报告名为" + item.getReportName() + "的数据存在以下问题:签字注师1和签字注师2至少有一个与项目的项目经理一致");
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
+ //被服务单位处理
|
|
|
+ String servedUnitName = item.getServedUnitName();
|
|
|
+ String servedUnitId= "";
|
|
|
+ List<CwWorkClientBase> cwWorkClientBases = cwWorkClientBaseMapper.queryByProjectId(item.getProjectId());
|
|
|
+ if (cwWorkClientBases == null && cwWorkClientBases.isEmpty()) {
|
|
|
+ result.add("第" + (actualIndex) + "条,报告名为" + item.getReportName() + "的数据存在以下问题:被服务单位未找到");
|
|
|
+ continue;
|
|
|
+ }else{
|
|
|
+ boolean servedUnitFlag = false;
|
|
|
+ for (CwWorkClientBase clientBase : cwWorkClientBases) {
|
|
|
+ if (clientBase != null && clientBase.getName() != null && clientBase.getName().equals(servedUnitName)) {
|
|
|
+ servedUnitId = clientBase.getId();
|
|
|
+ servedUnitFlag = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!servedUnitFlag){
|
|
|
+ result.add("第" + (actualIndex) + "条,报告名为" + item.getReportName() + "的数据存在以下问题:被服务单位未找到");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
CwProjectReportData cwProjectReportData = new CwProjectReportData();
|
|
|
BeanUtils.copyProperties(item, cwProjectReportData);
|
|
|
@@ -5737,11 +5751,10 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
cwProjectReportData.setBusinessType(item.getBusinessType());
|
|
|
cwProjectReportData.setAuditBusinessType(item.getAuditBusinessType());
|
|
|
cwProjectReportData.setSecurityBusiness(item.getSecurityBusiness());
|
|
|
- cwProjectReportData.setServedUnitId(cwWorkClientBaseDTO.getId());
|
|
|
+ cwProjectReportData.setServedUnitId(servedUnitId);
|
|
|
cwProjectReportData.setTakeNumberType(item.getTakeNumberType());
|
|
|
cwProjectReportData.setProjectId(item.getProjectId());
|
|
|
cwProjectReportData.setIsBatchImport("1");
|
|
|
-
|
|
|
//下一节点审核人
|
|
|
cwProjectReportData.setReviewBy(item.getNextAssignee());
|
|
|
//保存
|