fix: 增加药品单据的一个判断是否全部维护关联关系

dev_unify
chenhc 4 months ago
parent 2057364f55
commit 9dd6b11940

@ -2,6 +2,7 @@ package com.glxp.api.controller.inout;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.text.StrBuilder;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -22,6 +23,7 @@ import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.basic.EntrustReceEntity;
import com.glxp.api.entity.inout.*;
import com.glxp.api.entity.sync.SocketMsgEntity;
import com.glxp.api.entity.system.SystemParamConfigEntity;
import com.glxp.api.req.auth.FilterInvBusUserRequest;
import com.glxp.api.req.basic.BasicEntrustRecRequest;
import com.glxp.api.req.inout.*;
@ -249,6 +251,30 @@ public class IoOrderController extends BaseController {
}
ioAddInoutService.dealProcess(orderEntity);
//增加药品单据的一个判断是否全部维护关联关系
if (orderEntity.getProductType() == 2){
//加载开关
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("warning_relCode_switch");
if (systemParamConfigEntity.getParamValue().equals("1")) {
List<IoCodeTempEntity> codeTempEntities = codeTempService.findByOrderId(orderEntity.getBillNo());
if (CollUtil.isNotEmpty(codeTempEntities)){
boolean flag = false;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < codeTempEntities.size(); i++) {
IoCodeTempEntity ioCodeTempEntity = codeTempEntities.get(i);
if (ioCodeTempEntity.getDrugLink() == 0 ){
flag = true;
sb.append(ioCodeTempEntity.getNameCode()).append(";");
}
}
if (flag){
sb.append("的关联关系未获取");
return ResultVOUtils.error(500, String.valueOf(sb));
}
}
}
}
//不需要手动校验,则走正常单据校验处理流程
if (!ioCheckInoutService.checkManual(orderEntity.getBillNo())) {
ioCheckInoutService.check(orderEntity.getBillNo());

@ -1207,3 +1207,5 @@ CALL Pro_Temp_ColumnWork('customer_info', 'appSecret',
CALL Pro_Temp_ColumnWork('customer_info', 'refEntId',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''接口调用企业的唯一标识''',
1);
INSERT ignore INTO `sys_param_config` (`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`, `updateTime`)
VALUES (20100, 0, '是否全部维护关联关系', 'warning_relCode_switch', '1', 1, 0, '01', NULL);

Loading…
Cancel
Save