| | |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.util.TranslateDictTextUtils; |
| | | import org.jeecg.modules.eam.constant.OrderCreationMethodEnum; |
| | | import org.jeecg.modules.eam.constant.TechnicalStatusEvaluationCheckCategoryEnum; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderQuery; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderRequest; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderResult; |
| | | import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationOrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: 技术状态鉴定工单 |
| | |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("检查项不能为空!"); |
| | | } |
| | | request.setCreationMethod(OrderCreationMethodEnum.MANUAL.name()); |
| | | boolean b = eamTechnicalStatusEvaluationOrderService.addTechnicalStatusEvaluationOrder(request); |
| | | if (!b) { |
| | | return Result.error("添加失败!"); |
| | |
| | | if (request == null) { |
| | | return Result.error("审批的对象不能为空!"); |
| | | } |
| | | if(CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("检查明细信息为空!"); |
| | | } |
| | | // 检查请求参数 |
| | | if (StrUtil.isBlank(request.getTaskId()) || StrUtil.isBlank(request.getDataId()) || StrUtil.isBlank(request.getInstanceId())) { |
| | | return Result.error("审批任务错误或不存在!"); |
| | |
| | | return Result.error("数据转译失败!"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 设备精度检查技术鉴定表批量打印接口 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "技术鉴定表设备精度检查批量打印接口", notes = "技术鉴定表设备精度检查批量打印接口") |
| | | @GetMapping(value = "/accuracyPrint") |
| | | public Result<?> batchPrint(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<EamTechnicalStatusEvaluationOrderResult> list = eamTechnicalStatusEvaluationOrderService.batchPrint(ids, TechnicalStatusEvaluationCheckCategoryEnum.PRECISION_CHECK.name()); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | /** |
| | | * 安全装置技术鉴定表批量打印接口 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "技术鉴定表安全装置批量打印接口", notes = "技术鉴定表安全装置批量打印接口") |
| | | @GetMapping(value = "/safePrint") |
| | | public Result<?> safePrint(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<EamTechnicalStatusEvaluationOrderResult> list = eamTechnicalStatusEvaluationOrderService.batchPrint(ids, TechnicalStatusEvaluationCheckCategoryEnum.SAFETY_EQUIPMENT_CHECK.name()); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | /** |
| | | * 其他检查技术鉴定表批量打印接口 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "技术鉴定表其他检查批量打印接口", notes = "技术鉴定表其他检查批量打印接口") |
| | | @GetMapping(value = "/otherPrint") |
| | | public Result<?> otherPrint(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<EamTechnicalStatusEvaluationOrderResult> list = eamTechnicalStatusEvaluationOrderService.batchPrint(ids, TechnicalStatusEvaluationCheckCategoryEnum.OTHER_CHECK.name()); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | } |