This commit is contained in:
linfso 2025-03-14 16:58:40 +08:00
parent f606e979b8
commit cd3dbff427

View File

@ -221,18 +221,32 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
String newDataStr=emisWaybillAjustApply.getJsonData();
JSONObject jObj = JSONObject.parseObject(newDataStr);
// JSONObject jobjOldValue=jObj.getJSONObject("oldValue");
JSONObject jobjOldValue=jObj.getJSONObject("oldValue");
JSONObject jobjNewValue=jObj.getJSONObject("newValue");
String oldPaymentType = jobjOldValue.getString("paymentType");
String oldCustNo = jobjOldValue.getString("custNo");
String oldPayee=emisSettleSubBill.getPayee();
String oldSalesmen=emisSettleSubBill.getSalesmen();
String newPaymentType = jobjNewValue.getString("paymentType");
String newCustNo = jobjNewValue.getString("custNo");
String newPayee=jobjNewValue.getString("payee");
String newSalesmen=jobjNewValue.getString("salesmen");
if(!oldPayee.equals(newPayee) || !oldSalesmen.equals(newSalesmen) ){
if( !oldPayee.equals(newPayee) || !oldSalesmen.equals(newSalesmen) ){
throw new EmisBizError(EmisBizErrorType.FAIL,"已定制账单,销售联系/回款联系人发生改变,请从原账单移除,单号:"+emisSettleSubBill.getBillNo());
}
// bug: 1412 支付方式发生改变,月结客户发生改变,都需要从账单中移除
if( !oldPaymentType.equals(newPaymentType)){
throw new EmisBizError(EmisBizErrorType.FAIL,"已定制账单,支付方式发生改变,请从原账单移除,单号:"+emisSettleSubBill.getBillNo());
}
if( !oldCustNo.equals(newCustNo)){
throw new EmisBizError(EmisBizErrorType.FAIL,"已定制账单,客户发生改变,请从原账单移除,单号:"+emisSettleSubBill.getBillNo());
}
}
}