代码备份(物资库存录入批次号问题)

lh_dev_fifo
anthonywj 11 months ago
parent a5c6d5b44e
commit 0bcc9cb723

@ -338,7 +338,7 @@ public class IoAddInoutService {
//校验库存
for (IoOrderDetailBizEntity bizEntity : bizEntities) {
if (StrUtil.isNotEmpty(bizEntity.getBatchNo())) {
List<InvProductEntity> invProductEntities = invProductService.selectByRelId(bizEntity.getBindRlFk(), bizEntity.getSupId(), null, orderEntity.getInvCode());
List<InvProductEntity> invProductEntities = invProductService.selectByBatchNo(bizEntity.getBindRlFk(), bizEntity.getSupId(), null, orderEntity.getInvCode(), bizEntity.getBatchNo());
if (CollUtil.isNotEmpty(invProductEntities)) {
int count = 0;
for (InvProductEntity invProductEntity : invProductEntities) {

@ -48,7 +48,7 @@ public class InvProductService extends ServiceImpl<InvProductDao, InvProductEnti
return invProductDao.selectOne(new QueryWrapper<InvProductEntity>().eq("relIdFk", relId)
.eq(StrUtil.isNotBlank(batchNo), "batchNo", batchNo).isNull(StrUtil.isEmpty(batchNo), "batchNo")
.eq("supId", supId)
.eq(StrUtil.isNotBlank(deptCode),"deptCode", deptCode)
.eq(StrUtil.isNotBlank(deptCode), "deptCode", deptCode)
.eq("invCode", invCode)
.eq(price != null, "price", price).isNull(price == null, "price").last("limit 1")
);
@ -62,6 +62,15 @@ public class InvProductService extends ServiceImpl<InvProductDao, InvProductEnti
);
}
public List<InvProductEntity> selectByBatchNo(Long relId, String supId, String deptCode, String invCode, String batchNo) {
return invProductDao.selectList(new QueryWrapper<InvProductEntity>().eq("relIdFk", relId)
.eq("supId", supId)
.eq(StrUtil.isNotEmpty(deptCode), "deptCode", deptCode)
.eq(StrUtil.isNotEmpty(batchNo), "batchNo", batchNo)
.eq("invCode", invCode).gt("reCount", 0).orderByAsc("inBatchNo")
);
}
public InvProductEntity selectByUnique(Long relId, String batchNo, String supId) {
return invProductDao.selectOne(new QueryWrapper<InvProductEntity>().eq("relIdFk", relId).eq(StrUtil.isNotEmpty(batchNo), "batchNo", batchNo)

@ -4,7 +4,7 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
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
username: root
password: 123456
hikari:

Loading…
Cancel
Save