| | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.validation.constraints.*; |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import org.dromara.common.core.constant.DictConstants; |
| | | import org.dromara.common.core.utils.DateUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.eims.domain.bo.MaintOrderBo; |
| | | import org.dromara.eims.domain.vo.MaintOrdeGroupVo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | params.put("beginPlanTime",startOfMonth); |
| | | params.put("endPlanTime",endOfMonth); |
| | | |
| | | return eimsMaintOrderService.queryPageListCustom(bo, pageQuery); |
| | | TableDataInfo<EimsMaintOrderVo> tableDataInfo = eimsMaintOrderService.queryPageListCustom(bo, pageQuery); |
| | | tableDataInfo.getRows().forEach(e -> { |
| | | // 如果保养方法是维修,查询关联的备件 |
| | | if (DictConstants.MAINT_METHOD_DETAIL.REPAIR.equals(e.getMaintFun())) { |
| | | e.setSpareParts(eimsMaintOrderService.querySpareParts(e.getMaintCode())); |
| | | } |
| | | }); |
| | | return tableDataInfo; |
| | | } |
| | | |
| | | /** |
| | |
| | | return toAjax(eimsMaintOrderService.updateByBo(bo)); |
| | | } |
| | | |
| | | @SaCheckPermission("eims:maintOrder:edit") |
| | | @Log(title = "保养工单-批量修改", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | | @PutMapping("editBatch") |
| | | public R<Void> editBatch(@Validated(EditGroup.class) @RequestBody MaintOrderBo bo) { |
| | | return toAjax(eimsMaintOrderService.updateBatchByBo(bo)); |
| | | } |
| | | |
| | | /** |
| | | * 删除保养工单 |
| | | * |