From 49ca453631f70827ffb4caae3c7032146c2baa32 Mon Sep 17 00:00:00 2001 From: zpl Date: Wed, 11 Aug 2021 16:57:08 +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 --- .../controller/CallItemController.java | 36 ++++++++++++++++++ .../dispatch/mapper/CallItemMapper.java | 11 ++++++ .../dispatch/service/CallItemService.java | 16 ++++++++ .../service/impl/CallItemServiceImpl.java | 15 ++++++++ .../main/resources/mapper/CallItemMapper.xml | 37 +++++++++++++++---- 5 files changed, 108 insertions(+), 7 deletions(-) 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 437da2fe..61b47712 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 @@ -151,6 +151,24 @@ public class CallItemController { return R.ok("叫料操作成功"); } + /** + * 生产叫料pda + * @param callItemList + * @return + */ + @ResponseBody + @PostMapping("/callOrConfirmItemPda") + public R callOrConfirmItemPda(@RequestBody List callItemList) { + try { + String site = CommonMethods.getSite(); + String user = CommonMethods.getUser(); + callItemService.callOrConfirmItemPda(site, user, callItemList.get(0).getCallStatus() ,callItemList); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + return R.ok("叫料成功"); + } + @ResponseBody @PostMapping("/confirmReceive") @@ -203,6 +221,24 @@ public class CallItemController { return R.ok("刷新叫料明细成功"); } + /** + * 刷新叫料数据 + * @param callItemList + * @return + */ + @ResponseBody + @PostMapping("/refreshCallItemPda") + public R refreshCallItemPda(@RequestBody List callItemList) { + try { + String site = CommonMethods.getSite(); + String user = CommonMethods.getUser(); + callItemService.refreshCallItemPda(site, user, callItemList); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + return R.ok("刷新叫料明细成功"); + } + @ResponseBody @PostMapping("/refreshRequiredTime") public R refreshRequiredTime(@RequestBody List callItemNoList) { 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 4506b694..cb1c7abf 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 @@ -40,6 +40,17 @@ public interface CallItemMapper extends BaseMapper { void updateCallItemStatusByDispatchBo(@Param("status") String status, @Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List list); + /** + * PDA生产叫料--修改叫料状态 + * @param status + * @param user + * @param dateTime + * @param list + */ + void updateCallItemStatusByHandle(@Param("status") String status, @Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List list); + + void findRefreshCallItemPda(@Param("list") List list); + void updateCallItemStatusByCallItemNo(@Param("status") String status, @Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List list); void refreshRequiredTime(@Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List list); 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 03e2fd95..00bd8193 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 @@ -76,6 +76,14 @@ public interface CallItemService extends IService { */ void callItem(String site, String user, List callItemList); + /** + * 叫料PDA + * @param site + * @param user + * @param callItemList + */ + void callOrConfirmItemPda(String site, String user, String status ,List callItemList); + /** * 确认到料 * ----需要校验叫料明细行中不允许存在叫料类型为材料,且组件物料类型为原材料的行 @@ -104,6 +112,14 @@ public interface CallItemService extends IService { */ void refreshCallItem(String site, String user, List callItemList); + /** + * 刷新叫料明细PDA + * @param site + * @param user + * @param callItemList + */ + void refreshCallItemPda(String site, String user, List callItemList); + /** * 刷新需求时间 * 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 e8a4f5fb..6e945aa4 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 @@ -154,6 +154,16 @@ public class CallItemServiceImpl extends ServiceImpl i this.updateCallItemStatusByDispatchBo(Constants.CALL_ITEM_STATUS_CALLED, user, dispatchBoList); } + @Override + public void callOrConfirmItemPda(String site, String user,String status ,List callItemList) { + LocalDateTime dateTime = LocalDateTime.now(); + List list = new ArrayList<>(); + for (CallItem callItem : callItemList) { + list.add(callItem.getHandle()); + } + callItemMapper.updateCallItemStatusByHandle(status, user, dateTime, list); + } + @Override public void confirmReceive(String site, String user, List callItemList) { if (callItemList == null || callItemList.size() <= 0) { @@ -259,6 +269,11 @@ public class CallItemServiceImpl extends ServiceImpl i } } + @Override + public void refreshCallItemPda(String site, String user, List callItemList) { + + } + @Override public void refreshRequiredTime(String site, String user, List callItemNoList) { if (callItemNoList == null || callItemNoList.size() <= 0) { diff --git a/dispatch/src/main/resources/mapper/CallItemMapper.xml b/dispatch/src/main/resources/mapper/CallItemMapper.xml index 14036eec..0132e1fb 100644 --- a/dispatch/src/main/resources/mapper/CallItemMapper.xml +++ b/dispatch/src/main/resources/mapper/CallItemMapper.xml @@ -833,6 +833,14 @@ + + UPDATE Z_CALL_ITEM SET CALL_STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime} + WHERE HANDLE IN + + #{item} + + + UPDATE Z_CALL_ITEM SET STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime} WHERE STATUS != '804' AND CALL_ITEM_NO IN @@ -971,10 +979,10 @@ +