Compare commits
2 Commits
080ec218ab
...
83d055e7b5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
83d055e7b5 | ||
![]() |
f607738091 |
@ -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());
|
||||
}
|
||||
}
|
@ -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, "当前单有下级,不允许删除!!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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"));
|
||||
//价税合计
|
||||
|
Loading…
Reference in New Issue
Block a user