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 e980e8e4..5642c53e 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 @@ -89,5 +89,32 @@ public class ReportDataController { return R.failed(e.getMessage()); } } + /** + * 每日生产状态报表 + * + * @param paramMap + * @return + */ + @GetMapping("/workShopPassRate") + public R findWorkShopPassRate(@RequestParam(required = false) Map paramMap) { + try { + paramMap.put("site", CommonMethods.getSite()); + List> result = reportDataService.findWorkShopPassRate(paramMap); + return R.ok(result); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + } + + @GetMapping("/checkUserPassRate") + public R findCheckUserPassRate(@RequestParam(required = false) Map paramMap) { + try { + paramMap.put("site", CommonMethods.getSite()); + List> result = reportDataService.findCheckUserPassRate(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 a491333d..db4c7528 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 @@ -17,5 +17,8 @@ public interface ReportDataMapper { List> findProductStateInfo(Map paramMap); + List> findWorkShopPassRate(Map paramMap); + + List> findCheckUserPassRate(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 a36334e4..a93b4cf8 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 @@ -34,4 +34,9 @@ public interface ReportDataService { */ List> findProductStateInfo(Map paramMap); + List> findWorkShopPassRate(Map paramMap); + + List> findCheckUserPassRate(Map paramMap); + + } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/SfcDispatchCommonService.java b/common/src/main/java/com/foreverwin/mesnac/common/service/SfcDispatchCommonService.java index 9b85e83a..d2708cf8 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/SfcDispatchCommonService.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/SfcDispatchCommonService.java @@ -15,8 +15,7 @@ public interface SfcDispatchCommonService { /** * 拆分派工数据创建 - * - * @param site + * @param site * @param user * @param category N|正常拆分; R|返工拆分 * @param shopOrder @@ -25,8 +24,9 @@ public interface SfcDispatchCommonService { * @param stepId * @param splitSfc * @param routerBo + * @param stepSequence */ - void saveSplitSfcDispatch(String site, String user, String category, String shopOrder, String sfc, String operation, String stepId, String splitSfc, String routerBo); + void saveSplitSfcDispatch(String site, String user, String category, String shopOrder, String sfc, String operation, String stepId, String splitSfc, String routerBo, String stepSequence); /** * 修改派工单状态 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 216ac4fa..e955f5a1 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 @@ -35,4 +35,14 @@ public class ReportDataServiceImpl implements ReportDataService{ public List> findProductStateInfo(Map paramMap) { return reportDataMapper.findProductStateInfo(paramMap); } + + @Override + public List> findWorkShopPassRate(Map paramMap) { + return reportDataMapper.findWorkShopPassRate(paramMap); + } + + @Override + public List> findCheckUserPassRate(Map paramMap) { + return reportDataMapper.findCheckUserPassRate(paramMap); + } } diff --git a/common/src/main/resources/mapper/ProdReadyTaskMapper.xml b/common/src/main/resources/mapper/ProdReadyTaskMapper.xml index 0cd501cd..9f9f31d9 100644 --- a/common/src/main/resources/mapper/ProdReadyTaskMapper.xml +++ b/common/src/main/resources/mapper/ProdReadyTaskMapper.xml @@ -631,7 +631,7 @@ diff --git a/common/src/main/resources/mapper/ReportDataMapper.xml b/common/src/main/resources/mapper/ReportDataMapper.xml index 8d20197d..9add844d 100644 --- a/common/src/main/resources/mapper/ReportDataMapper.xml +++ b/common/src/main/resources/mapper/ReportDataMapper.xml @@ -64,4 +64,63 @@ + + + \ 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 1192b2e5..d4edcde4 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 @@ -602,7 +602,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl i splitSfc.setCreatedDateTime(LocalDateTime.now()); save(splitSfc); Router routerBySfcBo = routerService.getRouterBySfcBo(HandleEnum.SFC.getHandle(site, sfc)); - sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(), "N", sfcData.getShopOrder(), sfc, operation, sfcData.getStepId(),newSfc, routerBySfcBo.getHandle()); + sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(), "N", sfcData.getShopOrder(), sfc, operation, sfcData.getStepId(),newSfc, routerBySfcBo.getHandle(),sfcData.getStepSequence()); return splitSfc; } catch (Exception e) { ExceptionUtil.throwException(e); @@ -259,7 +259,7 @@ public class SplitSfcServiceImpl extends ServiceImpl i if (routerOperationByRouterBo.isEmpty()){ throw new BaseException("处置工艺路线没有步骤"); } - sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(),"R", sfcData.getShopOrder(), sfc, operation, sfcDispatchBySfc.getStepId(),newSfc, maxRevisionRouter.getHandle()); + sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(),"R", sfcData.getShopOrder(), sfc, operation, sfcDispatchBySfc.getStepId(),newSfc, maxRevisionRouter.getHandle(), sfcData.getStepSequence()); } SplitSfc splitSfc=new SplitSfc(); splitSfc.setHandle(HandleEnum.SPLIT_SFC.getHandle(site,newSfc)); diff --git a/production/src/main/resources/mapper/SplitSfcMapper.xml b/production/src/main/resources/mapper/SplitSfcMapper.xml index a4057151..ea2181c0 100644 --- a/production/src/main/resources/mapper/SplitSfcMapper.xml +++ b/production/src/main/resources/mapper/SplitSfcMapper.xml @@ -367,7 +367,7 @@