From 655b40d4cf0f6e79fd7c13bc57810a830db7d47e Mon Sep 17 00:00:00 2001 From: Leon <3066758958@qq.com> Date: Fri, 3 Sep 2021 15:33:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E6=AC=A1=E6=8B=86=E5=88=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B4=BE=E5=B7=A5=E6=95=B0=E9=87=8F&=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=B8=AD=E6=96=87=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/common/aspect/ExportAspect.java | 12 +++++++++--- .../mesnac/dispatch/mapper/SfcDispatchMapper.java | 10 ++++++++++ .../service/impl/SfcDispatchServiceImpl.java | 3 +++ .../src/main/resources/mapper/SfcDispatchMapper.xml | 6 ++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/aspect/ExportAspect.java b/common/src/main/java/com/foreverwin/mesnac/common/aspect/ExportAspect.java index 05d066a4..0c00a60e 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/aspect/ExportAspect.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/aspect/ExportAspect.java @@ -56,24 +56,30 @@ public class ExportAspect { //------------------------------------------------------------------------------------------------------------------- if (paramtes == null || args == null || args.length == 0) return joinPoint.proceed(); //------------------------------------------------------------------------------------------------------------------- + request.setCharacterEncoding("UTF-8"); + + Object[] params = new Object[1]; + Map paramMap = new HashMap<>(); while (paramtes.hasMoreElements()) { String param = paramtes.nextElement(); String value = request.getParameter(param); //------------------------------------------------------------------------------------------------------------------- if (param != null && param.equals("export")) export = true; if (param != null && param.equals("exportCode")) exportCode = value; - if (export && StringUtil.notEmpty(exportCode)) break; + + paramMap.put(param, value); }//while + params[0] = paramMap; //------------------------------------------------------------------------------------------------------------------- if (export == false || StringUtil.isEmpty(exportCode)) return joinPoint.proceed(); //------------------------------------------------------------------------------------------------------------------- - for (Object arg : args) { + for (Object arg : params) { if (arg instanceof FrontPage) { ((FrontPage)arg).setRows(20000); } }//for //------------------------------------------------------------------------------------------------------------------- - Object result = joinPoint.proceed(args); + Object result = joinPoint.proceed(params); JSONObject resultJson = JSON.parseObject(JSON.toJSONStringWithDateFormat(result, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat)); if (resultJson.get("data") instanceof List) { List dataList = (List)resultJson.get("data"); diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java index 4ca9ed10..ea73dc73 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java @@ -58,4 +58,14 @@ public interface SfcDispatchMapper extends BaseMapper { SfcDispatchDto findSfcDispatchBySfc(@Param("site")String site, @Param("dto")SfcDispatchDto sfcDispatch); List findSplitSfcDispatch(@Param("site") String site, @Param("sfc") String sfc, @Param("stepId") int stepId); + + /** + * 批次拆分后 修改派工单数量 + * + * @param site + * @param sfc + * @param currentSeq + * @param splitQty + */ + void updateSfcDispatchQty(@Param("site") String site, @Param("sfc") String sfc, @Param("currentSeq") int currentSeq, @Param("splitQty") Float splitQty); } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java index 94dcb17a..bd0939cb 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java @@ -714,6 +714,9 @@ public class SfcDispatchServiceImpl extends ServiceImpl= #{stepId} + + + + UPDATE Z_SFC_DISPATCH SET DISPATCH_QTY = DISPATCH_QTY - #{splitQty} + WHERE SITE = #{site} AND SFC = #{sfc} AND DISPATCH_SEQ >= #{currentSeq} +