From a17f3bca63aa56fc337e259c74001ff03c0f8420 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 31 Aug 2021 17:01:30 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=89=93=E5=8D=B0=E8=B6=85=E6=97=B63?= =?UTF-8?q?=E5=88=86=E9=92=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/common/service/impl/PrintLogServiceImpl.java | 3 ++- 1 file changed, 2 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 064e6a7d..6a8af85a 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 @@ -159,7 +159,8 @@ public class PrintLogServiceImpl extends ServiceImpl i } public void printServer(List list){ - String post = HttpUtil.post(printServer, JSON.toJSONString(list), 60000); + // 超时时间180秒/3分钟 + String post = HttpUtil.post(printServer, JSON.toJSONString(list), 180000); /** * {"msg":"打印成功","code":0} * {"msg":"打印失败","code":500} From 56599d67b031aad62b3309bd243b07904d15f655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com> Date: Tue, 31 Aug 2021 17:34:52 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=BA=8B=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/AbnormalBillMapper.xml | 11 ++++++++++- .../foreverwin/mesnac/common/util/ActiveMQUtil.java | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml index 4898d922..20580a3f 100644 --- a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml +++ b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml @@ -942,9 +942,18 @@ AND zab.ABNORMAL_NO = #{abnormalBill.abnormalNo} - + AND zab.STATUS = #{abnormalBill.status} + + AND zab.PROGRAM IS NULL + + + AND zab.CORRECTION IS NULL + + + AND zab.PROGRAM = 'true' AND zab.CORRECTION = 'true' AND zab.status != 'G' + AND zab.CREATED_DATE_TIME >= #{abnormalBill.startDateTime} diff --git a/common/src/main/java/com/foreverwin/mesnac/common/util/ActiveMQUtil.java b/common/src/main/java/com/foreverwin/mesnac/common/util/ActiveMQUtil.java index b6244cf3..97478976 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/util/ActiveMQUtil.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/util/ActiveMQUtil.java @@ -2,6 +2,7 @@ package com.foreverwin.mesnac.common.util; import org.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.jms.core.JmsMessagingTemplate; import org.springframework.stereotype.Component; @@ -15,6 +16,7 @@ public class ActiveMQUtil { @Autowired + @Qualifier("mesJmsTemplate") private JmsMessagingTemplate mesJmsTemplate; public void wechatSendMessage(String user, String text) { From 18df19141e061075bd13d0801a44c032b6c9462b Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Tue, 31 Aug 2021 17:41:37 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/mapper/InspectionItemMapper.java | 6 ++++++ .../service/impl/InspectionItemServiceImpl.java | 15 ++++++++++++++- .../resources/mapper/InspectionItemMapper.xml | 10 ++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/mapper/InspectionItemMapper.java b/common/src/main/java/com/foreverwin/mesnac/common/mapper/InspectionItemMapper.java index b084ecc5..f434ec01 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/mapper/InspectionItemMapper.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/mapper/InspectionItemMapper.java @@ -24,4 +24,10 @@ public interface InspectionItemMapper extends BaseMapper { List selectWidestQualityInspection(@Param("site")String site,@Param("inspectionType")String inspectionType,@Param("additionalObject")String additionalObject); Integer checkRouterStep(@Param("site")String site,@Param("operation") String operation,@Param("stepId") String stepId); + + Integer resrcePlanCheck(String handle); + + Integer resrceTaskCheck(String handle); + + Integer inspectTaskCheck(String handle); } \ No newline at end of file diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/InspectionItemServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/InspectionItemServiceImpl.java index 97370026..833f5766 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/InspectionItemServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/InspectionItemServiceImpl.java @@ -219,7 +219,20 @@ public class InspectionItemServiceImpl extends ServiceImpl0){ + throw new BaseException("检验项目已被使用,无法删除"); + } + num=inspectionItemMapper.resrceTaskCheck(handle); + if (num>0){ + throw new BaseException("检验项目已被使用,无法删除"); + } + num=inspectionItemMapper.inspectTaskCheck(handle); + if (num>0){ + throw new BaseException("检验项目已被使用,无法删除"); + } HashMap removeCondition = new HashMap<>(); removeCondition.put(InspectionItemAddition.INSPECTION_ITEM_BO, inspectionItem.getHandle()); inspectionItemAdditionService.removeByMap(removeCondition); diff --git a/common/src/main/resources/mapper/InspectionItemMapper.xml b/common/src/main/resources/mapper/InspectionItemMapper.xml index ac19108f..65f625bd 100644 --- a/common/src/main/resources/mapper/InspectionItemMapper.xml +++ b/common/src/main/resources/mapper/InspectionItemMapper.xml @@ -475,4 +475,14 @@ WHERE (ziia.ADDITIONAL_OBJECT_TYPE='ITEM' OR ziia.ADDITIONAL_OBJECT_TYPE='OPERATION') AND zii.STATUS='Y' AND zii.INSPECTION_TYPE=#{inspectionType} AND ziia.ADDITIONAL_OBJECT=#{additionalObject} AND zii.SITE=#{site} + + + + From 1dacffcf9c2e2a4f1273ef51f7bdb75a520e762e Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Tue, 31 Aug 2021 17:45:37 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=89=93=E5=BC=80=E6=8A=A5=E5=B7=A5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/production/service/impl/PodTemplateServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java index e8f44d3b..8f23e906 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java @@ -326,7 +326,7 @@ public class PodTemplateServiceImpl implements PodTemplateService { //更改派工单状态 sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), dispatchNo, DispatchStatusEnum.COMPLETE.getCode(),workHour); //报工 - //sendErp(sfc, stepId, qty, BigDecimal.ZERO, workHour); + sendErp(sfc, stepId, qty, BigDecimal.ZERO, workHour); } catch (Exception e) { ExceptionUtil.throwException(e); } From e437fad1fb2b61d3f0c25109b85027c174a1e8b2 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 31 Aug 2021 18:05:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ReportDataController.java | 52 +++++++++++++++++++ .../common/mapper/ReportDataMapper.java | 10 ++++ .../common/service/ReportDataService.java | 23 ++++++++ .../service/impl/ReportDataServiceImpl.java | 15 ++++++ .../resources/mapper/ReportDataMapper.xml | 15 ++++++ 5 files changed, 115 insertions(+) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/controller/ReportDataController.java b/common/src/main/java/com/foreverwin/mesnac/common/controller/ReportDataController.java index 08a73edd..e980e8e4 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/controller/ReportDataController.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/controller/ReportDataController.java @@ -38,4 +38,56 @@ public class ReportDataController { return R.failed(e.getMessage()); } } + + /** + * 设备负荷率报表 + * 查询设备每日的负荷率 + * @param paramMap + * @return + */ + @GetMapping("/findResourceLoadRateInfo") + public R findResourceLoadRateInfo(@RequestParam(required = false) Map paramMap) { + try { + paramMap.put("site", CommonMethods.getSite()); + List> result = reportDataService.findResourceLoadRateInfo(paramMap); + return R.ok(result); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + } + + /** + * 设备维修数据统计报表 + * + * @param paramMap + * @return + */ + @GetMapping("/findResourceRepairDataStatInfo") + public R findResourceRepairDataStatInfo(@RequestParam(required = false) Map paramMap) { + try { + paramMap.put("site", CommonMethods.getSite()); + List> result = reportDataService.findResourceRepairDataStatInfo(paramMap); + return R.ok(result); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + } + + /** + * 每日生产状态报表 + * + * @param paramMap + * @return + */ + @GetMapping("/findProductStateInfo") + public R findProductStateInfo(@RequestParam(required = false) Map paramMap) { + try { + paramMap.put("site", CommonMethods.getSite()); + List> result = reportDataService.findProductStateInfo(paramMap); + return R.ok(result); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + } + } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/mapper/ReportDataMapper.java b/common/src/main/java/com/foreverwin/mesnac/common/mapper/ReportDataMapper.java index a4d13aaa..a491333d 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/mapper/ReportDataMapper.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/mapper/ReportDataMapper.java @@ -8,4 +8,14 @@ import java.util.Map; @Repository public interface ReportDataMapper { List> findInspectionTask(Map paramMap); + + + List> findResourceLoadRateInfo(Map paramMap); + + List> findResourceRepairDataStatInfo(Map paramMap); + + List> findProductStateInfo(Map paramMap); + + + } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/ReportDataService.java b/common/src/main/java/com/foreverwin/mesnac/common/service/ReportDataService.java index 84d18732..a36334e4 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/ReportDataService.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/ReportDataService.java @@ -11,4 +11,27 @@ public interface ReportDataService { * @return */ List> findInspectionTask(Map paramMap); + + /** + * 设备负荷率报表 + * + * @param paramMap + * @return + */ + List> findResourceLoadRateInfo(Map paramMap); + /** + * 设备维修数据统计报表 + * + * @param paramMap + * @return + */ + List> findResourceRepairDataStatInfo(Map paramMap); + /** + * 每日生产状态报表 + * + * @param paramMap + * @return + */ + List> findProductStateInfo(Map paramMap); + } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ReportDataServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ReportDataServiceImpl.java index ffa1d225..216ac4fa 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ReportDataServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ReportDataServiceImpl.java @@ -20,4 +20,19 @@ public class ReportDataServiceImpl implements ReportDataService{ public List> findInspectionTask(Map paramMap) { return reportDataMapper.findInspectionTask(paramMap); } + + @Override + public List> findResourceLoadRateInfo(Map paramMap) { + return reportDataMapper.findResourceLoadRateInfo(paramMap); + } + + @Override + public List> findResourceRepairDataStatInfo(Map paramMap) { + return reportDataMapper.findResourceRepairDataStatInfo(paramMap); + } + + @Override + public List> findProductStateInfo(Map paramMap) { + return reportDataMapper.findProductStateInfo(paramMap); + } } diff --git a/common/src/main/resources/mapper/ReportDataMapper.xml b/common/src/main/resources/mapper/ReportDataMapper.xml index 973b39b0..8d20197d 100644 --- a/common/src/main/resources/mapper/ReportDataMapper.xml +++ b/common/src/main/resources/mapper/ReportDataMapper.xml @@ -49,4 +49,19 @@ + + + + + + + + + \ No newline at end of file From fb3c6fd6388c2d7a009371303da93221f8811aa8 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 31 Aug 2021 18:05:31 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E4=B8=BB=E8=A7=82=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/resources/mapper/PrintLogMapper.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/resources/mapper/PrintLogMapper.xml b/common/src/main/resources/mapper/PrintLogMapper.xml index 35ec6f7b..4e3238c0 100644 --- a/common/src/main/resources/mapper/PrintLogMapper.xml +++ b/common/src/main/resources/mapper/PrintLogMapper.xml @@ -570,7 +570,7 @@