fix: 库存预警

dev_fifo_z
chenhc 6 months ago
parent a9d0681260
commit 4cc4f5ec8b

@ -137,6 +137,8 @@ public class IoSplitInvResponse {
private String busName; private String busName;
private Integer availableCount; private Integer availableCount;
private Integer monopoly; private Integer monopoly;
private Integer queueRemindCount;
private String workPlaceQueueCodeName;
private Boolean queueEnableRemind;
} }

@ -289,8 +289,8 @@ public class IoSplitFifoInvService extends ServiceImpl<IoSplitFifoInvMapper, IoS
List<IoSplitInvResponse> ioSplitInvResponses = this.baseMapper.filterList(ioSplitFifoInvRequest); List<IoSplitInvResponse> ioSplitInvResponses = this.baseMapper.filterList(ioSplitFifoInvRequest);
if (CollUtil.isNotEmpty(ioSplitInvResponses)) { if (CollUtil.isNotEmpty(ioSplitInvResponses)) {
ioSplitInvResponses.forEach(t -> { ioSplitInvResponses.forEach(t -> {
if (t.getEnableRemind()) { if (t.getQueueEnableRemind()) {
int count = t.getReCount() - t.getInvRemindCount(); int count = t.getReCount() - t.getQueueRemindCount();
if (count >= 0) { if (count >= 0) {
t.setRemindState(1); t.setRemindState(1);
} else { } else {

@ -43,9 +43,13 @@
bc.name supName, bc.name supName,
sw.workPlaceName, sw.workPlaceName,
swd.busName, swd.busName,
swd.monopoly swd.monopoly,
swq.name as workPlaceQueueCodeName,
swq.enableRemind as queueEnableRemind,
swq.remindCount as queueRemindCount
from io_split_fifo_inv isfi from io_split_fifo_inv isfi
LEFT JOIN basic_udirel bu ON bu.id = isfi.relId LEFT JOIN basic_udirel bu ON bu.id = isfi.relId
LEFT JOIN sys_workplace_queue swq ON swq.code = isfi.workPlaceQueueCode
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
left join basic_corp bc on bc.erpId = isfi.supId left join basic_corp bc on bc.erpId = isfi.supId
left join sys_workplace sw on sw.workplaceId = isfi.workPlaceCode left join sys_workplace sw on sw.workplaceId = isfi.workPlaceCode
@ -92,6 +96,8 @@
<if test="keyWords != null and keyWords != ''"> <if test="keyWords != null and keyWords != ''">
AND ( AND (
isfi.workPlaceCode like concat('%', #{keyWords}, '%') isfi.workPlaceCode like concat('%', #{keyWords}, '%')
or isfi.workPlaceQueueCode like concat('%', #{keyWords}, '%')
or swq.name like concat('%', #{keyWords}, '%')
or bp.nameCode like concat('%', #{keyWords}, '%') or bp.nameCode like concat('%', #{keyWords}, '%')
or isfi.batchNo like concat('%', #{keyWords}, '%') or isfi.batchNo like concat('%', #{keyWords}, '%')
or bp.cpmctymc like concat('%', #{keyWords}, '%') or bp.cpmctymc like concat('%', #{keyWords}, '%')
@ -106,7 +112,8 @@
) )
</if> </if>
<if test="remind != null and remind == 'yj' "> <if test="remind != null and remind == 'yj' ">
AND not exists(select 1 from io_split_fifo_inv t where t.enableRemind = 0 and (t.reCount - t.invRemindCount) <![CDATA[ >= ]]> 0 and t.id = isfi.id ) AND swq.enableRemind = 1
AND (isfi.reCount - swq.remindCount) <![CDATA[ < ]]> 0
</if> </if>
</where> </where>
GROUP BY id GROUP BY id

Loading…
Cancel
Save