#
ytfl
2025-08-15 aa492470e4cb713ff42a1847add19e738e67c36a
#
3个文件已修改
49 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/CrnController.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/CrnMsgTableVo.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/crn.html 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/CrnController.java
@@ -35,6 +35,8 @@
import com.zy.core.model.protocol.CrnProtocol;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.properties.SystemProperties;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -68,6 +70,8 @@
    private MainServiceImpl mainService;
    @Autowired
    private LocMastService locMastService;
    @Autowired
    private ConfigService configService;
    @ManagerAuth(memo = "进行中的命令")
@@ -138,6 +142,16 @@
    @PostMapping("/table/crn/msg")
    @ManagerAuth(memo = "堆垛机数据表")
    public R crnMsgTable(){
        Config crnSearchDetectTaskCountConfig = configService.selectOne(new EntityWrapper<Config>()
                .eq("code", "crnSearchDetectTaskCount")
        );
        int crnSearchDetectTaskCount = Integer.parseInt(crnSearchDetectTaskCountConfig.getValue());
        Config applyInTaskTotalCountConfig = configService.selectOne(new EntityWrapper<Config>()
                .eq("code", "applyInTaskTotalCount")
        );
        int applyInTaskTotalCount = Integer.parseInt(applyInTaskTotalCountConfig.getValue());
        List<CrnMsgTableVo> list = new ArrayList<>();
        List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no"));
        for (BasCrnp basCrnp : crnps) {
@@ -175,6 +189,20 @@
            vo.setYdistance(crnProtocol.getYDistance());  //  升降距离(Km)
            vo.setXduration(crnProtocol.getXDuration());    //  走行时长(H)
            vo.setYduration(crnProtocol.getYDuration());    //  升降时长(H)
            vo.setCrnSearchDetectTaskCount(crnSearchDetectTaskCount);
            vo.setApplyInTaskTotalCount(applyInTaskTotalCount);
            List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                    .eq("crn_no", basCrnp.getCrnNo())
                    .in("io_type", 1, 10, 53, 57)
            );
            vo.setCurrentInTask(inWrkMasts.size());
            List<WrkMast> wrkMastsList = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                    .eq("crn_no", basCrnp.getCrnNo())
                    .in("io_type", 1, 10, 53, 57, 101, 103, 107, 110)
            );
            vo.setCurrentTotalTask(wrkMastsList.size());
        }
        return R.ok().add(list);
    }
src/main/java/com/zy/asrs/domain/vo/CrnMsgTableVo.java
@@ -60,6 +60,14 @@
    // 升降时长(H)
    private Float yduration = 0.0F;
    private Integer crnSearchDetectTaskCount;
    private Integer applyInTaskTotalCount;
    private Integer currentInTask;
    private Integer currentTotalTask;
    public void setXspeed(Float xspeed) {
        this.xspeed = Utils.scale(xspeed);
    }
src/main/webapp/views/crn.html
@@ -132,6 +132,10 @@
                    <th>升降距离(Km)</th>
                    <th>走行时长(H)</th>
                    <th>升降时长(H)</th>
                    <th>入库任务上限</th>
                    <th>当前入库任务</th>
                    <th>总任务数量上限</th>
                    <th>当前总任务数量</th>
                </tr>
                </thead>
                <tbody>
@@ -352,6 +356,7 @@
                        crnMsgTableFullRows = table.length;
                    }
                    for (var i=1;i<=table.length;i++){
                        console.log(table[i-1])
                        var tr = tableEl.find("tr").eq(i);
                        setVal(tr.children("td").eq(0), table[i-1].crnNo);
                        setVal(tr.children("td").eq(1), table[i-1].workNo);
@@ -367,6 +372,10 @@
                        setVal(tr.children("td").eq(11), table[i-1].ydistance);
                        setVal(tr.children("td").eq(12), table[i-1].xduration);
                        setVal(tr.children("td").eq(13), table[i-1].yduration);
                        setVal(tr.children("td").eq(14), table[i-1].crnSearchDetectTaskCount);
                        setVal(tr.children("td").eq(15), table[i-1].currentInTask);
                        setVal(tr.children("td").eq(16), table[i-1].applyInTaskTotalCount);
                        setVal(tr.children("td").eq(17), table[i-1].currentTotalTask);
                    }
                } else if (res.code === 403){
                    window.location.href = baseUrl+"/login";
@@ -569,6 +578,10 @@
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "     </tr>\n";
        }
        $('#crn-msg-table tbody').after(html);