art: 技术状态鉴定工单-领取接口问题修改,新增接口修改
| | |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1909079838201671681', N'PCR0001', N'操作工', NULL, NULL, N'admin', '2025-04-07 11:04:37.0720000', NULL, NULL, N'A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1909079910381449218', N'PCR0002', N'维修工', NULL, NULL, N'admin', '2025-04-07 11:04:54.2810000', NULL, NULL, N'A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1909079910381449219', N'PCR0005', N'设备能源部', NULL, NULL, N'admin', '2025-04-07 12:04:55.0000000', NULL, NULL, N'A01A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1909079939120820226', N'PCR0003', N'设备检验员', NULL, NULL, N'admin', '2025-04-07 11:05:01.0000000', N'admin', '2025-05-19 15:42:08.0230000', N'A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1909079969235922946', N'PCR0004', N'车间设备管理员', NULL, NULL, N'admin', '2025-04-07 11:05:08.0000000', N'admin', '2025-05-19 15:41:14.8330000', N'A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1922222199530192898', N'PCR0006', N'生产保障部', NULL, NULL, N'admin', '2025-05-13 17:27:40.0000000', N'admin', '2025-05-19 15:41:34.2050000', N'A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1927291533460058114', N'PCR0007', N'工艺员', NULL, NULL, N'admin', '2025-05-27 17:11:23.5840000', NULL, NULL, N'A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1942474796260507650', N'PCR0008', N'维修室主任', NULL, NULL, N'admin', '2025-07-08 14:44:15.0000000', N'admin', '2025-07-08 14:47:27.8780000', N'A01A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1942475634831900673', N'PCR0009', N'生产设备技术主管', NULL, NULL, N'admin', '2025-07-08 14:47:35.4530000', NULL, NULL, N'A01A01'); |
| | | INSERT INTO [dbo].[sys_position] ([id], [code], [name], [post_rank], [company_id], [create_by], [create_time], [update_by], [update_time], [sys_org_code]) VALUES (N'1943644324128256002', N'PCR0010', N'使用单位技术主管', NULL, NULL, N'admin', '2025-07-11 20:11:32.6910000', NULL, NULL, N'A01A01'); |
| | |
| | | @ApiModelProperty(value = "使用单位技术主管签字时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private String departTechnicalLeaderSignatureTime; |
| | | private Date departTechnicalLeaderSignatureTime; |
| | | /**使用单位技术主管签字结果*/ |
| | | @ApiModelProperty(value = "使用单位技术主管签字结果") |
| | | @Dict(dicCode = "approved_rejected") |
| | |
| | | /**维修人/精度检查者签字时间*/ |
| | | @ApiModelProperty(value = "维修人/精度检查者签字时间") |
| | | private Date repairmanSignatureTime; |
| | | |
| | | public EamTechnicalStatusEvaluationOrderDetail() { |
| | | } |
| | | |
| | | public EamTechnicalStatusEvaluationOrderDetail(EamTechnicalStatusEvaluationStandardDetail standardDetail, String orderId) { |
| | | this.orderId = orderId; |
| | | this.itemCode = standardDetail.getItemCode(); |
| | | this.checkCategory = standardDetail.getCheckCategory(); |
| | | this.itemName = standardDetail.getItemName(); |
| | | this.subItemName = standardDetail.getSubItemName(); |
| | | this.toleranceValue = standardDetail.getToleranceValue(); |
| | | } |
| | | } |
| | |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandardDetail; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: 技术状态鉴定规范明细 |
| | | * @Author: jeecg-boot |
| | |
| | | * @param category 分类 |
| | | */ |
| | | void removeByStandardIdAndCategory(String standardId, String category); |
| | | |
| | | /** |
| | | * 获取规范明细数据 |
| | | * @param id |
| | | */ |
| | | List<EamTechnicalStatusEvaluationStandardDetail> queryList(String id); |
| | | } |
| | |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.HfTemplateCategoryEnum; |
| | | import org.jeecg.modules.eam.constant.OrderCreationMethodEnum; |
| | | import org.jeecg.modules.eam.constant.TechnicalStatusEvaluationOrderStatusEnum; |
| | | import org.jeecg.modules.eam.constant.*; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationOrderMapper; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderQuery; |
| | |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationStandardService standardService; |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationStandardDetailService standardDetailService; |
| | | @Autowired |
| | | private IEamBaseHFCodeService hfCodeService; |
| | | @Autowired |
| | |
| | | if (standard == null) { |
| | | throw new JeecgBootException("技术状态鉴定规范不存在,添加失败!"); |
| | | } |
| | | if (!TechnicalStatusEvaluationStandardEnum.ENABLE.name().equals(standard.getStandardStatus())) { |
| | | throw new JeecgBootException("技术状态鉴定规范未启用,添加失败!"); |
| | | } |
| | | List<EamTechnicalStatusEvaluationStandardDetail> standardDetailList = standardDetailService.queryList(standard.getId()); |
| | | if (CollectionUtil.isEmpty(standardDetailList)) { |
| | | throw new JeecgBootException("技术状态鉴定规范检查项为空,添加失败!"); |
| | | } |
| | | EamTechnicalStatusEvaluationOrder order = new EamTechnicalStatusEvaluationOrder(); |
| | | order.setOrderNum(request.getOrderNum()); |
| | | order.setEquipmentId(request.getEquipmentId()); |
| | |
| | | order.setHfCodeC(eamBaseHFCode.getHfCode()); |
| | | this.getBaseMapper().insert(order); |
| | | //处理明细数据 |
| | | if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { |
| | | request.getTableDetailList().forEach(tableDetail -> { |
| | | tableDetail.setId(null); |
| | | tableDetail.setCreateBy(null); |
| | | tableDetail.setCreateTime(null); |
| | | tableDetail.setUpdateBy(null); |
| | | tableDetail.setUpdateTime(null); |
| | | tableDetail.setOrderId(order.getId()); |
| | | }); |
| | | orderDetailService.saveBatch(request.getTableDetailList()); |
| | | } |
| | | List<EamTechnicalStatusEvaluationOrderDetail> orderDetailList = standardDetailList.stream().map(item -> new EamTechnicalStatusEvaluationOrderDetail(item, order.getId())).collect(Collectors.toList()); |
| | | orderDetailService.saveBatch(orderDetailList); |
| | | return true; |
| | | } |
| | | |
| | |
| | | } |
| | | break; |
| | | case REPAIRER_SIGNING: |
| | | //维修工签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(),equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给维修室主任,无法进入下级审批!"); |
| | | } |
| | | //维修工签字 |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", "维修工签字完成"); |
| | |
| | | entity.setOtherCheckResult(request.getOtherCheckResult()); |
| | | break; |
| | | case REPAIR_MANAGER_SIGNING: |
| | | // values.put("dataId", entity.getId()); |
| | | // values.put("organization", request.getLeaderConfirmComment()); |
| | | // values.put("comment", request.getLeaderConfirmComment()); |
| | | // request.setComment(request.getLeaderConfirmComment()); |
| | | // //设置entity |
| | | // entity.setMaintenanceStatus(ThirdMaintenanceStatusEnum.COMPLETE.name()); |
| | | // entity.setConfirmLeader(user.getUsername()); |
| | | // entity.setLeaderConfirmComment(request.getLeaderConfirmComment()); |
| | | // entity.setLeaderConfirmTime(new Date()); |
| | | //维修室主任签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0007); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给工艺员,无法进入下级审批!"); |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getRepairManagerComment()); |
| | | values.put("comment", request.getRepairManagerComment()); |
| | | request.setComment(request.getRepairManagerComment()); |
| | | values.put("repairManagerApprovalFlag", request.getRepairManagerSignatureResult()); |
| | | entity.setRepairManagerSignature(user.getUsername()); |
| | | entity.setRepairManagerSignatureTime(new Date()); |
| | | entity.setRepairManagerComment(request.getRepairManagerComment()); |
| | | //设置entity |
| | | if (BusinessCodeConst.APPROVED.equals(request.getRepairManagerSignatureResult())) { |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.PROCESS_TECHNICIAN_SIGNING.name()); |
| | | } else { |
| | | userApprovalList = Collections.singletonList(entity.getRepairerSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.REPAIRER_SIGNING.name()); |
| | | } |
| | | // //更新设备保养状态 |
| | | // eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.NORMAL.name()); |
| | | break; |
| | | case PROCESS_TECHNICIAN_SIGNING: |
| | | //工艺员签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0010); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给使用单位技术主管,无法进入下级审批!"); |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getProcessTechnicianComment()); |
| | | values.put("comment", request.getProcessTechnicianComment()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | request.setComment(request.getProcessTechnicianComment()); |
| | | //设置entity |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.DEPART_TECHNICAL_LEADER_SIGNING.name()); |
| | | entity.setProcessTechnicianSignature(user.getUsername()); |
| | | entity.setProcessTechnicianSignatureTime(new Date()); |
| | | entity.setSampleCheckResult(request.getSampleCheckResult()); |
| | | entity.setProcessTechnicianComment(request.getProcessTechnicianComment()); |
| | | break; |
| | | case DEPART_TECHNICAL_LEADER_SIGNING: |
| | | //使用单位技术主管签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0003); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给设备检验员,无法进入下级审批!"); |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getDepartTechnicalLeaderComment()); |
| | | values.put("comment", request.getDepartTechnicalLeaderComment()); |
| | | request.setComment(request.getDepartTechnicalLeaderComment()); |
| | | values.put("technicalLeaderApprovalFlag", request.getDepartTechnicalLeaderSignatureResult()); |
| | | entity.setDepartTechnicalLeaderSignature(user.getUsername()); |
| | | entity.setDepartTechnicalLeaderSignatureTime(new Date()); |
| | | entity.setDepartTechnicalLeaderComment(request.getDepartTechnicalLeaderComment()); |
| | | //设置entity |
| | | if (BusinessCodeConst.APPROVED.equals(request.getDepartTechnicalLeaderSignatureResult())) { |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.PROCESS_TECHNICIAN_SIGNING.name()); |
| | | } else { |
| | | userApprovalList = Collections.singletonList(entity.getProcessTechnicianSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.INSPECTOR_SIGNING.name()); |
| | | } |
| | | break; |
| | | case INSPECTOR_SIGNING: |
| | | //设备检察员签字 |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getInspectorComment()); |
| | | values.put("comment", request.getInspectorComment()); |
| | | request.setComment(request.getInspectorComment()); |
| | | //设置entity |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.COMPLETED.name()); |
| | | entity.setInspectorSignature(user.getUsername()); |
| | | entity.setInspectorSignatureTime(new Date()); |
| | | entity.setInspectorComment(request.getInspectorComment()); |
| | | entity.setEvaluationResult(request.getEvaluationResult()); |
| | | entity.setEvaluationReason(request.getEvaluationReason()); |
| | | break; |
| | | } |
| | | request.setValues(values); |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: 技术状态鉴定规范明细 |
| | | * @Author: jeecg-boot |
| | |
| | | wrapper.eq(EamTechnicalStatusEvaluationStandardDetail::getCheckCategory, category); |
| | | this.getBaseMapper().delete(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<EamTechnicalStatusEvaluationStandardDetail> queryList(String standardId) { |
| | | LambdaQueryWrapper<EamTechnicalStatusEvaluationStandardDetail> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EamTechnicalStatusEvaluationStandardDetail::getStandardId, standardId); |
| | | queryWrapper.orderByAsc(EamTechnicalStatusEvaluationStandardDetail::getCheckCategory); |
| | | queryWrapper.orderByAsc(EamTechnicalStatusEvaluationStandardDetail::getItemCode); |
| | | return this.getBaseMapper().selectList(queryWrapper); |
| | | } |
| | | } |
| | |
| | | else if (nextFlowElement instanceof EndEvent) { |
| | | next(flowElements, nextFlowElement, map, nextUser); |
| | | } |
| | | // 相容网关 |
| | | else if (nextFlowElement instanceof InclusiveGateway) { |
| | | next(flowElements, nextFlowElement, map, nextUser); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | package org.jeecg.codegenerate; |
| | | |
| | | import org.jeecg.common.util.PasswordUtil; |
| | | import org.jeecgframework.codegenerate.generate.impl.CodeGenerateOne; |
| | | import org.jeecgframework.codegenerate.generate.pojo.TableVo; |
| | | |