Compare commits

..

4 Commits

Author SHA1 Message Date
25655
9a8784964b fix:
2.订舱通知单选择f7过滤
2025-03-01 12:04:31 +08:00
ljw
7a671ac93e fix: 1.订舱通知单选择F7时过滤 2025-03-01 12:04:29 +08:00
25655
f0c13f3856 fix:
1.申报要素改变过滤值
2025-03-01 12:04:27 +08:00
25655
45a8bf6585 fix:
1.申报要素改变过滤值
2025-03-01 12:04:26 +08:00
3 changed files with 25 additions and 45 deletions

View File

@ -794,11 +794,11 @@ public class SalesOrderEdit extends AbstractBillPlugIn implements Plugin, Before
DynamicObject billtype = (DynamicObject) model.getValue("yem_billtype");
String type = billtype.getString("number");
if (org.apache.commons.lang3.StringUtils.containsIgnoreCase(type, "zj")) {
if (org.apache.commons.lang3.StringUtils.containsIgnoreCase(type, "zj")||"yem_es_storagetrans".equals(type)) {
if ("Z".equals(businesssort)) {
if (YEM.isNotEmpty(productmodel)) {
id = productmodel.getLong("yem_products.id");
qFilter.and(new QFilter("yem_bd_declarationele.yem_productstree.id", QCP.equals, id));
id = productmodel.getLong("id");
qFilter.and(new QFilter("yem_bd_declarationele.yem_baseproductstree.id", QCP.equals, id));
qFilter.and(new QFilter("enable", QCP.equals, "1"));
}
}

View File

@ -763,17 +763,18 @@ public class SalesOrderUtils {
products = (DynamicObject) model.getValue("yem_bd_products");
}
String number = products.getString("number");
long id = 0L;
QFilter qFilter = new QFilter("enable", QCP.equals, "1");
String number = products.getString("number");
DynamicObject billtype = (DynamicObject) model.getValue("yem_billtype");
String type = billtype.getString("number");
if (StringUtils.containsIgnoreCase(type, "zj")) {
if (StringUtils.containsIgnoreCase(type, "zj")||"yem_es_storagetrans".equals(type)) {
if ("Z".equals(businesssort)) {
if (YEM.isNotEmpty(productmodel)) {
id = productmodel.getLong("yem_products.id");
qFilter.and(new QFilter("yem_bd_declarationele.yem_productstree.id", QCP.equals, id));
id = productmodel.getLong("id");
qFilter.and(new QFilter("yem_bd_declarationele.yem_baseproductstree.id", QCP.equals, id));
qFilter.and(new QFilter("enable", QCP.equals, "1"));
}
}
@ -802,30 +803,10 @@ public class SalesOrderUtils {
}
}
// if (qFilter != null && YEM.isNotEmpty(products)) {
// qFilter.and(new QFilter("yem_producttype.id", QCP.equals, products.getLong("id")));
// }
// if ("yem_customclass".equals(currentFilterKey)) {
// if (qFilter != null) {
// return BusinessDataServiceHelper.load("yem_bd_declarationele", selectfields, qFilter.toArray());
// }
// }
if ("yem_hscode".equals(currentFilterKey) && customclass != null) {
qFilter.and(new QFilter("yem_customclass.id", QCP.equals, customclass.getLong("id")));
}
// if (qFilter != null) {
// if (customclass != null && !"yem_customclass".equals(currentFilterKey)) {
// qFilter.and(new QFilter("yem_customclass.id", QCP.equals, customclass.getLong("id")));
// }
//
// if (hscode != null && !"yem_hscode".equals(currentFilterKey)) {
// qFilter.and(new QFilter("yem_hscodebase.id", QCP.equals, hscode.getLong("id")));
// }
// }
return BusinessDataServiceHelper.load("yem_bd_declarationele", selectfields, qFilter.toArray());
}
@ -865,11 +846,11 @@ public class SalesOrderUtils {
DynamicObject billtype = (DynamicObject) model.getValue("yem_billtype");
String type = billtype.getString("number");
if (StringUtils.containsIgnoreCase(type, "zj")) {
if (StringUtils.containsIgnoreCase(type, "zj")||"yem_es_storagetrans".equals(type)) {
if ("Z".equals(businesssort)) {
if (YEM.isNotEmpty(productmodel)) {
id = productmodel.getLong("yem_products.id");
qFilter.and(new QFilter("yem_bd_declarationele.yem_productstree.id", QCP.equals, id));
id = productmodel.getLong("id");
qFilter.and(new QFilter("yem_bd_declarationele.yem_baseproductstree.id", QCP.equals, id));
qFilter.and(new QFilter("enable", QCP.equals, "1"));
}
}

View File

@ -255,21 +255,6 @@ public class StorageTransZJEdit extends AbstractBillPlugIn implements BeforeF7Se
public void selectF7CustomClass(BeforeF7SelectEvent e) {
//1过滤报关分类时整机行只能过滤业务分类为整机的报关分类配件行只能过滤业务分类为配件的报关分类
int row = e.getRow();
List<Long> ids = new ArrayList();
IDataModel model = this.getModel();
DynamicObject materiel = (DynamicObject) model.getValue("yem_materiel", row);
if (YEM.isNotEmpty(materiel)) {
DynamicObject[] declarationEles = BusinessDataServiceHelper.load("yem_bd_declarationele", "id,yem_customclass",
new QFilter[]{new QFilter("yem_material", QCP.equals, materiel.getPkValue())});
for (DynamicObject declarationEle : declarationEles) {
DynamicObject hsCodebase = declarationEle.getDynamicObject("yem_customclass");
if (YEM.isNotEmpty(hsCodebase)) {
ids.add(hsCodebase.getLong("id"));
}
}
}
e.addCustomQFilter(new QFilter("id", QCP.in, ids));
String businesssort = (String) this.getModel().getValue("yem_businesssort", row);
if (businesssort == null) {
e.addCustomQFilter(new QFilter("yem_businessclassify", QCP.equals, null));
@ -278,6 +263,20 @@ public class StorageTransZJEdit extends AbstractBillPlugIn implements BeforeF7Se
e.addCustomQFilter(new QFilter("yem_businessclassify", QCP.equals, "Z"));
}
if ("P".equals(businesssort)) {
List<Long> ids = new ArrayList();
IDataModel model = this.getModel();
DynamicObject materiel = (DynamicObject) model.getValue("yem_materiel", row);
if (YEM.isNotEmpty(materiel)) {
DynamicObject[] declarationEles = BusinessDataServiceHelper.load("yem_bd_declarationele", "id,yem_customclass",
new QFilter[]{new QFilter("yem_material", QCP.equals, materiel.getPkValue())});
for (DynamicObject declarationEle : declarationEles) {
DynamicObject hsCodebase = declarationEle.getDynamicObject("yem_customclass");
if (YEM.isNotEmpty(hsCodebase)) {
ids.add(hsCodebase.getLong("id"));
}
}
}
e.addCustomQFilter(new QFilter("id", QCP.in, ids));
e.addCustomQFilter(new QFilter("yem_businessclassify", QCP.equals, "P"));
}