| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.parser.Feature; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.TranslateDictTextUtils; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.InspectionStatus; |
| | | import org.jeecg.modules.eam.constant.OrderCreationMethodEnum; |
| | | import org.jeecg.modules.eam.entity.EamInspectionOrder; |
| | | import org.jeecg.modules.eam.entity.EamInspectionOrderDetail; |
| | | import org.jeecg.modules.eam.request.EamInspectionBatchApprovalRequest; |
| | | import org.jeecg.modules.eam.request.EamInspectionOrderQuery; |
| | | import org.jeecg.modules.eam.request.EamInspectionOrderRequest; |
| | | import org.jeecg.modules.eam.service.IEamInspectionOrderDetailService; |
| | | import org.jeecg.modules.eam.service.IEamInspectionOrderService; |
| | | import org.jeecg.modules.eam.vo.InspectionVo; |
| | | import org.jeecg.modules.flowable.domain.vo.WorkTaskDataVo; |
| | | import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | /** |
| | | * @Description: 点检工单 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-04-02 |
| | | * @Date: 2025-04-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="点检工单") |
| | | @Api(tags = "点检工单") |
| | | @RestController |
| | | @RequestMapping("/eam/eamInspectionOrder") |
| | | @Slf4j |
| | | public class EamInspectionOrderController extends JeecgController<EamInspectionOrder, IEamInspectionOrderService> { |
| | | @Autowired |
| | | private IEamInspectionOrderService eamInspectionOrderService; |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | | * |
| | | * @param eamInspectionOrder |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "点检工单-分页列表查询") |
| | | @ApiOperation(value="点检工单-分页列表查询", notes="点检工单-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<EamInspectionOrder>> queryPageList(EamInspectionOrder eamInspectionOrder, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamInspectionOrder> queryWrapper = QueryGenerator.initQueryWrapper(eamInspectionOrder, req.getParameterMap()); |
| | | Page<EamInspectionOrder> page = new Page<EamInspectionOrder>(pageNo, pageSize); |
| | | IPage<EamInspectionOrder> pageList = eamInspectionOrderService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * 添加 |
| | | * |
| | | * @param eamInspectionOrder |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-添加") |
| | | @ApiOperation(value="点检工单-添加", notes="点检工单-添加") |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody EamInspectionOrder eamInspectionOrder) { |
| | | eamInspectionOrderService.save(eamInspectionOrder); |
| | | return Result.OK("添加成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param eamInspectionOrder |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-编辑") |
| | | @ApiOperation(value="点检工单-编辑", notes="点检工单-编辑") |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody EamInspectionOrder eamInspectionOrder) { |
| | | eamInspectionOrderService.updateById(eamInspectionOrder); |
| | | return Result.OK("编辑成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-通过id删除") |
| | | @ApiOperation(value="点检工单-通过id删除", notes="点检工单-通过id删除") |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | eamInspectionOrderService.removeById(id); |
| | | return Result.OK("删除成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-批量删除") |
| | | @ApiOperation(value="点检工单-批量删除", notes="点检工单-批量删除") |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.eamInspectionOrderService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("批量删除成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 通过id查询 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "点检工单-通过id查询") |
| | | @ApiOperation(value="点检工单-通过id查询", notes="点检工单-通过id查询") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<EamInspectionOrder> queryById(@RequestParam(name="id",required=true) String id) { |
| | | EamInspectionOrder eamInspectionOrder = eamInspectionOrderService.getById(id); |
| | | if(eamInspectionOrder==null) { |
| | | return Result.error("未找到对应数据"); |
| | | } |
| | | return Result.OK(eamInspectionOrder); |
| | | } |
| | | @Autowired |
| | | private IEamInspectionOrderService eamInspectionOrderService; |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | @Autowired |
| | | private ObjectMapper objectMapper; |
| | | @Autowired |
| | | private TranslateDictTextUtils translateDictTextUtils; |
| | | @Autowired |
| | | private IEamInspectionOrderDetailService eamInspectionOrderDetailService; |
| | | |
| | | /** |
| | | * 导出excel |
| | | * |
| | | * @param request |
| | | * @param eamInspectionOrder |
| | | */ |
| | | * 分页列表查询 |
| | | * |
| | | * @param query |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "点检工单-分页列表查询") |
| | | @ApiOperation(value = "点检工单-分页列表查询", notes = "点检工单-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<EamInspectionOrder>> queryPageList(EamInspectionOrderQuery query, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | // QueryWrapper<EamInspectionOrder> queryWrapper = QueryGenerator.initQueryWrapper(eamInspectionOrder, req.getParameterMap()); |
| | | Page<EamInspectionOrder> page = new Page<EamInspectionOrder>(pageNo, pageSize); |
| | | IPage<EamInspectionOrder> pageList = eamInspectionOrderService.queryPageList(page, query); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * 查询点检工单基本信息 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询点检工单基本信息", notes = "查询点检工单基本信息") |
| | | @GetMapping(value = "/selectVoById") |
| | | public Result<?> selectVoById(@RequestParam(name = "id") String id) { |
| | | return eamInspectionOrderService.selectVoById(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加 |
| | | * |
| | | * @param eamInspectionOrderRequest |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-添加") |
| | | @ApiOperation(value = "点检工单-添加", notes = "点检工单-添加") |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.INSPECTION_ORDER_CODE_RULE); |
| | | eamInspectionOrderRequest.setOrderNum(codeSeq); |
| | | eamInspectionOrderRequest.setCreationMethod(String.valueOf(OrderCreationMethodEnum.MANUAL)); |
| | | eamInspectionOrderService.addInspectionOrder(eamInspectionOrderRequest); |
| | | return Result.OK("添加成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param eamInspectionOrderRequest |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-编辑") |
| | | @ApiOperation(value = "点检工单-编辑", notes = "点检工单-编辑") |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | | eamInspectionOrderService.editInspectionOrder(eamInspectionOrderRequest); |
| | | return Result.OK("编辑成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 领取点检工单 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-领取点检工单") |
| | | @ApiOperation(value = "点检工单-领取点检工单", notes = "点检工单-领取点检工单") |
| | | @GetMapping(value = "/receiveInspectionOrder") |
| | | public Result<String> receiveInspectionOrder(@RequestParam(name = "id") String id) { |
| | | eamInspectionOrderService.takeInspectionOrder(id); |
| | | return Result.OK("领取成功"); |
| | | } |
| | | |
| | | /** |
| | | * 作废点检工单 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-作废点检工单") |
| | | @ApiOperation(value = "点检工单-作废点检工单", notes = "点检工单-作废点检工单") |
| | | @GetMapping(value = "/cancelInspectionOrder") |
| | | public Result<String> cancelInspectionOrder(@RequestParam(name = "id") String id) { |
| | | eamInspectionOrderService.cancelInspectionOrder(id); |
| | | return Result.OK("作废成功"); |
| | | } |
| | | |
| | | /** |
| | | * 批量作废与领取 |
| | | * |
| | | * @param ids |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-批量作废与领取") |
| | | @ApiOperation(value = "点检工单-批量作废与领取", notes = "点检工单-批量作废与领取") |
| | | @GetMapping(value = "/cancelOrReceive") |
| | | public Result<?> cancelOrReceive(@RequestParam(name = "ids") String ids, @RequestParam(name = "type") String type) { |
| | | return eamInspectionOrderService.batchCancelOrTakeInspectionOrder(ids, type); |
| | | } |
| | | |
| | | /** |
| | | * 点检流程 |
| | | * |
| | | * @param eamInspectionOrderRequest |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检流程") |
| | | @ApiOperation(value = "点检工单-点检流程", notes = "点检工单-点检流程") |
| | | @PostMapping("/approval") |
| | | public Result<?> approval(@RequestBody EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | | eamInspectionOrderService.inspectionProcess(eamInspectionOrderRequest); |
| | | return Result.OK("操作成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "点检工单-批量审批流程", notes = "点检工单-批量审批流程") |
| | | @PostMapping("/batchApproval") |
| | | public Result<?> batchApproval(@RequestBody EamInspectionBatchApprovalRequest request) { |
| | | if(request == null || CollectionUtil.isEmpty(request.getTaskList())) { |
| | | return Result.error("没有需要审批的数据!"); |
| | | } |
| | | int n = 0; |
| | | StringBuilder errorMsg = new StringBuilder(); |
| | | List<WorkTaskDataVo> tastList = request.getTaskList(); |
| | | for(WorkTaskDataVo workTaskDataVo : tastList) { |
| | | EamInspectionOrderRequest orderRequest = new EamInspectionOrderRequest(); |
| | | EamInspectionOrder order = eamInspectionOrderService.getById(workTaskDataVo.getDataId()); |
| | | if(order == null) { |
| | | errorMsg.append("工单ID:"); |
| | | errorMsg.append(workTaskDataVo.getDataId()); |
| | | errorMsg.append(",不存在或已被删除!\n"); |
| | | continue; |
| | | } |
| | | if(!InspectionStatus.WAIT_CONFIRM.name().equals(order.getInspectionStatus())) { |
| | | errorMsg.append("工单号:"); |
| | | errorMsg.append(order.getOrderNum()); |
| | | errorMsg.append(",状态无法批量审批!\n"); |
| | | continue; |
| | | } |
| | | List<EamInspectionOrderDetail> tableDetailList = eamInspectionOrderDetailService.queryListByOrderId(order.getId()); |
| | | try { |
| | | orderRequest.setId(order.getId()); |
| | | orderRequest.setEquipmentId(order.getEquipmentId()); |
| | | //审批信息 |
| | | orderRequest.setConfirmComment(request.getConfirmComment()); |
| | | orderRequest.setConfirmDealType(request.getConfirmDealType()); |
| | | //任务信息 |
| | | orderRequest.setDataId(workTaskDataVo.getDataId()); |
| | | orderRequest.setTaskId(workTaskDataVo.getId()); |
| | | orderRequest.setUserId(workTaskDataVo.getAssignee()); |
| | | orderRequest.setInstanceId(workTaskDataVo.getProcInstId()); |
| | | orderRequest.setValues(workTaskDataVo.getVariables()); |
| | | orderRequest.setTableDetailList(tableDetailList); |
| | | EamInspectionOrder result = eamInspectionOrderService.inspectionProcess(orderRequest); |
| | | if(result == null) { |
| | | errorMsg.append("工单号:"); |
| | | errorMsg.append(order.getOrderNum()); |
| | | errorMsg.append(",审批失败!\n"); |
| | | continue; |
| | | } |
| | | n++; |
| | | |
| | | } catch (Exception e) { |
| | | errorMsg.append("工单号:"); |
| | | errorMsg.append(order.getOrderNum()); |
| | | errorMsg.append(",审批失败,错误原因:"); |
| | | errorMsg.append(e.getMessage() + "\n"); |
| | | } |
| | | |
| | | } |
| | | if(n > 0) { |
| | | String message = "成功审批通过" + n + "条记录!\n" + errorMsg; |
| | | return Result.OK(message); |
| | | } |
| | | return Result.error(errorMsg.toString()); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-通过id删除") |
| | | @ApiOperation(value = "点检工单-通过id删除", notes = "点检工单-通过id删除") |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
| | | eamInspectionOrderService.removeById(id); |
| | | return Result.OK("删除成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "点检工单-批量删除") |
| | | @ApiOperation(value = "点检工单-批量删除", notes = "点检工单-批量删除") |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | this.eamInspectionOrderService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("批量删除成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 通过id查询 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "点检工单-通过id查询") |
| | | @ApiOperation(value = "点检工单-通过id查询", notes = "点检工单-通过id查询") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
| | | EamInspectionOrder eamInspectionOrder = eamInspectionOrderService.getById(id); |
| | | if (eamInspectionOrder == null) { |
| | | return Result.error("未找到对应数据"); |
| | | } |
| | | try { |
| | | String json = objectMapper.writeValueAsString(eamInspectionOrder); |
| | | JSONObject item = JSONObject.parseObject(json, Feature.OrderedField); |
| | | translateDictTextUtils.translateField("createBy", eamInspectionOrder.getCreateBy(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("standardId", eamInspectionOrder.getStandardId(), item, "eam_maintenance_standard,standard_name,id"); |
| | | translateDictTextUtils.translateField("operator", eamInspectionOrder.getOperator(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("creationMethod", eamInspectionOrder.getCreationMethod(), item, "order_creation_method"); |
| | | translateDictTextUtils.translateField("inspectionStatus", eamInspectionOrder.getInspectionStatus(), item, "inspection_status"); |
| | | translateDictTextUtils.translateField("confirmUser", eamInspectionOrder.getConfirmUser(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("confirmDealType", eamInspectionOrder.getConfirmDealType(), item, "approved_rejected"); |
| | | return Result.OK(item); |
| | | } catch (JsonProcessingException e) { |
| | | return Result.error("数据转译失败!"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导出excel |
| | | * |
| | | * @param request |
| | | * @param eamInspectionOrder |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:点检工单:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, EamInspectionOrder eamInspectionOrder) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通过excel导入数据 |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | * 通过excel导入数据 |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("点检工单:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, EamInspectionOrder.class); |
| | | } |
| | | |
| | | /** |
| | | * 报表使用 qsw |
| | | * 2025-6-19 |
| | | */ |
| | | @GetMapping("/findInspectionResult") |
| | | public JSONObject findInspectionResult(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "1000") Integer pageSize, |
| | | @RequestParam Map<String, Object> params) { |
| | | |
| | | String equipmentId = (String)params.get("equipmentId"); |
| | | String inspectionDate = (String)params.get("inspectionDate"); |
| | | |
| | | List<InspectionVo> inspectionVos = new ArrayList<>(); |
| | | List<Map<String, Object>> inspectionStandard = eamInspectionOrderService.findInspectionStandard(equipmentId); |
| | | for (Map<String, Object> map : inspectionStandard) { |
| | | List<InspectionVo> dayInspectionResult = eamInspectionOrderService.findInspectionResult(equipmentId,(String)map.get("itemDemand"),inspectionDate); |
| | | InspectionVo inspectionVo = new InspectionVo(); |
| | | inspectionVo.setInspectionContent((String)map.get("itemDemand")); |
| | | Object seq = map.get("seq"); |
| | | inspectionVo.setSeq(seq.toString()); |
| | | for (InspectionVo vo : dayInspectionResult) { |
| | | if("1".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay1(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("2".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay2(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("3".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay3(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("4".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay4(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("5".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay5(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("6".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay6(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("7".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay7(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("8".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay8(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("9".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay9(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("10".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay10(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("11".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay11(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("12".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay12(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("13".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay13(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("14".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay14(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("15".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay15(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("16".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay16(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("17".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay17(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("18".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay18(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("19".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay19(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("20".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay20(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("21".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay21(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("22".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay22(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("23".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay23(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("24".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay24(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("25".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay25(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("26".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay26(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("27".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay27(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("28".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay28(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("29".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay29(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("30".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay30(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("31".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay31(vo.getInspectionResult()); |
| | | continue; |
| | | } |
| | | } |
| | | inspectionVos.add(inspectionVo); |
| | | } |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",inspectionVos); |
| | | return jsonObject; |
| | | } |
| | | |
| | | /** |
| | | * 报表使用 qsw |
| | | * 2025-6-19 |
| | | */ |
| | | @GetMapping("/findInspectionUser") |
| | | public JSONObject findInspectionUser(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "1000") Integer pageSize, |
| | | @RequestParam Map<String, Object> params) { |
| | | |
| | | String equipmentId = (String)params.get("equipmentId"); |
| | | String inspectionDate = (String)params.get("inspectionDate"); |
| | | |
| | | List<InspectionVo> inspectionVos = new ArrayList<>(); |
| | | List<InspectionVo> inspectionUser = eamInspectionOrderService.findInspectionUser(equipmentId,inspectionDate); |
| | | InspectionVo inspectionVo = new InspectionVo(); |
| | | for (InspectionVo vo : inspectionUser) { |
| | | if("1".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator1(vo.getOperator()); |
| | | inspectionVo.setConfirmUser1(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("2".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator2(vo.getOperator()); |
| | | inspectionVo.setConfirmUser2(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("3".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator3(vo.getOperator()); |
| | | inspectionVo.setConfirmUser3(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("4".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator4(vo.getOperator()); |
| | | inspectionVo.setConfirmUser4(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("5".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator5(vo.getOperator()); |
| | | inspectionVo.setConfirmUser5(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("6".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator6(vo.getOperator()); |
| | | inspectionVo.setConfirmUser6(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("7".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator7(vo.getOperator()); |
| | | inspectionVo.setConfirmUser7(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("8".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator8(vo.getOperator()); |
| | | inspectionVo.setConfirmUser8(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("9".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator9(vo.getOperator()); |
| | | inspectionVo.setConfirmUser9(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("10".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator10(vo.getOperator()); |
| | | inspectionVo.setConfirmUser10(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("11".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator11(vo.getOperator()); |
| | | inspectionVo.setConfirmUser11(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("12".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator12(vo.getOperator()); |
| | | inspectionVo.setConfirmUser12(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("13".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator13(vo.getOperator()); |
| | | inspectionVo.setConfirmUser13(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("14".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator14(vo.getOperator()); |
| | | inspectionVo.setConfirmUser14(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("15".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator15(vo.getOperator()); |
| | | inspectionVo.setConfirmUser15(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("16".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator16(vo.getOperator()); |
| | | inspectionVo.setConfirmUser16(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("17".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator17(vo.getOperator()); |
| | | inspectionVo.setConfirmUser17(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("18".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator18(vo.getOperator()); |
| | | inspectionVo.setConfirmUser18(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("19".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator19(vo.getOperator()); |
| | | inspectionVo.setConfirmUser19(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("20".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator20(vo.getOperator()); |
| | | inspectionVo.setConfirmUser20(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("21".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator21(vo.getOperator()); |
| | | inspectionVo.setConfirmUser21(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("22".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator22(vo.getOperator()); |
| | | inspectionVo.setConfirmUser22(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("23".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator23(vo.getOperator()); |
| | | inspectionVo.setConfirmUser23(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("24".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator24(vo.getOperator()); |
| | | inspectionVo.setConfirmUser24(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("25".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator25(vo.getOperator()); |
| | | inspectionVo.setConfirmUser25(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("26".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator26(vo.getOperator()); |
| | | inspectionVo.setConfirmUser26(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("27".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator27(vo.getOperator()); |
| | | inspectionVo.setConfirmUser27(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("28".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator28(vo.getOperator()); |
| | | inspectionVo.setConfirmUser28(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("29".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator29(vo.getOperator()); |
| | | inspectionVo.setConfirmUser29(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("30".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator30(vo.getOperator()); |
| | | inspectionVo.setConfirmUser30(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("31".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator31(vo.getOperator()); |
| | | inspectionVo.setConfirmUser31(vo.getConfirmUser()); |
| | | continue; |
| | | } |
| | | } |
| | | inspectionVos.add(inspectionVo); |
| | | // } |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",inspectionVos); |
| | | return jsonObject; |
| | | } |
| | | |
| | | |
| | | |
| | | } |