fix:
1.装箱单效验 2.发运明细审核效验
This commit is contained in:
parent
21316e6fe9
commit
ce36ea9758
@ -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("锁定重量是否确认为空!!!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,7 +72,7 @@ public class ShippingDetailsAuditOp extends AbstractOperationServicePlugIn {
|
|||||||
* @description 审核时生成出运汇总分录
|
* @description 审核时生成出运汇总分录
|
||||||
* @author power
|
* @author power
|
||||||
*/
|
*/
|
||||||
public static void collect(DynamicObject dataEntitie) {
|
public static void collect (DynamicObject dataEntitie){
|
||||||
DynamicObjectCollection materialinfos = dataEntitie.getDynamicObjectCollection("yem_es_materialinfo");
|
DynamicObjectCollection materialinfos = dataEntitie.getDynamicObjectCollection("yem_es_materialinfo");
|
||||||
DynamicObjectCollection followcars = dataEntitie.getDynamicObjectCollection("yem_es_salesorder_p");
|
DynamicObjectCollection followcars = dataEntitie.getDynamicObjectCollection("yem_es_salesorder_p");
|
||||||
DynamicObjectCollection collects = dataEntitie.getDynamicObjectCollection("yem_es_salesorder_total");
|
DynamicObjectCollection collects = dataEntitie.getDynamicObjectCollection("yem_es_salesorder_total");
|
||||||
@ -61,7 +82,7 @@ public class ShippingDetailsAuditOp extends AbstractOperationServicePlugIn {
|
|||||||
String businesssort = materialinfo.getString("yem_businesssort");
|
String businesssort = materialinfo.getString("yem_businesssort");
|
||||||
|
|
||||||
boolean yemIfgift = materialinfo.getBoolean("yem_ifgift");
|
boolean yemIfgift = materialinfo.getBoolean("yem_ifgift");
|
||||||
if ("Z".equals(businesssort)&&!yemIfgift) {
|
if ("Z".equals(businesssort) && !yemIfgift) {
|
||||||
DynamicObjectCollection completemachines = materialinfo.getDynamicObjectCollection("yem_es_salesorder_z");
|
DynamicObjectCollection completemachines = materialinfo.getDynamicObjectCollection("yem_es_salesorder_z");
|
||||||
for (DynamicObject completemachine : completemachines) {
|
for (DynamicObject completemachine : completemachines) {
|
||||||
DynamicObject newEntryEntity = collects.addNew();
|
DynamicObject newEntryEntity = collects.addNew();
|
||||||
@ -117,7 +138,7 @@ public class ShippingDetailsAuditOp extends AbstractOperationServicePlugIn {
|
|||||||
newEntryEntity.set("yem_impactprice1", materialinfo.getString("yem_impactprice"));
|
newEntryEntity.set("yem_impactprice1", materialinfo.getString("yem_impactprice"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ("P".equals(businesssort)&&!yemIfgift) {
|
if ("P".equals(businesssort) && !yemIfgift) {
|
||||||
DynamicObject newEntryEntity = collects.addNew();
|
DynamicObject newEntryEntity = collects.addNew();
|
||||||
|
|
||||||
newEntryEntity.set("yem_isgifit_tl", yemIfgift);
|
newEntryEntity.set("yem_isgifit_tl", yemIfgift);
|
||||||
@ -167,7 +188,7 @@ public class ShippingDetailsAuditOp extends AbstractOperationServicePlugIn {
|
|||||||
// 汇总影响调拨价
|
// 汇总影响调拨价
|
||||||
newEntryEntity.set("yem_impactprice1", materialinfo.getString("yem_impactprice"));
|
newEntryEntity.set("yem_impactprice1", materialinfo.getString("yem_impactprice"));
|
||||||
}
|
}
|
||||||
if (yemIfgift){
|
if (yemIfgift) {
|
||||||
DynamicObject newEntryEntity = collects.addNew();
|
DynamicObject newEntryEntity = collects.addNew();
|
||||||
|
|
||||||
newEntryEntity.set("yem_isgifit_tl", yemIfgift);
|
newEntryEntity.set("yem_isgifit_tl", yemIfgift);
|
||||||
@ -267,7 +288,7 @@ public class ShippingDetailsAuditOp extends AbstractOperationServicePlugIn {
|
|||||||
* @time 2023/11/9 14:24
|
* @time 2023/11/9 14:24
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static void arrearsAmt(DynamicObject dataEntity) {
|
public static void arrearsAmt (DynamicObject dataEntity){
|
||||||
String sourceBillType = dataEntity.getString("yem_sourcebilltype");
|
String sourceBillType = dataEntity.getString("yem_sourcebilltype");
|
||||||
long sourceBillId = dataEntity.getLong("yem_sourcebillid");
|
long sourceBillId = dataEntity.getLong("yem_sourcebillid");
|
||||||
DynamicObject saleOrder = BusinessDataServiceHelper.loadSingle(sourceBillId, sourceBillType);
|
DynamicObject saleOrder = BusinessDataServiceHelper.loadSingle(sourceBillId, sourceBillType);
|
||||||
@ -279,4 +300,4 @@ public class ShippingDetailsAuditOp extends AbstractOperationServicePlugIn {
|
|||||||
dataEntity.set("yem_arrearsamt", thisRealityAmt);//本次发运欠款金额
|
dataEntity.set("yem_arrearsamt", thisRealityAmt);//本次发运欠款金额
|
||||||
dataEntity.set("yem_arrearsamtapply", FunUtil.getAbs(thisRealityAmt));//本次发运应申请欠条金额
|
dataEntity.set("yem_arrearsamtapply", FunUtil.getAbs(thisRealityAmt));//本次发运应申请欠条金额
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user