fix:
1.1、基础资料申报要素增加字段,是否默认(枚举,是否,默认空);
2、合同/发运/订舱,获取实际要素功能调整:
原逻辑配置时,如果匹配到多条,手动选择;
调整后:如果匹配到多条记录,取申报要素是否默认为是的记录,如果为空或者为否,则按照原逻辑不做处理,其他逻辑不变
涉及调整:整机和配件需要同步调整,批量获取(获取申报要素按钮)和单独获取(选择明细字段)
整机匹配逻辑:产品分类、基础机型、报关分类、海关编码;
配件匹配逻辑:产品分类、物料编码、保管分类、海关编码
(cherry picked from commit 02ce990a09
)
This commit is contained in:
parent
82a4a258bd
commit
6c73d074a9
@ -734,6 +734,28 @@ public class SalesOrderEdit extends AbstractBillPlugIn implements Plugin, Before
|
|||||||
model.setValue("yem_hscode", hscodebase.getLong("id"), rowIndex);
|
model.setValue("yem_hscode", hscodebase.getLong("id"), rowIndex);
|
||||||
carryDeclaration(model, view, rowIndex, load, hscodebase);
|
carryDeclaration(model, view, rowIndex, load, hscodebase);
|
||||||
}
|
}
|
||||||
|
} else if (loads.length > 0) {
|
||||||
|
List<DynamicObject> list = new ArrayList<>();
|
||||||
|
for (DynamicObject load : loads) {
|
||||||
|
boolean yemWhetheritdefaults = load.getBoolean("yem_whetheritdefaults");
|
||||||
|
if (yemWhetheritdefaults) {
|
||||||
|
list.add(load);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (list.size() == 1) {
|
||||||
|
DynamicObject load = list.get(0);
|
||||||
|
load = BusinessDataServiceHelper.loadSingle(load.getPkValue(), load.getDynamicObjectType().getName());
|
||||||
|
DynamicObject customclass = load.getDynamicObject("yem_customclass");
|
||||||
|
if (YEM.isNotEmpty(customclass)) {
|
||||||
|
model.setValue("yem_customclass", customclass.getLong("id"), rowIndex);
|
||||||
|
}
|
||||||
|
DynamicObject hscodebase = load.getDynamicObject("yem_hscodebase");
|
||||||
|
if (YEM.isNotEmpty(hscodebase)) {
|
||||||
|
hscodebase = BusinessDataServiceHelper.loadSingle(hscodebase.getPkValue(), hscodebase.getDynamicObjectType().getName());
|
||||||
|
model.setValue("yem_hscode", hscodebase.getLong("id"), rowIndex);
|
||||||
|
carryDeclaration(model, view, rowIndex, load, hscodebase);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1982,21 +2004,21 @@ public class SalesOrderEdit extends AbstractBillPlugIn implements Plugin, Before
|
|||||||
setNewpPrice(dataEntity, view);
|
setNewpPrice(dataEntity, view);
|
||||||
checkGiftsGivenNumber(dataEntity, e);
|
checkGiftsGivenNumber(dataEntity, e);
|
||||||
DynamicObjectCollection collection = dataEntity.getDynamicObjectCollection("yem_es_salesorder_zp");
|
DynamicObjectCollection collection = dataEntity.getDynamicObjectCollection("yem_es_salesorder_zp");
|
||||||
Map<Long,BigDecimal> map = new HashMap<>();
|
Map<Long, BigDecimal> map = new HashMap<>();
|
||||||
for (DynamicObject dynamicObject : collection) {
|
for (DynamicObject dynamicObject : collection) {
|
||||||
DynamicObject yemGiveproactype = dynamicObject.getDynamicObject("yem_giveproactype");
|
DynamicObject yemGiveproactype = dynamicObject.getDynamicObject("yem_giveproactype");
|
||||||
if (yemGiveproactype != null) {
|
if (yemGiveproactype != null) {
|
||||||
long aLong = yemGiveproactype.getLong("id");
|
long aLong = yemGiveproactype.getLong("id");
|
||||||
BigDecimal yemSingleamt = dynamicObject.getBigDecimal("yem_singleamt");
|
BigDecimal yemSingleamt = dynamicObject.getBigDecimal("yem_singleamt");
|
||||||
if (map.get(aLong)!=null){
|
if (map.get(aLong) != null) {
|
||||||
if (map.get(aLong).compareTo(yemSingleamt)!=0){
|
if (map.get(aLong).compareTo(yemSingleamt) != 0) {
|
||||||
// ConfirmCallBackListener confirmCallBackListener = new ConfirmCallBackListener("checkGiftsGivenNumber", this);
|
// ConfirmCallBackListener confirmCallBackListener = new ConfirmCallBackListener("checkGiftsGivenNumber", this);
|
||||||
// this.getView().showConfirm("赠送配件分录同一机型存在多个单台配件金额,请检查后在进行提交!!!", MessageBoxOptions.OKCancel, confirmCallBackListener);
|
// this.getView().showConfirm("赠送配件分录同一机型存在多个单台配件金额,请检查后在进行提交!!!", MessageBoxOptions.OKCancel, confirmCallBackListener);
|
||||||
this.getView().showMessage("赠送配件分录同一机型存在多个单台配件金额,请检查后在进行提交!!!");
|
this.getView().showMessage("赠送配件分录同一机型存在多个单台配件金额,请检查后在进行提交!!!");
|
||||||
e.setCancel(true);
|
e.setCancel(true);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
map.put(aLong,yemSingleamt);
|
map.put(aLong, yemSingleamt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2050,10 +2072,10 @@ public class SalesOrderEdit extends AbstractBillPlugIn implements Plugin, Before
|
|||||||
BigDecimal qtyint = dynamicObject.getBigDecimal("yem_qtyint");
|
BigDecimal qtyint = dynamicObject.getBigDecimal("yem_qtyint");
|
||||||
if (giveproactype == null) continue;
|
if (giveproactype == null) continue;
|
||||||
long id = giveproactype.getLong("id");
|
long id = giveproactype.getLong("id");
|
||||||
if (maps.containsKey(id)){
|
if (maps.containsKey(id)) {
|
||||||
maps.put(id,maps.get(id).add(qtyint));
|
maps.put(id, maps.get(id).add(qtyint));
|
||||||
}else {
|
} else {
|
||||||
maps.put(id,qtyint);
|
maps.put(id, qtyint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Long id : maps.keySet()) {
|
for (Long id : maps.keySet()) {
|
||||||
|
@ -292,18 +292,27 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
|
|||||||
}
|
}
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (int i : selectRows) {
|
for (int i : selectRows) {
|
||||||
DynamicObject[] load = getDeclarationElementsUseCarry(model, i, null);
|
DynamicObject[] loads = getDeclarationElementsUseCarry(model, i, null);
|
||||||
if (load.length == 1) {
|
if (loads.length == 1) {
|
||||||
// DynamicObject hscode = (DynamicObject) model.getValue("yem_hscode", i);
|
// DynamicObject hscode = (DynamicObject) model.getValue("yem_hscode", i);
|
||||||
// carryDeclaration(model, view, i, load[0], hscode);
|
// carryDeclaration(model, view, i, load[0], hscode);
|
||||||
carryReportCategoryAndHsCode(model, view, i, "");
|
carryReportCategoryAndHsCode(model, view, i, "");
|
||||||
} else {
|
} else if (loads.length > 0) {
|
||||||
if (load.length == 0) {
|
List<DynamicObject> list = new ArrayList<>();
|
||||||
sb.append(String.format("第 %s 行未获匹配申报要素!!", i + 1)).append("\r\n");
|
for (DynamicObject load : loads) {
|
||||||
|
boolean yemWhetheritdefaults = load.getBoolean("yem_whetheritdefaults");
|
||||||
|
if (yemWhetheritdefaults) {
|
||||||
|
list.add(load);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (load.length > 1) {
|
if (list.size() == 1) {
|
||||||
|
carryReportCategoryAndHsCode(model, view, i, "");
|
||||||
|
}
|
||||||
|
if (list.size() != 1) {
|
||||||
sb.append(String.format("第 %s 行匹配到多条申报要素,请手动选择!!", i + 1)).append("\r\n");
|
sb.append(String.format("第 %s 行匹配到多条申报要素,请手动选择!!", i + 1)).append("\r\n");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
sb.append(String.format("第 %s 行未获匹配申报要素!!", i + 1)).append("\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sb.length() > 0) {
|
if (sb.length() > 0) {
|
||||||
@ -538,7 +547,7 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
|
|||||||
DynamicObject yemEsMaterialinfo = dynamicObjectCollection.get(currentRowIndex);
|
DynamicObject yemEsMaterialinfo = dynamicObjectCollection.get(currentRowIndex);
|
||||||
long yemCoreentryid = yemEsMaterialinfo.getLong("yem_coreentryid");
|
long yemCoreentryid = yemEsMaterialinfo.getLong("yem_coreentryid");
|
||||||
DynamicObjectCollection yemEsSalesorderZ = yemEsMaterialinfo.getDynamicObjectCollection("yem_es_salesorder_z");
|
DynamicObjectCollection yemEsSalesorderZ = yemEsMaterialinfo.getDynamicObjectCollection("yem_es_salesorder_z");
|
||||||
if (!yemEsSalesorderZ.isEmpty()){
|
if (!yemEsSalesorderZ.isEmpty()) {
|
||||||
for (DynamicObject dynamicObject : yemEsSalesorderZ) {
|
for (DynamicObject dynamicObject : yemEsSalesorderZ) {
|
||||||
String yemVehicleno = dynamicObject.getString("yem_vehicleno");
|
String yemVehicleno = dynamicObject.getString("yem_vehicleno");
|
||||||
list.add(yemVehicleno);
|
list.add(yemVehicleno);
|
||||||
|
@ -21,6 +21,7 @@ import kd.bos.entity.datamodel.events.*;
|
|||||||
import kd.bos.entity.property.EntryProp;
|
import kd.bos.entity.property.EntryProp;
|
||||||
import kd.bos.form.*;
|
import kd.bos.form.*;
|
||||||
import kd.bos.form.control.AttachmentPanel;
|
import kd.bos.form.control.AttachmentPanel;
|
||||||
|
import kd.bos.form.control.EntryGrid;
|
||||||
import kd.bos.form.control.events.UploadListener;
|
import kd.bos.form.control.events.UploadListener;
|
||||||
import kd.bos.form.events.AfterDoOperationEventArgs;
|
import kd.bos.form.events.AfterDoOperationEventArgs;
|
||||||
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||||
@ -443,6 +444,41 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
if ("test_islastship".equals(operateKey)) {
|
if ("test_islastship".equals(operateKey)) {
|
||||||
view.showSuccessNotification(String.valueOf(isLastShip(dataEntity)));
|
view.showSuccessNotification(String.valueOf(isLastShip(dataEntity)));
|
||||||
}
|
}
|
||||||
|
if ("requestacdeclaration".equals(operateKey)) {
|
||||||
|
EntryGrid control = this.getControl("yem_es_materialinfo");
|
||||||
|
int[] selectRows = control.getSelectRows();
|
||||||
|
if (selectRows.length == 0) {
|
||||||
|
DynamicObjectCollection yemEsMaterialinfo = this.getModel().getEntryEntity("yem_es_materialinfo");
|
||||||
|
for (int i = 0; i < yemEsMaterialinfo.size(); i++) {
|
||||||
|
carryReportCategoryAndHsCode(model, view, i, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i : selectRows) {
|
||||||
|
DynamicObject[] loads = getDeclarationElementsUseCarry(model, i, null);
|
||||||
|
if (loads.length == 1) {
|
||||||
|
// DynamicObject hscode = (DynamicObject) model.getValue("yem_hscode", i);
|
||||||
|
// carryDeclaration(model, view, i, load[0], hscode);
|
||||||
|
carryReportCategoryAndHsCode(model, view, i, "");
|
||||||
|
} else if (loads.length > 0) {
|
||||||
|
List<DynamicObject> list = new ArrayList<>();
|
||||||
|
for (DynamicObject load : loads) {
|
||||||
|
boolean yemWhetheritdefaults = load.getBoolean("yem_whetheritdefaults");
|
||||||
|
if (yemWhetheritdefaults) {
|
||||||
|
list.add(load);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (list.size() == 1) {
|
||||||
|
carryReportCategoryAndHsCode(model, view, i, "");
|
||||||
|
}
|
||||||
|
if (list.size() != 1) {
|
||||||
|
sb.append(String.format("第 %s 行匹配到多条申报要素,请手动选择!!", i + 1)).append("\r\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sb.append(String.format("第 %s 行未获匹配申报要素!!", i + 1)).append("\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user