diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java index 297f517..3686f88 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java @@ -8,6 +8,7 @@ import com.ktg.common.core.domain.AjaxResult; import com.ktg.common.core.page.TableDataInfo; import com.ktg.common.enums.BusinessType; import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.mes.md.domain.AP0AE; import com.ktg.mes.md.domain.WmsOutPlan; import com.ktg.mes.md.domain.WmsOutPlanDetailEntity; import com.ktg.mes.md.service.IAP0AEService; @@ -32,9 +33,6 @@ public class WmsOutPlanController extends BaseController { @Autowired private IWmsOutPlanService wmsOutPlanService; - @Autowired - private IAP0AEService aP0AEService; - /** * 查询出库计划管理列表 */ @@ -51,10 +49,6 @@ public class WmsOutPlanController extends BaseController { @PreAuthorize("@ss.hasPermi('md:PLAN:list')") @GetMapping("/list") public TableDataInfo list(WmsOutPlan wmsOutPlan) { -// System.out.println("==================================================="); -// System.out.println(JSON.toJSONString(this.aP0AEService.selectAllAP0AE())); -// System.out.println("==================================================="); - startPage(); List list = wmsOutPlanService.selectWmsOutPlanList(wmsOutPlan); return getDataTable(list); @@ -113,7 +107,14 @@ public class WmsOutPlanController extends BaseController { return toAjax(wmsOutPlanService.runWmsOutPlan(wmsOutPlanIds)); } - @PreAuthorize("@ss.hasPermi('md:PLAN:edit')") + @PreAuthorize("@ss.hasPermi('md:PLAN:add')") + @Log(title = "出库计划管理", businessType = BusinessType.UPDATE) + @PutMapping("/synchronization-mini-box") + public AjaxResult synchronizationMiniBox() { + return AjaxResult.success(wmsOutPlanService.synchronizationMiniBox(getUsername())); + } + + @PreAuthorize("@ss.hasPermi('md:PLAN:add')") @Log(title = "出库计划管理", businessType = BusinessType.UPDATE) @PutMapping("/auto-scrap-out") public AjaxResult autoScrapOut() { diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsOutPlanService.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsOutPlanService.java index d3d8a9b..dade33e 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsOutPlanService.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsOutPlanService.java @@ -1,5 +1,6 @@ package com.ktg.mes.md.service; +import com.ktg.mes.md.domain.AP0AE; import com.ktg.mes.md.domain.WmsOutPlan; import com.ktg.mes.md.domain.WmsOutPlanDetailEntity; @@ -65,6 +66,8 @@ public interface IWmsOutPlanService { List> selectWmsOutPlanDetailEntityList(WmsOutPlanDetailEntity wmsOutPlanDetailEntity); + int synchronizationMiniBox(String username); + int autoScrapOut(String username); public String checkPlanCodeUnique(WmsOutPlan wmsOutPlan); diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java index 5639764..7cb1395 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java @@ -1,5 +1,6 @@ package com.ktg.mes.md.service.impl; +import com.alibaba.fastjson.JSON; import com.ktg.common.constant.UserConstants; import com.ktg.common.utils.DateUtils; import com.ktg.common.utils.StringUtils; @@ -45,6 +46,9 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService { @Autowired private WmStorageAreaMapper wmStorageAreaMapper; + @Autowired + private AP0AEMapper ap0AEMapper; + /** * 查询出库计划管理 * @@ -262,6 +266,21 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService { return hashMapList; } + @Override + public int synchronizationMiniBox(String username) { + List ap0AEList = ap0AEMapper.selectOutNewData(); + System.out.println("========================================="); + System.out.println(JSON.toJSONString(ap0AEList)); + System.out.println("========================================="); + + List wmsOutPlanList = wmsOutPlanMapper.selectWmsOutPlanList(new WmsOutPlan()); + System.out.println("========================================="); + System.out.println(JSON.toJSONString(wmsOutPlanList)); + System.out.println("========================================="); + + return 0; + } + @Transactional @Override public int autoScrapOut(String username) {