| | |
| | | //@RequiresPermissions("org.jeecg.modules.demo:mom_eam_inspection_project:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody InspectionProject inspectionProject) { |
| | | String analysisMethod = inspectionProject.getAnalysisMethod(); |
| | | if("1".equals(analysisMethod)){ |
| | | String testValueType = inspectionProject.getTestValueType(); |
| | | if("1".equals(testValueType)){ |
| | | BigDecimal surfaceValue = inspectionProject.getSurfaceValue(); |
| | | BigDecimal upValue = inspectionProject.getUpValue(); |
| | | BigDecimal downValue = inspectionProject.getDownValue(); |
| | |
| | | //@RequiresPermissions("org.jeecg.modules.demo:mom_eam_inspection_project:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody InspectionProject inspectionProject) { |
| | | String analysisMethod = inspectionProject.getAnalysisMethod(); |
| | | if("1".equals(analysisMethod)){ |
| | | String testValueType = inspectionProject.getTestValueType(); |
| | | if("1".equals(testValueType)){ |
| | | BigDecimal surfaceValue = inspectionProject.getSurfaceValue(); |
| | | BigDecimal upValue = inspectionProject.getUpValue(); |
| | | BigDecimal downValue = inspectionProject.getDownValue(); |
| | |
| | | if (processParameters != null) { |
| | | processParametersTemplateDetail.setProcessParametersNum(processParameters.getNum()); |
| | | processParametersTemplateDetail.setProcessParametersName(processParameters.getName()); |
| | | processParametersTemplateDetail.setProcessParametersCategory(processParametersCategoryService.getById(processParameters.getProcessParametersCategoryId()).getName()); |
| | | if(processParameters != null){ |
| | | processParametersTemplateDetail.setProcessParametersCategory(processParametersCategoryService.getById(processParameters.getProcessParametersCategoryId()).getName()); |
| | | }else{ |
| | | processParametersTemplateDetail.setProcessParametersCategory("/"); |
| | | } |
| | | // processParametersTemplateDetail.setUnit(unitService.getById(processParameters.getUnitId()).getName()); |
| | | String unitName = sysBaseApi.getUnitNameById(processParameters.getUnitId()); |
| | | processParametersTemplateDetail.setUnit(unitName); |
| | |
| | | String fileType = json.getString("fileType"); |
| | | String description = json.getString("description"); |
| | | String type = json.getString("type"); |
| | | // 文件变更 |
| | | // 文件变更 |
| | | if (isFileChange) { |
| | | if (StrUtils.isNotBlankOrNull(uploadId)) { |
| | | // 情形一、从文件管理中选择 |
| | |
| | | specialtyInspectionPlanDetailService.save(specialtyInspectionPlanDetail); |
| | | } |
| | | |
| | | boolean isFileChange = json.getBoolean("isFileChange"); |
| | | String uploadId = json.getString("uploadId"); |
| | | String fileType = json.getString("fileType"); |
| | | String description = json.getString("description"); |
| | | String type = json.getString("type"); |
| | | // 文件变更 |
| | | if (isFileChange) { |
| | | if (StrUtils.isNotBlankOrNull(uploadId)) { |
| | | // 情形一、从文件管理中选择 |
| | | // uploadRelaService.saveOrUpdateUploadRale(partRouteFile.getId(), partRouteFile.getType(), uploadId); |
| | | } else { |
| | | // 情形二、重新上传 |
| | | // 1、持久upload |
| | | MultipartFile multipartFile = request.getFile("file"); |
| | | List<MultipartFile> multipartFileList = new ArrayList<>(); |
| | | multipartFileList.add(multipartFile); |
| | | // List<SysUpload> sysUploads = uploadService.batchUploadFile(fileType, multipartFileList, description); |
| | | List<SysUpload> sysUploads = sysBaseApi.batchUploadFile(fileType, multipartFileList, description); |
| | | // 2、创建/修改 uploadRela |
| | | // 注:当前视为单文件上传控制,后续可能会有单个产品工艺文件对应多个上传文件的升级调整,修改后注意更细此段注释 |
| | | // uploadRelaService.saveOrUpdateUploadRale(specialtyInspectionPlan.getId(), type, sysUploads.get(0).getId()); |
| | | sysBaseApi.saveOrUpdateUploadRale(specialtyInspectionPlan.getId(), type, sysUploads.get(0).getId()); |
| | | } |
| | | } |
| | | // boolean isFileChange = json.getBoolean("isFileChange"); |
| | | // String uploadId = json.getString("uploadId"); |
| | | // String fileType = json.getString("fileType"); |
| | | // String description = json.getString("description"); |
| | | // String type = json.getString("type"); |
| | | // // 文件变更 |
| | | // if (isFileChange) { |
| | | // if (StrUtils.isNotBlankOrNull(uploadId)) { |
| | | // // 情形一、从文件管理中选择 |
| | | //// uploadRelaService.saveOrUpdateUploadRale(partRouteFile.getId(), partRouteFile.getType(), uploadId); |
| | | // } else { |
| | | // // 情形二、重新上传 |
| | | // // 1、持久upload |
| | | // MultipartFile multipartFile = request.getFile("file"); |
| | | // List<MultipartFile> multipartFileList = new ArrayList<>(); |
| | | // multipartFileList.add(multipartFile); |
| | | //// List<SysUpload> sysUploads = uploadService.batchUploadFile(fileType, multipartFileList, description); |
| | | // List<SysUpload> sysUploads = sysBaseApi.batchUploadFile(fileType, multipartFileList, description); |
| | | // // 2、创建/修改 uploadRela |
| | | // // 注:当前视为单文件上传控制,后续可能会有单个产品工艺文件对应多个上传文件的升级调整,修改后注意更细此段注释 |
| | | //// uploadRelaService.saveOrUpdateUploadRale(specialtyInspectionPlan.getId(), type, sysUploads.get(0).getId()); |
| | | // sysBaseApi.saveOrUpdateUploadRale(specialtyInspectionPlan.getId(), type, sysUploads.get(0).getId()); |
| | | // } |
| | | // } |
| | | |
| | | return Result.ok("上传成功!"); |
| | | } |
| | |
| | | LEFT JOIN mom_eam_maintenance_standard t2 ON t1.maintenance_standard_id = t2.id |
| | | LEFT JOIN mom_eam_maintenance_project t3 ON t1.maintenance_project_id = t3.id |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_project_method' ) t4 ON t4.item_value = t3.maintenance_method |
| | | where t1.del_flag = '0' and t2.del_flag = '0' and t3.del_flag = '0' and t2.type = "daily" |
| | | where t1.del_flag = '0' and t2.del_flag = '0' and t3.del_flag = '0' and t2.type = 'daily' |
| | | <if test="maintenanceStandardId != null and maintenanceStandardId != ''"> |
| | | and t2.id = #{maintenanceStandardId} |
| | | </if> |
| | |
| | | <select id="getDailyMaintenanceOrderList" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | | t1.id, |
| | | t1.`status`, |
| | | t1.status, |
| | | t5.item_text as statusName, |
| | | t1.num, |
| | | t4.id as maintenanceCycleId, |
| | |
| | | t3.name as equipmentName, |
| | | t3.model as equipmentModel, |
| | | t2.id as maintenanceStandardId, |
| | | t2.`num` as maintenanceStandardNum, |
| | | t2.num as maintenanceStandardNum, |
| | | t2.assign_mode assignMode, |
| | | t3.team_id teamId, |
| | | t3.use_id as useId, |
| | |
| | | LEFT JOIN mom_eam_maintenance_standard t2 ON t1.maintenance_standard_id = t2.id |
| | | left join mom_eam_equipment t3 on t1.equipment_id = t3.id |
| | | left join mom_eam_maintenance_cycle t4 on t1.maintenance_cycle_id = t4.id |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'daily_maintenance_order_status' ) t5 on t5.item_value = t1.`status` |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'daily_maintenance_order_status' ) t5 on t5.item_value = t1.status |
| | | left join sys_depart t6 on t3.use_id = t6.id |
| | | left join mom_base_team t7 on t7.id = t3.team_id |
| | | left join sys_user t8 on t1.maintenance_user_id = t8.id |
| | |
| | | LEFT JOIN mom_eam_maintenance_standard t2 ON tt.maintenance_standard_id = t2.id |
| | | LEFT JOIN mom_eam_maintenance_project t3 ON tt.maintenance_project_id = t3.id |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_project_method' ) t4 ON t4.item_value = t3.maintenance_method |
| | | WHERE t1.del_flag = '0' AND t2.del_flag = '0' AND t3.del_flag = '0' AND t2.type = "daily" |
| | | WHERE t1.del_flag = '0' AND t2.del_flag = '0' AND t3.del_flag = '0' AND t2.type = 'daily' |
| | | <if test="dailyMaintenanceOrderId != null and dailyMaintenanceOrderId != ''"> |
| | | and tt.daily_maintenance_order_id = #{dailyMaintenanceOrderId} |
| | | </if> |
| | |
| | | t1.arrange_way arrangeWay, |
| | | t1.audit_status auditStatus, |
| | | t1.first_inspection_time as firstInspectionTime, |
| | | DATE_FORMAT(t1.first_inspection_time, '%Y-%m-%d') firstInspectionTime1, |
| | | DATE_FORMAT(t1.first_inspection_time, '%h:%i:%s') firstInspectionTime2, |
| | | CONVERT( VARCHAR(100), t1.first_inspection_time, 23 ) firstInspectionTime1, |
| | | CONVERT( VARCHAR(100), t1.first_inspection_time, 8 ) firstInspectionTime2, |
| | | t1.lead_time leadTime, |
| | | t1.effective_time effectiveTime, |
| | | t2.item_text cycleUnitName, |
| | |
| | | t4.num as inspectionStandardNum, |
| | | t1.create_by as createBy, |
| | | t1.create_time as createTime, |
| | | t2.use_id as useId, |
| | | t6.depart_name as useDepartName, |
| | | t2.team_id as teamId, |
| | | t7.name as teamName, |
| | | t4.assign_mode as assignMode, |
| | | t8.item_text as assignModeName, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- <select id="findUserList" parameterType="Map" resultType="Map">--> |
| | | <!-- SELECT--> |
| | | <!-- t1.id,--> |
| | | <!-- t1.username,--> |
| | | <!-- t1.realname,--> |
| | | <!-- t3.name as teamName--> |
| | | <!-- FROM--> |
| | | <!-- sys_user t1--> |
| | | <!-- LEFT JOIN mom_base_team_class t2 ON t1.team_class_id = t2.id--> |
| | | <!-- left join mom_base_team t3 on t2.team_id = t3.id--> |
| | | <!-- where t1.del_flag = 0 and t2.del_flag = 0 and t3.id = #{params.teamId}--> |
| | | <!-- <if test="params.num!=null and params.num!= ''">--> |
| | | <!-- and t3.num like concat('%',#{params.num},'%')--> |
| | | <!-- </if>--> |
| | | <!-- <if test="params.username!=null and params.username!= ''">--> |
| | | <!-- and t1.username like concat('%',#{params.username},'%')--> |
| | | <!-- </if>--> |
| | | <!-- <if test="params.realname!=null and params.realname!= ''">--> |
| | | <!-- and t1.realname like concat('%',#{params.realname},'%')--> |
| | | <!-- </if>--> |
| | | <!-- ORDER BY t1.create_time desc--> |
| | | <!-- </select>--> |
| | | <select id="findUserList" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | | t1.id, |
| | | t1.username, |
| | | t1.realname, |
| | | t3.name as teamName |
| | | t1.id, |
| | | t1.username, |
| | | t1.realname |
| | | FROM |
| | | sys_user t1 |
| | | LEFT JOIN mom_base_team_class t2 ON t1.team_class_id = t2.id |
| | | left join mom_base_team t3 on t2.team_id = t3.id |
| | | where t1.del_flag = 0 and t2.del_flag = 0 and t3.id = #{params.teamId} |
| | | <if test="params.num!=null and params.num!= ''"> |
| | | and t3.num like concat('%',#{params.num},'%') |
| | | </if> |
| | | sys_user t1 |
| | | where t1.del_flag = 0 |
| | | <if test="params.username!=null and params.username!= ''"> |
| | | and t1.username like concat('%',#{params.username},'%') |
| | | </if> |
| | |
| | | t1.arrange_way arrangeWay, |
| | | t1.audit_status auditStatus, |
| | | t1.first_maintenance_time as firstMaintenanceTime, |
| | | DATE_FORMAT(t1.first_maintenance_time, '%Y-%m-%d') firstMaintenanceTime1, |
| | | DATE_FORMAT(t1.first_maintenance_time, '%h:%i:%s') firstMaintenanceTime2, |
| | | CONVERT( VARCHAR(100), t1.first_maintenance_time, 23 ) firstMaintenanceTime1, |
| | | CONVERT( VARCHAR(100), t1.first_maintenance_time, 8 ) firstMaintenanceTime2, |
| | | t1.lead_time leadTime, |
| | | t1.effective_time effectiveTime, |
| | | t2.item_text cycleUnitName, |
| | |
| | | t1.num, |
| | | t1.version, |
| | | t1.depart_id as departId, |
| | | t1.team_id as teamId, |
| | | t1.equipment_id AS equipmentId, |
| | | t2.num AS equipmentNum, |
| | | t2.NAME AS equipmentName, |
| | |
| | | t1.id, |
| | | t1.num, |
| | | t1.depart_id as departId, |
| | | t1.team_id as teamId, |
| | | t1.equipment_id AS equipmentId, |
| | | t2.num AS equipmentNum, |
| | | t2.NAME AS equipmentName, |
| | |
| | | t1.judgment_result as judgmentResult, |
| | | t1.abnormal_desc as abnormalDesc, |
| | | t1.abnormal_photo as abnormalPhoto, |
| | | t7.`status` |
| | | t7.status |
| | | FROM |
| | | mom_eam_specialty_inspection_order_detail t1 |
| | | LEFT JOIN mom_eam_inspection_project t2 on t1.inspection_project_id = t2.id |
| | |
| | | t2.id AS equipmentId, |
| | | t2.num AS equipmentNum, |
| | | t2.NAME AS equipmentName, |
| | | t2.model AS equipmentModel |
| | | t2.model AS equipmentModel, |
| | | t1.create_time |
| | | FROM |
| | | mom_eam_specialty_inspection_standard t1 |
| | | left join mom_eam_specialty_inspection_standard_detail t5 on t1.id = t5.specialty_inspection_standard_id |
| | |
| | | SELECT |
| | | t1.id, |
| | | t1.num, |
| | | t1.`status`, |
| | | t1.status, |
| | | t1.maintenance_user_id maintenanceUserId, |
| | | t12.realname maintenanceUserName, |
| | | t2.id as specialtyMaintenancePlanId, |
| | |
| | | t1.actual_end_time as actualEndTime, |
| | | t10.realname, |
| | | t1.create_time as createTime, |
| | | t1.create_by as createBy, |
| | | ifnull(sum(t14.working_hour_quota),0) sumOfWorkingHourQuota |
| | | t1.create_by as createBy |
| | | FROM |
| | | mom_eam_specialty_maintenance_order t1 |
| | | LEFT JOIN mom_eam_specialty_maintenance_plan t2 ON t1.specialty_maintenance_plan_id = t2.id |
| | |
| | | <if test="params.num != null and params.num != ''"> |
| | | and t1.num like concat('%',#{params.num},'%') |
| | | </if> |
| | | group by t1.id |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | |