1.订舱通知单物流
This commit is contained in:
ljw 2024-11-08 22:10:18 +08:00
parent 118f2f9277
commit 6c1d90e759
2 changed files with 88 additions and 3 deletions

View File

@ -0,0 +1,85 @@
package com.yem.wm.es.shippingdetails.op;
import com.alibaba.csp.sentinel.util.StringUtil;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.BeforeOperationArgs;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* @author ljw
* @date 2024/11/8 17:42
* @description XshippingDetailsSaveOp
*/
public class XshippingDetailsSaveOp extends AbstractOperationServicePlugIn {
@Override
public void onPreparePropertys(PreparePropertysEventArgs e) {
e.getFieldKeys().addAll(this.billEntityType.getAllFields().keySet());
}
@Override
public void beforeExecuteOperationTransaction(BeforeOperationArgs e) {
super.beforeExecuteOperationTransaction(e);
DynamicObject[] eDataEntities = e.getDataEntities();
for (int i = 0; i < eDataEntities.length; i++) {
DynamicObject dataEntitie = eDataEntities[i];
DynamicObjectCollection collects = dataEntitie.getDynamicObjectCollection("yem_es_salesorder_total");
DynamicObjectCollection followcars = dataEntitie.getDynamicObjectCollection("yem_es_salesorder_p");
Map<Long, DynamicObject > map = new HashMap<>();
for (DynamicObject followcar : followcars) {
DynamicObject yemAccesmaterial = followcar.getDynamicObject("yem_accesmaterial");
if (yemAccesmaterial != null) {
// long aLong = yemAccesmaterial.getLong("id");
// if (map.get(aLong)!=null){
// map.put(aLong,followcar);
// }else {
// DynamicObject[] dynamicObjects = map.get(aLong);
// DynamicObject[] objects = {};
// for (DynamicObject dynamicObject : dynamicObjects) {
// }
// map.put(aLong,dynamicObjects)
// }
// if (!collects.isEmpty()) {
// for (DynamicObject dynamicObject : collects) {
// DynamicObject[] decimal = map.get(dynamicObject.getLong("yem_accesmaterial_tl.id"));
// if (decimal != null) {
// DynamicObject newEntryEntity = collects.addNew();
// newEntryEntity.set("yem_isgifit_tl", true);
// newEntryEntity.set("yem_classification_tl", "A");
// if (followcar.getDynamicObject("yem_accessorytype") != null) {
// newEntryEntity.set("yem_basicmodel_tl", followcar.getLong("yem_accessorytype.id"));
// }
// if (StringUtil.isNotEmpty(followcar.getString("yem_volvotype"))) {
// newEntryEntity.set("yem_volvotype_tl", followcar.getString("yem_volvotype"));
// }
// if (followcar.getDynamicObject("yem_accesmaterial") != null) {
// newEntryEntity.set("yem_accesmaterial_tl", followcar.getLong("yem_accesmaterial.id"));
// newEntryEntity.set("yem_materialname_tl", followcar.getString("yem_accesmaterial.name"));
// newEntryEntity.set("yem_materialenname_tl", followcar.getString("yem_accesmaterial.yem_nameen"));
// newEntryEntity.set("yem_specification_tl", followcar.getString("yem_accesmaterial.modelnum"));
// }
// if (followcar.getDynamicObject("yem_acunit") != null) {
// newEntryEntity.set("yem_acunit_tl", followcar.getLong("yem_acunit.id"));
// newEntryEntity.set("yem_unitfieldbase_tl", followcar.getLong("yem_acunit.id"));
// }
// if (StringUtil.isNotEmpty(followcar.getString("yem_saleorderno_p"))) {
// newEntryEntity.set("yem_constratnb_tl", followcar.getString("yem_saleorderno_p"));
// }
// newEntryEntity.set("yem_qty_tl", followcar.getBigDecimal("yem_acallqty"));
// newEntryEntity.set("yem_qtybase_tl", followcar.getBigDecimal("yem_acallqty"));
// newEntryEntity.set("yem_constracteyid_tl", followcar.getLong("yem_constracteyid_p"));
// newEntryEntity.set("yem_constractioid_tl", followcar.getLong("id"));
//
// }
// }
}
}
}
}
}

View File

@ -212,7 +212,7 @@ public class StorageTransEdit_wl extends AbstractBillPlugIn {
boonle = false;
i++;
}
if (yemStation == null) {
if ("".equals(yemStation)) {
string = string + i + ". 场站为空,请稍后重试!\n";
boonle = false;
i++;
@ -313,7 +313,7 @@ public class StorageTransEdit_wl extends AbstractBillPlugIn {
boonle = false;
i++;
}
if (yemStation == null) {
if ("".equals(yemStation)) {
string = string + i + ". 场站为空,请稍后重试!\n";
boonle = false;
i++;
@ -326,7 +326,7 @@ public class StorageTransEdit_wl extends AbstractBillPlugIn {
i++;
}
if (yemInitforecdate == null) {
string = string + i + ". 预计船期为空,请稍后重试!\n";
string = string + i + ". 物流预计船期/班列为空,请稍后重试!\n";
boonle = false;
i++;
}