#
Junjie
1 天以前 707f8db2227a6031f230e35895ea1c5f7ff03bd6
#
11个文件已修改
179 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/BasDevp.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocMastMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocMastService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/network/fake/ZyStationFakeConnect.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/map/上海临港哥斯拉项目.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BasDevpMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocMastMapper.xml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/basDevp/basDevp.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/basDevp/basDevp.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/BasDevp.java
@@ -106,6 +106,13 @@
    @TableField("out_station_list")
    private String outStationList;
    /**
     * è¿è¡Œå µå¡žé‡æ–°åˆ†é…åº“位站点数据
     */
    @ApiModelProperty(value= "运行堵塞重新分配库位站点数据")
    @TableField("run_block_reassign_loc_station_list")
    private String runBlockReassignLocStationList;
    public BasDevp() {}
    public BasDevp(Integer devpNo,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,String stationList,String barcodeStationList,String inStationList,String outStationList) {
@@ -209,4 +216,17 @@
        return list;
    }
    public List<StationObjModel> getRunBlockReassignLocStationList$(){
        List<StationObjModel> list = new ArrayList<>();
        if (Cools.isEmpty(this.runBlockReassignLocStationList)){
            return list;
        }
        List<StationObjModel> jsonList = JSON.parseArray(this.runBlockReassignLocStationList, StationObjModel.class);
        for (StationObjModel json : jsonList){
            list.add(json);
        }
        return list;
    }
}
src/main/java/com/zy/asrs/mapper/LocMastMapper.java
@@ -14,13 +14,7 @@
    LocMast queryByLoc(String locNo);
    LocMast queryByQrCode(String qrCodeValue);
    List<LocMast> selectLocByLev(Integer lev);
    List<LocMast> selectEmptyLocNos(@Param("locNos") List<String> locNos);
    List<LocMast> selectNotEmptyLocNos(@Param("locNos") List<String> locNos);
    //查询所有楼层
    List<Integer> getLevList();
src/main/java/com/zy/asrs/service/LocMastService.java
@@ -9,14 +9,8 @@
    LocMast queryByLoc(String locNo);
    LocMast queryByQrCode(String qrCodeValue);
    //查询指定楼层的库位数据
    List<LocMast> selectLocByLev(Integer lev);
    List<LocMast> selectEmptyLocNos(List<String> locNos);
    List<LocMast> selectNotEmptyLocNos(List<String> locNos);
    //查询所有楼层
    List<Integer> getLevList();
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -19,26 +19,8 @@
    }
    @Override
    public LocMast queryByQrCode(String qrCodeValue) {
        return this.baseMapper.queryByQrCode(qrCodeValue);
    }
    @Override
    public List<LocMast> selectLocByLev(Integer lev) {
        return this.baseMapper.selectLocByLev(lev);
    }
    @Override
    public List<LocMast> selectEmptyLocNos(List<String> locNos) {
        return this.baseMapper.selectEmptyLocNos(locNos);
    }
    @Override
    public List<LocMast> selectNotEmptyLocNos(List<String> locNos) {
        if (locNos.isEmpty()) {
            return new ArrayList<LocMast>();
        }
        return this.baseMapper.selectNotEmptyLocNos(locNos);
    }
    @Override
src/main/java/com/zy/core/network/fake/ZyStationFakeConnect.java
@@ -14,6 +14,7 @@
import com.zy.core.network.api.ZyStationConnectApi;
import com.zy.core.network.entity.ZyStationStatusEntity;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -293,7 +294,16 @@
            }
            if (!checkTaskNoInArea(taskNo)) {
                if (System.currentTimeMillis() - executeTime > 1000 * 10) {
                boolean fakeAllowCheckBlock = true;
                Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
                if (systemConfigMapObj != null) {
                    HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
                    if (!systemConfigMap.get("fakeAllowCheckBlock").equals("Y")) {
                        fakeAllowCheckBlock = false;
                    }
                }
                if (fakeAllowCheckBlock && System.currentTimeMillis() - executeTime > 1000 * 10) {
                    //认定堵塞
                    boolean result = runBlockStation(taskNo, currentStationId, taskNo, currentStationId);
                    if(!result) {
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
@@ -5,14 +5,8 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.zy.asrs.domain.param.CreateInTaskParam;
import com.zy.asrs.entity.BasCrnp;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.entity.HttpRequestLog;
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.BasCrnpService;
import com.zy.asrs.service.BasDevpService;
import com.zy.asrs.service.HttpRequestLogService;
import com.zy.asrs.service.WrkMastService;
import com.zy.asrs.entity.*;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.Utils;
import com.zy.common.model.StartupDto;
import com.zy.common.service.CommonService;
@@ -53,6 +47,8 @@
    private ConfigService configService;
    @Autowired
    private HttpRequestLogService httpRequestLogService;
    @Autowired
    private LocMastService locMastService;
    //执行输送站点入库任务
    public synchronized void stationInExecute() {
@@ -253,6 +249,11 @@
                continue;
            }
            List<Integer> runBlockReassignLocStationList = new ArrayList<>();
            for (StationObjModel stationObjModel : basDevp.getRunBlockReassignLocStationList$()) {
                runBlockReassignLocStationList.add(stationObjModel.getStationId());
            }
            List<StationProtocol> list = stationThread.getStatus();
            for (StationProtocol stationProtocol : list) {
                if(stationProtocol.isAutoing()
@@ -260,7 +261,6 @@
                    && stationProtocol.getTaskNo() > 0
                    && stationProtocol.isRunBlock()
                ) {
                    //运行堵塞,重新申请任务
                    WrkMast wrkMast = wrkMastService.selectByWorkNo(stationProtocol.getTaskNo());
                    if (wrkMast == null) {
                        News.info("输送站点号={} è¿è¡Œé˜»å¡žï¼Œä½†æ— æ³•找到对应任务,工作号={}", stationProtocol.getStationId(), stationProtocol.getTaskNo());
@@ -271,8 +271,11 @@
                    if (lock != null) {
                        continue;
                    }
                    redisUtil.set(RedisKeyType.CHECK_STATION_RUN_BLOCK_LIMIT_.key + stationProtocol.getTaskNo(), "lock", 15);
                    if (runBlockReassignLocStationList.contains(stationProtocol.getStationId())) {
                        //站点处于重新分配库位区域
                        //运行堵塞,重新申请任务
                    HashMap<String, Object> requestParam = new HashMap<>();
                    String response = null;
@@ -290,10 +293,30 @@
                        if (jsonObject.getInteger("code").equals(200)) {
                            StartupDto dto = jsonObject.getObject("data", StartupDto.class);
                                String sourceLocNo = wrkMast.getLocNo();
                            String locNo = dto.getLocNo();
                            //更新数据
                            wrkMast.setLocNo(locNo);
                            wrkMastService.updateById(wrkMast);
                                LocMast sourceLocMast = locMastService.queryByLoc(sourceLocNo);
                                if (sourceLocMast == null) {
                                    News.taskInfo(wrkMast.getWrkNo(), "库位号:{} æºåº“位信息不存在", sourceLocNo);
                                    continue;
                                }
                                if (!sourceLocMast.getLocSts().equals("S")) {
                                    News.taskInfo(wrkMast.getWrkNo(), "库位号:{} æºåº“位状态不处于入库预约", sourceLocNo);
                                    continue;
                                }
                                LocMast locMast = locMastService.queryByLoc(locNo);
                                if (locMast == null) {
                                    News.taskInfo(wrkMast.getWrkNo(), "库位号:{} ç›®æ ‡åº“位信息不存在", locNo);
                                    continue;
                                }
                                if (!locMast.getLocSts().equals("O")) {
                                    News.taskInfo(wrkMast.getWrkNo(), "库位号:{} ç›®æ ‡åº“位状态不处于空库位", locNo);
                                    continue;
                                }
                            Integer crnNo = commonService.findCrnNoByLocNo(locNo);
                            if (crnNo == null) {
@@ -312,7 +335,24 @@
                                News.taskInfo(wrkMast.getWrkNo(), "获取输送线命令失败");
                                continue;
                            }
                                //更新源库位
                                sourceLocMast.setLocSts("O");
                                sourceLocMast.setModiTime(new Date());
                                locMastService.updateById(sourceLocMast);
                                //更新目标库位
                                locMast.setLocSts("S");
                                locMast.setModiTime(new Date());
                                locMastService.updateById(locMast);
                                //更新工作档数据
                                wrkMast.setLocNo(locNo);
                                wrkMast.setCrnNo(crnNo);
                                wrkMast.setStaNo(targetStationId);
                                if (wrkMastService.updateById(wrkMast)) {
                            MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command));
                                }
                            News.info("请求WMS接口成功!!!url:{};request:{};response:{}", wmsUrl + wmsSystemReassignInTaskUrl, JSON.toJSONString(requestParam), response);
                        } else {
                            News.error("请求WMS接口失败!!!url:{};request:{};response:{}", wmsUrl + wmsSystemReassignInTaskUrl, JSON.toJSONString(requestParam), response);
@@ -327,6 +367,17 @@
                        httpRequestLog.setCreateTime(new Date());
                        httpRequestLogService.insert(httpRequestLog);
                    }
                    }else {
                        //运行堵塞,重新计算路线
                        StationCommand command = stationThread.getMoveCommand(wrkMast.getWrkNo(), stationProtocol.getStationId(), wrkMast.getStaNo(), 0);
                        if(command == null){
                            News.taskInfo(wrkMast.getWrkNo(), "获取输送线命令失败");
                            continue;
                        }
                        MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command));
                        News.info("输送站点堵塞后重新计算路径命令下发成功,站点号={},工作号={},命令数据={}", stationProtocol.getStationId(), wrkMast.getWrkNo(), JSON.toJSONString(command));
                    }
                }
            }
        }
src/main/resources/map/ÉϺ£ÁÙ¸Û¸ç˹À­ÏîÄ¿.xlsx
Binary files differ
src/main/resources/mapper/BasDevpMapper.xml
@@ -16,6 +16,7 @@
        <result column="barcode_station_list" property="barcodeStationList" />
        <result column="in_station_list" property="inStationList" />
        <result column="out_station_list" property="outStationList" />
        <result column="run_block_reassign_loc_station_list" property="runBlockReassignLocStationList" />
    </resultMap>
src/main/resources/mapper/LocMastMapper.xml
@@ -30,32 +30,8 @@
        select * from asr_loc_mast where loc_no = #{locNo} limit 0,1
    </select>
    <select id="queryByQrCode" resultMap="BaseResultMap">
        select * from asr_loc_mast where qr_code_value = #{qrCodeValue} limit 0,1
    </select>
    <select id="selectLocByLev" resultMap="BaseResultMap">
        SELECT * FROM asr_loc_mast WHERE lev1 = #{lev}
    </select>
    <select id="selectEmptyLocNos" resultMap="BaseResultMap">
        select * from asr_loc_mast
        where loc_no in
        <foreach item="loc" collection="locNos" index="index"  separator="," open="(" close=")">
            #{loc}
        </foreach>
        and loc_sts = 'O'
        order by row1
    </select>
    <select id="selectNotEmptyLocNos" resultMap="BaseResultMap">
        select * from asr_loc_mast
        where loc_no in
        <foreach item="loc" collection="locNos" index="index"  separator="," open="(" close=")">
            #{loc}
        </foreach>
        and loc_sts not in ('O')
        order by row1
    </select>
    <select id="getLevList" resultType="java.lang.Integer">
src/main/webapp/static/js/basDevp/basDevp.js
@@ -28,15 +28,16 @@
          { field: "id", align: "center", title: "编号" },
          { field: "devpNo", align: "center", title: "设备编号" },
          { field: "status$", align: "center", title: "状态" },
          { field: "createBy", align: "center", title: "创建人员" },
          { field: "createTime$", align: "center", title: "创建时间" },
          { field: "updateBy", align: "center", title: "修改人员" },
          { field: "updateTime$", align: "center", title: "修改时间" },
          // { field: "createBy", align: "center", title: "创建人员" },
          // { field: "createTime$", align: "center", title: "创建时间" },
          // { field: "updateBy", align: "center", title: "修改人员" },
          // { field: "updateTime$", align: "center", title: "修改时间" },
          { field: "memo", align: "center", title: "备注" },
          { field: "stationList", align: "center", title: "站点数据" },
          { field: "barcodeStationList", align: "center", title: "条码站点数据" },
          { field: "inStationList", align: "center", title: "入库站点数据" },
          { field: "outStationList", align: "center", title: "出库站点数据" },
          { field: "runBlockReassignLocStationList", align: "center", title: "运行堵塞重新分配库位站点数据" },
          {
            fixed: "right",
src/main/webapp/views/basDevp/basDevp.html
@@ -143,6 +143,12 @@
                        <input class="layui-input" name="outStationList" placeholder="请输入出库站点数据">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">运行堵塞重新分配库位站点数据: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="runBlockReassignLocStationList" placeholder="请输入运行堵塞重新分配库位站点数据">
                    </div>
                </div>
             </div>
        </div>