Compare commits

...

2 Commits

Author SHA1 Message Date
25655
83d055e7b5 fix:
1.传EAS金额精度强制更改为2
2.产品类型删除效验

(cherry picked from commit 1c7a4b4299)
2025-03-08 18:04:18 +08:00
25655
f607738091 fix:
1.传EAS金额精度强制更改为4

(cherry picked from commit 674a1ed3c7)
2025-03-08 18:04:17 +08:00
3 changed files with 50 additions and 2 deletions

View File

@ -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());
}
}

View File

@ -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, "当前单有下级,不允许删除!!!");
}
}
}
}

View File

@ -3,6 +3,7 @@ package com.yem.wm.syn.eas;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yem.wm.utils.BigDecimalUtils;
import com.yem.wm.utils.RequestEAS;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
@ -316,11 +317,13 @@ public class YemDelivernoticeService extends AbstractOperationServicePlugIn {
//实际含税单价
json.put("price", materialentry.getBigDecimal("yem_priceandtax"));
//金额
json.put("nonTaxAmount", materialentry.getBigDecimal("yem_amt"));
BigDecimal yemAmt = materialentry.getBigDecimal("yem_amt");
json.put("nonTaxAmount", BigDecimalUtils.div(yemAmt,1,2));
//金额本位币
json.put("localNonTaxAmount", materialentry.getBigDecimal("yem_locamt"));
//税额
json.put("tax", materialentry.getBigDecimal("yem_taxamount"));
BigDecimal yemTaxamount = materialentry.getBigDecimal("yem_taxamount");
json.put("tax", BigDecimalUtils.div(yemTaxamount,1,2));
//税额本位币
json.put("localTax", materialentry.getBigDecimal("yem_curtaxamount"));
//价税合计