1、优化合同收款凭证生成逻辑。

This commit is contained in:
zhengyf 2025-09-10 17:19:54 +08:00
parent 0b16eaa8a2
commit f772afdec6
1 changed files with 30 additions and 3 deletions

View File

@ -594,6 +594,9 @@ public class ICoreServiceImpl implements ICoreService {
VoucherData.Voucher.Detail.Ass ass_D0003 = null;
boolean flat_D0004=false;
AeConfVoucherTemplateAssistEntity templateAssistEntity_004=null;
String key_004=null;
String value_004=null;
for (Map.Entry<String, String> assByBdCodeEntry : AssByBdCodeMap.entrySet()) {
@ -607,12 +610,15 @@ public class ICoreServiceImpl implements ICoreService {
//辅助核算取值
Map<String, String> assValue = new HashMap<>();
if("350499bebe41426eaf29c603ca54fd88".equals(createVoucherVO.getMdmId()) && "D0004".equals(value) && ass_D0003==null){
flat_D0004=true;
if ("350499bebe41426eaf29c603ca54fd88".equals(createVoucherVO.getMdmId()) && "D0004".equals(value) && ass_D0003 == null) {
flat_D0004 = true;
key_004 = key;
value_004 = value;
templateAssistEntity_004=templateAssistEntity;
continue;
}
try{
try {
assValue = getAssValue(templateAssistEntity, dataValue, orgBookVO);
}catch (Exception e){
e.printStackTrace();
@ -656,6 +662,27 @@ public class ICoreServiceImpl implements ICoreService {
assEntity.setCheckvaluecode("17");
assEntity.setCheckvaluename("");
assList.add(assEntity);
}else {
//不是06 07的查询辅助核算
System.out.println(templateAssistEntity_004);//去单据辅助核算
Map<String, String> assValu_004 = getAssValue(templateAssistEntity_004, dataValue, orgBookVO);
if (assValu_004.size() != 0) {
VoucherData.Voucher.Detail.Ass assEntity = new VoucherData.Voucher.Detail.Ass();
assEntity.setChecktypecode(value_004);
assEntity.setCheckvalueid(assValu_004.get("pk"));
assEntity.setCheckvaluecode(assValu_004.get("code"));
assEntity.setCheckvaluename(assValu_004.get("name"));
//类型
for (AeConfBdAccsubjEntity aeConfBdAccsubjEntity : aeConfBdAccsubjEntities) {
if (value_004.equals(aeConfBdAccsubjEntity.getBdcode())) {
assEntity.setChecktypename(aeConfBdAccsubjEntity.getBdname());
break;
}
}
assList.add(assEntity);
}
}
}