|
@@ -1188,13 +1188,15 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
|
MeterTreeContractVO2 vo2 = iterator.next();
|
|
|
//先去获取对应质检的相关数据
|
|
|
List<Long> linkWbsIds = Func.toLongList(vo2.getLinkWbs());
|
|
|
- Boolean isApp = false;
|
|
|
+ Boolean isApp = true;
|
|
|
Integer strength = null;
|
|
|
for (Long id : linkWbsIds) {
|
|
|
MeterLinkWbsInfoVO vo = wbsInfoVOMap.get(id);
|
|
|
+ if (vo == null){
|
|
|
+ throw new ServiceException("未找到计量单元:"+vo2.getNodeName()+"的关联WBS节点id"+id+",的节点信息");
|
|
|
+ }
|
|
|
if (vo.getAppStatus() != 2) {
|
|
|
- isApp = true;
|
|
|
- break;
|
|
|
+ isApp = false;
|
|
|
}
|
|
|
if (vo.getMaxType() == 12) {
|
|
|
strength = 28;
|
|
@@ -1213,7 +1215,7 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
|
}
|
|
|
//根据附件设置强度设置强度值
|
|
|
if (strength == 28){
|
|
|
- if (isApp){
|
|
|
+ if (!isApp){
|
|
|
iterator.remove();
|
|
|
continue;
|
|
|
}else {
|
|
@@ -1225,7 +1227,7 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
|
}else {
|
|
|
//不为混凝土节点
|
|
|
//审批不通过,移除,审批通过则设置为后台比例
|
|
|
- if (isApp) {
|
|
|
+ if (!isApp) {
|
|
|
iterator.remove();
|
|
|
continue;
|
|
|
}else {
|
|
@@ -1236,7 +1238,7 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
|
str.append(vo2.getLinkWbs()+",");
|
|
|
str2.append(vo2.getId()+",");
|
|
|
str3.append(vo2.getLinkForm()+",");
|
|
|
-
|
|
|
+ vo2.setIsApp(isApp);
|
|
|
}
|
|
|
if (voList.size() == 0 || StringUtils.isBlank(str.toString()) || StringUtils.isBlank(str2.toString()) || StringUtils.isBlank(str3.toString())){
|
|
|
throw new ServiceException("当前没有符合要求的合同计量单元-2");
|
|
@@ -1348,20 +1350,22 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
|
for (Long aLong : longs) {
|
|
|
//new 中间计量申请的附件,通过query数据填写信息
|
|
|
WbsLinkQueryInfoVO vo = wbsMap.get(aLong);
|
|
|
- if (vo == null || StringUtils.isBlank(vo.getEVisaPdf())){
|
|
|
- throw new ServiceException("合同计量单元("+vo2.getNodeName()+")所关联的WBS节点id:"+aLong+"未找到电签PDF");
|
|
|
+ if (vo2.getIsApp()){
|
|
|
+ if (vo == null || StringUtils.isBlank(vo.getEVisaPdf())) {
|
|
|
+ throw new ServiceException("合同计量单元(" + vo2.getNodeName() + ")所关联的WBS节点id:" + aLong + "未找到电签PDF");
|
|
|
+ }
|
|
|
+ AttachmentForm form = new AttachmentForm();
|
|
|
+ form.setProjectId(projectId);
|
|
|
+ form.setContractId(contractId);
|
|
|
+ form.setMasterId(middleId);
|
|
|
+ form.setFileName(vo.getName());
|
|
|
+ form.setFileUrl(vo.getEVisaPdf());
|
|
|
+ form.setFilePdfUrl(vo.getEVisaPdf());
|
|
|
+ form.setFileType(1);
|
|
|
+ form.setSelectId(vo.getId());
|
|
|
+ //添加到附件表
|
|
|
+ attachmentFormAdd.add(form);
|
|
|
}
|
|
|
- AttachmentForm form = new AttachmentForm();
|
|
|
- form.setProjectId(projectId);
|
|
|
- form.setContractId(contractId);
|
|
|
- form.setMasterId(middleId);
|
|
|
- form.setFileName(vo.getName());
|
|
|
- form.setFileUrl(vo.getEVisaPdf());
|
|
|
- form.setFilePdfUrl(vo.getEVisaPdf());
|
|
|
- form.setFileType(1);
|
|
|
- form.setSelectId(vo.getId());
|
|
|
- //添加到附件表
|
|
|
- attachmentFormAdd.add(form);
|
|
|
}
|
|
|
//设置中间计量申请属性
|
|
|
apply.setProjectId(projectId);
|