提交人:陈绍鑫

日期:2025/5/29 12:30
内容:开票登记转换规则插件
This commit is contained in:
陈绍鑫 2025-05-29 13:46:28 +08:00
parent 7e9756f53f
commit b187852d9d
1 changed files with 26 additions and 7 deletions

View File

@ -5,6 +5,18 @@
package shkd.sys.sys.plugin.other; package shkd.sys.sys.plugin.other;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.StringJoiner;
import java.util.stream.Collectors;
import kd.bos.dataentity.entity.DynamicObject; import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection; import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.dataentity.serialization.SerializationUtils; import kd.bos.dataentity.serialization.SerializationUtils;
@ -23,10 +35,6 @@ import kd.tmc.cdm.common.helper.TradeBillHelper;
import kd.tmc.fbp.common.helper.TmcDataServiceHelper; import kd.tmc.fbp.common.helper.TmcDataServiceHelper;
import kd.tmc.fbp.common.util.EmptyUtil; import kd.tmc.fbp.common.util.EmptyUtil;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
public class newDraftBillToTradeBillConvertPlugin extends AbstractConvertPlugIn { public class newDraftBillToTradeBillConvertPlugin extends AbstractConvertPlugIn {
private static Log logger = LogFactory.getLog(newDraftBillToTradeBillConvertPlugin.class); private static Log logger = LogFactory.getLog(newDraftBillToTradeBillConvertPlugin.class);
@ -53,9 +61,20 @@ public class newDraftBillToTradeBillConvertPlugin extends AbstractConvertPlugIn
targetBill.set("tradetype", tradeType); targetBill.set("tradetype", tradeType);
DynamicObject billType = TmcDataServiceHelper.loadSingle(DraftTradeTypeEnum.getType(tradeType), "bos_billtype"); DynamicObject billType = TmcDataServiceHelper.loadSingle(DraftTradeTypeEnum.getType(tradeType), "bos_billtype");
targetBill.set("billtype", billType); targetBill.set("billtype", billType);
// targetBill.set("payeetypetext", "bd_supplier"); String remarks = null;
// targetBill.set("payeetype", "bd_supplier"); try {
// targetBill.set("beendorsor", (Object)null); remarks = this.getOption().getVariableValue("remarks");
} catch (Exception ex) {
targetBill.set("payeetypetext", "bd_supplier");
targetBill.set("payeetype", "bd_supplier");
targetBill.set("beendorsor", (Object)null);
}
if ("后台下推".equals(remarks)){
}else {
targetBill.set("payeetypetext", "bd_supplier");
targetBill.set("payeetype", "bd_supplier");
targetBill.set("beendorsor", (Object)null);
}
this.initFeilds(targetBill); this.initFeilds(targetBill);
TradeBillAmountHelper.calcTradeBillAmount(targetBill); TradeBillAmountHelper.calcTradeBillAmount(targetBill);
String isPledged = this.getOption().getVariableValue("isPledged", "false"); String isPledged = this.getOption().getVariableValue("isPledged", "false");