平潭科室收费出库为往来单位时问题

dev_fifo1.0
anthonywj 1 year ago
parent fba3db5d38
commit bc4c32eb51

@ -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();

@ -1883,6 +1883,7 @@
<foreach collection="relIds" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
group by bu.id
</select>

@ -723,3 +723,7 @@ CALL Pro_Temp_ColumnWork('thr_inv_order', 'fromCorp', 'varchar(255) NULL DEFAULT
INSERT IGNORE INTO `sys_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`,
`paramType`, `paramExplain`, `updateTime`)
VALUES (200321, 0, '收费出库是否过滤高值耗材', 'fee_out_filter_hight', '0', 1, 0, '收费出库是否过滤高值耗材', '2024-03-13 09:50:48');
INSERT IGNORE INTO `sys_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`,
`paramType`, `paramExplain`, `updateTime`)
VALUES (200322, 0, '收费出库是否过滤一对多', 'fee_out_filter_cp', '0', 1, 0, '收费出库是否过滤1对多的耗材', '2024-03-13 11:04:02');

Loading…
Cancel
Save