pms-parent/pms-global/src/main/resources/privileges-config.xml
@@ -18,6 +18,8 @@ <!-- 生产管理 --> <privilege num="10200000" name="生产查询" type="1020" typeName="生产管理"></privilege> <privilege num="10200001" name="生产管理" type="1020" typeName="生产管理"></privilege> <privilege num="10200002" name="流程查询" type="1020" typeName="生产管理"></privilege> <privilege num="10200003" name="流程管理" type="1020" typeName="生产管理"></privilege> <!-- 平台信息 --> <privilege num="10300000" name="产品查询" type="1030" typeName="平台信息"></privilege> @@ -32,6 +34,8 @@ <privilege num="10300009" name="不合格原因管理" type="1030" typeName="平台信息"></privilege> <privilege num="10300010" name="报废原因查询" type="1030" typeName="平台信息"></privilege> <privilege num="10300011" name="报废原因管理" type="1030" typeName="平台信息"></privilege> <privilege num="10300012" name="测试项目查询" type="1030" typeName="平台信息"></privilege> <privilege num="10300013" name="测试项目管理" type="1030" typeName="平台信息"></privilege> </privileges> </config> pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java
@@ -116,7 +116,7 @@ * @return */ @PostMapping(path="disabled") @SsoPowerAop(power = "10100011") @SsoPowerAop(power = "10300003") @Log("禁用或启用质检项目") public BaseResponse<Boolean> disabled(@RequestBody PltProductQualityInspectionItems reason){ int count = sv.disabled(reason.id,reason.disabled); pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
@@ -34,7 +34,7 @@ * @return */ @PostMapping(path="save") @SsoPowerAop(power = "10300003") @SsoPowerAop(power = "10300013") @Log("保存产品测试检查项目信息") public BaseResponse<Boolean> save(@RequestBody @Valid PltProductTestInspectionItems item){ item.deleted = false; @@ -54,7 +54,7 @@ * @return */ @PostMapping(path="update") @SsoPowerAop(power = "10300003") @SsoPowerAop(power = "10300013") @Log("更新产品测试检查项目信息") public BaseResponse<Boolean> update(@RequestBody @Valid PltProductTestInspectionItems item){ int count = sv.update(item); @@ -71,7 +71,7 @@ * @return */ @GetMapping(path="delete") @SsoPowerAop(power = "10300003") @SsoPowerAop(power = "10300013") @Log("删除产品测试检查项目信息") public BaseResponse<Boolean> delete(String id){ int count = sv.delete(Long.parseLong(id)); @@ -90,7 +90,7 @@ * @return */ @GetMapping(path="one") @SsoPowerAop(power = "10300002") //登录与权限同时验证 @SsoPowerAop(power = "10300012") //登录与权限同时验证 @Log("根据ID查询产品测试检查项目信息") public BaseResponse<PltProductTestInspectionItems> one(String id){ PltProductTestInspectionItems item=sv.selectById(id); @@ -103,7 +103,7 @@ * @return */ @PostMapping(path="some") @SsoPowerAop(power = "10300002") @SsoPowerAop(power = "10300012") @Log("查询产品测试检查项目信息") public BaseResponse<QueryResultVo<List<PltProductTestInspectionItems>>> some(@RequestBody QueryVo vo){ QueryResultVo<List<PltProductTestInspectionItems>> list = sv.selectSome(vo) ; @@ -115,7 +115,7 @@ * @return */ @PostMapping(path="disabled") @SsoPowerAop(power = "10100011") @SsoPowerAop(power = "10300013") @Log("禁用或启用测试项目") public BaseResponse<Boolean> disabled(@RequestBody PltProductTestInspectionItems reason){ int count = sv.disabled(reason.id,reason.disabled); pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
@@ -118,7 +118,7 @@ } @PostMapping(path="disabled") @SsoPowerAop(power = "10100011") @SsoPowerAop(power = "10300007") @Log("禁用或启用工站") public BaseResponse<Boolean> disabled(@RequestBody PltStation station){ int count = sv.disabled(station.id,station.disabled); @@ -130,7 +130,7 @@ } } @PostMapping(path="export") @SsoPowerAop(power = "10300000") @SsoPowerAop(power = "10300007") @Log("导出工站信息") public void export(HttpServletResponse response){ List<Converter> list = new ArrayList<>() ; pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessCtrl.java
@@ -33,7 +33,7 @@ * @return */ @PostMapping(path="save") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200003") @Log("保存生产流程") public BaseResponse<Boolean> save(@RequestBody @Valid PrProductionProcess process){ int count = sv.save(process); @@ -50,7 +50,7 @@ * @return */ @PostMapping(path="update") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200003") @Log("更新生产流程") public BaseResponse<Boolean> update(@RequestBody @Valid PrProductionProcess process){ int count = sv.update(process); @@ -66,7 +66,7 @@ * @return */ @GetMapping(path="one") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200002") @Log("根据ID查询生产流程") public BaseResponse<PrProductionProcess> one(Long id){ PrProductionProcess process=sv.selectById(id); @@ -79,7 +79,7 @@ * @return */ @PostMapping(path="some") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200002") @Log("分页查询生产流程") public BaseResponse<QueryResultVo<List<PrProductionProcess>>> some(@RequestBody QueryVo vo){ QueryResultVo<List<PrProductionProcess>> list = sv.selectSome(vo) ; @@ -91,7 +91,7 @@ * @return */ @GetMapping(path="queryAll") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200002") @Log("查询所有生产流程") public BaseResponse<List<Map<String,String>>> queryAll(Long proId){ return BaseResponseUtils.buildSuccess(sv.queryAll(proId)); pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java
@@ -37,7 +37,7 @@ } @PostMapping(path="save") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200001") @Log("保存组装任务计划") public BaseResponse<Boolean> save(@RequestBody @Valid PrAssemblyPlan plan){ int count = sv.save(plan); @@ -54,7 +54,7 @@ * @return */ @PostMapping(path="update") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200001") @Log("更新组装任务计划") public BaseResponse<Boolean> update(@RequestBody @Valid PrAssemblyPlan plan){ int count = sv.update(plan); @@ -66,7 +66,7 @@ } @PostMapping(path="updateStatus") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200001") @Log("更新任务计划状态") public BaseResponse<Boolean> updateStatus(@RequestBody PrAssemblyPlan plan){ int count = sv.updateStatus(plan); @@ -81,7 +81,7 @@ * @return */ @GetMapping(path="one") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200000") @Log("根据ID查询组装任务计划") public BaseResponse<PrAssemblyPlan> one(Long id){ PrAssemblyPlan plan=sv.selectById(id); @@ -94,7 +94,7 @@ * @return */ @PostMapping(path="some") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200000") @Log("分页查询组装任务计划") public BaseResponse<QueryResultVo<List<PrAssemblyPlan>>> some(@RequestBody QueryVo vo){ QueryResultVo<List<PrAssemblyPlan>> list = sv.selectSome(vo) ; @@ -105,7 +105,7 @@ * 增加设备号 */ @PostMapping(path="addDevice") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200001") @Log("增加设备号") public BaseResponse<?> addDevice(@RequestBody QueryVo vo){ if(vo.addNum == null || vo.addNum <= 0 || vo.planId == null){ @@ -120,7 +120,7 @@ } @PostMapping(path="someDevice") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200000") @Log("分页查询设备号") public BaseResponse<QueryResultVo<List<PrDevice>>> someDevice(@RequestBody QueryVo queryVo){ QueryResultVo<List<PrDevice>> list = sv.selectSomeDevice(queryVo) ; @@ -128,7 +128,7 @@ } @GetMapping(path="exportDevice") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200001") @Log("导出设备号") public void exportDevice(Long batchId, HttpServletResponse response){ Date start = new Date() ; pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/DevOpsPlanCtrl.java
@@ -28,7 +28,7 @@ @PostMapping(path="save") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200001") @Log("保存组装任务计划") public BaseResponse<Boolean> save(@RequestBody @Valid PrDevOpsPlan plan){ int count = sv.save(plan); @@ -45,7 +45,7 @@ * @return */ @PostMapping(path="update") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200001") @Log("更新组装任务计划") public BaseResponse<Boolean> update(@RequestBody @Valid PrDevOpsPlan plan){ int count = sv.update(plan); @@ -57,7 +57,7 @@ } @PostMapping(path="updateStatus") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200001") @Log("更新任务计划状态") public BaseResponse<Boolean> updateStatus(@RequestBody PrDevOpsPlan plan){ int count = sv.updateStatus(plan); @@ -73,7 +73,7 @@ * @return */ @GetMapping(path="one") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200000") @Log("根据ID查询组装任务计划") public BaseResponse<PrDevOpsPlan> one(Long id){ PrDevOpsPlan plan=sv.selectById(id); @@ -86,7 +86,7 @@ * @return */ @PostMapping(path="some") @SsoPowerAop(power = "-1") @SsoPowerAop(power = "10200000") @Log("分页查询组装任务计划") public BaseResponse<QueryResultVo<List<PrDevOpsPlan>>> some(@RequestBody QueryVo vo){ QueryResultVo<List<PrDevOpsPlan>> list = sv.selectSome(vo) ; pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -240,6 +240,9 @@ if (record.outLineTime != null) { isEnd = true; } if(StringUtils.isNotBlank(params.getContent())){ record.nodeContent = params.getContent(); } } else { PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId); record.nodeContent = node.content; @@ -284,7 +287,7 @@ */ private Integer getStatus(String status, boolean isEnd, String workType) { //组装 2024/07/17 目前组装workType 1 只有MarkOk //测试 //品检 if (WORK_TYPE_ASSEMBLY.equals(workType) || WORK_TYPE_TEST.equals(workType) || WORK_TYPE_INSPECTION.equals(workType) || WORK_TYPE_REPAIR.equals(workType)) { if (WORK_TYPE_ASSEMBLY.equals(workType) || WORK_TYPE_TEST.equals(workType) || WORK_TYPE_INSPECTION.equals(workType) || WORK_TYPE_REPAIR.equals(workType)|| WORK_TYPE_OTHER.equals(workType)) { return switch (status) { case QrCodeConstant.MarkOk -> isEnd ? DeviceStatus.COMPLETED.getCode() : DeviceStatus.ASSEMBLING.getCode(); case QrCodeConstant.MarkQualified -> isEnd ? DeviceStatus.COMPLETED.getCode() : DeviceStatus.ASSEMBLING.getCode(); @@ -304,8 +307,8 @@ * @return 结果 */ private Integer getResult(String status, String workType) { //组装 if (WORK_TYPE_ASSEMBLY.equals(workType)) { //组装 临时任务-其他 if (WORK_TYPE_ASSEMBLY.equals(workType) || WORK_TYPE_OTHER.equals(workType)) { return switch (status) { case QrCodeConstant.MarkOk -> DeviceResult.PASS.getCode(); default -> throw new RuntimeException("状态错误"); @@ -410,22 +413,31 @@ if (workLast == null) { throw new RuntimeException("系统中没有该条登录信息"); } //保存工作记录 StaDeviceProductionLog log = new StaDeviceProductionLog(); log.setId(null); // 设备生产日志ID设为null,表示新增 log.setDeviceNo(""); //RepairId planId currNode deviceCycleContent memo log.setWorkId(workId); log.setStationId(workLast.getStationId()); log.setNodeContent(vo.getContent()); log.setStatus(DeviceStatus.COMPLETED.getCode());//完成状态 log.setResult(DeviceResult.PASS.getCode());//通过 log.setErrorMsg(vo.getErrorMsg()); log.setAssistants(workLast.getAssistants()); log.setInTime(new Date()); log.setOutTime(new Date()); log.setUpdatedBy(workLast.getUserId()); log.setNumber(vo.getNumber()); int count = deviceProductionLogDao.insertSelective(log); int count = 0; //保存工作记录 //如果有设备码 if(vo.deviceNo != null && StringUtils.isNotBlank(vo.deviceNo[0])){ StaDeviceLast deviceLast = buildDeviceLast(vo, workLast, vo.deviceNo[0]); count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) : deviceLastDao.updateByPrimaryKey(deviceLast); saveDeviceProductionLog(deviceLast); }else{ StaDeviceProductionLog log = new StaDeviceProductionLog(); log.setId(null); // 设备生产日志ID设为null,表示新增 log.setDeviceNo(""); //RepairId planId currNode deviceCycleContent memo log.setWorkId(workId); log.setStationId(workLast.getStationId()); log.setNodeContent(vo.getContent()); log.setStatus(DeviceStatus.COMPLETED.getCode());//完成状态 log.setResult(DeviceResult.PASS.getCode());//通过 log.setErrorMsg(vo.getErrorMsg()); log.setAssistants(workLast.getAssistants()); log.setInTime(new Date()); log.setOutTime(new Date()); log.setUpdatedBy(workLast.getUserId()); log.setNumber(vo.getNumber()); count = deviceProductionLogDao.insertSelective(log); } return count; }