1.如果外销合同变更单没有回签确认,合同不允许下推订舱
This commit is contained in:
25655 2025-02-27 18:06:09 +08:00
parent b44cf36cbb
commit 2af66f46a8

View File

@ -9,6 +9,7 @@ import kd.bos.entity.ExtendedDataEntity;
import kd.bos.entity.botp.plugin.AbstractConvertPlugIn;
import kd.bos.entity.botp.plugin.args.AfterBuildDrawFilterEventArgs;
import kd.bos.entity.botp.plugin.args.AfterConvertEventArgs;
import kd.bos.exception.KDBizException;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
@ -49,7 +50,18 @@ public class ShippingDetialToStoraConvert extends AbstractConvertPlugIn
ExtendedDataEntity[] entities = e.getTargetExtDataEntitySet().FindByEntityKey(name);
for (ExtendedDataEntity findByEntityKey : findByEntityKeys) {
DynamicObject dataEntity = findByEntityKey.getDataEntity();
Long yemCorebillid = dataEntity.getLong("yem_corebillid");
DynamicObject[] yem_es_xsalesorder = BusinessDataServiceHelper.load("yem_es_xsalesorder", "id,billno,yem_masterid,yem_signconfirmstatus", new QFilter[]{new QFilter("yem_masterid", QCP.equals, yemCorebillid)});
if (yem_es_xsalesorder.length>0){
for (DynamicObject object : yem_es_xsalesorder) {
String yemSignconfirmstatus = object.getString("yem_signconfirmstatus");
if (!yemSignconfirmstatus.equals("A")) {
// e.setCustFilterDesc("外销合同存在变更单,变更单未回签!!!");
// throw new RuntimeException("外销合同存在变更单,变更单未回签!!!");
throw new KDBizException("外销合同存在变更单,变更单未回签!!!");
}
}
}
DynamicObjectCollection materialinfo = dataEntity.getDynamicObjectCollection("yem_es_materialinfo");
Set<String> set = new HashSet<>();
for (DynamicObject dynamicObject : materialinfo) {