| src/main/java/com/zy/asrs/controller/RgvController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/asrs/controller/TaskWrkController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/asrs/entity/TaskWrk.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/asrs/task/TaskLogScheduler.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/core/model/CrnSlave.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/resources/application-prod.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/webapp/views/deviceOperate/rgvOperate.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/RgvController.java
@@ -76,7 +76,7 @@ } @PostMapping("/run/del")//Take Put Walk @ManagerAuth(memo = "小车行走") @ManagerAuth(memo = "清空任务") public R rgvRunDel(@RequestParam(defaultValue = "0") Integer rgvNo ) { if (rgvNo==null || rgvNo==0){ @@ -101,15 +101,12 @@ @PostMapping("/run/walk")//Take Put Walk @ManagerAuth(memo = "小车行走") public R rgvRunWalk(@RequestParam(defaultValue = "0") Integer rgvNo, @RequestParam(defaultValue = "0") Integer taskNo, @RequestParam(defaultValue = "9999") Integer taskNo, @RequestParam(defaultValue = "0") Integer rgvStaNoPut, @RequestParam(defaultValue = "0") Long rgvPosDestination ) { if (rgvNo==null || rgvNo==0){ return R.error("请选择小车"); } if (taskNo==null || taskNo==0){ return R.error("作业号请填写"); } if ((rgvStaNoPut == null || rgvStaNoPut == 0) && (rgvPosDestination==null || rgvPosDestination==0L)){ return R.error("目标站点请填写"); @@ -149,15 +146,12 @@ @PostMapping("/run/put")//Take Put Walk @ManagerAuth(memo = "小车放货") public R rgvPutWalk(@RequestParam(defaultValue = "0") Integer rgvNo, @RequestParam(defaultValue = "0") Integer taskNo, @RequestParam(defaultValue = "9999") Integer taskNo, @RequestParam(defaultValue = "0") Integer rgvStaNoPut, @RequestParam(defaultValue = "0") Long rgvPosDestination ) { if (rgvNo==null || rgvNo==0){ return R.error("请选择小车"); } if (taskNo==null || taskNo==0){ return R.error("作业号请填写"); } if (rgvStaNoPut == null || rgvStaNoPut == 0){ return R.error("目标站点请填写"); @@ -193,15 +187,12 @@ @PostMapping("/run/take")//Take Put Walk @ManagerAuth(memo = "小车取货") public R rgvTakeWalk(@RequestParam(defaultValue = "0") Integer rgvNo, @RequestParam(defaultValue = "0") Integer taskNo, @RequestParam(defaultValue = "9999") Integer taskNo, @RequestParam(defaultValue = "0") Integer rgvStaNoTake, @RequestParam(defaultValue = "0") Long rgvPosDestination ) { if (rgvNo==null || rgvNo==0){ return R.error("请选择小车"); } if (taskNo==null || taskNo==0){ return R.error("作业号请填写"); } if (rgvStaNoTake == null || rgvStaNoTake == 0){ return R.error("取货站点请填写"); @@ -236,16 +227,13 @@ @PostMapping("/run/TakeAndPut")//Take Put Walk @ManagerAuth(memo = "小车取货") public R rgvTakeAndPut(@RequestParam(defaultValue = "0") Integer rgvNo, @RequestParam(defaultValue = "0") Integer taskNo, @RequestParam(defaultValue = "9999") Integer taskNo, @RequestParam(defaultValue = "0") Integer rgvStaNoTake, @RequestParam(defaultValue = "0") Integer rgvStaNoPut, @RequestParam(defaultValue = "0") Long rgvPosDestination ) { if (rgvNo==null || rgvNo==0){ return R.error("请选择小车"); } if (taskNo==null || taskNo==0){ return R.error("作业号请填写"); } if (rgvStaNoTake == null || rgvStaNoTake == 0){ return R.error("取货站点请填写"); src/main/java/com/zy/asrs/controller/TaskWrkController.java
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; import java.util.*; @RestController @@ -263,10 +264,12 @@ try{ HashMap<String, Object> headParam = new HashMap<>(); headParam.put("taskNo",taskWrk.getTaskNo()); headParam.put("status",taskWrk.getStatus()); headParam.put("taskStatus",taskWrk.getStatusWms()); headParam.put("ioType",taskWrk.getIoTypeWms()); headParam.put("barcode",taskWrk.getBarcode()); // headParam.put("reportTime",new Date()); headParam.put("barCode",taskWrk.getBarcode()); headParam.put("reportTime", LocalDateTime.now()); headParam.put("weight",taskWrk.getScWeight().doubleValue()); log.info("wcs手动完成任务上报wms={}", taskWrk); response = new HttpHandler.Builder() // .setHeaders(headParam) @@ -322,10 +325,12 @@ try{ HashMap<String, Object> headParam = new HashMap<>(); headParam.put("taskNo",taskWrk.getTaskNo()); headParam.put("status",taskWrk.getStatus()); headParam.put("taskStatus",taskWrk.getStatusWms()); headParam.put("ioType",taskWrk.getIoTypeWms()); headParam.put("barcode",taskWrk.getBarcode()); // headParam.put("reportTime",new Date()); headParam.put("barCode",taskWrk.getBarcode()); headParam.put("reportTime", LocalDateTime.now()); headParam.put("weight",taskWrk.getScWeight().doubleValue()); log.info("wcs手动取消任务上报wm={}", taskWrk); response = new HttpHandler.Builder() src/main/java/com/zy/asrs/entity/TaskWrk.java
@@ -110,7 +110,7 @@ */ @ApiModelProperty(value= "重量") @TableField("SC_WEIGHT") private Integer scWeight; private Integer scWeight = 0; /** * 修改人员 @@ -376,6 +376,17 @@ } } public Integer getStatusWms(){ switch (status){ case 5: return 1; case 4: return 0; default: return 0; } } public String getPut(String point){ String[] split = point.split("-"); if (split.length == 5){ src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -38,6 +38,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport; import java.io.IOException; import java.time.LocalDateTime; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; @@ -653,13 +654,17 @@ continue; } CrnSlave crnSlave = new CrnSlave(crn); if (!crn.getId().equals(crnProtocol.getLaneNo())) { for (CrnSlave crnOther : slaveProperties.getCrn()) { if (crnOther.getId().equals(crnProtocol.getLaneNo())) { crn.updateCrnInStn(crnOther); crnSlave.updateCrnInStn(crnOther); } } } crn = crnSlave; // 库位移转 this.locToLoc(crn, crnProtocol); @@ -807,10 +812,13 @@ } try { HashMap<String, Object> headParam = new HashMap<>(); headParam.put("taskNo", taskWrk.getTaskNo()); headParam.put("status", taskWrk.getStatus()); headParam.put("ioType", taskWrk.getIoTypeWms()); headParam.put("barcode", taskWrk.getBarcode()); headParam.put("taskNo",taskWrk.getTaskNo()); headParam.put("taskStatus",taskWrk.getStatusWms()); headParam.put("ioType",taskWrk.getIoTypeWms()); headParam.put("barCode",taskWrk.getBarcode()); headParam.put("reportTime", LocalDateTime.now()); headParam.put("weight",taskWrk.getScWeight().doubleValue()); String response; response = new HttpHandler.Builder() // .setHeaders(headParam) @@ -927,10 +935,13 @@ } try { HashMap<String, Object> headParam = new HashMap<>(); headParam.put("taskNo", taskWrk.getTaskNo()); headParam.put("status", taskWrk.getStatus()); headParam.put("ioType", taskWrk.getIoTypeWms()); headParam.put("barcode", taskWrk.getBarcode()); headParam.put("taskNo",taskWrk.getTaskNo()); headParam.put("taskStatus",taskWrk.getStatusWms()); headParam.put("ioType",taskWrk.getIoTypeWms()); headParam.put("barCode",taskWrk.getBarcode()); headParam.put("reportTime", LocalDateTime.now()); headParam.put("weight",taskWrk.getScWeight().doubleValue()); String response; response = new HttpHandler.Builder() // .setHeaders(headParam) @@ -1031,10 +1042,13 @@ } try { HashMap<String, Object> headParam = new HashMap<>(); headParam.put("taskNo", taskWrk.getTaskNo()); headParam.put("status", taskWrk.getStatus()); headParam.put("ioType", taskWrk.getIoTypeWms()); headParam.put("barcode", taskWrk.getBarcode()); headParam.put("taskNo",taskWrk.getTaskNo()); headParam.put("taskStatus",taskWrk.getStatusWms()); headParam.put("ioType",taskWrk.getIoTypeWms()); headParam.put("barCode",taskWrk.getBarcode()); headParam.put("reportTime", LocalDateTime.now()); headParam.put("weight",taskWrk.getScWeight().doubleValue()); String response; response = new HttpHandler.Builder() // .setHeaders(headParam) @@ -1145,10 +1159,13 @@ try { HashMap<String, Object> headParam = new HashMap<>(); headParam.put("taskNo", taskWrk.getTaskNo()); headParam.put("status", taskWrk.getStatus()); headParam.put("ioType", taskWrk.getIoTypeWms()); headParam.put("barcode", taskWrk.getBarcode()); headParam.put("taskNo",taskWrk.getTaskNo()); headParam.put("taskStatus",taskWrk.getStatusWms()); headParam.put("ioType",taskWrk.getIoTypeWms()); headParam.put("barCode",taskWrk.getBarcode()); headParam.put("reportTime", LocalDateTime.now()); headParam.put("weight",taskWrk.getScWeight().doubleValue()); String response; log.error("wcs完结任务上报wms==》", headParam); @@ -1372,6 +1389,32 @@ } return true; } public boolean rgvOtherIDLEOther(RgvSlave slave) { RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(slave.getOtherId()); RgvTaskProtocol rgvTaskProtocol = RgvTaskCache.getRgvStatus(slave.getOtherId()); if (rgvProtocol == null || rgvTaskProtocol == null) { return false; } if (!rgvProtocol.getModeType().equals(RgvModeType.AUTO) || rgvProtocol.getRgvPos().equals(0L) || rgvTaskProtocol.getAvoid() == -1 || (!rgvProtocol.getStatusType().equals(RgvStatusType.IDLE) && !rgvProtocol.getStatusType().equals(RgvStatusType.ROAM))) { return false; } RgvProtocol rgvProtocolOther = RgvStatusCache.getRgvStatus(slave.getId()); RgvTaskProtocol rgvTaskProtocolOther = RgvTaskCache.getRgvStatus(slave.getId()); if (rgvProtocolOther == null) { return true; } if (rgvProtocolOther.statusEnable) { if (rgvProtocolOther.getModeType().equals(RgvModeType.AUTO) && rgvProtocolOther.getStatusType().equals(RgvStatusType.IDLE) && rgvProtocolOther.getLoaded()==0) { return false; } } return true; } public boolean rgvOtherIDLE(RgvSlave slave) { RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(slave.getId()); RgvTaskProtocol rgvTaskProtocol = RgvTaskCache.getRgvStatus(slave.getId()); @@ -1509,8 +1552,10 @@ } if (!sign){ if (!rgvOtherIDLE(rgvSlave)){ sign=true; if (rgvOtherIDLEOther(rgvSlave)){ if (!rgvOtherIDLE(rgvSlave)){ sign=true; } } } src/main/java/com/zy/asrs/service/impl/TaskWrkServiceImpl.java
@@ -34,6 +34,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -143,9 +144,12 @@ try{ HashMap<String, Object> headParam = new HashMap<>(); headParam.put("taskNo",taskWrk.getTaskNo()); headParam.put("status",taskWrk.getStatus()); headParam.put("taskStatus",taskWrk.getStatusWms()); headParam.put("ioType",taskWrk.getIoTypeWms()); headParam.put("barcode",taskWrk.getBarcode()); headParam.put("barCode",taskWrk.getBarcode()); headParam.put("reportTime", LocalDateTime.now()); headParam.put("weight",taskWrk.getScWeight().doubleValue()); // headParam.put("reportTime",new Date()); String response; response = new HttpHandler.Builder() src/main/java/com/zy/asrs/task/TaskLogScheduler.java
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Component; import java.io.IOException; import java.time.LocalDateTime; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -62,10 +63,10 @@ HashMap<String, Object> map = new HashMap<>(); try { map.put("taskNo",taskWrk.getTaskNo()); map.put("taskStatus",taskWrk.getStatus()); map.put("taskStatus",taskWrk.getStatusWms()); map.put("ioType",taskWrk.getIoTypeWms()); map.put("barCode",taskWrk.getBarcode()); map.put("reportTime",new Date()); map.put("reportTime", LocalDateTime.now()); map.put("weight",taskWrk.getScWeight().doubleValue()); response = new HttpHandler.Builder() .setUri(wmsUrl) src/main/java/com/zy/core/model/CrnSlave.java
@@ -51,6 +51,18 @@ } public CrnSlave() { } public CrnSlave(CrnSlave crnSlave) { this.rack = crnSlave.getRack(); this.slot = crnSlave.getSlot(); this.offset = crnSlave.getOffset(); this.demo = crnSlave.getDemo(); this.crnInStn = crnSlave.getCrnInStn(); this.crnOutStn = crnSlave.getCrnOutStn(); } public void updateCrnInStn(CrnSlave crnSlave){ crnInStn = crnSlave.getCrnInStn(); crnOutStn = crnSlave.getCrnOutStn(); src/main/resources/application-prod.yml
@@ -3,7 +3,7 @@ doubleLocs: 3 #双深库位排号 groupCount: 2 #一个堆垛机负责的货架排数 devp[0]: #输送线 ip: 10.10.10.60 ip: 27.172.2.60 slot: 0 port: 102 rack: 0 @@ -78,7 +78,7 @@ # RGV穿梭车1 rgv[0]: id: 1 ip: 10.10.10.70 ip: 27.172.2.70 port: 502 rack: 0 slot: 0 @@ -154,7 +154,7 @@ # RGV穿梭车2 rgv[1]: id: 2 ip: 10.10.10.71 ip: 27.172.2.71 port: 502 rack: 0 slot: 0 @@ -243,19 +243,19 @@ # 磅秤 scale[0]: id: 1 ip: 10.10.10.202 ip: 27.172.2.121 port: 5005 staNo: 1004 devpPlcId: 1 # 磅秤 scale[1]: id: 2 ip: 10.10.10.203 ip: 27.172.2.122 port: 5005 staNo: 1022 devpPlcId: 1 crn[0]: #堆垛机1 ip: 10.10.10.10 ip: 27.172.2.10 id: 1 slot: 0 demo: false @@ -275,7 +275,7 @@ lev: 1 devpPlcId: ${wcs-slave.devp[0].id} crn[1]: #堆垛机1 ip: 10.10.10.20 ip: 27.172.2.20 id: 2 slot: 0 demo: false @@ -295,7 +295,7 @@ lev: 1 devpPlcId: ${wcs-slave.devp[0].id} crn[2]: #堆垛机1 ip: 10.10.10.30 ip: 27.172.2.30 id: 3 slot: 0 demo: false @@ -315,7 +315,7 @@ lev: 1 devpPlcId: ${wcs-slave.devp[0].id} crn[3]: #堆垛机1 ip: 10.10.10.40 ip: 27.172.2.40 id: 4 slot: 0 demo: false @@ -335,7 +335,7 @@ lev: 1 devpPlcId: ${wcs-slave.devp[0].id} crn[4]: #堆垛机1 ip: 10.10.10.50 ip: 27.172.2.50 id: 5 slot: 0 demo: false src/main/resources/application.yml
@@ -12,7 +12,7 @@ # username: sa # password: sa@123 driver-class-name: dm.jdbc.driver.DmDriver # url: jdbc:dm://10.10.10.201:5236/SOURCE # url: jdbc:dm://27.172.2.101:5236/SOURCE url: jdbc:dm://127.0.0.1:5236/SOURCE username: SYSDBA password: Zy@12345 @@ -66,7 +66,7 @@ #url: 10.32.53.195:8080 # WMS系统ip # url: 10.210.157.109:8090 url: 10.10.10.205:9027 url: 27.172.2.107:9027 # 入库任务申请接口 #inboundTaskApplyPath: api/InterFace/inboundTaskApply inboundTaskApplyPath: sugood/inboundTaskApply src/main/webapp/views/deviceOperate/rgvOperate.html
@@ -41,9 +41,6 @@ </div> <div> <el-form :model="formParam" label-position="top" :inline="true" class="demo-form-inline"> <el-form-item label="工作号"> <el-input v-model="formParam.taskNo" placeholder="工作号"></el-input> </el-form-item> <el-form-item label="目标定位置"> <el-input v-model="formParam.rgvPosDestination" placeholder="目标定位置"></el-input> </el-form-item> @@ -106,7 +103,6 @@ currentIndex: null, formParam: { rgvNo: 0, taskNo: 0, rgvStaNoTake: 0, rgvStaNoPut: 0, rgvPosDestination: 0 @@ -133,7 +129,6 @@ this.currentTitle = row.rgvNo + "小车" this.formParam.rgvNo = row.rgvNo this.formParam.taskNo = row.taskNo this.formParam.rgvStaNoTake = row.rgvStaNoTake this.formParam.rgvStaNoPut = row.rgvStaNoPut this.formParam.rgvPosDestination = row.rgvPosDestination