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