From 470718b6f7de2688807a59b4e32f437624c51499 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期四, 15 一月 2026 16:06:17 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java |  367 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 365 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java b/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
index 26954d7..52ff58a 100644
--- a/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
+++ b/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
@@ -4,6 +4,7 @@
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.exception.CoolException;
+import com.zy.asrs.domain.enums.NotifyMsgType;
 import com.zy.asrs.domain.param.CreateLocMoveTaskParam;
 import com.zy.asrs.entity.BasCrnp;
 import com.zy.asrs.entity.LocMast;
@@ -11,6 +12,7 @@
 import com.zy.asrs.service.BasCrnpService;
 import com.zy.asrs.service.LocMastService;
 import com.zy.asrs.service.WrkMastService;
+import com.zy.asrs.utils.NotifyUtils;
 import com.zy.asrs.utils.Utils;
 import com.zy.common.model.StartupDto;
 import com.zy.common.service.CommonService;
@@ -30,6 +32,7 @@
 import org.springframework.stereotype.Component;
 
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -48,9 +51,23 @@
     private WmsOperateUtils wmsOperateUtils;
     @Autowired
     private CommonService commonService;
+    @Autowired
+    private NotifyUtils notifyUtils;
+
+    public synchronized void crnIoExecute() {
+        Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
+        if (systemConfigMapObj != null) {
+            HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
+            if (systemConfigMap.get("crnRunMethod").equals("solver")) {
+                plannerExecute();
+            }else {
+                crnIoExecuteNormal();
+            }
+        }
+    }
 
     //鍏ュ嚭搴�  ===>>  鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂
-    public synchronized void crnIoExecute() {
+    public synchronized void crnIoExecuteNormal() {
         List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>());
         for (BasCrnp basCrnp : basCrnps) {
             CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, basCrnp.getCrnNo());
@@ -162,7 +179,6 @@
             }
 
             if(wrkMast.getWrkSts() != WrkStsType.INBOUND_DEVICE_RUN.sts){
-                News.taskInfo(stationProtocol.getTaskNo(), "宸ヤ綔鍙�:{} 浠诲姟鐘舵�佸紓甯�", stationProtocol.getTaskNo());
                 continue;
             }
 
@@ -195,6 +211,7 @@
             wrkMast.setIoTime(new Date());
             if (wrkMastService.updateById(wrkMast)) {
                 MessageQueue.offer(SlaveType.Crn, crnNo, new Task(2, command));
+                notifyUtils.notify(String.valueOf(SlaveType.Crn), crnNo, String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_IN_TASK_RUN, null);
                 News.info("鍫嗗灈鏈哄懡浠や笅鍙戞垚鍔燂紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", crnNo, JSON.toJSON(command));
             }
         }
@@ -283,11 +300,190 @@
                 wrkMast.setIoTime(new Date());
                 if (wrkMastService.updateById(wrkMast)) {
                     MessageQueue.offer(SlaveType.Crn, crnNo, new Task(2, command));
+                    notifyUtils.notify(String.valueOf(SlaveType.Crn), crnNo, String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_OUT_TASK_RUN, null);
                     News.info("鍫嗗灈鏈哄懡浠や笅鍙戞垚鍔燂紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", crnNo, JSON.toJSON(command));
                     return;
                 }
             }
         }
+    }
+
+    private synchronized boolean crnExecuteInPlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) {
+        CrnProtocol crnProtocol = crnThread.getStatus();
+        if (crnProtocol == null) {
+            return false;
+        }
+
+        if (!basCrnp.getInEnable().equals("Y")) {
+            News.info("鍫嗗灈鏈�:{} 鍙叆淇″彿涓嶆弧瓒�", basCrnp.getCrnNo());
+            return false;
+        }
+
+        List<StationObjModel> inStationList = basCrnp.getInStationList$();
+        if (inStationList.isEmpty()) {
+            News.info("鍫嗗灈鏈�:{} 鍏ュ簱绔欑偣鏈缃�", basCrnp.getCrnNo());
+            return false;
+        }
+
+        Integer crnNo = basCrnp.getCrnNo();
+
+        for (StationObjModel stationObjModel : inStationList) {
+            StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, stationObjModel.getDeviceNo());
+            if (stationThread == null) {
+                continue;
+            }
+
+            Map<Integer, StationProtocol> stationProtocolMap = stationThread.getStatusMap();
+            StationProtocol stationProtocol = stationProtocolMap.get(stationObjModel.getStationId());
+            if (stationProtocol == null) {
+                continue;
+            }
+
+            if (!stationProtocol.isAutoing()) {
+                continue;
+            }
+
+            if (!stationProtocol.isLoading()) {
+                continue;
+            }
+
+            if (stationProtocol.getTaskNo() <= 0) {
+                continue;
+            }
+
+            if (!stationProtocol.isInEnable()) {
+                News.taskInfo(stationProtocol.getTaskNo(), "鍙栬揣绔欑偣:{} 娌℃湁鍙叆淇″彿", stationObjModel.getStationId());
+                continue;
+            }
+
+            if (!wrkMast.getWrkNo().equals(stationProtocol.getTaskNo())) {
+                continue;
+            }
+
+            if (wrkMast.getWrkSts() != WrkStsType.INBOUND_DEVICE_RUN.sts) {
+                continue;
+            }
+
+            // 鑾峰彇搴撲綅淇℃伅
+            LocMast locMast = locMastService.selectById(wrkMast.getLocNo());
+            if (locMast == null) {
+                News.taskInfo(wrkMast.getWrkNo(), "鐩爣搴撲綅:{} 淇℃伅涓嶅瓨鍦�", wrkMast.getLocNo());
+                continue;
+            }
+
+            if (!locMast.getLocSts().equals("S")) {
+                News.taskInfo(wrkMast.getWrkNo(), "鐩爣搴撲綅:{} 鐘舵�佸紓甯�", wrkMast.getLocNo());
+                continue;
+            }
+
+            //妫�娴嬫祬搴撲綅鐘舵��
+            boolean checkStatus = checkShallowLocStatus(locMast.getLocNo(), wrkMast.getWrkNo());
+            if (!checkStatus) {
+                News.taskInfo(wrkMast.getWrkNo(), "鍥犳祬搴撲綅鍫靛鏃犳硶鎵ц");
+                continue;
+            }
+
+            String sourceLocNo = Utils.getLocNo(stationObjModel.getDeviceRow(), stationObjModel.getDeviceBay(), stationObjModel.getDeviceLev());
+
+            CrnCommand command = crnThread.getPickAndPutCommand(sourceLocNo, wrkMast.getLocNo(), wrkMast.getWrkNo(), crnNo);
+
+            wrkMast.setWrkSts(WrkStsType.INBOUND_RUN.sts);
+            wrkMast.setCrnNo(crnNo);
+            wrkMast.setSystemMsg("");
+            wrkMast.setIoTime(new Date());
+            if (wrkMastService.updateById(wrkMast)) {
+                MessageQueue.offer(SlaveType.Crn, crnNo, new Task(2, command));
+                notifyUtils.notify(String.valueOf(SlaveType.Crn), crnNo, String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_IN_TASK_RUN, null);
+                News.info("鍫嗗灈鏈哄懡浠や笅鍙戞垚鍔燂紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", crnNo, JSON.toJSON(command));
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private synchronized boolean crnExecuteOutPlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) {
+        CrnProtocol crnProtocol = crnThread.getStatus();
+        if (crnProtocol == null) {
+            return false;
+        }
+
+        if (!basCrnp.getOutEnable().equals("Y")) {
+            News.info("鍫嗗灈鏈�:{} 鍙嚭淇″彿涓嶆弧瓒�", basCrnp.getCrnNo());
+            return false;
+        }
+
+        List<StationObjModel> outStationList = basCrnp.getOutStationList$();
+        if (outStationList.isEmpty()) {
+            News.info("鍫嗗灈鏈�:{} 鍑哄簱绔欑偣鏈缃�", basCrnp.getCrnNo());
+            return false;
+        }
+
+        Integer crnNo = basCrnp.getCrnNo();
+
+        for (StationObjModel stationObjModel : outStationList) {
+            StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, stationObjModel.getDeviceNo());
+            if (stationThread == null) {
+                continue;
+            }
+
+            Map<Integer, StationProtocol> stationProtocolMap = stationThread.getStatusMap();
+            StationProtocol stationProtocol = stationProtocolMap.get(stationObjModel.getStationId());
+            if (stationProtocol == null) {
+                continue;
+            }
+
+            if (!stationProtocol.isAutoing()) {
+                continue;
+            }
+
+            if (stationProtocol.isLoading()) {
+                continue;
+            }
+
+            if (stationProtocol.getTaskNo() != 0) {
+                continue;
+            }
+
+            if (!stationProtocol.isOutEnable()) {
+                News.info("鏀捐揣绔欑偣:{} 娌℃湁鍙嚭淇″彿", stationObjModel.getStationId());
+                continue;
+            }
+
+            // 鑾峰彇搴撲綅淇℃伅
+            LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo());
+            if (locMast == null) {
+                News.taskInfo(wrkMast.getWrkNo(), "婧愬簱浣�:{} 淇℃伅涓嶅瓨鍦�", wrkMast.getSourceLocNo());
+                continue;
+            }
+
+            if (!locMast.getLocSts().equals("R")) {
+                News.taskInfo(wrkMast.getWrkNo(), "婧愬簱浣�:{} 鐘舵�佸紓甯�", wrkMast.getSourceLocNo());
+                continue;
+            }
+
+            //妫�娴嬫祬搴撲綅鐘舵��
+            boolean checkStatus = checkShallowLocStatus(locMast.getLocNo(), wrkMast.getWrkNo());
+            if (!checkStatus) {
+                News.taskInfo(wrkMast.getWrkNo(), "鍥犳祬搴撲綅鍫靛鏃犳硶鎵ц");
+                continue;
+            }
+
+            String targetLocNo = Utils.getLocNo(stationObjModel.getDeviceRow(), stationObjModel.getDeviceBay(), stationObjModel.getDeviceLev());
+
+            CrnCommand command = crnThread.getPickAndPutCommand(wrkMast.getSourceLocNo(), targetLocNo, wrkMast.getWrkNo(), crnNo);
+
+            wrkMast.setWrkSts(WrkStsType.OUTBOUND_RUN.sts);
+            wrkMast.setCrnNo(crnNo);
+            wrkMast.setSystemMsg("");
+            wrkMast.setIoTime(new Date());
+            if (wrkMastService.updateById(wrkMast)) {
+                MessageQueue.offer(SlaveType.Crn, crnNo, new Task(2, command));
+                notifyUtils.notify(String.valueOf(SlaveType.Crn), crnNo, String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_OUT_TASK_RUN, null);
+                News.info("鍫嗗灈鏈哄懡浠や笅鍙戞垚鍔燂紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", crnNo, JSON.toJSON(command));
+                return true;
+            }
+        }
+        return false;
     }
 
     private synchronized void crnExecuteLocTransfer(BasCrnp basCrnp, CrnThread crnThread) {
@@ -336,6 +532,7 @@
             wrkMast.setIoTime(new Date());
             if (wrkMastService.updateById(wrkMast)) {
                 MessageQueue.offer(SlaveType.Crn, crnNo, new Task(2, command));
+                notifyUtils.notify(String.valueOf(SlaveType.Crn), crnNo, String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_TRANSFER_TASK_RUN, null);
                 News.info("鍫嗗灈鏈哄懡浠や笅鍙戞垚鍔燂紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", crnNo, JSON.toJSON(command));
                 return;
             }
@@ -375,10 +572,13 @@
                 Long updateWrkSts = null;
                 if(wrkMast.getWrkSts() == WrkStsType.INBOUND_RUN.sts){
                     updateWrkSts = WrkStsType.COMPLETE_INBOUND.sts;
+                    notifyUtils.notify(String.valueOf(SlaveType.Crn), crnProtocol.getCrnNo(), String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_IN_TASK_COMPLETE, null);
                 }else if(wrkMast.getWrkSts() == WrkStsType.OUTBOUND_RUN.sts){
                     updateWrkSts = WrkStsType.OUTBOUND_RUN_COMPLETE.sts;
+                    notifyUtils.notify(String.valueOf(SlaveType.Crn), crnProtocol.getCrnNo(), String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_OUT_TASK_COMPLETE, null);
                 }else if(wrkMast.getWrkSts() == WrkStsType.LOC_MOVE_RUN.sts){
                     updateWrkSts = WrkStsType.COMPLETE_LOC_MOVE.sts;
+                    notifyUtils.notify(String.valueOf(SlaveType.Crn), crnProtocol.getCrnNo(), String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_TRANSFER_TASK_COMPLETE, null);
                 }else{
                     News.error("鍫嗗灈鏈哄浜庣瓑寰呯‘璁や笖浠诲姟瀹屾垚鐘舵�侊紝浣嗗伐浣滅姸鎬佸紓甯搞�傚爢鍨涙満鍙�={}锛屽伐浣滃彿={}", basCrnp.getCrnNo(), crnProtocol.getTaskNo());
                     continue;
@@ -398,8 +598,167 @@
         }
     }
 
+    public synchronized void plannerExecute() {
+        int nowSec = (int) (System.currentTimeMillis() / 1000);
+        List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>());
+        for (BasCrnp basCrnp : basCrnps) {
+            String key = RedisKeyType.PLANNER_SCHEDULE.key + "CRN-" + basCrnp.getCrnNo();
+            List<Object> items = redisUtil.lGet(key, 0, -1);
+            if (items == null || items.isEmpty()) {
+                continue;
+            }
+
+            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, basCrnp.getCrnNo());
+            if (crnThread == null) {
+                continue;
+            }
+            CrnProtocol crnProtocol = crnThread.getStatus();
+            if (crnProtocol == null) {
+                continue;
+            }
+            List<WrkMast> running = wrkMastService.selectList(new EntityWrapper<WrkMast>()
+                    .eq("crn_no", basCrnp.getCrnNo())
+                    .in("wrk_sts", WrkStsType.INBOUND_RUN.sts, WrkStsType.OUTBOUND_RUN.sts, WrkStsType.LOC_MOVE_RUN.sts)
+            );
+            if (!running.isEmpty()) {
+                continue;
+            }
+            if (!(crnProtocol.getMode() == CrnModeType.AUTO.id
+                    && crnProtocol.getTaskNo() == 0
+                    && crnProtocol.getStatus() == CrnStatusType.IDLE.id
+                    && crnProtocol.getLoaded() == 0
+                    && crnProtocol.getForkPos() == 0
+                    && crnProtocol.getAlarm() == 0)) {
+                continue;
+            }
+
+            for (Object v : items) {
+                String s = String.valueOf(v);
+                JSONObject obj = null;
+                try { obj = JSON.parseObject(s); } catch (Exception ignore) {}
+                if (obj == null) {
+                    continue;
+                }
+                Integer startEpochSec = obj.getInteger("startEpochSec");
+                Integer endEpochSec = obj.getInteger("endEpochSec");
+                Integer taskId = obj.getInteger("taskId");
+                String taskType = obj.getString("taskType");
+                if (startEpochSec == null || taskId == null || taskType == null) {
+                    continue;
+                }
+                int earlySlackSec = 5;
+                int lateSlackSec = 10;
+                Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
+                if (systemConfigMapObj != null) {
+                    try {
+                        HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
+                        String es = systemConfigMap.getOrDefault("plannerEarlySlackSec", "60");
+                        String ls = systemConfigMap.getOrDefault("plannerLateSlackSec", "10");
+                        earlySlackSec = Integer.parseInt(es);
+                        lateSlackSec = Integer.parseInt(ls);
+                    } catch (Exception ignore) {}
+                }
+                if (nowSec < startEpochSec - earlySlackSec) {
+                    continue;
+                }
+                if (endEpochSec != null && nowSec > endEpochSec + lateSlackSec) {
+                    redisUtil.lRemove(key, 1, s);
+                    continue;
+                }
+
+                WrkMast wrkMast = wrkMastService.selectByWorkNo(taskId);
+                if (wrkMast == null) {
+                    redisUtil.lRemove(key, 1, s);
+                    continue;
+                }
+
+                if ("IN".equalsIgnoreCase(taskType)) {
+                    boolean result = this.crnExecuteInPlanner(basCrnp, crnThread, wrkMast);//鍏ュ簱
+                    if (result) {
+                        redisUtil.lRemove(key, 1, s);
+                        break;
+                    }
+                } else if ("OUT".equalsIgnoreCase(taskType)) {
+                    boolean result = this.crnExecuteOutPlanner(basCrnp, crnThread, wrkMast);//鍑哄簱
+                    if (result) {
+                        redisUtil.lRemove(key, 1, s);
+                        break;
+                    }
+                } else if ("MOVE".equalsIgnoreCase(taskType)) {
+                    boolean result = this.crnExecuteMovePlanner(basCrnp, crnThread, wrkMast);//绉诲簱
+                    if (result) {
+                        redisUtil.lRemove(key, 1, s);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    private synchronized boolean crnExecuteMovePlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) {
+        CrnProtocol crnProtocol = crnThread.getStatus();
+        if (crnProtocol == null) {
+            return false;
+        }
+
+        Integer crnNo = basCrnp.getCrnNo();
+
+        if (!wrkMast.getWrkSts().equals(WrkStsType.NEW_LOC_MOVE.sts)) {
+            return false;
+        }
+
+        // 鑾峰彇婧愬簱浣嶄俊鎭�
+        LocMast sourceLocMast = locMastService.selectById(wrkMast.getSourceLocNo());
+        if (sourceLocMast == null) {
+            News.taskInfo(wrkMast.getWrkNo(), "婧愬簱浣�:{} 淇℃伅涓嶅瓨鍦�", wrkMast.getSourceLocNo());
+            return false;
+        }
+
+        if(!sourceLocMast.getLocSts().equals("R")){
+            News.taskInfo(wrkMast.getWrkNo(), "婧愬簱浣�:{} 鐘舵�佸紓甯革紝涓嶅睘浜庡嚭搴撻绾︾姸鎬�", wrkMast.getSourceLocNo());
+            return false;
+        }
+
+        // 鑾峰彇搴撲綅淇℃伅
+        LocMast locMast = locMastService.selectById(wrkMast.getLocNo());
+        if (locMast == null) {
+            News.taskInfo(wrkMast.getWrkNo(), "搴撲綅:{} 淇℃伅涓嶅瓨鍦�", wrkMast.getLocNo());
+            return false;
+        }
+
+        if (!locMast.getLocSts().equals("S")) {
+            News.taskInfo(wrkMast.getWrkNo(), "搴撲綅:{} 鐘舵�佸紓甯革紝涓嶅睘浜庡叆搴撻绾︾姸鎬�", wrkMast.getLocNo());
+            return false;
+        }
+
+        CrnCommand command = crnThread.getPickAndPutCommand(wrkMast.getSourceLocNo(), wrkMast.getLocNo(), wrkMast.getWrkNo(), crnNo);
+
+        wrkMast.setWrkSts(WrkStsType.LOC_MOVE_RUN.sts);
+        wrkMast.setCrnNo(crnNo);
+        wrkMast.setSystemMsg("");
+        wrkMast.setIoTime(new Date());
+        if (wrkMastService.updateById(wrkMast)) {
+            MessageQueue.offer(SlaveType.Crn, crnNo, new Task(2, command));
+            notifyUtils.notify(String.valueOf(SlaveType.Crn), crnNo, String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_TRANSFER_TASK_RUN, null);
+            News.info("鍫嗗灈鏈哄懡浠や笅鍙戞垚鍔燂紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", crnNo, JSON.toJSON(command));
+            return true;
+        }
+        return false;
+    }
+
     //妫�娴嬫祬搴撲綅鐘舵��
     public synchronized boolean checkShallowLocStatus(String locNo, Integer taskNo) {
+        String checkDeepLocOutTaskBlockReport = "Y";
+        Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
+        if (systemConfigMapObj != null) {
+            HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
+            checkDeepLocOutTaskBlockReport = systemConfigMap.get("checkDeepLocOutTaskBlockReport");
+        }
+
+        if (!checkDeepLocOutTaskBlockReport.equals("Y")) {
+            return true;
+        }
+
         Object lock = redisUtil.get(RedisKeyType.CHECK_SHALLOW_LOC_STATUS_LIMIT.key + taskNo);
         if (lock != null) {
             return false;
@@ -425,6 +784,10 @@
         if (shallowLocMast.getLocSts().equals("F")) {
             //娴呭簱浣嶇姸鎬佹湁璐�,鐢宠鏇存崲搴撲綅
             String response = wmsOperateUtils.applyChangeLocNo(shallowLocNo);
+            if (response == null) {
+                News.taskError(taskNo, "WCS鐢宠鍦ㄥ簱搴撲綅鏇存崲搴撲綅澶辫触锛學MS鎺ュ彛鏈搷搴旓紒锛侊紒response锛歿}", response);
+                return false;
+            }
             JSONObject jsonObject = JSON.parseObject(response);
             if (jsonObject.getInteger("code").equals(200)) {
                 StartupDto dto = jsonObject.getObject("data", StartupDto.class);

--
Gitblit v1.9.1