|
|
@ -160,13 +160,33 @@ public class TzcPolicyApplicationServiceImpl implements TzcPolicyApplicationServ |
|
|
|
log.warn("[{}]政策同步失败,存货编码为空",policyItem.getPolicyItemCode()); |
|
|
|
return; |
|
|
|
} |
|
|
|
List<PolicyItemDto.PolicyGoodsItem> goodsItems = new ArrayList<>(); |
|
|
|
Map<String,String> tranCodeMap = new HashMap<>(); |
|
|
|
tranCodeMap.put("sku","invCode"); |
|
|
|
tranCodeMap.put("spu","invSkuCode"); |
|
|
|
tranCodeMap.put("brand","invBrandCode"); |
|
|
|
tranCodeMap.put("category","invCategoryCode"); |
|
|
|
tranCodeMap.put("series","invSeriesCode"); |
|
|
|
for (TzcPolicyGoods policyGood : policyGoods) { |
|
|
|
PolicyItemDto.PolicyGoodsItem goodsItem = new PolicyItemDto.PolicyGoodsItem(); |
|
|
|
String tmp = tranCodeMap.get(policyGood.getTargetType()); |
|
|
|
goodsItem.setTargetType(tmp!=null?tmp:policyGood.getTargetType()); |
|
|
|
goodsItem.setTargetId(policyGood.getTargetId()); |
|
|
|
goodsItem.setTargetCode(policyGood.getTargetCode()); |
|
|
|
goodsItem.setTargetName(policyGood.getTargetName()); |
|
|
|
goodsItems.add(goodsItem); |
|
|
|
} |
|
|
|
|
|
|
|
policyItemDto.setInvCodeList(invCodes); |
|
|
|
policyItemDto.setPolicyGoodsItemList(goodsItems); |
|
|
|
//保存异步处理的
|
|
|
|
xiaoLuTonService.savePolicyItem(policyItemDto); |
|
|
|
TzcPolicyItem updParam = new TzcPolicyItem(); |
|
|
|
updParam.setId(policyItemId); |
|
|
|
updParam.setPolicyItemStatus(TzPolicyItemStatus.Status_2_SyncSuccess); |
|
|
|
tzcPolicyItemService.updateById(updParam); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -226,6 +246,7 @@ public class TzcPolicyApplicationServiceImpl implements TzcPolicyApplicationServ |
|
|
|
createProcess.setSubjectTitle(TbsSeeYonConst.PRE_TITLE_COST_APPLY + tzcPolicy.getTitle()); |
|
|
|
createProcess.setTargetId(tzcPolicy.getId()+""); |
|
|
|
createProcess.setDataJson(JsonUtil.objectToJson(data)); |
|
|
|
|
|
|
|
R<String> flowIdResult = seeYonService.baseCreateProcess(createProcess); |
|
|
|
if(flowIdResult.getStatus()!=200){ |
|
|
|
Assert.throwEx(flowIdResult.getMsg()); |
|
|
|