| src/main/java/com/zy/asrs/task/WorkLogScheduler.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/resources/mapper/ViewWorkInMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/webapp/static/js/common.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/webapp/views/matInOut/matInOut.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/webapp/views/report/viewWorkIn.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/webapp/views/report/viewWorkOut.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/task/WorkLogScheduler.java
@@ -1,21 +1,18 @@ package com.zy.asrs.task; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.common.Cools; import com.core.exception.CoolException; import com.zy.asrs.entity.Order; import com.zy.asrs.entity.OrderDetl; import com.zy.asrs.entity.WrkDetl; import com.zy.asrs.entity.WrkMast; import com.zy.asrs.entity.*; import com.zy.asrs.mapper.OrderDetlMapper; import com.zy.asrs.service.OrderService; import com.zy.asrs.service.WrkDetlService; import com.zy.asrs.service.WrkMastService; import com.zy.asrs.service.*; import com.zy.asrs.task.core.ReturnT; import com.zy.asrs.task.handler.WorkLogHandler; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -36,6 +33,33 @@ private WrkDetlService wrkDetlService; @Autowired private OrderDetlMapper orderDetlMapper; @Autowired private WrkDetlLogService wrkDetlLogService; @Autowired private MatService matService; @Scheduled(cron = "0/3 * * * * ? ") // @Transactional(rollbackFor = Exception.class) private void replenishColor() { List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectList(new EntityWrapper<WrkDetlLog>().isNull("color")); for (WrkDetlLog wrkDetlLog : wrkDetlLogs) { Mat mat = matService.selectByMatnr(wrkDetlLog.getMatnr()); if(null==mat){ wrkDetlLog.setColor("未知"); }else { wrkDetlLog.setColor(mat.getColor()); } boolean update = wrkDetlLogService.update(wrkDetlLog, new EntityWrapper<WrkDetlLog>() .eq("wrk_no", wrkDetlLog.getWrkNo()) .eq("matnr", wrkDetlLog.getMatnr()) .eq(!Cools.isEmpty(wrkDetlLog.getIoTime()),"io_time", wrkDetlLog.getIoTime())); if (!update) { throw new CoolException("状态为空,更新历史档失败"); } } } @Scheduled(cron = "0/3 * * * * ? ") private void execute() { src/main/resources/mapper/ViewWorkInMapper.xml
@@ -48,6 +48,9 @@ <if test="specs != null and specs != ''"> and specs like concat('%',#{specs},'%') </if> <if test="color != null and color != ''"> and color like concat('%',#{color},'%') </if> <if test="outOrderNo != null and outOrderNo != ''"> and out_order_no like concat('%',#{outOrderNo},'%') </if> src/main/webapp/static/js/common.js
@@ -239,7 +239,7 @@ ,{field: 'anfme', align: 'center',title: '数量', hide: false} ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: false} ,{field: 'specs', align: 'center',title: '规格', hide: false} ,{field: 'color', align: 'center',title: '颜色', hide: true} ,{field: 'color', align: 'center',title: '状态', hide: true} ,{field: 'brand', align: 'center',title: '品牌', hide: true} ,{field: 'price', align: 'center',title: '单价', hide: true} ,{field: 'sku', align: 'center',title: '材质', hide: true} src/main/webapp/views/matInOut/matInOut.html
@@ -51,6 +51,23 @@ </div> <div class="layui-inline"> <div class="layui-input-inline"> <select name="color" id="color" class="layui-input" type="text" placeholder="状态" autocomplete="off"> <option value="">状态</option> <option value="正常">正常</option> <option value="报废">报废</option> <option value="试模">试模</option> <option value="上机">上机</option> <option value="接收">接收</option> <option value="机台">机台</option> <option value="封存">封存</option> <option value="返修待检">返修待检</option> <option value="返厂维修">返厂维修</option> </select> </div> </div> <div class="layui-inline"> <div class="layui-input-inline"> <select name="temp1" id="temp1" class="layui-input" type="text" placeholder="属性" autocomplete="off"> <option value="">属性</option> <option value="在库">在库</option> src/main/webapp/views/report/viewWorkIn.html
@@ -41,6 +41,11 @@ </div> <div class="layui-inline"> <div class="layui-input-inline"> <input class="layui-input" type="text" name="color" placeholder="状态" autocomplete="off"> </div> </div> <div class="layui-inline"> <div class="layui-input-inline"> <input class="layui-input" type="text" name="batch" placeholder="货品特征" autocomplete="off"> </div> </div> src/main/webapp/views/report/viewWorkOut.html
@@ -41,6 +41,11 @@ </div> <div class="layui-inline"> <div class="layui-input-inline"> <input class="layui-input" type="text" name="color" placeholder="状态" autocomplete="off"> </div> </div> <div class="layui-inline"> <div class="layui-input-inline"> <input class="layui-input" type="text" name="batch" placeholder="货品特征" autocomplete="off"> </div> </div>