parent
2578cb5a7a
commit
029ffad9aa
|
|
@ -0,0 +1,44 @@
|
||||||
|
package shkd.sys.sys.plugin.other;
|
||||||
|
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
|
import kd.bos.entity.ExtendedDataEntity;
|
||||||
|
import kd.bos.entity.botp.plugin.AbstractConvertPlugIn;
|
||||||
|
import kd.bos.entity.botp.plugin.args.AfterFieldMappingEventArgs;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import shkd.sys.sys.utils.EmptyUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @FileName AddRecBilllConvertBOTPPlugin
|
||||||
|
* @Description
|
||||||
|
* @Author csx
|
||||||
|
* @date 2026-01-21
|
||||||
|
**/
|
||||||
|
public class AddRecBilllConvertBOTPPlugin extends AbstractConvertPlugIn {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterFieldMapping(AfterFieldMappingEventArgs e) {
|
||||||
|
super.afterFieldMapping(e);
|
||||||
|
String targetEntityNumber = this.getTgtMainType().getName();
|
||||||
|
ExtendedDataEntity[] billDataEntitys = e.getTargetExtDataEntitySet().FindByEntityKey(targetEntityNumber);
|
||||||
|
for (ExtendedDataEntity billDataEntity : billDataEntitys) {
|
||||||
|
DynamicObject targetBill = billDataEntity.getDataEntity();
|
||||||
|
String shkd_jhkm = null;
|
||||||
|
try {
|
||||||
|
shkd_jhkm = this.getOption().getVariableValue("shkd_jhkm");
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
if (shkd_jhkm!=null&& !EmptyUtil.isEmpty(shkd_jhkm)){
|
||||||
|
DynamicObject fpm_member_f7 = BusinessDataServiceHelper.loadSingle("fpm_member_f7", "id,number", new QFilter("number", QCP.equals,shkd_jhkm).toArray());
|
||||||
|
DynamicObjectCollection entry = targetBill.getDynamicObjectCollection("entry");
|
||||||
|
for (DynamicObject dynamicObject : entry) {
|
||||||
|
dynamicObject.set("shkd_jhkm",fpm_member_f7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue