diff --git a/src/main/java/com/yem/em/bd/ProductsGroup/op/ProductsGroupSave.java b/src/main/java/com/yem/em/bd/ProductsGroup/op/ProductsGroupSave.java new file mode 100644 index 00000000..e30d3c43 --- /dev/null +++ b/src/main/java/com/yem/em/bd/ProductsGroup/op/ProductsGroupSave.java @@ -0,0 +1,21 @@ +package com.yem.em.bd.ProductsGroup.op; + +import com.yem.em.bd.ProductsGroup.validator.BomChangeSavevalidatorEdit; +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.AddValidatorsEventArgs; +import kd.bos.entity.plugin.PreparePropertysEventArgs; + +public class ProductsGroupSave extends AbstractOperationServicePlugIn { + + @Override + public void onPreparePropertys(PreparePropertysEventArgs e) { + super.onPreparePropertys(e); + e.getFieldKeys().addAll(this.billEntityType.getAllFields().keySet()); + } + + @Override + public void onAddValidators(AddValidatorsEventArgs e) { + super.onAddValidators(e); + e.addValidator(new BomChangeSavevalidatorEdit()); + } +} diff --git a/src/main/java/com/yem/em/bd/ProductsGroup/validator/BomChangeSavevalidatorEdit.java b/src/main/java/com/yem/em/bd/ProductsGroup/validator/BomChangeSavevalidatorEdit.java new file mode 100644 index 00000000..1beefabd --- /dev/null +++ b/src/main/java/com/yem/em/bd/ProductsGroup/validator/BomChangeSavevalidatorEdit.java @@ -0,0 +1,24 @@ +package com.yem.em.bd.ProductsGroup.validator; + +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.entity.ExtendedDataEntity; +import kd.bos.entity.validate.AbstractValidator; +import kd.bos.orm.query.QCP; +import kd.bos.orm.query.QFilter; +import kd.bos.servicehelper.BusinessDataServiceHelper; + +public class BomChangeSavevalidatorEdit extends AbstractValidator { + @Override + public void validate() { + ExtendedDataEntity[] dataEntities = this.getDataEntities(); + for (ExtendedDataEntity dataEntitie : dataEntities) { + DynamicObject dataEntity = dataEntitie.getDataEntity(); + long aLong = dataEntity.getLong("id"); + DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(dataEntity.getDataEntityType().getName() + , "id,parent", new QFilter[]{new QFilter("parent.id", QCP.equals, aLong)}); + if (dynamicObject != null) { + this.addMessage(dataEntitie, "当前单有下级,不允许删除!!!"); + } + } + } +} diff --git a/src/main/java/com/yem/wm/syn/eas/YemDelivernoticeService.java b/src/main/java/com/yem/wm/syn/eas/YemDelivernoticeService.java index 320b1097..b00342d4 100644 --- a/src/main/java/com/yem/wm/syn/eas/YemDelivernoticeService.java +++ b/src/main/java/com/yem/wm/syn/eas/YemDelivernoticeService.java @@ -318,12 +318,12 @@ public class YemDelivernoticeService extends AbstractOperationServicePlugIn { json.put("price", materialentry.getBigDecimal("yem_priceandtax")); //金额 BigDecimal yemAmt = materialentry.getBigDecimal("yem_amt"); - json.put("nonTaxAmount", BigDecimalUtils.div(yemAmt,1,4)); + json.put("nonTaxAmount", BigDecimalUtils.div(yemAmt,1,2)); //金额本位币 json.put("localNonTaxAmount", materialentry.getBigDecimal("yem_locamt")); //税额 BigDecimal yemTaxamount = materialentry.getBigDecimal("yem_taxamount"); - json.put("tax", BigDecimalUtils.div(yemTaxamount,1,4)); + json.put("tax", BigDecimalUtils.div(yemTaxamount,1,2)); //税额本位币 json.put("localTax", materialentry.getBigDecimal("yem_curtaxamount")); //价税合计 diff --git a/src/main/java/kd/cosmic/Application.java b/src/main/java/kd/cosmic/Application.java index b30a4f27..da9708ed 100644 --- a/src/main/java/kd/cosmic/Application.java +++ b/src/main/java/kd/cosmic/Application.java @@ -17,17 +17,17 @@ public class Application { cosmic.setWebPath("E:/Cosmic/Comics_YXZG/YXZG-server/webapp"); ////152 - cosmic.setClusterNumber("yxzg-topview-dev"); - cosmic.setTenantNumber("yxzg-topview-dev"); - cosmic.setServerIP("10.64.112.152"); - cosmic.setFileServerPathIPAndPort("", ""); - cosmic.setConfigUrl("10.64.112.152:2181", "zookeeper", "Cosmic@5092"); +// cosmic.setClusterNumber("yxzg-topview-dev"); +// cosmic.setTenantNumber("yxzg-topview-dev"); +// cosmic.setServerIP("10.64.112.152"); +// cosmic.setFileServerPathIPAndPort("", ""); +// cosmic.setConfigUrl("10.64.112.152:2181", "zookeeper", "Cosmic@5092"); System.setProperty("mq.debug.queue.tag", "wrxtest"); ////134 -// cosmic.setClusterNumber("yxzg-prod"); -// cosmic.setTenantNumber("yxzg-prod"); -// cosmic.setServerIP("10.64.111.134"); -// cosmic.setConfigUrl("10.64.111.134:2181","zookeeper","d@f*g:SGVsbG8==U4HRwjlqTOp0p9b60T+T8D2fQ8ThQgJLu/qgfLyLgknPa2RwYXNzd29yZA=="); + cosmic.setClusterNumber("yxzg-prod"); + cosmic.setTenantNumber("yxzg-prod"); + cosmic.setServerIP("10.64.111.134"); + cosmic.setConfigUrl("10.64.111.134:2181","zookeeper","d@f*g:SGVsbG8==U4HRwjlqTOp0p9b60T+T8D2fQ8ThQgJLu/qgfLyLgknPa2RwYXNzd29yZA=="); cosmic.setStartWithQing(false); cosmic.start();