| | |
| | | --技术状态鉴定工单状态 |
| | | delete from [dbo].[sys_dict] where dict_code='technical_status_evaluation_order_status'; |
| | | delete from [dbo].[sys_dict_item] where dict_id in (select id from [dbo].[sys_dict] where dict_code='technical_status_evaluation_order_status'); |
| | | delete from [dbo].[sys_dict] where dict_code='technical_status_evaluation_order_status'; |
| | | |
| | | INSERT INTO [dbo].[sys_dict] ([id], [dict_name], [dict_code], [description], [del_flag], [create_by], [create_time], [update_by], [update_time], [type]) VALUES (N'1943282255763828737', N'技术状态鉴定工单状态', N'technical_status_evaluation_order_status', N'设备管理使用', 0, N'admin', '2025-07-10 20:12:48.8660000', NULL, NULL, NULL); |
| | | |
| | |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1943283135447789569', N'1943282255763828737', N'EXPIRED', N'已过期', '', 11, 1, N'admin', '2025-07-10 20:16:18.6020000', NULL, NULL); |
| | | |
| | | --技术状态检查项分类 |
| | | delete from [dbo].[sys_dict] where dict_code='technical_status_evaluation_check_category'; |
| | | delete from [dbo].[sys_dict_item] where dict_id in (select id from [dbo].[sys_dict] where dict_code='technical_status_evaluation_check_category'); |
| | | delete from [dbo].[sys_dict] where dict_code='technical_status_evaluation_check_category'; |
| | | |
| | | INSERT INTO [dbo].[sys_dict] ([id], [dict_name], [dict_code], [description], [del_flag], [create_by], [create_time], [update_by], [update_time], [type]) VALUES (N'1942406054790733826', N'技术状态检查项分类', N'technical_status_evaluation_check_category', N'设备管理使用', 0, N'admin', '2025-07-08 10:11:06.2770000', NULL, NULL, NULL); |
| | | |
| | |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1942406681549774850', N'1942406054790733826', N'其他检查', N'OTHER_CHECK', '', 3, 1, N'admin', '2025-07-08 10:13:35.7220000', NULL, NULL); |
| | | |
| | | --技术状态鉴定规范状态 |
| | | delete from [dbo].[sys_dict] where dict_code='technical_status_evaluation_standard_status'; |
| | | delete from [dbo].[sys_dict_item] where dict_id in (select id from [dbo].[sys_dict] where dict_code='technical_status_evaluation_standard_status'); |
| | | delete from [dbo].[sys_dict] where dict_code='technical_status_evaluation_standard_status'; |
| | | |
| | | INSERT INTO [dbo].[sys_dict] ([id], [dict_name], [dict_code], [description], [del_flag], [create_by], [create_time], [update_by], [update_time], [type]) VALUES (N'1942405419550810113', N'技术状态鉴定规范状态', N'technical_status_evaluation_standard_status', N'设备管理使用', 0, N'admin', '2025-07-08 10:08:34.8250000', NULL, NULL, NULL); |
| | | |
| | |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1942405710740365313', N'1942405419550810113', N'禁用', N'DISABLE', '', 3, 1, N'admin', '2025-07-08 10:09:44.2500000', NULL, NULL); |
| | | |
| | | --HF模板分类 |
| | | delete from [dbo].[sys_dict] where dict_code='hf_template_category'; |
| | | delete from [dbo].[sys_dict_item] where dict_id in (select id from [dbo].[sys_dict] where dict_code='hf_template_category'); |
| | | delete from [dbo].[sys_dict] where dict_code='hf_template_category'; |
| | | |
| | | INSERT INTO [dbo].[sys_dict] ([id], [dict_name], [dict_code], [description], [del_flag], [create_by], [create_time], [update_by], [update_time], [type]) VALUES (N'1941372067586695170', N'HF模板分类', N'hf_template_category', N'设备管理使用', 0, N'admin', '2025-07-05 13:42:24.5310000', NULL, NULL, NULL); |
| | | |
| | |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1943211241587568641', N'1941372067586695170', N'设备精度检查表', N'TECHNICAL_STATUS_EVALUATION_PRECISION_CHECK', '', 8, 1, N'admin', '2025-07-10 15:30:37.0000000', N'admin', '2025-07-10 15:31:29.2060000'); |
| | | |
| | | --启用禁用 |
| | | delete from [dbo].[sys_dict] where dict_code='enable_disable'; |
| | | delete from [dbo].[sys_dict_item] where dict_id in (select id from [dbo].[sys_dict] where dict_code='enable_disable'); |
| | | delete from [dbo].[sys_dict] where dict_code='enable_disable'; |
| | | |
| | | INSERT INTO [dbo].[sys_dict] ([id], [dict_name], [dict_code], [description], [del_flag], [create_by], [create_time], [update_by], [update_time], [type]) VALUES (N'1941370835371483137', N'启用禁用', N'enable_disable', N'通用数据字典', 0, N'admin', '2025-07-05 13:37:30.7420000', NULL, NULL, NULL); |
| | | |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1941370959137005570', N'1941370835371483137', N'启用', N'ENABLE', '', 1, 1, N'admin', '2025-07-05 13:38:00.2500000', NULL, NULL); |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1941371030628917250', N'1941370835371483137', N'禁用', N'DISABLE', '', 2, 1, N'admin', '2025-07-05 13:38:17.2920000', NULL, NULL); |
| | | |
| | | --技术状态 |
| | | delete from [dbo].[sys_dict_item] where dict_id in (select id from [dbo].[sys_dict] where dict_code='equipment_technology_status'); |
| | | delete from [dbo].[sys_dict] where dict_code='equipment_technology_status'; |
| | | |
| | | INSERT INTO [dbo].[sys_dict] ([id], [dict_name], [dict_code], [description], [del_flag], [create_by], [create_time], [update_by], [update_time], [type]) VALUES (N'1940319386308980737', N'技术状态', N'equipment_technology_status', N'设备管理使用', 0, N'admin', '2025-07-02 15:59:25.0000000', N'admin', '2025-07-03 10:27:26.5370000', NULL); |
| | | |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1940319446841176066', N'1940319386308980737', N'合格', N'QUALIFIED', '', 1, 1, N'admin', '2025-07-02 15:59:40.0000000', N'admin', '2025-07-11 11:23:11.9870000'); |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1940319476352299010', N'1940319386308980737', N'限用', N'RESTRICTED', '', 2, 1, N'admin', '2025-07-02 15:59:47.0000000', N'admin', '2025-07-11 11:23:52.7830000'); |
| | | INSERT INTO [dbo].[sys_dict_item] ([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1943511780124659714', N'1940319386308980737', N'禁用', N'PROHIBITED', '', 3, 1, N'admin', '2025-07-11 11:24:51.7410000', NULL, NULL); |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | @ApiModelProperty(value = "规范ID") |
| | | private String standardId; |
| | | /**计划鉴定日期;提前70天生成工单*/ |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "计划鉴定日期;提前70天生成工单") |
| | | private Date evaluationDate; |
| | | /**锁定工单日期;提前55天锁定工单*/ |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "锁定工单日期;提前55天锁定工单") |
| | | private Date freezeOrderDate; |
| | | /**工单过期日期;到期未做直接过期,并修改设备技术状态为禁用*/ |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "工单过期日期;到期未做直接过期,并修改设备技术状态为禁用") |
| | | private Date orderExpirationDate; |
| | | /**实际开始时间*/ |
| | | @ApiModelProperty(value = "实际开始时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date actualStartTime; |
| | | /**实际结束时间*/ |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "实际结束时间") |
| | | private Date actualEndTime; |
| | | /**鉴定人*/ |
| | |
| | | private String evaluator; |
| | | /**鉴定状态;待鉴定、鉴定中、维修室主任签字、工艺人员签字、使用单位技术主管签字、设备检验员签字、已完成、已锁定、变更中、已过期*/ |
| | | @ApiModelProperty(value = "鉴定状态;待鉴定、鉴定中、维修室主任签字、工艺人员签字、使用单位技术主管签字、设备检验员签字、已完成、已锁定、变更中、已过期") |
| | | @Dict(dicCode = "technical_status_evaluation_order_status") |
| | | private String evaluationStatus; |
| | | /**创建方式*/ |
| | | @ApiModelProperty(value = "创建方式") |
| | | @Dict(dicCode = "order_creation_method") |
| | | private String creationMethod; |
| | | /**安全装置检查是否完成*/ |
| | | @ApiModelProperty(value = "安全装置检查是否完成") |
| | |
| | | private String otherCheckCompleted; |
| | | /**安全装置检查确认人*/ |
| | | @ApiModelProperty(value = "安全装置检查确认人") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String safetyCheckConfirm; |
| | | /**安全装置检查确认时间*/ |
| | | @ApiModelProperty(value = "安全装置检查确认时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date safetyCheckConfirmTime; |
| | | /**安全装置检查确认结果*/ |
| | | @ApiModelProperty(value = "安全装置检查确认结果") |
| | | @Dict(dicCode = "approved_rejected") |
| | | private String safetyCheckResult; |
| | | /**安全装置检查确认意见*/ |
| | | @ApiModelProperty(value = "安全装置检查确认意见") |
| | | private String safetyCheckComment; |
| | | /**设备精度检查确认人*/ |
| | | @ApiModelProperty(value = "设备精度检查确认人") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String precisionCheckConfirm; |
| | | /**设备精度检查确认时间*/ |
| | | @ApiModelProperty(value = "设备精度检查确认时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date precisionCheckConfirmTime; |
| | | /**设备精度检查确认结果*/ |
| | | @ApiModelProperty(value = "设备精度检查确认结果") |
| | | @Dict(dicCode = "approved_rejected") |
| | | private String precisionCheckConfirmResult; |
| | | /**设备精度检查确认意见*/ |
| | | @ApiModelProperty(value = "设备精度检查确认意见") |
| | | private String precisionCheckConfirmComment; |
| | | /**其他检查确认人*/ |
| | | @ApiModelProperty(value = "其他检查确认人") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String otherCheckConfirm; |
| | | /**其他检查确认时间*/ |
| | | @ApiModelProperty(value = "其他检查确认时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date otherCheckConfirmTime; |
| | | /**其他检查确认结果*/ |
| | | @ApiModelProperty(value = "其他检查确认结果") |
| | | @Dict(dicCode = "approved_rejected") |
| | | private String otherCheckConfirmResult; |
| | | /**其他检查确认意见*/ |
| | | @ApiModelProperty(value = "其他检查确认意见") |
| | | private String otherCheckConfirmComment; |
| | | /**安全装置检查结果;是、否*/ |
| | | @ApiModelProperty(value = "安全装置检查结果;是、否") |
| | | @Dict(dicCode = "yn") |
| | | private String safetyEquipmentCheckResult; |
| | | /**精度参数检查结果;是、否、无*/ |
| | | @ApiModelProperty(value = "精度参数检查结果;是、否、无") |
| | | @Dict(dicCode = "ye_no_none") |
| | | private String precisionCheckResult; |
| | | /**功能状态检查结果;是、否*/ |
| | | @ApiModelProperty(value = "功能状态检查结果;是、否") |
| | | @Dict(dicCode = "yn") |
| | | private String functionalCheckResult; |
| | | /**其他检查结果;是、否、无*/ |
| | | @ApiModelProperty(value = "其他检查结果;是、否、无") |
| | | @Dict(dicCode = "ye_no_none") |
| | | private String otherCheckResult; |
| | | /**维修人签字*/ |
| | | @ApiModelProperty(value = "维修人签字") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String repairerSignature; |
| | | /**维修人签字时间*/ |
| | | @ApiModelProperty(value = "维修人签字时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date repairerSignatureTime; |
| | | /**维修室主任签字*/ |
| | | @ApiModelProperty(value = "维修室主任签字") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String repairManagerSignature; |
| | | /**维修室主任签字时间*/ |
| | | @ApiModelProperty(value = "维修室主任签字时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date repairManagerSignatureTime; |
| | | /**维修室主任签字结果*/ |
| | | @ApiModelProperty(value = "维修室主任签字结果") |
| | | @Dict(dicCode = "approved_rejected") |
| | | private String repairManagerSignatureResult; |
| | | /**维修室主任意见*/ |
| | | @ApiModelProperty(value = "维修室主任意见") |
| | |
| | | private String sampleCheckResult; |
| | | /**工艺员签字*/ |
| | | @ApiModelProperty(value = "工艺员签字") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String processTechnicianSignature; |
| | | /**工艺员签字时间*/ |
| | | @ApiModelProperty(value = "工艺员签字时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date processTechnicianSignatureTime; |
| | | /**工艺员意见*/ |
| | | @ApiModelProperty(value = "工艺员意见") |
| | | private String processTechnicianComment; |
| | | /**使用单位技术主管签字*/ |
| | | @ApiModelProperty(value = "使用单位技术主管签字") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String departTechnicalLeaderSignature; |
| | | /**使用单位技术主管签字时间*/ |
| | | @ApiModelProperty(value = "使用单位技术主管签字时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private String departTechnicalLeaderSignatureTime; |
| | | /**使用单位技术主管签字结果*/ |
| | | @ApiModelProperty(value = "使用单位技术主管签字结果") |
| | | @Dict(dicCode = "approved_rejected") |
| | | private String departTechnicalLeaderSignatureResult; |
| | | /**使用单位技术主管意见*/ |
| | | @ApiModelProperty(value = "使用单位技术主管意见") |
| | | private String departTechnicalLeaderComment; |
| | | /**鉴定结果;合格、限用、禁用*/ |
| | | @ApiModelProperty(value = "鉴定结果;合格、限用、禁用") |
| | | @Dict(dicCode = "equipment_technology_status") |
| | | private String evaluationResult; |
| | | /**限/禁用原因(多选);安全装置、设备功能、精度、试件、其他*/ |
| | | @ApiModelProperty(value = "限/禁用原因(多选);安全装置、设备功能、精度、试件、其他") |
| | | @Dict(dicCode = "technical_status_evaluation_result_reason") |
| | | private String evaluationReason; |
| | | /**设备检查人签字*/ |
| | | @ApiModelProperty(value = "设备检查人签字") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String inspectorSignature; |
| | | /**设备检查人签字时间*/ |
| | | @ApiModelProperty(value = "设备检查人签字时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date inspectorSignatureTime; |
| | | /**设备检查人意见*/ |
| | | @ApiModelProperty(value = "设备检查人意见") |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.flowable.engine.TaskService; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.constant.DataBaseConstant; |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | |
| | | if (!TechnicalStatusEvaluationOrderStatusEnum.WAIT_EVALUATION.name().equals(entity.getEvaluationStatus())) { |
| | | throw new JeecgBootException("该工单已进行过领取!"); |
| | | } |
| | | EamTechnicalStatusEvaluationStandard standard = standardService.getById(entity.getStandardId()); |
| | | if(standard == null) { |
| | | throw new JeecgBootException("设备保养标准不存在,请检查!"); |
| | | } |
| | | EamEquipment equipment = equipmentService.getById(entity.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设备不存在,添加失败!"); |
| | |
| | | } |
| | | List<UserSelector> userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0002); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给车间班组长,无法进入下级审批!"); |
| | | throw new JeecgBootException("设备未分配给维修工,无法领取!"); |
| | | } |
| | | |
| | | List<String> userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | entity.setEvaluator(sysUser.getUsername()); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.UNDER_EVALUATION.name()); |
| | | entity.setActualStartTime(new Date()); |
| | |
| | | variables.put("comment", entity.getRemark()); |
| | | } |
| | | variables.put("proofreading", true); |
| | | List<String> usernames = new ArrayList<>(); |
| | | usernames.add(entity.getEquipmentCode()); |
| | | variables.put("NextAssignee", usernames); |
| | | // Result result = flowDefinitionService.startProcessInstanceByKey("second_maintenance_process", variables); |
| | | // if (result != null) { |
| | | // //更新设备保养状态 |
| | | // eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_SECOND_MAINTENANCE.name()); |
| | | // return result.isSuccess(); |
| | | // } |
| | | if(CommonConstant.STATUS_1.equals(standard.getHasSafetyEquipmentCheck())) { |
| | | variables.put("hasSafetyEquipmentCheck", CommonConstant.STATUS_1); |
| | | variables.put("safety_equipment_check", userApprovalList); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_0); |
| | | } else { |
| | | variables.put("hasSafetyEquipmentCheck", CommonConstant.STATUS_0); |
| | | variables.put("safety_equipment_check", userApprovalList); |
| | | } |
| | | if(CommonConstant.STATUS_1.equals(standard.getHasPrecisionCheck())) { |
| | | variables.put("hasPrecisionCheck", CommonConstant.STATUS_1); |
| | | variables.put("equipment_precision_check", userApprovalList); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_0); |
| | | } else { |
| | | variables.put("hasPrecisionCheck", CommonConstant.STATUS_0); |
| | | variables.put("equipment_precision_check", userApprovalList); |
| | | } |
| | | if(CommonConstant.STATUS_1.equals(standard.getHasOtherCheck())) { |
| | | variables.put("hasOtherCheck", CommonConstant.STATUS_1); |
| | | variables.put("other_check", userApprovalList); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_0); |
| | | } else { |
| | | variables.put("hasOtherCheck ", CommonConstant.STATUS_0); |
| | | variables.put("other_check", userApprovalList); |
| | | } |
| | | Result<?> result = flowDefinitionService.startProcessInstanceByKey("technical_status_evaluation_process", variables); |
| | | if(result == null || !result.isSuccess()) { |
| | | throw new JeecgBootException("启动流程失败,领取失败"); |
| | | } |
| | | return true; |
| | | } |
| | | |