|
@@ -282,7 +282,7 @@ public class ContractInventoryFormServiceImpl extends BaseServiceImpl<ContractIn
|
|
|
InventoryFormDetailVO vo = baseMapper.getById(id);
|
|
|
//如果是清单节点就直接返回
|
|
|
if (vo.getIsFormNode() == 1){
|
|
|
- if (this.nodeIsChange(id)){
|
|
|
+ if (this.nodeIsChange(vo)){
|
|
|
vo.setCiteStatus(1);
|
|
|
}else {
|
|
|
vo.setCiteStatus(0);
|
|
@@ -336,6 +336,11 @@ public class ContractInventoryFormServiceImpl extends BaseServiceImpl<ContractIn
|
|
|
throw new ServiceException("增补清单必须为清单节点");
|
|
|
}
|
|
|
}
|
|
|
+ if (form.getIsFormNode() == 1) {
|
|
|
+ if (form.getBidPrice() == null || form.getContractTotal() == null) {
|
|
|
+ throw new ServiceException("清单节点必须填写:中标单价和合同数量");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (StringUtils.isBlank(form.getFormNumber())){
|
|
|
throw new ServiceException("清单编号不能为空");
|
|
|
}
|
|
@@ -393,7 +398,7 @@ public class ContractInventoryFormServiceImpl extends BaseServiceImpl<ContractIn
|
|
|
//相同则先判断修改后节点类型是否为清单类型
|
|
|
if (form.getIsFormNode().equals(1)){
|
|
|
//判断是否已经被分解或者被变更,包括零号变更
|
|
|
- Boolean isChange = this.nodeIsChange(nodeInfo.getId());
|
|
|
+ Boolean isChange = this.nodeIsChange(nodeInfo);
|
|
|
//发生过变更,就去判断单价和数量。没被变更或者修改过,就不去判断单价和数量是否发生改变
|
|
|
if (isChange) {
|
|
|
//判断单价和数量是否发生改变
|
|
@@ -423,7 +428,7 @@ public class ContractInventoryFormServiceImpl extends BaseServiceImpl<ContractIn
|
|
|
}
|
|
|
}else {
|
|
|
//不为清单节点:判断当前节点是否被分解或者被变更,包括零号变更
|
|
|
- Boolean isChange = this.nodeIsChange(nodeInfo.getId());
|
|
|
+ Boolean isChange = this.nodeIsChange(nodeInfo);
|
|
|
if (isChange){
|
|
|
throw new ServiceException("当前节点已被分解或变更,不能修改为非清单节点");
|
|
|
}
|
|
@@ -514,17 +519,17 @@ public class ContractInventoryFormServiceImpl extends BaseServiceImpl<ContractIn
|
|
|
/**
|
|
|
* 判断当前节点是否已经分解或变更过,变更过返回true
|
|
|
*/
|
|
|
- private Boolean nodeIsChange(Long id) {
|
|
|
-// if (form.getBuildChangeTotal() != null) {
|
|
|
-// return true;
|
|
|
-// }
|
|
|
+ private Boolean nodeIsChange(ContractInventoryForm form) {
|
|
|
+ if (form.getBuildChangeTotal() != null) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
long count = formMeterService.count(new LambdaQueryWrapper<InventoryFormMeter>()
|
|
|
- .eq(InventoryFormMeter::getContractFormId, id));
|
|
|
+ .eq(InventoryFormMeter::getContractFormId, form.getId()));
|
|
|
if (count > 0) {
|
|
|
return true;
|
|
|
}
|
|
|
long count1 = tokenInventoryService.count(new LambdaQueryWrapper<ChangeTokenInventory>()
|
|
|
- .eq(ChangeTokenInventory::getContractFormId, id));
|
|
|
+ .eq(ChangeTokenInventory::getContractFormId, form.getId()));
|
|
|
if (count1 > 0) {
|
|
|
return true;
|
|
|
}
|