1.传EAS金额精度强制更改为2
2.产品类型删除效验

(cherry picked from commit 1c7a4b4299)
This commit is contained in:
25655 2025-03-08 16:52:07 +08:00
parent f607738091
commit 83d055e7b5
3 changed files with 47 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

@ -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"));
//价税合计