Commit 7f01d6099649778dee9fc053b7ff8e573cb0b7c5
1 parent
27ba095c
修复库存为0时,无法预警的问题,跳转连接修复
Showing
2 changed files
with
16 additions
and
20 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryLevel/mapper/xml/InventoryLevelAlarmMapper.xml
... | ... | @@ -4,31 +4,27 @@ |
4 | 4 | |
5 | 5 | <select id="queryLevelAlarm" |
6 | 6 | resultType="org.jeecg.modules.wms.inventory.inventoryLevel.entity.InventoryLevelAlarm"> |
7 | - select t.* from ( | |
8 | - SELECT w.*, sum(qty) as qtySum FROM inventory_detail i inner join material_warning w | |
9 | - on i.material_code = w.material_code | |
10 | - WHERE i.inventory_status='good' and i.material_code IN ( SELECT material_code FROM material_warning | |
11 | - <where> | |
12 | - <if test="materialCode != null and materialCode != ''"> | |
13 | - and material_code = #{materialCode} | |
14 | - </if> | |
15 | - <if test="materialName != null and materialName != ''"> | |
16 | - <bind name="materialNameLike" value="'%'+materialName+'%'"/> | |
17 | - and material_name like #{materialNameLike} | |
18 | - </if> | |
19 | - </where> | |
20 | - ) | |
21 | - group by material_code | |
22 | - ) t | |
7 | + select w.*, i.qtySum from ( | |
8 | + SELECT material_code, sum(qty) as qtySum FROM inventory_detail | |
9 | + WHERE inventory_status='good' and material_code IN ( SELECT material_code FROM material_warning) | |
10 | + group by material_code | |
11 | + ) i right join material_warning w on i.material_code = w.material_code | |
23 | 12 | <where> |
13 | + <if test="materialCode != null and materialCode != ''"> | |
14 | + and w.material_code = #{materialCode} | |
15 | + </if> | |
16 | + <if test="materialName != null and materialName != ''"> | |
17 | + <bind name="materialNameLike" value="'%'+materialName+'%'"/> | |
18 | + and w.material_name like #{materialNameLike} | |
19 | + </if> | |
24 | 20 | <if test="alarmStatus != null and alarmStatus == 'noAlarm'"> |
25 | 21 | and qtySum between lower and upper |
26 | 22 | </if> |
27 | 23 | <if test="alarmStatus != null and alarmStatus == 'isAlarm'"> |
28 | - and qtySum <= lower or qtySum >= upper | |
24 | + and (qtySum <= lower or qtySum >= upper or qtySum is null) | |
29 | 25 | </if> |
30 | 26 | <if test="alarmStatus != null and alarmStatus == 'lowerAlarm'"> |
31 | - and qtySum <= lower | |
27 | + and (qtySum <= lower or qtySum is null) | |
32 | 28 | </if> |
33 | 29 | <if test="alarmStatus != null and alarmStatus == 'upperAlarm'"> |
34 | 30 | and qtySum >= upper |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/InventoryLevelAlarmTask.java
... | ... | @@ -65,8 +65,8 @@ public class InventoryLevelAlarmTask implements Job { |
65 | 65 | |
66 | 66 | List<String> list = alarmList.stream().map(InventoryLevelAlarm::toString).collect(Collectors.toList()); |
67 | 67 | String msg = String.join("\n", list); |
68 | - msg = msg + "<a href='/wms/#/system/inventory/inventoryLevel'>库存水位详情</a> " + | |
69 | - "<a href='/wms/#/system/config/MaterialWarningList'>预警配置</a>"; | |
68 | + msg = msg + "<a href='/wms/index.html#/system/inventory/inventoryLevel'>库存水位详情</a>"; | |
69 | +// " <a href='/wms/index.html#/system/config/MaterialWarningList'>预警配置</a>"; | |
70 | 70 | |
71 | 71 | List<SysUser> userList; |
72 | 72 | try { |
... | ... |