fix: 库存预警

dev_fifo_z
chenhc 6 months ago
parent a9d0681260
commit 4cc4f5ec8b

@ -137,6 +137,8 @@ public class IoSplitInvResponse {
private String busName;
private Integer availableCount;
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);
if (CollUtil.isNotEmpty(ioSplitInvResponses)) {
ioSplitInvResponses.forEach(t -> {
if (t.getEnableRemind()) {
int count = t.getReCount() - t.getInvRemindCount();
if (t.getQueueEnableRemind()) {
int count = t.getReCount() - t.getQueueRemindCount();
if (count >= 0) {
t.setRemindState(1);
} else {

@ -43,9 +43,13 @@
bc.name supName,
sw.workPlaceName,
swd.busName,
swd.monopoly
swd.monopoly,
swq.name as workPlaceQueueCodeName,
swq.enableRemind as queueEnableRemind,
swq.remindCount as queueRemindCount
from io_split_fifo_inv isfi
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_corp bc on bc.erpId = isfi.supId
left join sys_workplace sw on sw.workplaceId = isfi.workPlaceCode
@ -92,6 +96,8 @@
<if test="keyWords != null and keyWords != ''">
AND (
isfi.workPlaceCode like concat('%', #{keyWords}, '%')
or isfi.workPlaceQueueCode like concat('%', #{keyWords}, '%')
or swq.name like concat('%', #{keyWords}, '%')
or bp.nameCode like concat('%', #{keyWords}, '%')
or isfi.batchNo like concat('%', #{keyWords}, '%')
or bp.cpmctymc like concat('%', #{keyWords}, '%')
@ -106,7 +112,8 @@
)
</if>
<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>
</where>
GROUP BY id

Loading…
Cancel
Save