From 76211d85fa898be9e08dc57d62150f1eaf7e27b6 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 10 Aug 2021 22:13:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=8F=AB=E6=96=99PDA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PrintLogServiceImpl.java | 2 +- .../controller/CallItemController.java | 24 ++++++++++++ .../dispatch/mapper/CallItemMapper.java | 2 + .../mesnac/dispatch/model/CallItem.java | 12 ++++++ .../dispatch/service/CallItemService.java | 8 ++++ .../service/impl/CallItemServiceImpl.java | 5 +++ .../main/resources/mapper/CallItemMapper.xml | 38 +++++++++++++++++++ 7 files changed, 90 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java index 6f50e552..b49c4d50 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java @@ -83,7 +83,7 @@ public class PrintLogServiceImpl extends ServiceImpl i JSONObject jsonObject = JSONObject.parseObject(post); Integer code = jsonObject.getInteger("code"); String msg = jsonObject.getString("msg"); - if (code == 500){ + if (code != 0){ throw BusinessException.build(msg); } // 更新打印记录:是否已打印、使用的打印机、打印次数 diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/CallItemController.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/CallItemController.java index 4b9a89e7..437da2fe 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/CallItemController.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/CallItemController.java @@ -110,6 +110,30 @@ public class CallItemController { return R.ok(result); } + /** + * 查询叫料明细数据 + * + * @return + */ + @ResponseBody + @PostMapping("/findCallItemInfoList") + public R findCallItemInfoList(@RequestBody CallItem callItem){ + List result; + try { + callItem.setSite(CommonMethods.getSite()); + if (callItem.getStartFromDate_S() != null) { + callItem.setStartFromDate(DateUtil.parse(callItem.getStartFromDate_S())); + } + if (callItem.getStartToDate_S() != null) { + callItem.setStartToDate(DateUtil.parse(callItem.getStartToDate_S())); + } + result = callItemService.findCallItemInfoList(callItem); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + return R.ok(result); + } + @ResponseBody @PostMapping("/callItem") public R callItem(@RequestBody List callItemList) { diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/CallItemMapper.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/CallItemMapper.java index f92639c7..4506b694 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/CallItemMapper.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/CallItemMapper.java @@ -34,6 +34,8 @@ public interface CallItemMapper extends BaseMapper { List findCallItemDetailList(CallItem callItem); + List findCallItemInfoList(CallItem callItem); + List findCallItemDetailListByDispatchBo(@Param("site") String site, @Param("list") List list); void updateCallItemStatusByDispatchBo(@Param("status") String status, @Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List list); diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/CallItem.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/CallItem.java index 2fefe482..2102550d 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/CallItem.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/CallItem.java @@ -142,6 +142,8 @@ public class CallItem extends Model { @TableField(exist = false) private String component; @TableField(exist = false) + private String componentDescription; + @TableField(exist = false) private String itemDescription; @TableField(exist = false) private String materialType; @@ -158,6 +160,8 @@ public class CallItem extends Model { @TableField(exist = false) private String workCenter; @TableField(exist = false) + private String workCenterDescription; + @TableField(exist = false) private String dispatchNo; @TableField(exist = false) private BigDecimal dispatchQty; @@ -384,6 +388,14 @@ public class CallItem extends Model { this.component = component; } + public String getComponentDescription() { + return componentDescription; + } + + public void setComponentDescription(String componentDescription) { + this.componentDescription = componentDescription; + } + public String getItemDescription() { return itemDescription; } diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/CallItemService.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/CallItemService.java index ce714f19..03e2fd95 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/CallItemService.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/CallItemService.java @@ -58,6 +58,14 @@ public interface CallItemService extends IService { */ List findCallItemDetailListByDispatchBo(String site, List dispatchBoList); + /** + * 生产叫料PDA + * + * @param callItem + * @return + */ + List findCallItemInfoList(CallItem callItem); + /** * 叫料 diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java index e9ad3806..e8a4f5fb 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java @@ -134,6 +134,11 @@ public class CallItemServiceImpl extends ServiceImpl i return callItemMapper.findCallItemDetailListByDispatchBo(site, dispatchBoList); } + @Override + public List findCallItemInfoList(CallItem callItem) { + return callItemMapper.findCallItemInfoList(callItem); + } + @Override public void callItem(String site, String user, List callItemList) { if (callItemList == null || callItemList.size() <= 0) { diff --git a/dispatch/src/main/resources/mapper/CallItemMapper.xml b/dispatch/src/main/resources/mapper/CallItemMapper.xml index af07b7f5..14036eec 100644 --- a/dispatch/src/main/resources/mapper/CallItemMapper.xml +++ b/dispatch/src/main/resources/mapper/CallItemMapper.xml @@ -969,4 +969,42 @@ ON VIP.SITE = SIP.SITE AND VIP.ITEM_BO = SIP.ITEM_BO AND VIP.REQUIRED_QTY > 0 ORDER BY VIP.WORK_ORDER, VIP.ITEM + + +