src/main/java/com/zy/asrs/controller/LocMastController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/mapper/LocMastMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/service/LocMastService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/common/config/AdminInterceptor.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/static/js/pakStore/locMove.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/views/pakStore/locMove.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -39,6 +39,12 @@ return R.ok().add(Parameter.get().getLocMastInitPwd().equals(pwd)); } @PostMapping(value = "/group/empty/stock") @ManagerAuth(memo = "获取同组货架的空库位") public R getGroupEmptyStock(@RequestParam String sourceLocNo) { return R.ok().add(locMastService.queryGroupEmptyStock(sourceLocNo)); } @RequestMapping(value = "/locMast/{id}/auth") @ManagerAuth public R get(@PathVariable("id") String id) { src/main/java/com/zy/asrs/mapper/LocMastMapper.java
@@ -4,7 +4,10 @@ import com.zy.asrs.entity.LocMast; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; import java.util.List; @Mapper @Repository @@ -12,4 +15,7 @@ LocMast queryFreeLocMast(@Param("row") Integer row); @Select("select loc_no from asr_loc_mast where 1=1 and loc_type = 'O' and crn_no = #{crnNo}") List<String> queryGroupEmptyStock(Integer crnNo); } src/main/java/com/zy/asrs/service/LocMastService.java
@@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.service.IService; import com.zy.asrs.entity.LocMast; import java.util.List; public interface LocMastService extends IService<LocMast> { /** @@ -10,4 +12,10 @@ */ LocMast queryFreeLocMast(Integer row); /** * 获取同组货架的空库位 * @param sourceLocNo 源库位 * @return 同组空库位集合 */ List<String> queryGroupEmptyStock(String sourceLocNo); } src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -1,16 +1,37 @@ package com.zy.asrs.service.impl; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.core.common.Cools; import com.core.exception.CoolException; import com.zy.asrs.entity.LocMast; import com.zy.asrs.mapper.LocMastMapper; import com.zy.asrs.service.LocMastService; import com.zy.asrs.service.RowLastnoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service("locMastService") public class LocMastServiceImpl extends ServiceImpl<LocMastMapper, LocMast> implements LocMastService { @Autowired private RowLastnoService rowLastnoService; @Override public LocMast queryFreeLocMast(Integer row) { return this.baseMapper.queryFreeLocMast(row); } @Override public List<String> queryGroupEmptyStock(String sourceLocNo) { if (Cools.isEmpty(sourceLocNo)) { throw new CoolException("源库位不能为空"); } LocMast sourceStock = this.selectById(sourceLocNo); if (Cools.isEmpty(sourceStock)) { throw new CoolException("源库位不存在"); } return this.baseMapper.queryGroupEmptyStock(sourceStock.getCrnNo()); } } src/main/java/com/zy/common/config/AdminInterceptor.java
@@ -96,8 +96,8 @@ User user = userService.selectById(userLogin.getUserId()); String deToken = Cools.deTokn(token, user.getPassword()); long timestamp = Long.parseLong(deToken.substring(0, 13)); // 1天后过期 if (System.currentTimeMillis() - timestamp > 86400000){ // 15分钟后过期 if (System.currentTimeMillis() - timestamp > 900000){ Http.response(response, BaseRes.DENIED); return false; } src/main/resources/application.yml
@@ -28,8 +28,8 @@ mapper-locations: classpath:mapper/*.xml # global-config: # field-strategy: 0 configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # configuration: # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl logging: path: /stock/out/logs src/main/webapp/static/js/pakStore/locMove.js
@@ -4,7 +4,6 @@ var table = layui.table; var $ = layui.jquery; var layer = layui.layer; var layDate = layui.laydate; var form = layui.form; // 数据渲染 @@ -14,8 +13,8 @@ // url: baseUrl+'/locDetl/list/auth', data:[], page: true, limit: 10, skin: 'line', limit: 16, limits: [16, 50, 100, 200, 500], even: true, cellMinWidth: 50, cols: [[ @@ -66,23 +65,26 @@ }); // 搜索库位物料 function getLoc() { let locNo = $("#locNo\\$").val(); if (locNo === undefined || locNo === null || locNo === "") { layer.msg("请填写库位号"); $('.search-input').css("border-color", "red"); setTimeout(function () { $('.search-input').css("border-color", "#b8b8b8"); }, 2000); return; } function getLoc(el) { tableIns.reload({ url: baseUrl+'/locDetl/list/auth' , where: {loc_no: locNo} , where: {loc_no: el.value} , done:function (res) { limit(); } }); http.post(baseUrl + "/locMast/"+el.value+"/auth", null, function (res) { if (res.data != null) { // 获取同一堆垛机的空库位 http.post(baseUrl + "/group/empty/stock", {sourceLocNo: el.value}, function (res) { var tpl = $("#emptyLocStock").html(); var template = Handlebars.compile(tpl); var html = template(res); console.log(html); $('.layui-anim.layui-anim-upbit').append(html); }); } }) } // 移库启动 src/main/webapp/views/pakStore/locMove.html
@@ -71,27 +71,24 @@ </head> <body> <div class="function-area" style="border-right: 1px solid #d5d5d5"> <div class="layui-inline"> <div class="layui-input-inline cool-auto-complete"> <input id="locNo$" class="layui-input cool-auto-complete-div search-input" type="text" placeholder="库位号" autocomplete="off" style="cursor: initial"> </div> </div> <button id="loc-query-btn" class="function-btn" onclick="getLoc()">搜索</button> </div> <div class="function-area"> <div class="function-area layui-form"> <!-- 源库位 --> <div class="layui-inline"> <div class="layui-input-inline"> <input id="sourceLocNo" class="layui-input cool-auto-complete-div" onkeyup="locStatus(this)" type="text" placeholder="源库位" style="width: 150px;cursor: initial" autocomplete="off"> <input id="sourceLocNo" value="0100203" class="layui-input cool-auto-complete-div" onkeyup="getLoc(this)" type="text" placeholder="源库位" style="width: 150px;cursor: initial" autocomplete="off"> </div> </div> <div class="layui-form-mid" style="float: none; display: inline-block; margin-left: 10px">-</div> <!-- 目标库位 --> <div class="layui-inline"> <div class="layui-input-inline"> <input id="targetLocNo" class="layui-input cool-auto-complete-div" onkeyup="locStatus(this)" type="text" placeholder="目标库位" style="width: 150px;cursor: initial" autocomplete="off"> </div> <!-- <div class="layui-inline">--> <!-- <div class="layui-input-inline">--> <!-- <input id="targetLocNo" class="layui-input cool-auto-complete-div" onkeyup="locStatus(this)" type="text" placeholder="目标库位" style="width: 150px;cursor: initial" autocomplete="off">--> <!-- </div>--> <!-- </div>--> <div class="layui-input-inline"> <select id="targetLocNo" name="modules" lay-verify="required" lay-search=""> <option value="">目标库位</option> </select> </div> <button id="loc-move-btn" class="function-btn" onclick="locMove()" style="background: #4476A7;text-shadow: inherit;height: 45px;font-size: 15px;margin-left: 20px">库位移转</button> </div> @@ -107,7 +104,10 @@ <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> <script type="text/javascript" src="../../static/js/pakStore/locMove.js" charset="utf-8"></script> <script type="text/template" id=""> <script type="text/template" id="emptyLocStock"> {{#each data}} <dd lay-value="{{this}}" class>{{this}}</dd> {{/each}} </script> <div id="locMoveWindow" style="height: 100%;display: none">