diff --git a/shkj-admin/src/main/resources/application-dev.yml b/shkj-admin/src/main/resources/application-dev.yml index 562313b..a199ec5 100644 --- a/shkj-admin/src/main/resources/application-dev.yml +++ b/shkj-admin/src/main/resources/application-dev.yml @@ -12,12 +12,11 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://127.0.0.1:3306/mjk_pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B7 - # url: jdbc:mysql://192.168.150.162:3306/mjk_wcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - #url: jdbc:mysql://120.77.94.227:3306/mjk_wms_wcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + #url: jdbc:mysql://127.0.0.1:3306/mjk_pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B7 + url: jdbc:mysql://120.77.94.227:3306/mjk_wcs_2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - # password: CTlTwKgIrRVTsEHqxxx - password: 123456 + password: CTlTwKgIrRVTsEHqxxx + # password: 123456 # password: Y4yhl9tbf110 # 从库数据源 slave: diff --git a/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java b/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java index 5ff2f52..ced9e20 100644 --- a/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java +++ b/shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java @@ -525,8 +525,6 @@ public class PlcEventTask { public void stkRealTimeTask(List propertyList,Map pointMap, PLCReadAndWrite plcReadAndWrite,PlcOperate plcOperate,String pointTables){ try { - - // log.info("监测堆垛机读取的属性值:"+pointMap); if (pointMap.isEmpty()){ pointMap = plcReadAndWrite.readPlcData(plcOperate, pointTables); log.info("堆垛机为空时,重新读取的属性值{} ",pointMap); diff --git a/shkj-wms/src/main/java/com/shkj/wms/bo/BaseContainerCallBo.java b/shkj-wms/src/main/java/com/shkj/wms/bo/BaseContainerCallBo.java index 31739fd..eef80ee 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/bo/BaseContainerCallBo.java +++ b/shkj-wms/src/main/java/com/shkj/wms/bo/BaseContainerCallBo.java @@ -44,4 +44,9 @@ private static final long serialVersionUID=1L; * 可容纳模具的数量 */ private String modlQty; + + /** + * 出库楼层 + */ + private Integer layer; } diff --git a/shkj-wms/src/main/java/com/shkj/wms/bo/BusinOutPlanAddBo.java b/shkj-wms/src/main/java/com/shkj/wms/bo/BusinOutPlanAddBo.java index 467029b..df7d89f 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/bo/BusinOutPlanAddBo.java +++ b/shkj-wms/src/main/java/com/shkj/wms/bo/BusinOutPlanAddBo.java @@ -40,4 +40,9 @@ public class BusinOutPlanAddBo implements Serializable { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7") private Date planTime; + /** + * 出库楼层 + */ + private Integer layer; + } diff --git a/shkj-wms/src/main/java/com/shkj/wms/bo/BusinStockInvAddBo.java b/shkj-wms/src/main/java/com/shkj/wms/bo/BusinStockInvAddBo.java index 86b7e8f..59ff5b1 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/bo/BusinStockInvAddBo.java +++ b/shkj-wms/src/main/java/com/shkj/wms/bo/BusinStockInvAddBo.java @@ -43,5 +43,10 @@ public class BusinStockInvAddBo implements Serializable { @NotEmpty(message = "库存id集合不得为空") private List ids; + /** + * 出库楼层 + */ + private Integer layer; + } diff --git a/shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseMoldController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseMoldController.java index 4ff1316..98d6011 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseMoldController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseMoldController.java @@ -189,9 +189,6 @@ public class BaseMoldController extends BaseController { @GetMapping("/queryStockMoldByBarCode") public Result> queryStockMoldByBarCode(BaseMoldBarcodeQueryBo bo) { -// if (StringUtils.isBlank(bo.getMoldBarcode())) { -// return Result.err().msg("模具编码不得为空"); -// } return iBaseMoldService.queryStockMoldByBarCode(bo); } diff --git a/shkj-wms/src/main/java/com/shkj/wms/domain/BusinOutInPlan.java b/shkj-wms/src/main/java/com/shkj/wms/domain/BusinOutInPlan.java index 1645bed..ccdb3e8 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/domain/BusinOutInPlan.java +++ b/shkj-wms/src/main/java/com/shkj/wms/domain/BusinOutInPlan.java @@ -174,4 +174,8 @@ public class BusinOutInPlan implements Serializable { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7") private Date planTime; + /** + * 出库楼层 + */ + private Integer layer; } diff --git a/shkj-wms/src/main/java/com/shkj/wms/domain/BusinStockInv.java b/shkj-wms/src/main/java/com/shkj/wms/domain/BusinStockInv.java index 4fb3f69..080428e 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/domain/BusinStockInv.java +++ b/shkj-wms/src/main/java/com/shkj/wms/domain/BusinStockInv.java @@ -177,5 +177,10 @@ public class BusinStockInv implements Serializable { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7") private Date endTime; + /** + * 出库楼层 + */ + private Integer layer; + } diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/ISysThirdExceptionRequestService.java b/shkj-wms/src/main/java/com/shkj/wms/service/ISysThirdExceptionRequestService.java index 9164db7..f889be1 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/ISysThirdExceptionRequestService.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/ISysThirdExceptionRequestService.java @@ -35,7 +35,7 @@ public interface ISysThirdExceptionRequestService extends IService x.setPlanStatus(PlanStatusEnum.WAIT.getValue())); } else { @@ -743,12 +744,11 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl x.setPlanStatus(PlanStatusEnum.WAIT.getValue())); - wmsCallWcsUtil.outStock(detailVo, false); + wmsCallWcsUtil.outStock(detailVo, false, bo.getLayer()); } index++; } - this.updateBatchById(outPlans); } finally { //释放锁 @@ -799,6 +799,7 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl businStockInvs = entry.getValue(); //由于堆垛机只能执行一个任务、所以这里只能第一个任务下发、其他的任务进行轮询 //全部进入任务管理,进行调度执行 if (index.equals(0)) { - wmsCallWcsUtil.outStock(detailVo, false); + wmsCallWcsUtil.outStock(detailVo, false,businStockInvs.get(0).getLayer()); } else { log.info("不用调用、直接进入轮询 = {}" , detailVo); - wmsCallWcsUtil.outStock(detailVo, false); + wmsCallWcsUtil.outStock(detailVo, false,businStockInvs.get(0).getLayer()); } index++; } diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/SysThirdExceptionRequestServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/SysThirdExceptionRequestServiceImpl.java index b937685..96e77d5 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/SysThirdExceptionRequestServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/SysThirdExceptionRequestServiceImpl.java @@ -147,7 +147,7 @@ public class SysThirdExceptionRequestServiceImpl extends ServiceImpl result = Result.err(); @@ -70,20 +70,9 @@ public class WmsCallWcsUtil { } result = stkCallUtil.outTask(moveBo); } - // 这里是添加成功的结果 -// String code = taskService.addTask(vo.getOrderNo(), -// vo.getOrderNo().toString(), -// BusinTaskTypeEnum.out.getValue(), -// Result.isOk(result) ? TaskStatusEnum.wait_callback.getValue() : TaskStatusEnum.err.getValue(), -// null, -// "下发任务" + vo.getLocationCode(), -// null, -// vo.getBranchId(), -// result.getMsg(), -// ThirdApiTypeEnum.wcsOutTask); thirdExceptionRequestService.addException(vo.getOrderNo().toString(), ThirdApiTypeEnum.wcsOutTask, JSONObject.toJSONString(moveBo), - JSONObject.toJSONString(result), Result.isOk(result),null); + JSONObject.toJSONString(result), Result.isOk(result),null,layer); log.info("outStock 调用结果 = {}", result); return result; } catch (Exception e) { @@ -93,7 +82,7 @@ public class WmsCallWcsUtil { } } - public Result callOutStock(OutStockDetailVo vo) { + public Result callOutStock(OutStockDetailVo vo,Integer layer) { try { //从哪个位置搬运 STKMoveBo moveBo = getStkMoveBo(vo); @@ -102,7 +91,7 @@ public class WmsCallWcsUtil { Result result = stkCallUtil.outTask(moveBo); //记录结果到是否正常,异常要轮询执行 thirdExceptionRequestService.addException(vo.getOrderNo().toString(), ThirdApiTypeEnum.wcsCallOutStock, JSONObject.toJSONString(moveBo), - JSONObject.toJSONString(result), Result.isOk(result),null); + JSONObject.toJSONString(result), Result.isOk(result),null,layer); log.info("outStock 调用结果 = {}", result); return result; } catch (Exception e) { @@ -159,23 +148,8 @@ public class WmsCallWcsUtil { STKMoveBo moveBo = getStkMoveBo(vo); Result result = stkCallUtil.locationAdjustment(moveBo); -// if (Result.isOk(result)) { -// log.error("货位调整下发失败 result = {}", result); -// throw new ServiceException(result.getMsg()); -// } -// // 这里是添加成功的结果 -// String code = taskService.addTask(moveBo.getTaskId(), -// moveBo.getTaskId().toString(), -// BusinTaskTypeEnum.move.getValue(), -// TaskStatusEnum.wait_callback.getValue(), -// null, -// "货位调整" + vo.getFromLocationCode() + "=>" + vo.getToLocationCode(), -// null, -// vo.getBranchId(), -// result.getMsg(), -// ThirdApiTypeEnum.wcsMoveLocationTask); thirdExceptionRequestService.addException(vo.getTaskId().toString(), ThirdApiTypeEnum.wcsMoveLocationTask, JSONObject.toJSONString(moveBo), - JSONObject.toJSONString(result), true,null); + JSONObject.toJSONString(result), true,null,null); return Result.ok(); } catch (Exception e) { e.printStackTrace(); diff --git a/shkj-wms/src/main/resources/mapper/wms/BaseMoldMapper.xml b/shkj-wms/src/main/resources/mapper/wms/BaseMoldMapper.xml index 2730f3b..58c12ec 100644 --- a/shkj-wms/src/main/resources/mapper/wms/BaseMoldMapper.xml +++ b/shkj-wms/src/main/resources/mapper/wms/BaseMoldMapper.xml @@ -90,16 +90,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - \ No newline at end of file +