ZengTao
2024-03-31 1de52d82ec5c3fb56e095a36571ab32bfdb15ca4
springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -291,11 +291,11 @@
    }
    // 开始任务
    public Result ClaimTasks(String flowcard, Integer state) {
    public Result ClaimTasks(String flowcard, Integer state, Integer line) {
        if (state == 1) {
            homeMapper.ClaimTasks(flowcard, 0);
            homeMapper.ClaimTasks(flowcard, 0,line);
        } else {
            homeMapper.ClaimTasks(flowcard, 1);
            homeMapper.ClaimTasks(flowcard, 1,line);
        }
        Map<String, Object> map = new HashMap<>();
        map.put("message", "200");
@@ -317,8 +317,10 @@
    // 修改测量信息
    public Result UpdateQueue(GlassInfo glassInfo) {
        homeMapper.UpdateQueue(glassInfo.getFlowcard(), glassInfo.getWidth(), glassInfo.getHeight(),
                glassInfo.getGlasstype());
                glassInfo.getGlasstype(),glassInfo.getThickness());
        Map<String, Object> map = new HashMap<>();
        PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
        S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1);
        map.put("message", "200");
        return Result.success(map);
    }
@@ -399,6 +401,7 @@
        System.out.println(RemoveErrorData.size());
        // 处理完成 添加数据库
        int count=1;
        for (Map map : RemoveErrorData) {
            String key = map.get("base").toString() + "_" + map.get("height").toString() + "_"
                       + map.get("thickness").toString() + "_" + map.get("films").toString();
@@ -409,18 +412,23 @@
            Integer glasstype;
            if (TypeData.get(key) == null) {
                glasstype = homeMapper.SelectMaxType();
                if (glasstype==null) {
                    glasstype=1;
                }
            } else {
                glasstype = Integer.valueOf(value);
            }
            //
            homeMapper.AddGlassinfo(map.get("order").toString(), glasstype,
                    Integer.parseInt(map.get("matching").toString()) // 需要计算 配片ID
                    , glasstype+"" // 需要计算 玻璃ID
                    ,map.get("order").toString()+"-"+count+"" // 需要计算 玻璃ID
                    , Integer.parseInt(map.get("tier").toString()), map.get("films").toString(),
                    Double.parseDouble(map.get("base").toString()), Double.parseDouble(map.get("height").toString()),
                    Double.parseDouble(map.get("thickness").toString()),
                    Integer.parseInt(map.get("quantity").toString()),groupby.get(tierkey));// 需要计算总层数
            //订单内总层数
            homeMapper.InsertFlowcard(map.get("order").toString(),OrderFinishedProduct.get(tierkey+"_Sum")); 
            count++;
        }
        Map<String, Object> ResultCode = new HashMap<>();
        ResultCode.put("message", "200");