外销合同提交时子分录数据汇总到分录
This commit is contained in:
parent
f4f7a1a668
commit
138e2fcedb
@ -13,6 +13,7 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|||||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
||||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||||
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||||
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
|
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
@ -20,10 +21,7 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Calendar;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description
|
* @Description
|
||||||
@ -109,6 +107,30 @@ public class SalesOrderSubmitOp extends AbstractOperationServicePlugIn {
|
|||||||
// checkNewPrice(dataEntities);
|
// checkNewPrice(dataEntities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||||
|
super.afterExecuteOperationTransaction(e);
|
||||||
|
DynamicObject[] eDataEntities = e.getDataEntities();
|
||||||
|
for (DynamicObject eDataEntity : eDataEntities) {
|
||||||
|
long aLong = eDataEntity.getLong("id");
|
||||||
|
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle("yem_es_salesorder", "id,billno,yem_es_materialinfo" +
|
||||||
|
",yem_es_materialinfo.yem_multiconfig,yem_es_materialinfo.yem_optional,yem_multiconfig.yem_configurtypeen"
|
||||||
|
, new QFilter[]{new QFilter("id", QCP.equals, aLong)});
|
||||||
|
DynamicObjectCollection yemEsMaterialinfo = dynamicObject.getDynamicObjectCollection("yem_es_materialinfo");
|
||||||
|
for (DynamicObject yemEsMAterialin : yemEsMaterialinfo) {
|
||||||
|
DynamicObjectCollection yemMulticonfig = yemEsMAterialin.getDynamicObjectCollection("yem_multiconfig");
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
for (DynamicObject yemMulticon : yemMulticonfig) {
|
||||||
|
String yemConfigurtypeen = yemMulticon.getString("yem_configurtypeen");
|
||||||
|
list.add(yemConfigurtypeen);
|
||||||
|
}
|
||||||
|
String mergedString = String.join(";"+"\n", list);
|
||||||
|
yemEsMAterialin.set("yem_optional",mergedString);
|
||||||
|
SaveServiceHelper.update(dynamicObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新配件客商额度申请单据
|
* 更新配件客商额度申请单据
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user