1.装箱单效验
2.发运明细审核效验
This commit is contained in:
ljw 2024-10-31 20:48:07 +08:00
parent 21316e6fe9
commit ce36ea9758
2 changed files with 317 additions and 272 deletions

View File

@ -150,13 +150,23 @@ public class EncaseMentEdit extends AbstractBillPlugIn implements Plugin, Before
deleteEntryRow(); deleteEntryRow();
break; break;
case "statusconvertpjqr": case "statusconvertpjqr":
String yemWeightconfirmed = (String) this.getModel().getValue("yem_weightconfirmed");
if (!yemWeightconfirmed.isEmpty()) {
lockAccessoriesPackaging(false); lockAccessoriesPackaging(false);
} else {
this.getView().showMessage("锁定重量是否确认为空!!!");
}
break; break;
case "statusconvertpjfqr": case "statusconvertpjfqr":
lockAccessoriesPackaging(true); lockAccessoriesPackaging(true);
break; break;
case "statusconvertqrzj": case "statusconvertqrzj":
String yemWeightconfirmeds = (String) this.getModel().getValue("yem_weightconfirmed");
if (!yemWeightconfirmeds.isEmpty()) {
lockRemovable(false); lockRemovable(false);
} else {
this.getView().showMessage("锁定重量是否确认为空!!!");
}
break; break;
case "statusconvertfqrzj": case "statusconvertfqrzj":
lockRemovable(true); lockRemovable(true);
@ -175,7 +185,8 @@ public class EncaseMentEdit extends AbstractBillPlugIn implements Plugin, Before
IDataModel model = this.getModel(); IDataModel model = this.getModel();
DynamicObject dataEntity = model.getDataEntity(true); DynamicObject dataEntity = model.getDataEntity(true);
if ("statusconvertpjqr".equals(operateKey) || "statusconvertqrzj".equals(operateKey)) { if ("statusconvertpjqr".equals(operateKey) || "statusconvertqrzj".equals(operateKey)) {
String yemWeightconfirmed = (String) this.getModel().getValue("yem_weightconfirmed");
if (!yemWeightconfirmed.isEmpty()) {
DynamicObjectCollection collection = dataEntity.getDynamicObjectCollection("yem_im_packinginfor_pi"); DynamicObjectCollection collection = dataEntity.getDynamicObjectCollection("yem_im_packinginfor_pi");
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (DynamicObject dynamicObject : collection) { for (DynamicObject dynamicObject : collection) {
@ -268,6 +279,9 @@ public class EncaseMentEdit extends AbstractBillPlugIn implements Plugin, Before
} else { } else {
doConfirm(operateKey); doConfirm(operateKey);
} }
} else {
this.getView().showMessage("锁定重量是否确认为空!!!");
}
} }
IFormView view = this.getView(); IFormView view = this.getView();
@ -344,19 +358,24 @@ public class EncaseMentEdit extends AbstractBillPlugIn implements Plugin, Before
SaveServiceHelper.save(new DynamicObject[]{dynamicObject}); SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
long currentUserId = YEM.getCurrentUserId(); long currentUserId = YEM.getCurrentUserId();
DynamicObject user = BusinessDataServiceHelper.loadSingle(currentUserId, "bos_user"); DynamicObject user = BusinessDataServiceHelper.loadSingle(currentUserId, "bos_user");
String yemWeightconfirmed = (String) this.getModel().getValue("yem_weightconfirmed");
if (!yemWeightconfirmed.isEmpty()) {
if ("statusconvertpjqr".equals(operateKey)) { if ("statusconvertpjqr".equals(operateKey)) {
dataEntity.set("yem_completionstatuspj", "B"); dataEntity.set("yem_completionstatuspj", "B");
dataEntity.set("yem_affirmmanpj", user); dataEntity.set("yem_affirmmanpj", user);
dataEntity.set("yem_affirmdatepj", new Date()); dataEntity.set("yem_affirmdatepj", new Date());
} }
if ("statusconvertqrzj".equals(operateKey)) { if ("statusconvertqrzj".equals(operateKey)) {
dataEntity.set("yem_completionstatuszj", "B"); dataEntity.set("yem_completionstatuszj", "B");
dataEntity.set("yem_affirmmanzj", user); dataEntity.set("yem_affirmmanzj", user);
dataEntity.set("yem_affirmdatezj", new Date()); dataEntity.set("yem_affirmdatezj", new Date());
} }
} else {
this.getView().showMessage("锁定重量是否确认为空!!!");
}
SaveServiceHelper.save(new DynamicObject[]{dataEntity}); SaveServiceHelper.save(new DynamicObject[]{dataEntity});
this.getView().invokeOperation("refresh"); this.getView().invokeOperation("refresh");
this.getView().showSuccessNotification("确认完成"); this.getView().showSuccessNotification("确认完成");
@ -413,7 +432,12 @@ public class EncaseMentEdit extends AbstractBillPlugIn implements Plugin, Before
if (MessageBoxResult.Yes.equals(result)) { if (MessageBoxResult.Yes.equals(result)) {
if ("statusconvertpjqr".equals(callBackId) || "statusconvertqrzj".equals(callBackId)) { if ("statusconvertpjqr".equals(callBackId) || "statusconvertqrzj".equals(callBackId)) {
String yemWeightconfirmed = (String) this.getModel().getValue("yem_weightconfirmed");
if (!yemWeightconfirmed.isEmpty()) {
doConfirm(callBackId); doConfirm(callBackId);
} else {
this.getView().showMessage("锁定重量是否确认为空!!!");
}
} }
} }
} }

View File

@ -3,9 +3,11 @@ package com.yem.wm.es.shippingdetails.op;
import com.alibaba.csp.sentinel.util.StringUtil; import com.alibaba.csp.sentinel.util.StringUtil;
import com.yem.wm.es.contractamtlist.util.FunUtil; import com.yem.wm.es.contractamtlist.util.FunUtil;
import com.yem.wm.es.shippingdetails.util.PaymentControlUtil; import com.yem.wm.es.shippingdetails.util.PaymentControlUtil;
import com.yem.wm.es.shippingdetails.validator.ShippingDetailsAuditValidator;
import com.yem.wm.utils.YEM; import com.yem.wm.utils.YEM;
import kd.bos.dataentity.entity.DynamicObject; import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection; import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.entity.ExtendedDataEntity;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn; import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs; import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs; import kd.bos.entity.plugin.PreparePropertysEventArgs;
@ -33,7 +35,7 @@ public class ShippingDetailsAuditOp extends AbstractOperationServicePlugIn {
@Override @Override
public void onAddValidators(AddValidatorsEventArgs e) { public void onAddValidators(AddValidatorsEventArgs e) {
super.onAddValidators(e); super.onAddValidators(e);
// e.addValidator(new ShippingDetailAuditValidator()); // e.addValidator(new ShippingDetailsAuditValidator());
} }
@Override @Override
@ -43,6 +45,25 @@ public class ShippingDetailsAuditOp extends AbstractOperationServicePlugIn {
dataEntitie = BusinessDataServiceHelper.loadSingle(dataEntitie.getPkValue(), dataEntitie.getDynamicObjectType().getName()); dataEntitie = BusinessDataServiceHelper.loadSingle(dataEntitie.getPkValue(), dataEntitie.getDynamicObjectType().getName());
collect(dataEntitie); collect(dataEntitie);
arrearsAmt(dataEntitie); arrearsAmt(dataEntitie);
// if (dataEntitie.getDynamicObjectType().getName().equals("yem_xshippingdetails")) {
// DynamicObjectCollection yemEsSalesorderTotal = dataEntitie.getDynamicObjectCollection("yem_es_salesorder_total");
// if (!yemEsSalesorderTotal.isEmpty()) {
// for (DynamicObject dynamicObject : yemEsSalesorderTotal) {
// BigDecimal yemQtyTl = dynamicObject.getBigDecimal("yem_qty_tl");
// BigDecimal yemAllocateqtyTl = dynamicObject.getBigDecimal("yem_allocateqty_tl");
// int i = dynamicObject.getInt("seq");
// String yemAccesmaterial = dynamicObject.getString("yem_accesmaterial_tl.name");
// boolean yemIsgifitTl = dynamicObject.getBoolean("yem_isgifit_tl");
//
// if (yemQtyTl.compareTo(yemAllocateqtyTl) < 0&&!yemIsgifitTl&&) {
// this.getOperationResult().setSuccess(true);
// this.getOperationResult().setMessage("出运汇总页签,第" + i + "行物料" + yemAccesmaterial + ",已调数量" + yemQtyTl + ",出运数量" + yemAllocateqtyTl + ",不允许审核,请修改调拨后处理!"); // 提示内容
// this.getOperationResult().setShowMessage(true); // 是否显示提示消息
// }
// }
// }
// }
SaveServiceHelper.save(new DynamicObject[]{dataEntitie}); SaveServiceHelper.save(new DynamicObject[]{dataEntitie});
} }
} }