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/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/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/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/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} 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/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} + + + + 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 @@ 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 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); } diff --git a/quartz/src/main/java/com/foreverwin/mesnac/quartz/controller/SystemJobController.java b/quartz/src/main/java/com/foreverwin/mesnac/quartz/controller/SystemJobController.java index 763616f0..f4fc7719 100644 --- a/quartz/src/main/java/com/foreverwin/mesnac/quartz/controller/SystemJobController.java +++ b/quartz/src/main/java/com/foreverwin/mesnac/quartz/controller/SystemJobController.java @@ -86,17 +86,17 @@ public class SystemJobController { * @param systemJobDTO 传递的实体 * @return null 失败 实体成功 */ - @PostMapping + @PostMapping("/save") public R save(@RequestBody SystemJobDTO systemJobDTO) { return R.ok(systemJobService.save(systemJobDTO)); } /** * 修改 - * @param systemJob 传递的实体 + * @param systemJobDTO 传递的实体 * @return null 失败 实体成功 */ - @PutMapping + @PostMapping("/update") public R updateById(@RequestBody SystemJobDTO systemJobDTO) { return R.ok(systemJobService.updateById(systemJobDTO)); } @@ -107,8 +107,8 @@ public class SystemJobController { * @return 0 失败 1 成功 */ @ResponseBody - @RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}") - public R removeById(@PathVariable("id") String id){ + @GetMapping("/delete") + public R removeById(String id){ return R.ok(systemJobService.removeById(id)); }