|
|
|
@ -575,12 +575,12 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
.map(ThrInvOrderDetail::getThrCode).collect(Collectors.toList());
|
|
|
|
|
if (CollectionUtil.isNotEmpty(thrCodes)) {
|
|
|
|
|
MainIdRelIdAndProductResponse map = udiRelevanceService.selectMainIdRelIdAndProductMap(thrCodes, thirdSysFk);
|
|
|
|
|
Map<String, Long> mainIdRelIdMap = map.getMainIdRelIdMap();
|
|
|
|
|
Map<String, UdiRelevanceEntity> mainIdRelIdMap = map.getMainIdRelIdMap();
|
|
|
|
|
|
|
|
|
|
thrInvOrderDetails.forEach(item -> {
|
|
|
|
|
if (ObjectUtil.isNull(item.getRelId())) {
|
|
|
|
|
String thrCode = item.getThrCode();
|
|
|
|
|
Long relId = mainIdRelIdMap.get(thrCode);
|
|
|
|
|
Long relId = mainIdRelIdMap.get(thrCode).getId();
|
|
|
|
|
if (ObjectUtil.isNotNull(relId)) {
|
|
|
|
|
|
|
|
|
|
item.setRelId(relId);
|
|
|
|
@ -872,17 +872,18 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
(List<ThrInvResultResponse> list, List<ThrInvOrderDetail> thrInvOrderDetails, String billNo, String
|
|
|
|
|
thirdSys, ThrInvOrder thrInvOrder, Integer sourceType) {
|
|
|
|
|
// Integer inv_set_enable = Integer.valueOf(systemParamConfigService.selectValueByParamKey("inv_set_enable"));
|
|
|
|
|
String configValue = systemParamConfigService.selectValueByParamKey("fee_out_filter_high");
|
|
|
|
|
if (sourceType == 0) {//直接明细 不走项目组套
|
|
|
|
|
thrInvOrder.setSkProject(0);
|
|
|
|
|
List<String> thrCodes = list.stream().map(ThrInvResultResponse::getThrCode).collect(Collectors.toList());
|
|
|
|
|
MainIdRelIdAndProductResponse map = udiRelevanceService.selectMainIdRelIdAndProductMap(thrCodes, thirdSys);
|
|
|
|
|
Map<String, Long> mainIdRelIdMap = map.getMainIdRelIdMap();
|
|
|
|
|
Map<String, UdiRelevanceEntity> mainIdRelIdMap = map.getMainIdRelIdMap();
|
|
|
|
|
StringBuilder exmsg = new StringBuilder("");
|
|
|
|
|
|
|
|
|
|
list.forEach(item -> {
|
|
|
|
|
String mainAction = item.getMainAction();
|
|
|
|
|
String thrCode = item.getThrCode();
|
|
|
|
|
Long relId = mainIdRelIdMap.get(thrCode);
|
|
|
|
|
Long relId = mainIdRelIdMap.get(thrCode).getId();
|
|
|
|
|
Integer count;
|
|
|
|
|
if (ConstantType.TYPE_PUT.equals(mainAction)) {
|
|
|
|
|
count = IntUtil.value(item.getInCount());
|
|
|
|
@ -906,6 +907,17 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
else
|
|
|
|
|
exmsg.append(thrCode + "供应商未关联");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//过滤是否高值
|
|
|
|
|
if (IntUtil.value(configValue) > 0) {
|
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = mainIdRelIdMap.get(thrCode);
|
|
|
|
|
if (IntUtil.value(udiRelevanceEntity.getHcType()) != 1) {
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
if (exmsg.length() > 0) {
|
|
|
|
|
exmsg.deleteCharAt(exmsg.length() - 1);
|
|
|
|
@ -914,6 +926,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {//走项目组套
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
thrInvOrder.setSkProject(1);
|
|
|
|
|
StringBuilder exmsg = new StringBuilder("");
|
|
|
|
|
list.forEach(item -> {
|
|
|
|
@ -930,19 +944,31 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
if (CollectionUtil.isNotEmpty(skProjectDetailEntityList) && count > 0) {
|
|
|
|
|
Integer finalCount = count;
|
|
|
|
|
skProjectDetailEntityList.forEach(sk -> {
|
|
|
|
|
|
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = new ThrInvOrderDetail();
|
|
|
|
|
BeanUtils.copyProperties(item, thrInvOrderDetail);
|
|
|
|
|
thrInvOrderDetail.setOrderIdFk(billNo);
|
|
|
|
|
thrInvOrderDetail.setRelId(sk.getRelId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer skCount = sk.getCount();
|
|
|
|
|
if (skCount != null && skCount > 0) {
|
|
|
|
|
thrInvOrderDetail.setReCount(String.valueOf(skCount * finalCount));
|
|
|
|
|
}
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
|
|
|
|
|
//过滤是否高值
|
|
|
|
|
if (IntUtil.value(configValue) > 0) {
|
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(sk.getRelId());
|
|
|
|
|
if (IntUtil.value(udiRelevanceEntity.getHcType()) != 1) {
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
exmsg.append(thrCode + ",");
|
|
|
|
|
|
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = new ThrInvOrderDetail();
|
|
|
|
|
BeanUtils.copyProperties(item, thrInvOrderDetail);
|
|
|
|
|
thrInvOrderDetail.setOrderIdFk(billNo);
|
|
|
|
|