| | |
| | | import org.jeecg.modules.eam.entity.EamSecondMaintenanceOrder; |
| | | import org.jeecg.modules.eam.request.EamSecondMaintenanceQuery; |
| | | import org.jeecg.modules.eam.request.EamSecondMaintenanceRequest; |
| | | import org.jeecg.modules.eam.service.IEamSecondMaintenanceOrderDetailService; |
| | | import org.jeecg.modules.eam.service.IEamSecondMaintenanceOrderService; |
| | | import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | /** |
| | | * @Description: 设å¤äºçº§ä¿å
» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-04-29 |
| | | * @Date: 2025-04-29 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags="设å¤äºçº§ä¿å
»") |
| | | @Api(tags = "设å¤äºçº§ä¿å
»") |
| | | @RestController |
| | | @RequestMapping("/eam/secondMaintenanceOrder") |
| | | public class EamSecondMaintenanceOrderController extends JeecgController<EamSecondMaintenanceOrder, IEamSecondMaintenanceOrderService> { |
| | | @Autowired |
| | | private IEamSecondMaintenanceOrderService eamSecondMaintenanceOrderService; |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | @Autowired |
| | | private IEamSecondMaintenanceOrderDetailService secondMaintenanceOrderDetailService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param query |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="设å¤äºçº§ä¿å
»-å页å表æ¥è¯¢", notes="设å¤äºçº§ä¿å
»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamSecondMaintenanceQuery query, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | @Autowired |
| | | private IEamSecondMaintenanceOrderService eamSecondMaintenanceOrderService; |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param query |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-å页å表æ¥è¯¢") |
| | | @ApiOperation(value = "设å¤äºçº§ä¿å
»-å页å表æ¥è¯¢", notes = "设å¤äºçº§ä¿å
»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamSecondMaintenanceQuery query, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | // QueryWrapper<EamSecondMaintenanceOrder> queryWrapper = QueryGenerator.initQueryWrapper(eamSecondMaintenanceOrder, req.getParameterMap()); |
| | | Page<EamSecondMaintenanceOrder> page = new Page<EamSecondMaintenanceOrder>(pageNo, pageSize); |
| | | IPage<EamSecondMaintenanceOrder> pageList = eamSecondMaintenanceOrderService.queryPageList(page, query); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-æ·»å ") |
| | | @ApiOperation(value="设å¤äºçº§ä¿å
»-æ·»å ", notes="设å¤äºçº§ä¿å
»-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamSecondMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("æ·»å ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.SECOND_MAINTENANCE_CODE_RULE); |
| | | request.setOrderNum(codeSeq); |
| | | request.setCreationMethod(OrderCreationMethodEnum.MANUAL.name()); |
| | | boolean b = eamSecondMaintenanceOrderService.addWeekMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("æ·»å 失败ï¼"); |
| | | } |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-ç¼è¾") |
| | | @ApiOperation(value="设å¤äºçº§ä¿å
»-ç¼è¾", notes="设å¤äºçº§ä¿å
»-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamSecondMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("æ·»å ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | boolean b = eamSecondMaintenanceOrderService.editWeekMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | Page<EamSecondMaintenanceOrder> page = new Page<EamSecondMaintenanceOrder>(pageNo, pageSize); |
| | | IPage<EamSecondMaintenanceOrder> pageList = eamSecondMaintenanceOrderService.queryPageList(page, query); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * éè¿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) { |
| | | EamSecondMaintenanceOrder eamSecondMaintenanceOrder = eamSecondMaintenanceOrderService.getById(id); |
| | | return Result.OK(eamSecondMaintenanceOrder); |
| | | } |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-æ·»å ") |
| | | @ApiOperation(value = "设å¤äºçº§ä¿å
»-æ·»å ", notes = "设å¤äºçº§ä¿å
»-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamSecondMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("æ·»å ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.SECOND_MAINTENANCE_CODE_RULE); |
| | | request.setOrderNum(codeSeq); |
| | | request.setCreationMethod(OrderCreationMethodEnum.MANUAL.name()); |
| | | boolean b = eamSecondMaintenanceOrderService.addMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("æ·»å 失败ï¼"); |
| | | } |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idä½åº |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-ä½åº") |
| | | @ApiOperation(value = "设å¤äºçº§ä¿å
»-ä½åº", notes = "设å¤äºçº§ä¿å
»-ä½åº") |
| | | @DeleteMapping(value = "/abolish") |
| | | public Result<?> abolish(@RequestParam(name = "id", required = true) String id) { |
| | | EamSecondMaintenanceOrder entity = eamSecondMaintenanceOrderService.getById(id); |
| | | if (entity == null) { |
| | | return Result.error("è¦ä½åºçæ°æ®ä¸åå¨ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | return Result.error("è¯¥ç¶æçæ°æ®ä¸å
许è¿è¡ä½åºï¼"); |
| | | } |
| | | entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.ABOLISH.name()); |
| | | eamSecondMaintenanceOrderService.updateById(entity); |
| | | return Result.OK("ä½åºæå!"); |
| | | } |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-ç¼è¾") |
| | | @ApiOperation(value = "设å¤äºçº§ä¿å
»-ç¼è¾", notes = "设å¤äºçº§ä¿å
»-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamSecondMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("æ·»å ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | boolean b = eamSecondMaintenanceOrderService.editMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idé¢å |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-é¢å") |
| | | @ApiOperation(value = "设å¤äºçº§ä¿å
»-é¢å", notes = "设å¤äºçº§ä¿å
»-é¢å") |
| | | @GetMapping(value = "/collect") |
| | | public Result<?> collect(@RequestParam(name = "id", required = true) String id) { |
| | | boolean b = eamSecondMaintenanceOrderService.collect(id); |
| | | if (!b) { |
| | | Result.OK("é¢å失败!"); |
| | | } |
| | | 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) { |
| | | EamSecondMaintenanceOrder eamSecondMaintenanceOrder = eamSecondMaintenanceOrderService.getById(id); |
| | | return Result.OK(eamSecondMaintenanceOrder); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¹éä½åº |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å¨ä¿å·¥å-æ¹éä½åº") |
| | | @ApiOperation(value = "å¨ä¿å·¥å-æ¹éä½åº", notes = "å¨ä¿å·¥å-æ¹éä½åº") |
| | | @DeleteMapping(value = "/abolishBatch") |
| | | public Result<?> abolishBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamSecondMaintenanceOrder entity = eamSecondMaintenanceOrderService.getById(id); |
| | | if (entity != null && SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.ABOLISH.name()); |
| | | eamSecondMaintenanceOrderService.updateById(entity); |
| | | i.getAndIncrement(); |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éä½åºæå " + i.get() + " æ¡å·¥åï¼"); |
| | | } |
| | | /** |
| | | * éè¿idä½åº |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-ä½åº") |
| | | @ApiOperation(value = "设å¤äºçº§ä¿å
»-ä½åº", notes = "设å¤äºçº§ä¿å
»-ä½åº") |
| | | @DeleteMapping(value = "/abolish") |
| | | public Result<?> abolish(@RequestParam(name = "id", required = true) String id) { |
| | | EamSecondMaintenanceOrder entity = eamSecondMaintenanceOrderService.getById(id); |
| | | if (entity == null) { |
| | | return Result.error("è¦ä½åºçæ°æ®ä¸åå¨ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | return Result.error("è¯¥ç¶æçæ°æ®ä¸å
许è¿è¡ä½åºï¼"); |
| | | } |
| | | entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.ABOLISH.name()); |
| | | eamSecondMaintenanceOrderService.updateById(entity); |
| | | return Result.OK("ä½åºæå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¹éé¢å |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å¨ä¿å·¥å-æ¹éé¢å") |
| | | @ApiOperation(value = "å¨ä¿å·¥å-æ¹éé¢å", notes = "å¨ä¿å·¥å-æ¹éé¢å") |
| | | @DeleteMapping(value = "/collectBatch") |
| | | public Result<?> collectBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamSecondMaintenanceOrder entity = eamSecondMaintenanceOrderService.getById(id); |
| | | if (entity != null && SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | boolean b = eamSecondMaintenanceOrderService.collect(id); |
| | | if (b) { |
| | | i.getAndIncrement(); |
| | | } |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éé¢åæå " + i.get() + " æ¡å·¥åï¼"); |
| | | } |
| | | /** |
| | | * éè¿idé¢å |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤äºçº§ä¿å
»-é¢å") |
| | | @ApiOperation(value = "设å¤äºçº§ä¿å
»-é¢å", notes = "设å¤äºçº§ä¿å
»-é¢å") |
| | | @GetMapping(value = "/collect") |
| | | public Result<?> collect(@RequestParam(name = "id", required = true) String id) { |
| | | boolean b = eamSecondMaintenanceOrderService.collect(id); |
| | | if (!b) { |
| | | Result.OK("é¢å失败!"); |
| | | } |
| | | return Result.OK("é¢åæå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¹éä½åº |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å¨ä¿å·¥å-æ¹éä½åº") |
| | | @ApiOperation(value = "å¨ä¿å·¥å-æ¹éä½åº", notes = "å¨ä¿å·¥å-æ¹éä½åº") |
| | | @DeleteMapping(value = "/abolishBatch") |
| | | public Result<?> abolishBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamSecondMaintenanceOrder entity = eamSecondMaintenanceOrderService.getById(id); |
| | | if (entity != null && SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.ABOLISH.name()); |
| | | eamSecondMaintenanceOrderService.updateById(entity); |
| | | i.getAndIncrement(); |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éä½åºæå " + i.get() + " æ¡å·¥åï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¹éé¢å |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å¨ä¿å·¥å-æ¹éé¢å") |
| | | @ApiOperation(value = "å¨ä¿å·¥å-æ¹éé¢å", notes = "å¨ä¿å·¥å-æ¹éé¢å") |
| | | @DeleteMapping(value = "/collectBatch") |
| | | public Result<?> collectBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamSecondMaintenanceOrder entity = eamSecondMaintenanceOrderService.getById(id); |
| | | if (entity != null && SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | boolean b = eamSecondMaintenanceOrderService.collect(id); |
| | | if (b) { |
| | | i.getAndIncrement(); |
| | | } |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éé¢åæå " + i.get() + " æ¡å·¥åï¼"); |
| | | } |
| | | } |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | |
| | | 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.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.OrderCreationMethodEnum; |
| | | import org.jeecg.modules.eam.constant.ThirdMaintenanceStatusEnum; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceQuery; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceRequest; |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceOrderService; |
| | | import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | |
| | | /** |
| | | /** |
| | | * @Description: 设å¤ä¸çº§ä¿å
» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-04-29 |
| | |
| | | @Slf4j |
| | | @Api(tags="设å¤ä¸çº§ä¿å
»") |
| | | @RestController |
| | | @RequestMapping("/eam/eamThirdMaintenanceOrder") |
| | | @RequestMapping("/eam/thirdMaintenanceOrder") |
| | | public class EamThirdMaintenanceOrderController extends JeecgController<EamThirdMaintenanceOrder, IEamThirdMaintenanceOrderService> { |
| | | @Autowired |
| | | private IEamThirdMaintenanceOrderService eamThirdMaintenanceOrderService; |
| | | |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param eamThirdMaintenanceOrder |
| | | * @param query |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»-å页å表æ¥è¯¢", notes="设å¤ä¸çº§ä¿å
»-å页å表æ¥è¯¢") |
| | | @ApiOperation(value = "设å¤ä¸çº§ä¿å
»-å页å表æ¥è¯¢", notes = "设å¤ä¸çº§ä¿å
»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamThirdMaintenanceOrder eamThirdMaintenanceOrder, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | public Result<?> queryPageList(EamThirdMaintenanceQuery query, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamThirdMaintenanceOrder> queryWrapper = QueryGenerator.initQueryWrapper(eamThirdMaintenanceOrder, req.getParameterMap()); |
| | | Page<EamThirdMaintenanceOrder> page = new Page<EamThirdMaintenanceOrder>(pageNo, pageSize); |
| | | IPage<EamThirdMaintenanceOrder> pageList = eamThirdMaintenanceOrderService.page(page, queryWrapper); |
| | | IPage<EamThirdMaintenanceOrder> pageList = eamThirdMaintenanceOrderService.queryPageList(page, query); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param eamThirdMaintenanceOrder |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-æ·»å ") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»-æ·»å ", notes="设å¤ä¸çº§ä¿å
»-æ·»å ") |
| | | @ApiOperation(value = "设å¤ä¸çº§ä¿å
»-æ·»å ", notes = "设å¤ä¸çº§ä¿å
»-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamThirdMaintenanceOrder eamThirdMaintenanceOrder) { |
| | | eamThirdMaintenanceOrderService.save(eamThirdMaintenanceOrder); |
| | | public Result<?> add(@RequestBody EamThirdMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("æ·»å ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.THIRD_MAINTENANCE_CODE_RULE); |
| | | request.setOrderNum(codeSeq); |
| | | request.setCreationMethod(OrderCreationMethodEnum.MANUAL.name()); |
| | | boolean b = eamThirdMaintenanceOrderService.addMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("æ·»å 失败ï¼"); |
| | | } |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param eamThirdMaintenanceOrder |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-ç¼è¾") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»-ç¼è¾", notes="设å¤ä¸çº§ä¿å
»-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamThirdMaintenanceOrder eamThirdMaintenanceOrder) { |
| | | eamThirdMaintenanceOrderService.updateById(eamThirdMaintenanceOrder); |
| | | @ApiOperation(value = "设å¤ä¸çº§ä¿å
»-ç¼è¾", notes = "设å¤ä¸çº§ä¿å
»-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamThirdMaintenanceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("æ·»å ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | if (CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | boolean b = eamThirdMaintenanceOrderService.editMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-éè¿idå é¤") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»-éè¿idå é¤", notes="设å¤ä¸çº§ä¿å
»-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
| | | eamThirdMaintenanceOrderService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-æ¹éå é¤") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»-æ¹éå é¤", notes="设å¤ä¸çº§ä¿å
»-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.eamThirdMaintenanceOrderService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿åï¼"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»-éè¿idæ¥è¯¢", notes="设å¤ä¸çº§ä¿å
»-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value = "设å¤ä¸çº§ä¿å
»-éè¿idæ¥è¯¢", notes = "设å¤ä¸çº§ä¿å
»-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
| | | EamThirdMaintenanceOrder eamThirdMaintenanceOrder = eamThirdMaintenanceOrderService.getById(id); |
| | | return Result.OK(eamThirdMaintenanceOrder); |
| | | public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
| | | EamThirdMaintenanceOrder order = eamThirdMaintenanceOrderService.getById(id); |
| | | return Result.OK(order); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idä½åº |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-ä½åº") |
| | | @ApiOperation(value = "设å¤ä¸çº§ä¿å
»-ä½åº", notes = "设å¤ä¸çº§ä¿å
»-ä½åº") |
| | | @DeleteMapping(value = "/abolish") |
| | | public Result<?> abolish(@RequestParam(name = "id", required = true) String id) { |
| | | EamThirdMaintenanceOrder entity = eamThirdMaintenanceOrderService.getById(id); |
| | | if (entity == null) { |
| | | return Result.error("è¦ä½åºçæ°æ®ä¸åå¨ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!ThirdMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | return Result.error("è¯¥ç¶æçæ°æ®ä¸å
许è¿è¡ä½åºï¼"); |
| | | } |
| | | entity.setMaintenanceStatus(ThirdMaintenanceStatusEnum.ABOLISH.name()); |
| | | eamThirdMaintenanceOrderService.updateById(entity); |
| | | return Result.OK("ä½åºæå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idé¢å |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-é¢å") |
| | | @ApiOperation(value = "设å¤ä¸çº§ä¿å
»-é¢å", notes = "设å¤ä¸çº§ä¿å
»-é¢å") |
| | | @GetMapping(value = "/collect") |
| | | public Result<?> collect(@RequestParam(name = "id", required = true) String id) { |
| | | boolean b = eamThirdMaintenanceOrderService.collect(id); |
| | | if (!b) { |
| | | Result.OK("é¢å失败!"); |
| | | } |
| | | return Result.OK("é¢åæå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¹éä½åº |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å¨ä¿å·¥å-æ¹éä½åº") |
| | | @ApiOperation(value = "å¨ä¿å·¥å-æ¹éä½åº", notes = "å¨ä¿å·¥å-æ¹éä½åº") |
| | | @DeleteMapping(value = "/abolishBatch") |
| | | public Result<?> abolishBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamThirdMaintenanceOrder entity = eamThirdMaintenanceOrderService.getById(id); |
| | | if (entity != null && ThirdMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | entity.setMaintenanceStatus(ThirdMaintenanceStatusEnum.ABOLISH.name()); |
| | | eamThirdMaintenanceOrderService.updateById(entity); |
| | | i.getAndIncrement(); |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éä½åºæå " + i.get() + " æ¡å·¥åï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¹éé¢å |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å¨ä¿å·¥å-æ¹éé¢å") |
| | | @ApiOperation(value = "å¨ä¿å·¥å-æ¹éé¢å", notes = "å¨ä¿å·¥å-æ¹éé¢å") |
| | | @DeleteMapping(value = "/collectBatch") |
| | | public Result<?> collectBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamThirdMaintenanceOrder entity = eamThirdMaintenanceOrderService.getById(id); |
| | | if (entity != null && ThirdMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | boolean b = eamThirdMaintenanceOrderService.collect(id); |
| | | if (b) { |
| | | i.getAndIncrement(); |
| | | } |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éé¢åæå " + i.get() + " æ¡å·¥åï¼"); |
| | | } |
| | | } |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrderDetail; |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceOrderDetailService; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | 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.system.base.controller.JeecgController; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrderDetail; |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceOrderDetailService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: 设å¤ä¸çº§ä¿å
»æç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-04-29 |
| | | * @Date: 2025-04-29 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags="设å¤ä¸çº§ä¿å
»æç»") |
| | | @Api(tags = "设å¤ä¸çº§ä¿å
»æç»") |
| | | @RestController |
| | | @RequestMapping("/eam/eamThirdMaintenanceOrderDetail") |
| | | @RequestMapping("/eam/thirdMaintenanceOrderDetail") |
| | | public class EamThirdMaintenanceOrderDetailController extends JeecgController<EamThirdMaintenanceOrderDetail, IEamThirdMaintenanceOrderDetailService> { |
| | | @Autowired |
| | | private IEamThirdMaintenanceOrderDetailService eamThirdMaintenanceOrderDetailService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param eamThirdMaintenanceOrderDetail |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»æç»-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»æç»-å页å表æ¥è¯¢", notes="设å¤ä¸çº§ä¿å
»æç»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamThirdMaintenanceOrderDetail eamThirdMaintenanceOrderDetail, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamThirdMaintenanceOrderDetail> queryWrapper = QueryGenerator.initQueryWrapper(eamThirdMaintenanceOrderDetail, req.getParameterMap()); |
| | | Page<EamThirdMaintenanceOrderDetail> page = new Page<EamThirdMaintenanceOrderDetail>(pageNo, pageSize); |
| | | IPage<EamThirdMaintenanceOrderDetail> pageList = eamThirdMaintenanceOrderDetailService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param eamThirdMaintenanceOrderDetail |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»æç»-æ·»å ") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»æç»-æ·»å ", notes="设å¤ä¸çº§ä¿å
»æç»-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamThirdMaintenanceOrderDetail eamThirdMaintenanceOrderDetail) { |
| | | eamThirdMaintenanceOrderDetailService.save(eamThirdMaintenanceOrderDetail); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param eamThirdMaintenanceOrderDetail |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»æç»-ç¼è¾") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»æç»-ç¼è¾", notes="设å¤ä¸çº§ä¿å
»æç»-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamThirdMaintenanceOrderDetail eamThirdMaintenanceOrderDetail) { |
| | | eamThirdMaintenanceOrderDetailService.updateById(eamThirdMaintenanceOrderDetail); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»æç»-éè¿idå é¤") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»æç»-éè¿idå é¤", notes="设å¤ä¸çº§ä¿å
»æç»-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
| | | eamThirdMaintenanceOrderDetailService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»æç»-æ¹éå é¤") |
| | | @ApiOperation(value="设å¤ä¸çº§ä¿å
»æç»-æ¹éå é¤", notes="设å¤ä¸çº§ä¿å
»æç»-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.eamThirdMaintenanceOrderDetailService.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) { |
| | | EamThirdMaintenanceOrderDetail eamThirdMaintenanceOrderDetail = eamThirdMaintenanceOrderDetailService.getById(id); |
| | | return Result.OK(eamThirdMaintenanceOrderDetail); |
| | | } |
| | | @Autowired |
| | | private IEamThirdMaintenanceOrderDetailService eamThirdMaintenanceOrderDetailService; |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param eamThirdMaintenanceOrderDetail |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, EamThirdMaintenanceOrderDetail eamThirdMaintenanceOrderDetail) { |
| | | return super.exportXls(request, eamThirdMaintenanceOrderDetail, EamThirdMaintenanceOrderDetail.class, "设å¤ä¸çº§ä¿å
»æç»"); |
| | | } |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param orderId |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å¨ä¿å·¥åæç»-å页å表æ¥è¯¢", notes = "å¨ä¿å·¥åæç»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(@RequestParam("orderId") String orderId, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { |
| | | LambdaQueryWrapper<EamThirdMaintenanceOrderDetail> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EamThirdMaintenanceOrderDetail::getOrderId, orderId); |
| | | queryWrapper.orderByAsc(EamThirdMaintenanceOrderDetail::getItemCode); |
| | | Page<EamThirdMaintenanceOrderDetail> page = new Page<>(pageNo, pageSize); |
| | | IPage<EamThirdMaintenanceOrderDetail> pageList = eamThirdMaintenanceOrderDetailService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, EamThirdMaintenanceOrderDetail.class); |
| | | } |
| | | |
| | | /** |
| | | * 䏿¬¡å è½½ |
| | | * |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å¨ä¿å·¥åæç»-ä¸å页å表æ¥è¯¢", notes = "å¨ä¿å·¥åæç»-ä¸å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/queryList") |
| | | public Result<?> queryList(@RequestParam("orderId") String orderId) { |
| | | LambdaQueryWrapper<EamThirdMaintenanceOrderDetail> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EamThirdMaintenanceOrderDetail::getOrderId, orderId); |
| | | queryWrapper.orderByAsc(EamThirdMaintenanceOrderDetail::getItemCode); |
| | | List<EamThirdMaintenanceOrderDetail> list = eamThirdMaintenanceOrderDetailService.list(queryWrapper); |
| | | return Result.OK(list); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description: 设å¤äºçº§ä¿å
» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-04-29 |
| | | * @Date: 2025-04-29 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("eam_second_maintenance_order") |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="eam_second_maintenance_order对象", description="设å¤äºçº§ä¿å
»") |
| | | @ApiModel(value = "eam_second_maintenance_order对象", description = "设å¤äºçº§ä¿å
»") |
| | | public class EamSecondMaintenanceOrder implements Serializable { |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private Integer delFlag; |
| | | /**å·¥åå·*/ |
| | | @Excel(name = "å·¥åå·", width = 15) |
| | | @ApiModelProperty(value = "å·¥åå·") |
| | | private String orderNum; |
| | | /**设å¤ID*/ |
| | | @Excel(name = "设å¤ID", width = 15) |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | private String equipmentId; |
| | | /**æ åID*/ |
| | | @Excel(name = "æ åID", width = 15) |
| | | @ApiModelProperty(value = "æ åID") |
| | | @Dict(dicCode = "eam_maintenance_standard, standard_name, id") |
| | | private String standardId; |
| | | /**计åä¿å
»æ¥æ*/ |
| | | @ApiModelProperty(value = "计åä¿å
»æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | /**å®é
å¼å§æ¶é´*/ |
| | | @ApiModelProperty(value = "å®é
å¼å§æ¶é´") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date actualStartTime; |
| | | /**å®é
ç»ææ¶é´*/ |
| | | @ApiModelProperty(value = "å®é
ç»ææ¶é´") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date actualEndTime; |
| | | /**ä¿å
»äºº*/ |
| | | @Excel(name = "ä¿å
»äºº", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»äºº") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String operator; |
| | | /**ä¿å
»ç¶æ*/ |
| | | @Excel(name = "ä¿å
»ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»ç¶æ") |
| | | @Dict(dicCode = "second_maintenance_status") |
| | | private String maintenanceStatus; |
| | | /**å建æ¹å¼*/ |
| | | @Excel(name = "å建æ¹å¼", width = 15) |
| | | @ApiModelProperty(value = "å建æ¹å¼") |
| | | @Dict(dicCode = "order_creation_method") |
| | | private String creationMethod; |
| | | /**ç»´ä¿®ç»é¿ç¡®è®¤*/ |
| | | @Excel(name = "ç»´ä¿®ç»é¿ç¡®è®¤", width = 15) |
| | | @ApiModelProperty(value = "ç»´ä¿®ç»é¿ç¡®è®¤") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String confirmUser; |
| | | /**确认æè§*/ |
| | | @ApiModelProperty(value = "确认æè§") |
| | | private String confirmComment; |
| | | /**确认æ¶é´*/ |
| | | @ApiModelProperty(value = "确认æ¶é´") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date confirmTime; |
| | | /**ä¿å
»ä¸ä¼ å¾ç*/ |
| | | @Excel(name = "ä¿å
»ä¸ä¼ å¾ç", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»ä¸ä¼ å¾ç") |
| | | private String imageFiles; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | //å表å±ç¤º |
| | | @TableField(exist = false) |
| | | private String equipmentCode; |
| | | @TableField(exist = false) |
| | | private String equipmentName; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /** |
| | | * å 餿 è®° |
| | | */ |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private Integer delFlag; |
| | | /** |
| | | * å·¥åå· |
| | | */ |
| | | @Excel(name = "å·¥åå·", width = 15) |
| | | @ApiModelProperty(value = "å·¥åå·") |
| | | private String orderNum; |
| | | /** |
| | | * 设å¤ID |
| | | */ |
| | | @Excel(name = "设å¤ID", width = 15) |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | private String equipmentId; |
| | | /** |
| | | * æ åID |
| | | */ |
| | | @Excel(name = "æ åID", width = 15) |
| | | @ApiModelProperty(value = "æ åID") |
| | | @Dict(dicCode = "eam_maintenance_standard, standard_name, id") |
| | | private String standardId; |
| | | /** |
| | | * 计åä¿å
»æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "计åä¿å
»æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | /** |
| | | * å®é
å¼å§æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å®é
å¼å§æ¶é´") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date actualStartTime; |
| | | /** |
| | | * å®é
ç»ææ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å®é
ç»ææ¶é´") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date actualEndTime; |
| | | /** |
| | | * ä¿å
»äºº |
| | | */ |
| | | @Excel(name = "ä¿å
»äºº", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»äºº") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String operator; |
| | | /** |
| | | * ä¿å
»ç¶æ |
| | | */ |
| | | @Excel(name = "ä¿å
»ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»ç¶æ") |
| | | @Dict(dicCode = "second_maintenance_status") |
| | | private String maintenanceStatus; |
| | | /** |
| | | * å建æ¹å¼ |
| | | */ |
| | | @Excel(name = "å建æ¹å¼", width = 15) |
| | | @ApiModelProperty(value = "å建æ¹å¼") |
| | | @Dict(dicCode = "order_creation_method") |
| | | private String creationMethod; |
| | | /** |
| | | * ç»´ä¿®ç»é¿ç¡®è®¤ |
| | | */ |
| | | @Excel(name = "ç»´ä¿®ç»é¿ç¡®è®¤", width = 15) |
| | | @ApiModelProperty(value = "ç»´ä¿®ç»é¿ç¡®è®¤") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String confirmUser; |
| | | /** |
| | | * 确认æè§ |
| | | */ |
| | | @ApiModelProperty(value = "确认æè§") |
| | | private String confirmComment; |
| | | /** |
| | | * 确认æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "确认æ¶é´") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date confirmTime; |
| | | /** |
| | | * ä¿å
»ä¸ä¼ å¾ç |
| | | */ |
| | | @Excel(name = "ä¿å
»ä¸ä¼ å¾ç", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»ä¸ä¼ å¾ç") |
| | | private String imageFiles; |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | //å表å±ç¤º |
| | | @TableField(exist = false) |
| | | private String equipmentCode; |
| | | @TableField(exist = false) |
| | | private String equipmentName; |
| | | } |
| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | 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 lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description: 设å¤ä¸çº§ä¿å
» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-04-29 |
| | | * @Date: 2025-04-29 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("eam_third_maintenance_order") |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="eam_third_maintenance_order对象", description="设å¤ä¸çº§ä¿å
»") |
| | | @ApiModel(value = "eam_third_maintenance_order对象", description = "设å¤ä¸çº§ä¿å
»") |
| | | public class EamThirdMaintenanceOrder implements Serializable { |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @Excel(name = "å建人", width = 15) |
| | | private String id; |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @Excel(name = "å建人", width = 15) |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @Excel(name = "å建æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private String createBy; |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @Excel(name = "æ´æ°äºº", width = 15) |
| | | private Date createTime; |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | @Excel(name = "æ´æ°äºº", width = 15) |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @Excel(name = "æ´æ°æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private String updateBy; |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | private Date updateTime; |
| | | /** |
| | | * å 餿 è®° |
| | | */ |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private Integer delFlag; |
| | | /**å·¥åå·*/ |
| | | @Excel(name = "å·¥åå·", width = 15) |
| | | private Integer delFlag; |
| | | /** |
| | | * å·¥åå· |
| | | */ |
| | | @Excel(name = "å·¥åå·", width = 15) |
| | | @ApiModelProperty(value = "å·¥åå·") |
| | | private String orderNum; |
| | | /**设å¤ID*/ |
| | | @Excel(name = "设å¤ID", width = 15) |
| | | private String orderNum; |
| | | /** |
| | | * 设å¤ID |
| | | */ |
| | | @Excel(name = "设å¤ID", width = 15) |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | private String equipmentId; |
| | | /**æ åID*/ |
| | | @Excel(name = "æ åID", width = 15) |
| | | private String equipmentId; |
| | | /** |
| | | * æ åID |
| | | */ |
| | | @Excel(name = "æ åID", width = 15) |
| | | @ApiModelProperty(value = "æ åID") |
| | | private String standardId; |
| | | /**计åå¼å§æ¶é´*/ |
| | | @Excel(name = "计åå¼å§æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "计åå¼å§æ¶é´") |
| | | private Date planStartTime; |
| | | /**计åç»ææ¶é´*/ |
| | | @Excel(name = "计åç»ææ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "计åç»ææ¶é´") |
| | | private Date planEndTime; |
| | | /**å®é
å¼å§æ¶é´*/ |
| | | @Excel(name = "å®é
å¼å§æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @Dict(dicCode = "eam_maintenance_standard, standard_name, id") |
| | | private String standardId; |
| | | /** |
| | | * 计åä¿å
»æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "计åä¿å
»æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | /** |
| | | * å®é
å¼å§æ¶é´ |
| | | */ |
| | | @Excel(name = "å®é
å¼å§æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "å®é
å¼å§æ¶é´") |
| | | private Date actualStartTime; |
| | | /**å®é
ç»ææ¶é´*/ |
| | | @Excel(name = "å®é
ç»ææ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date actualStartTime; |
| | | /** |
| | | * å®é
ç»ææ¶é´ |
| | | */ |
| | | @Excel(name = "å®é
ç»ææ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "å®é
ç»ææ¶é´") |
| | | private Date actualEndTime; |
| | | /**ä¿å
»äºº*/ |
| | | @Excel(name = "ä¿å
»äºº", width = 15) |
| | | private Date actualEndTime; |
| | | /** |
| | | * ä¿å
»äºº |
| | | */ |
| | | @Excel(name = "ä¿å
»äºº", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»äºº") |
| | | private String operator; |
| | | /**ä¿å
»ç¶æ*/ |
| | | @Excel(name = "ä¿å
»ç¶æ", width = 15) |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String operator; |
| | | /** |
| | | * ä¿å
»ç¶æ |
| | | */ |
| | | @Excel(name = "ä¿å
»ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»ç¶æ") |
| | | private String maintenanceStatus; |
| | | /**å建æ¹å¼*/ |
| | | @Excel(name = "å建æ¹å¼", width = 15) |
| | | @Dict(dicCode = "third_maintenance_status") |
| | | private String maintenanceStatus; |
| | | /** |
| | | * å建æ¹å¼ |
| | | */ |
| | | @Excel(name = "å建æ¹å¼", width = 15) |
| | | @ApiModelProperty(value = "å建æ¹å¼") |
| | | private String creationMethod; |
| | | /**设å¤ç®¡çå确认*/ |
| | | @Excel(name = "设å¤ç®¡çå确认", width = 15) |
| | | @Dict(dicCode = "order_creation_method") |
| | | private String creationMethod; |
| | | /** |
| | | * 设å¤ç®¡çå确认 |
| | | */ |
| | | @Excel(name = "设å¤ç®¡çå确认", width = 15) |
| | | @ApiModelProperty(value = "设å¤ç®¡çå确认") |
| | | private String confirmUser; |
| | | /**确认æ¶é´*/ |
| | | @Excel(name = "确认æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String confirmUser; |
| | | /** |
| | | * 确认æè§ |
| | | */ |
| | | @ApiModelProperty(value = "确认æè§") |
| | | private String confirmComment; |
| | | /** |
| | | * 确认æ¶é´ |
| | | */ |
| | | @Excel(name = "确认æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "确认æ¶é´") |
| | | private Date confirmTime; |
| | | /**ç¡®è®¤ç¶æ*/ |
| | | @Excel(name = "ç¡®è®¤ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "ç¡®è®¤ç¶æ") |
| | | private String confirmStatus; |
| | | /**ç
§çæä»¶ids;id以éå·åé*/ |
| | | @Excel(name = "ç
§çæä»¶ids;id以éå·åé", width = 15) |
| | | @ApiModelProperty(value = "ç
§çæä»¶ids;id以éå·åé") |
| | | private String imageFiles; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | private Date confirmTime; |
| | | /** |
| | | * ä¿å
»ä¸ä¼ å¾ç |
| | | */ |
| | | @Excel(name = "ä¿å
»ä¸ä¼ å¾ç", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»ä¸ä¼ å¾ç") |
| | | private String imageFiles; |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | private String remark; |
| | | |
| | | //å表å±ç¤º |
| | | @TableField(exist = false) |
| | | private String equipmentCode; |
| | | @TableField(exist = false) |
| | | private String equipmentName; |
| | | } |
| | |
| | | package org.jeecg.modules.eam.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder; |
| | | |
| | | /** |
| | | * @Description: 设å¤ä¸çº§ä¿å
» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-04-29 |
| | | * @Date: 2025-04-29 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface EamThirdMaintenanceOrderMapper extends BaseMapper<EamThirdMaintenanceOrder> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param page |
| | | * @param queryWrapper |
| | | * @return |
| | | */ |
| | | IPage<EamThirdMaintenanceOrder> queryPageList(Page<EamThirdMaintenanceOrder> page, @Param(Constants.WRAPPER) QueryWrapper<EamThirdMaintenanceOrder> queryWrapper); |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.eam.mapper.EamThirdMaintenanceOrderMapper"> |
| | | |
| | | <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder"> |
| | | select wmo.*, e.equipment_code, e.equipment_name |
| | | from eam_second_maintenance_order wmo |
| | | inner join eam_equipment e |
| | | on wmo.equipment_id = e.id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class EamThirdMaintenanceQuery { |
| | | private String orderNum; |
| | | private String equipmentId; |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDateBegin; |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDateEnd; |
| | | private String maintenanceStatus; |
| | | |
| | | private String column; |
| | | private String order; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | 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.api.vo.FileUploadResult; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrderDetail; |
| | | import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="ä¸ä¿å¯¹è±¡", description="ä¸ä¿") |
| | | public class EamThirdMaintenanceRequest extends FlowTaskVo implements Serializable { |
| | | |
| | | /**主é®*/ |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å·¥åå·*/ |
| | | @ApiModelProperty(value = "å·¥åå·") |
| | | private String orderNum; |
| | | /**设å¤ID*/ |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | private String equipmentId; |
| | | /**æ åID*/ |
| | | @ApiModelProperty(value = "æ åID") |
| | | private String standardId; |
| | | /**ä¿å
»æ¥æ*/ |
| | | @ApiModelProperty(value = "ä¿å
»æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | /**ä¿å
»äºº*/ |
| | | @ApiModelProperty(value = "ä¿å
»äºº") |
| | | private String operator; |
| | | /**ä¿å
»å¾ç*/ |
| | | @ApiModelProperty(value = "ä¿å
»å¾ç") |
| | | private String imageFiles; |
| | | /**ä¿å
»å¾ç*/ |
| | | @ApiModelProperty(value = "ä¿å
»å¾ç") |
| | | private List<FileUploadResult> imageFilesResult; |
| | | /**夿³¨*/ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /**å建æ¹å¼*/ |
| | | @ApiModelProperty(value = "å建æ¹å¼") |
| | | private String creationMethod; |
| | | /**å表 ä¿å
»é¡¹æç»*/ |
| | | @ApiModelProperty(value = "å表 ä¿å
»é¡¹æç»") |
| | | private List<EamThirdMaintenanceOrderDetail> tableDetailList; |
| | | /**å é¤ ä¿å
»é¡¹æç»*/ |
| | | @ApiModelProperty(value = "å é¤ ä¿å
»é¡¹æç»") |
| | | private List<EamThirdMaintenanceOrderDetail> removeDetailList; |
| | | |
| | | //确认æä½ |
| | | /**确认æè§*/ |
| | | @ApiModelProperty(value = "确认æè§") |
| | | private String confirmComment; |
| | | @ApiModelProperty(value = "确认类å") |
| | | private String confirmDealType; |
| | | } |
| | |
| | | * @param request |
| | | * @return |
| | | */ |
| | | boolean addWeekMaintenance(EamSecondMaintenanceRequest request); |
| | | boolean addMaintenance(EamSecondMaintenanceRequest request); |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * @param request |
| | | * @return |
| | | */ |
| | | boolean editWeekMaintenance(EamSecondMaintenanceRequest request); |
| | | boolean editMaintenance(EamSecondMaintenanceRequest request); |
| | | |
| | | /** |
| | | * å·¥åé¢å |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceQuery; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceRequest; |
| | | |
| | | /** |
| | | * @Description: 设å¤ä¸çº§ä¿å
» |
| | |
| | | */ |
| | | public interface IEamThirdMaintenanceOrderService extends IService<EamThirdMaintenanceOrder> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param page |
| | | * @param query |
| | | * @return |
| | | */ |
| | | IPage<EamThirdMaintenanceOrder> queryPageList(Page<EamThirdMaintenanceOrder> page, EamThirdMaintenanceQuery query); |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param request |
| | | * @return |
| | | */ |
| | | boolean addMaintenance(EamThirdMaintenanceRequest request); |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * @param request |
| | | * @return |
| | | */ |
| | | boolean editMaintenance(EamThirdMaintenanceRequest request); |
| | | |
| | | /** |
| | | * é¢åå·¥å |
| | | * @param id |
| | | * @return |
| | | */ |
| | | boolean collect(String id); |
| | | } |
| | |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.SecondMaintenanceStatusEnum; |
| | | import org.jeecg.modules.eam.constant.WeekMaintenanceStatusEnum; |
| | | import org.jeecg.modules.eam.entity.EamEquipment; |
| | | import org.jeecg.modules.eam.entity.EamSecondMaintenanceOrder; |
| | | import org.jeecg.modules.eam.entity.EamSecondMaintenanceOrderDetail; |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean addWeekMaintenance(EamSecondMaintenanceRequest request) { |
| | | public boolean addMaintenance(EamSecondMaintenanceRequest request) { |
| | | EamEquipment equipment = eamEquipmentService.getById(request.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设å¤ä¸åå¨ï¼æ·»å 失败ï¼"); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean editWeekMaintenance(EamSecondMaintenanceRequest request) { |
| | | public boolean editMaintenance(EamSecondMaintenanceRequest request) { |
| | | EamEquipment equipment = eamEquipmentService.getById(request.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设å¤ä¸åå¨ï¼æ·»å 失败ï¼"); |
| | |
| | | if (entity == null) { |
| | | throw new JeecgBootException("ç¼è¾çæ°æ®å·²å é¤ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!WeekMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | if (!SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | throw new JeecgBootException("åªæå¾
ä¿å
»ç¶æçæ°æ®æå¯ç¼è¾ï¼"); |
| | | } |
| | | entity.setMaintenanceDate(request.getMaintenanceDate()); |
| | |
| | | throw new JeecgBootException("䏿¯æä½å·¥ï¼æ æ³é¢åæ¤å·¥åï¼"); |
| | | } |
| | | entity.setOperator(sysUser.getUsername()); |
| | | entity.setMaintenanceStatus(WeekMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); |
| | | entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); |
| | | entity.setActualStartTime(new Date()); |
| | | eamSecondMaintenanceOrderMapper.updateById(entity); |
| | | |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder; |
| | | import org.jeecg.modules.eam.mapper.EamThirdMaintenanceOrderMapper; |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceOrderService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.flowable.engine.TaskService; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.constant.DataBaseConstant; |
| | | 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.SecondMaintenanceStatusEnum; |
| | | import org.jeecg.modules.eam.constant.ThirdMaintenanceStatusEnum; |
| | | import org.jeecg.modules.eam.entity.EamEquipment; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrderDetail; |
| | | import org.jeecg.modules.eam.mapper.EamThirdMaintenanceOrderMapper; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceQuery; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceRequest; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCommonService; |
| | | import org.jeecg.modules.flowable.service.IFlowDefinitionService; |
| | | import org.jeecg.modules.flowable.service.IFlowTaskService; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description: 设å¤ä¸çº§ä¿å
» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-04-29 |
| | | * @Date: 2025-04-29 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class EamThirdMaintenanceOrderServiceImpl extends ServiceImpl<EamThirdMaintenanceOrderMapper, EamThirdMaintenanceOrder> implements IEamThirdMaintenanceOrderService { |
| | | @Resource |
| | | private EamThirdMaintenanceOrderMapper eamThirdMaintenanceOrderMapper; |
| | | @Autowired |
| | | private IEamThirdMaintenanceOrderDetailService thirdMaintenanceOrderDetailService; |
| | | @Autowired |
| | | private FlowCommonService flowCommonService; |
| | | @Autowired |
| | | private IFlowDefinitionService flowDefinitionService; |
| | | @Autowired |
| | | private IFlowMyBusinessService flowMyBusinessService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private IFlowTaskService flowTaskService; |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | @Autowired |
| | | private IEamEquipmentService eamEquipmentService; |
| | | @Autowired |
| | | private IEamReportRepairService eamReportRepairService; |
| | | @Autowired |
| | | private IEamEquipmentExtendService eamEquipmentExtendService; |
| | | |
| | | @Override |
| | | public IPage<EamThirdMaintenanceOrder> queryPageList(Page<EamThirdMaintenanceOrder> page, EamThirdMaintenanceQuery query) { |
| | | QueryWrapper<EamThirdMaintenanceOrder> queryWrapper = new QueryWrapper<>(); |
| | | //ç¨æ·æ°æ®æé |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (sysUser == null) { |
| | | return page; |
| | | } |
| | | if (StringUtils.isNotBlank(sysUser.getEquipmentIds())) { |
| | | //éæ©äºè®¾å¤ï¼æ ¹æ®è®¾å¤idè¿æ»¤è®¾å¤ |
| | | List<String> equipArr = Arrays.asList(sysUser.getEquipmentIds().split(",")); |
| | | queryWrapper.in("e.equipment_code", equipArr); |
| | | } else { |
| | | //没æéæ©è®¾å¤ï¼æ ¹æ®è½¦é´è¿æ»¤è®¾å¤ |
| | | queryWrapper.exists("select 1 from mdc_user_production t where t.user_id={0} and t.pro_id=e.org_id ", sysUser.getId()); |
| | | } |
| | | //æ¥è¯¢æ¡ä»¶è¿æ»¤ |
| | | if (query != null) { |
| | | if (StringUtils.isNotBlank(query.getEquipmentId())) { |
| | | queryWrapper.eq("wmo.equipment_id", query.getEquipmentId()); |
| | | } |
| | | if (StringUtils.isNotBlank(query.getOrderNum())) { |
| | | queryWrapper.like("wmo.order_num", query.getOrderNum()); |
| | | } |
| | | if (StringUtils.isNotBlank(query.getMaintenanceStatus())) { |
| | | queryWrapper.eq("wmo.maintenance_status", query.getMaintenanceStatus()); |
| | | } |
| | | if (query.getMaintenanceDateBegin() != null && query.getMaintenanceDateEnd() != null) { |
| | | queryWrapper.between("wmo.maintenance_date", query.getMaintenanceDateBegin(), query.getMaintenanceDateEnd()); |
| | | } |
| | | //æåº |
| | | if (StringUtils.isNotBlank(query.getColumn()) && StringUtils.isNotBlank(query.getOrder())) { |
| | | String column = query.getColumn(); |
| | | if (column.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) { |
| | | column = column.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX)); |
| | | } |
| | | if (DataBaseConstant.SQL_ASC.equalsIgnoreCase(query.getOrder())) { |
| | | queryWrapper.orderByAsc("wmo." + oConvertUtils.camelToUnderline(column)); |
| | | } else { |
| | | queryWrapper.orderByDesc("wmo." + oConvertUtils.camelToUnderline(column)); |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc("wmo.create_time"); |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc("wmo.create_time"); |
| | | } |
| | | |
| | | return eamThirdMaintenanceOrderMapper.queryPageList(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean addMaintenance(EamThirdMaintenanceRequest request) { |
| | | EamEquipment equipment = eamEquipmentService.getById(request.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设å¤ä¸åå¨ï¼æ·»å 失败ï¼"); |
| | | } |
| | | EamThirdMaintenanceOrder order = new EamThirdMaintenanceOrder(); |
| | | order.setOrderNum(request.getOrderNum()); |
| | | order.setEquipmentId(request.getEquipmentId()); |
| | | order.setStandardId(request.getStandardId()); |
| | | order.setMaintenanceDate(request.getMaintenanceDate()); |
| | | order.setOperator(request.getOperator()); |
| | | order.setRemark(request.getRemark()); |
| | | //ç¶æåå§å |
| | | order.setMaintenanceStatus(ThirdMaintenanceStatusEnum.WAIT_MAINTENANCE.name()); |
| | | order.setCreationMethod(request.getCreationMethod()); |
| | | //å 餿 è®° |
| | | order.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | eamThirdMaintenanceOrderMapper.insert(order); |
| | | //å¤çæç»æ°æ® |
| | | if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { |
| | | request.getTableDetailList().forEach(tableDetail -> { |
| | | tableDetail.setId(null); |
| | | tableDetail.setOrderId(order.getId()); |
| | | }); |
| | | thirdMaintenanceOrderDetailService.saveBatch(request.getTableDetailList()); |
| | | } |
| | | //夿æ¯å¦åå¨ä¿å
»äºº 妿åå¨åå¯å¨æµç¨ |
| | | if (StringUtils.isNotBlank(order.getOperator())) { |
| | | //å¯å¨æµç¨ TODO |
| | | // flowCommonService.initActBusiness("å·¥åå·:" + order.getOrderNum() + ";设å¤ç¼å·: " + equipment.getEquipmentCode() + ";è¿è¡è®¾å¤äºä¿", |
| | | // order.getId(), "IEamWeekMaintenanceOrderService", "week_maintenance_process", null); |
| | | // Map<String, Object> variables = new HashMap<>(); |
| | | // variables.put("dataId", order.getId()); |
| | | // if (StrUtil.isEmpty(order.getRemark())) { |
| | | // variables.put("organization", "æ°å¢å¨ä¿å·¥åé»è®¤å¯å¨æµç¨"); |
| | | // variables.put("comment", "æ°å¢å¨ä¿å·¥åé»è®¤å¯å¨æµç¨"); |
| | | // } else { |
| | | // variables.put("organization", order.getRemark()); |
| | | // variables.put("comment", order.getRemark()); |
| | | // } |
| | | // variables.put("proofreading", true); |
| | | // List<String> usernames = new ArrayList<>(); |
| | | // usernames.add(order.getOperator()); |
| | | // variables.put("NextAssignee", usernames); |
| | | // Result result = flowDefinitionService.startProcessInstanceByKey("week_maintenance_process", variables); |
| | | // if (result != null) { |
| | | // //æ´æ°å¨ä¿ç¶æ |
| | | // order.setMaintenanceStatus(WeekMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); |
| | | // order.setActualStartTime(new Date()); |
| | | // eamWeekMaintenanceOrderMapper.updateById(order); |
| | | // //æ´æ°è®¾å¤ä¿å
»ç¶æ |
| | | // eamEquipmentExtendService.updateEquipmentMaintenanceStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_MAINTENANCE.name()); |
| | | // return result.isSuccess(); |
| | | // } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean editMaintenance(EamThirdMaintenanceRequest request) { |
| | | EamEquipment equipment = eamEquipmentService.getById(request.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设å¤ä¸åå¨ï¼æ·»å 失败ï¼"); |
| | | } |
| | | EamThirdMaintenanceOrder entity = eamThirdMaintenanceOrderMapper.selectById(request.getId()); |
| | | if (entity == null) { |
| | | throw new JeecgBootException("ç¼è¾çæ°æ®å·²å é¤ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!ThirdMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | throw new JeecgBootException("åªæå¾
ä¿å
»ç¶æçæ°æ®æå¯ç¼è¾ï¼"); |
| | | } |
| | | entity.setMaintenanceDate(request.getMaintenanceDate()); |
| | | entity.setOperator(request.getOperator()); |
| | | entity.setRemark(request.getRemark()); |
| | | |
| | | eamThirdMaintenanceOrderMapper.updateById(entity); |
| | | //å¤ç详æ
|
| | | if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { |
| | | List<EamThirdMaintenanceOrderDetail> addList = new ArrayList<>(); |
| | | List<EamThirdMaintenanceOrderDetail> updateList = new ArrayList<>(); |
| | | request.getTableDetailList().forEach(tableDetail -> { |
| | | tableDetail.setOrderId(entity.getId()); |
| | | if (tableDetail.getId() == null) { |
| | | addList.add(tableDetail); |
| | | } else { |
| | | updateList.add(tableDetail); |
| | | } |
| | | }); |
| | | if (CollectionUtil.isNotEmpty(addList)) { |
| | | thirdMaintenanceOrderDetailService.saveBatch(addList); |
| | | } |
| | | if (CollectionUtil.isNotEmpty(updateList)) { |
| | | thirdMaintenanceOrderDetailService.updateBatchById(updateList); |
| | | } |
| | | } |
| | | if (CollectionUtil.isNotEmpty(request.getRemoveDetailList())) { |
| | | List<String> ids = request.getRemoveDetailList().stream().map(EamThirdMaintenanceOrderDetail::getId).collect(Collectors.toList()); |
| | | thirdMaintenanceOrderDetailService.removeBatchByIds(ids); |
| | | } |
| | | //夿æ¯å¦åå¨ä¿å
»äºº 妿åå¨åå¯å¨æµç¨ |
| | | if (StringUtils.isNotBlank(entity.getOperator())) { |
| | | //å¯å¨æµç¨ TODO |
| | | // flowCommonService.initActBusiness("å·¥åå·:" + entity.getOrderNum() + ";设å¤ç¼å·: " + equipment.getEquipmentCode() + ";è¿è¡è®¾å¤å¨ä¿", |
| | | // entity.getId(), "IEamWeekMaintenanceOrderService", "week_maintenance_process", null); |
| | | // Map<String, Object> variables = new HashMap<>(); |
| | | // variables.put("dataId", entity.getId()); |
| | | // if (StrUtil.isEmpty(entity.getRemark())) { |
| | | // variables.put("organization", "æ°å¢å¨ä¿å·¥åé»è®¤å¯å¨æµç¨"); |
| | | // variables.put("comment", "æ°å¢å¨ä¿å·¥åé»è®¤å¯å¨æµç¨"); |
| | | // } else { |
| | | // variables.put("organization", entity.getRemark()); |
| | | // variables.put("comment", entity.getRemark()); |
| | | // } |
| | | // variables.put("proofreading", true); |
| | | // List<String> usernames = new ArrayList<>(); |
| | | // usernames.add(entity.getOperator()); |
| | | // variables.put("NextAssignee", usernames); |
| | | // Result result = flowDefinitionService.startProcessInstanceByKey("week_maintenance_process", variables); |
| | | // if (result != null) { |
| | | // //æ´æ°å¨ä¿ç¶æ |
| | | // entity.setMaintenanceStatus(WeekMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); |
| | | // entity.setActualStartTime(new Date()); |
| | | // eamWeekMaintenanceOrderMapper.updateById(entity); |
| | | // //æ´æ°è®¾å¤ä¿å
»ç¶æ |
| | | // eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_MAINTENANCE.name()); |
| | | // return result.isSuccess(); |
| | | // } |
| | | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean collect(String id) { |
| | | EamThirdMaintenanceOrder entity = eamThirdMaintenanceOrderMapper.selectById(id); |
| | | if (entity == null) { |
| | | throw new JeecgBootException("è¦é¢åçå·¥åä¸åå¨ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | throw new JeecgBootException("该工åå·²è¿è¡è¿é¢åï¼"); |
| | | } |
| | | EamEquipment equipment = eamEquipmentService.getById(entity.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设å¤ä¸åå¨ï¼æ·»å 失败ï¼"); |
| | | } |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if(sysUser == null || !BusinessCodeConst.PCR0001.equals(sysUser.getPost())) { |
| | | throw new JeecgBootException("䏿¯æä½å·¥ï¼æ æ³é¢åæ¤å·¥åï¼"); |
| | | } |
| | | entity.setOperator(sysUser.getUsername()); |
| | | entity.setMaintenanceStatus(ThirdMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); |
| | | entity.setActualStartTime(new Date()); |
| | | eamThirdMaintenanceOrderMapper.updateById(entity); |
| | | |
| | | // //å¯å¨æµç¨ |
| | | // flowCommonService.initActBusiness("å·¥åå·:" + entity.getOrderNum() + ";设å¤ç¼å·: " + equipment.getEquipmentCode() + ";è¿è¡è®¾å¤å¨ä¿", |
| | | // entity.getId(), "IEamWeekMaintenanceOrderService", "week_maintenance_process", null); |
| | | // Map<String, Object> variables = new HashMap<>(); |
| | | // variables.put("dataId", entity.getId()); |
| | | // if (StrUtil.isEmpty(entity.getRemark())) { |
| | | // variables.put("organization", "æ°å¢å¨ä¿å·¥åé»è®¤å¯å¨æµç¨"); |
| | | // variables.put("comment", "æ°å¢å¨ä¿å·¥åé»è®¤å¯å¨æµç¨"); |
| | | // } else { |
| | | // variables.put("organization", entity.getRemark()); |
| | | // variables.put("comment", entity.getRemark()); |
| | | // } |
| | | // variables.put("proofreading", true); |
| | | // List<String> usernames = new ArrayList<>(); |
| | | // usernames.add(entity.getOperator()); |
| | | // variables.put("NextAssignee", usernames); |
| | | // Result result = flowDefinitionService.startProcessInstanceByKey("week_maintenance_process", variables); |
| | | // if (result != null) { |
| | | // //æ´æ°è®¾å¤ä¿å
»ç¶æ |
| | | // eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_MAINTENANCE.name()); |
| | | // return result.isSuccess(); |
| | | // } |
| | | return true; |
| | | } |
| | | } |