切换分支备份

lh_dev_fifo
yewj 11 months ago
parent 63df50666c
commit 6dd0e0d4c5

@ -278,12 +278,7 @@ public class IoAddInoutService {
} }
if (orderDetailBizEntity.getBindRlFk() == null) { if (orderDetailBizEntity.getBindRlFk() == null) {
errMsg = errMsg + orderDetailBizEntity.getCoName() + "该产品未指定唯一耗材编码;"; errMsg = errMsg + orderDetailBizEntity.getCoName() + "该产品未指定唯一耗材编码;";
}
if (StrUtil.isEmpty(orderDetailBizEntity.getSupId())) {
errMsg = errMsg + orderDetailBizEntity.getCoName() + "该产品未指定供应商;";
} }
if (IntUtil.value(orderDetailBizEntity.getCount()) == 0) { if (IntUtil.value(orderDetailBizEntity.getCount()) == 0) {
errMsg = errMsg + orderDetailBizEntity.getCoName() + "产品数量不能为0;"; errMsg = errMsg + orderDetailBizEntity.getCoName() + "产品数量不能为0;";

@ -23,6 +23,7 @@ import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.inout.IoCodeTempEntity; import com.glxp.api.entity.inout.IoCodeTempEntity;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity; import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.inout.IoOrderEntity; import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.entity.inv.InvProductEntity;
import com.glxp.api.entity.thrsys.*; import com.glxp.api.entity.thrsys.*;
import com.glxp.api.exception.JsonException; import com.glxp.api.exception.JsonException;
import com.glxp.api.http.ErpInvClient; import com.glxp.api.http.ErpInvClient;
@ -942,9 +943,27 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
item.setToBillNo(null); item.setToBillNo(null);
updateThrInvOrderDetails.add(item); updateThrInvOrderDetails.add(item);
//校验产品是否被供应商关联 //校验产品是否被供应商关联
CompanyProductRelevanceEntity udiRlSupEntity = udiRlSupService.selOneByRlId(relId); List<InvProductEntity> invProductEntities = invProductService.selectByRelId(relId, null, null, thrInvOrder.getInvCode());
if (udiRlSupEntity != null) if (CollUtil.isNotEmpty(invProductEntities)) {
item.setSupId(udiRlSupEntity.getCustomerId()); InvProductEntity invProductEntity1 = null;
for (InvProductEntity invProductEntity : invProductEntities) {
if (IntUtil.value(invProductEntity.getReCount()) > 0 && IntUtil.value(invProductEntity.getReCount()) > IntUtil.value(item.getReCount())) {
item.setSupId(invProductEntity.getSupId());
break;
} else if (IntUtil.value(invProductEntity.getReCount()) > 0) {
//随机找一个有库存的供应商
invProductEntity1 = invProductEntity;
}
}
if (StrUtil.isEmpty(item.getSupId()) && invProductEntity1 != null) {
item.setSupId(invProductEntity1.getSupId());
}
}
if (StrUtil.isEmpty(item.getSupId())) {
CompanyProductRelevanceEntity udiRlSupEntity = udiRlSupService.selOneByRlId(relId);
if (udiRlSupEntity != null)
item.setSupId(udiRlSupEntity.getCustomerId());
}
} }
} }
}); });

@ -4,9 +4,9 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt2?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true jdbc-url: jdbc:p6spy:mysql://192.168.0.59:3306/udi_wms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: Glxp@6066
hikari: hikari:
connection-timeout: 60000 connection-timeout: 60000
maximum-pool-size: 20 maximum-pool-size: 20

Loading…
Cancel
Save