|
@@ -341,6 +341,18 @@ public class BillManFacade {
|
|
|
billSaveVO.setCondition(condition);
|
|
|
}
|
|
|
|
|
|
+ //删除旧的关系
|
|
|
+ if (billSaveVO.getRelationId() != null) {
|
|
|
+ RelationIdVO relationIdVO = new RelationIdVO();
|
|
|
+ relationIdVO.setRelationId(billSaveVO.getRelationId());
|
|
|
+ BillSaveVO oldBillRecord = getRecordByRelationId(relationIdVO);
|
|
|
+ if (oldBillRecord != null
|
|
|
+ && oldBillRecord.getRelationId().equals(billSaveVO.getRelationId())
|
|
|
+ && !oldBillRecord.getCondition().getName().equals(condition.getName())) {
|
|
|
+ baseNodeRepository.deleteRelationStatusById(billSaveVO.getRelationId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//条件明细节点更新
|
|
|
//数值类型可新增或更新条件明细节点,文本类型不允许新增或修改
|
|
|
if (billSaveVO.getRuleType().equals(1)) {
|