From ae79b64e03af6295b423ca1bb6cbfb72237f56e8 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Wed, 17 Jan 2024 11:55:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=90=88=E8=A7=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=A4=84=E7=90=86+=E6=8A=A5=E5=B7=A5=E9=97=AE=E9=A2=98?= =?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/MesReportWorkController.java | 9 ++++ .../op/mes/mapper/MesReportWorkMapper.java | 2 + .../op/mes/service/IMesReportWorkService.java | 2 + .../op/mes/service/IWCSInterfaceService.java | 1 + .../service/impl/IWCInterfaceServiceImpl.java | 53 ------------------- .../impl/MesReportWorkServiceImpl.java | 8 +++ .../mapper/mes/MesReportWorkMapper.xml | 9 +++- 7 files changed, 30 insertions(+), 54 deletions(-) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java index 5d01a67d..8e25229d 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java @@ -136,6 +136,15 @@ public class MesReportWorkController extends BaseController { } } + /** + * 报工撤销 + */ + @RequiresPermissions("mes:reportWork:edit") + @PutMapping("/reportSapCancel") + public AjaxResult reportSapCancel(@RequestBody MesReportWork mesReportWork) { + return toAjax(mesReportWorkService.reportSapCancel(mesReportWork)); + } + /** * 删除报工报表 */ diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java index 35ccd15d..153d45bb 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java @@ -127,4 +127,6 @@ public interface MesReportWorkMapper { MesReportWork getEndReport(MesReportWork pWork); List selectMesReportWorkList_S(MesReportWork mesReportWork); + + int reportSapCancel(MesReportWork mesReportWork); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java index ae6ff30e..95d9f2cb 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java @@ -101,4 +101,6 @@ public interface IMesReportWorkService { List getPrepareList(MesPrepareDetail mesPrepareDetail); List selectMesReportWorkList_S(MesReportWork mesReportWork); + + int reportSapCancel(MesReportWork mesReportWork); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IWCSInterfaceService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IWCSInterfaceService.java index 129e6d27..ccad386e 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/IWCSInterfaceService.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IWCSInterfaceService.java @@ -40,4 +40,5 @@ public interface IWCSInterfaceService { Map dryRoomDataHeader(BoardDTO boardDTO); Map dryRoomDataCarousel(BoardDTO boardDTO); + } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java index 062f4305..f63e76c4 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java @@ -536,57 +536,4 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService { return map; } - -// public static void main(String[] args) { -// param param=new param(); -// param.setReqCode(IdUtils.fastSimpleUUID()); -// param.setReqTime(DateUtils.dateTimeNow()); -// param.setBufferType("10"); -// param.setFactory("999"); -// try { -// String res= HttpUtils.sendPost("http://192.168.109.36:5001/api/ReceivingAndFeedingMaterials/bufferInfoSync", JSON.toJSONString(param)); -// System.out.println(res); -// }catch (Exception e){ -// System.out.println(e.getMessage()); -// } -// -// } -// static class param{ -// String reqCode; -// String reqTime; -// String factory; -// String bufferType; -// -// public String getReqCode() { -// return reqCode; -// } -// -// public void setReqCode(String reqCode) { -// this.reqCode = reqCode; -// } -// -// public String getReqTime() { -// return reqTime; -// } -// -// public void setReqTime(String reqTime) { -// this.reqTime = reqTime; -// } -// -// public String getFactory() { -// return factory; -// } -// -// public void setFactory(String factory) { -// this.factory = factory; -// } -// -// public String getBufferType() { -// return bufferType; -// } -// -// public void setBufferType(String bufferType) { -// this.bufferType = bufferType; -// } -// } } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java index 8d1d7fe9..95c6a72c 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java @@ -176,6 +176,14 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { return dtos; } + @Override + @DS("#header.poolName") + public int reportSapCancel(MesReportWork mesReportWork) { + mesReportWork.setFactoryCode(ServletUtils.getRequest().getHeader("PoolName")); + int m = mesReportWorkMapper.reportSapCancel(mesReportWork); + return m; + } + /** * 修改报工报表 * diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index 632865c5..fb4dd409 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -813,8 +813,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" id = #{item.id} + + update mes_report_work set + upload_time = null, + upload_status = '0', + upload_msg = null + where workorder_code = #{workorderCode} + - + update mes_report_work set del_flag = '1' where id = #{id}