|
|
|
@ -377,7 +377,11 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
IoOrderEntity ioOrderEntity = new IoOrderEntity();
|
|
|
|
|
ioOrderEntity.setBillNo(newBillNo);
|
|
|
|
|
ioOrderEntity.setMainAction(thrInvOrder.getMainAction());
|
|
|
|
|
String fromCorp = addInoutService.updateCorp(bussinessTypeEntity, entry.getValue().get(0).getSickerName(), entry.getKey());
|
|
|
|
|
String fromCorp;
|
|
|
|
|
if (entry.getValue().get(0).getSickerCode() != null || entry.getValue().get(0).getSickerName() != null)
|
|
|
|
|
fromCorp = addInoutService.updateCorp(bussinessTypeEntity, entry.getValue().get(0).getSickerName(), entry.getKey());
|
|
|
|
|
else
|
|
|
|
|
fromCorp = entry.getKey();
|
|
|
|
|
ioOrderEntity.setFromCorp(fromCorp);
|
|
|
|
|
ioOrderEntity.setInvCode(thrInvOrder.getInvCode());
|
|
|
|
|
ioOrderEntity.setDeptCode(thrInvOrder.getDeptCode());
|
|
|
|
@ -872,7 +876,8 @@ 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");
|
|
|
|
|
String highFilter = systemParamConfigService.selectValueByParamKey("fee_out_filter_high");
|
|
|
|
|
String cpMutiFilter = systemParamConfigService.selectValueByParamKey("fee_out_filter_cp");
|
|
|
|
|
if (sourceType == 0) {//直接明细 不走项目组套
|
|
|
|
|
thrInvOrder.setSkProject(0);
|
|
|
|
|
List<String> thrCodes = list.stream().map(ThrInvResultResponse::getThrCode).collect(Collectors.toList());
|
|
|
|
@ -909,7 +914,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//过滤是否高值
|
|
|
|
|
if (IntUtil.value(configValue) > 0) {
|
|
|
|
|
if (IntUtil.value(highFilter) > 0) {
|
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = mainIdRelIdMap.get(thrCode);
|
|
|
|
|
if (IntUtil.value(udiRelevanceEntity.getHcType()) != 1) {
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
@ -942,31 +947,38 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
//通过thrCode获取到项目组套
|
|
|
|
|
List<BasicSkProjectDetailEntity> skProjectDetailEntityList = basicDestinyRelService.filterDestinyRelListByPId(thrCode);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(skProjectDetailEntityList) && count > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer finalCount = count;
|
|
|
|
|
skProjectDetailEntityList.forEach(sk -> {
|
|
|
|
|
if (IntUtil.value(cpMutiFilter) > 0 && IntUtil.value(finalCount) > 1) {
|
|
|
|
|
log.error(item.getCpmctymc() + "," + item.getThrCode() + "项目关联多个耗材对照,已杯过滤!");
|
|
|
|
|
} else {
|
|
|
|
|
skProjectDetailEntityList.forEach(sk -> {
|
|
|
|
|
|
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = new ThrInvOrderDetail();
|
|
|
|
|
BeanUtils.copyProperties(item, thrInvOrderDetail);
|
|
|
|
|
thrInvOrderDetail.setOrderIdFk(billNo);
|
|
|
|
|
thrInvOrderDetail.setRelId(sk.getRelId());
|
|
|
|
|
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));
|
|
|
|
|
}
|
|
|
|
|
Integer skCount = sk.getCount();
|
|
|
|
|
if (skCount != null && skCount > 0) {
|
|
|
|
|
thrInvOrderDetail.setReCount(String.valueOf(skCount * finalCount));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//过滤是否高值
|
|
|
|
|
if (IntUtil.value(configValue) > 0) {
|
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(sk.getRelId());
|
|
|
|
|
if (IntUtil.value(udiRelevanceEntity.getHcType()) != 1) {
|
|
|
|
|
//过滤是否高值
|
|
|
|
|
if (IntUtil.value(highFilter) > 0) {
|
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(sk.getRelId());
|
|
|
|
|
if (IntUtil.value(udiRelevanceEntity.getHcType()) != 1) {
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
exmsg.append(thrCode + ",");
|
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = new ThrInvOrderDetail();
|
|
|
|
|