From 8452e5b19e09574aad99df9bd91ad819a3f9d6ff Mon Sep 17 00:00:00 2001 From: A0010407 Date: Mon, 11 Dec 2023 10:54:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=BB=BC=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/EquCheckItemController.java | 30 ++ .../device/domain/dto/SummaryReportDTO.java | 477 ++++++++++++++++++ .../op/device/mapper/EquCheckItemMapper.java | 22 + .../device/service/IEquCheckItemService.java | 24 +- .../service/impl/DevicePDAServiceImpl.java | 3 + .../service/impl/EquCheckItemServiceImpl.java | 50 +- .../mapper/device/EquCheckItemMapper.xml | 45 ++ 7 files changed, 643 insertions(+), 8 deletions(-) create mode 100644 op-modules/op-device/src/main/java/com/op/device/domain/dto/SummaryReportDTO.java diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquCheckItemController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquCheckItemController.java index bce69c032..fbb07ad1f 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/EquCheckItemController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquCheckItemController.java @@ -3,7 +3,10 @@ package com.op.device.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.op.device.domain.EquRepairOrder; +import com.op.device.domain.WorkCenter; import com.op.device.domain.dto.EquCheckItemDTO; +import com.op.device.domain.dto.SummaryReportDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -118,4 +121,31 @@ public class EquCheckItemController extends BaseController { public AjaxResult remove(@PathVariable String[] itemIds) { return equCheckItemService.deleteEquCheckItemByItemIds(itemIds); } + + //检查标准汇总 点检、巡检、保养 + @RequiresPermissions("device:item:summaryReport") + @GetMapping("/summaryReport") + public AjaxResult getSummaryReport(EquCheckItem equCheckItem) { + return equCheckItemService.getSummaryReport(equCheckItem); + } + + /** + * 获取工作中心 + * + * @return + */ + @GetMapping("/getWorkCenter") + public AjaxResult getWorkCenter() { + return equCheckItemService.getWorkCenter(); + } + + + /** + * 点检、巡检、保养计划工单匹配检查项 + * @return + */ + @GetMapping("/matchList") + public AjaxResult selectMatchListByEquipmentCode(SummaryReportDTO summaryReportDTO) { + return equCheckItemService.selectMatchListByEquipmentCode(summaryReportDTO); + } } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/dto/SummaryReportDTO.java b/op-modules/op-device/src/main/java/com/op/device/domain/dto/SummaryReportDTO.java new file mode 100644 index 000000000..26e486e2f --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/domain/dto/SummaryReportDTO.java @@ -0,0 +1,477 @@ +package com.op.device.domain.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.op.common.core.annotation.Excel; +import com.op.device.domain.EquCheckItemDetail; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +// 检查项维护页面DTO +public class SummaryReportDTO { + /** 主键 */ + private String itemId ; + /** 检查项编码 */ + private String itemCode ; + /** 检查项名称 */ + private String itemName ; + /** 检查项方法/工具 */ + private String itemMethod ; + /** 维护类型编码 */ + private String itemType ; + /** 维护类型名称 */ + private String itemTypeName ; + /** 检查项备注 */ + private String itemRemark ; + // 检查工具 + private String itemTools; + //标准类型 + private String standardType; + //标准名称 + private String standardName; + // 循环周期类型 + private String itemLoopType; + // 循环周期 + private int itemLoop; + /** 主键 */ + private String orderId; + //设备 + private String equipmentCode; + /** 维修前达标 */ + private String detailReach; + //维修后是否达标 + private String repairReach; + /** 主键 */ + private String detailId ; + /** 主键 */ + private String id ; + + //1号 + private String one ; + //2号 + private String two ; + //3号 + private String three ; + //4号 + private String four ; + //5号 + private String five ; + //6号 + private String six ; + //7号 + private String seven ; + //8号 + private String eight ; + //9号 + private String nine ; + //10号 + private String ten ; + //11号 + private String eleven ; + //12号 + private String twelve ; + //13号 + private String thirteen ; + //14号 + private String fourteen; + //15号 + private String fifteen; + //16号 + private String sixteen; + //17号 + private String seventeen; + //18号 + private String eighteen; + //19号 + private String nineteen; + //20号 + private String twenty; + //21号 + private String twentyOne; + //22号 + private String twentyTwo; + //23号 + private String twentyThree; + //24号 + private String twentyFour; + //25号 + private String twentyFive; + //26号 + private String twentySix; + //27号 + private String twentySeven; + //28号 + private String twentyEight; + //29号 + private String twentyNine; + //30号 + private String thirty; + //31号 + private String thirtyOne; + + /** 实际结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date orderEnd; + + /** 时间 */ + private String yearMouth; + + public void setId(String id) { + this.id = id; + } + public String getId() { + return id; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + public String getOrderId() { + return orderId; + } + + public String getItemTools() { + return itemTools; + } + public void setItemTools(String itemTools) { + this.itemTools = itemTools; + } + + public String getItemId() { + return itemId; + } + public void setItemId(String itemId) { + this.itemId = itemId; + } + + public String getItemCode() { + return itemCode; + } + public void setItemCode(String itemCode) { + this.itemCode = itemCode; + } + + public String getItemName() { + return itemName; + } + public void setItemName(String itemName) { + this.itemName = itemName; + } + + public String getItemMethod() { + return itemMethod; + } + public void setItemMethod(String itemMethod) { + this.itemMethod = itemMethod; + } + + public String getItemType() { + return itemType; + } + public void setItemType(String itemType) { + this.itemType = itemType; + } + + public String getItemTypeName() { + return itemTypeName; + } + public void setItemTypeName(String itemTypeName) { + this.itemTypeName = itemTypeName; + } + + public String getItemRemark() { + return itemRemark; + } + public void setItemRemark(String itemRemark) { + this.itemRemark = itemRemark; + } + + public String getStandardType() { + return standardType; + } + public void setStandardType(String standardType) { + this.standardType = standardType; + } + + public String getStandardName() { + return standardName; + } + public void setStandardName(String standardName) { + this.standardName = standardName; + } + + public int getItemLoop() { + return itemLoop; + } + public void setItemLoop(int itemLoop) { + this.itemLoop = itemLoop; + } + + public String getItemLoopType() { + return itemLoopType; + } + public void setItemLoopType(String itemLoopType) { + this.itemLoopType = itemLoopType; + } + + public void setEquipmentCode(String equipmentCode) { + this.equipmentCode = equipmentCode; + } + public String getEquipmentCode() { + return equipmentCode; + } + + public void setDetailId(String detailId) { + this.detailId = detailId; + } + public String getDetailId() { + return detailId; + } + + public String getRepairReach() { + return repairReach; + } + public void setRepairReach(String repairReach) { + this.repairReach = repairReach; + } + + public String getDetailReach() { + return detailReach; + } + public void setDetailReach(String detailReach) { + this.detailReach = detailReach; + } + + public void setOrderEnd(Date orderEnd) { + this.orderEnd = orderEnd; + } + public Date getOrderEnd() { + return orderEnd; + } + + public void setYearMouth(String yearMouth) { + this.yearMouth = yearMouth; + } + public String getYearMouth() { + return yearMouth; + } + + public void setOne(String one) { + this.one = one; + } + public String getOne() { + return one; + } + + public void setTwo(String two) { + this.two = two; + } + public String getTwo() { + return two; + } + + public void setThree(String three) { + this.three = three; + } + public String getThree() { + return three; + } + + public void setFour(String four) { + this.four = four; + } + public String getFour() { + return four; + } + + public void setFive(String five) { + this.five = five; + } + public String getFive() { + return five; + } + + public void setSix(String six) { + this.six = six; + } + public String getSix() { + return six; + } + + public void setSeven(String seven) { + this.seven = seven; + } + public String getSeven() { + return seven; + } + + public void setEight(String eight) { + this.eight = eight; + } + public String getEight() { + return eight; + } + + public void setNine(String nine) { + this.nine = nine; + } + public String getNine() { + return nine; + } + + public void setTen(String ten) { + this.ten = ten; + } + public String getTen() { + return ten; + } + + public void setEleven(String eleven) { + this.eleven = eleven; + } + public String getEleven() { + return eleven; + } + + public void setTwelve(String twelve) { + this.twelve = twelve; + } + public String getTwelve() { + return twelve; + } + + public void setThirteen(String thirteen) { + this.thirteen = thirteen; + } + public String getThirteen() { + return thirteen; + } + + public void setFourteen(String fourteen) { + this.fourteen = fourteen; + } + public String getFourteen() { + return fourteen; + } + + public void setFifteen(String fifteen) { + this.fifteen = fifteen; + } + public String getFifteen() { + return fifteen; + } + + public void setSixteen(String sixteen) { + this.sixteen = sixteen; + } + public String getSixteen() { + return sixteen; + } + + public void setSeventeen(String seventeen) { + this.seventeen = seventeen; + } + public String getSeventeen() { + return seventeen; + } + + public void setEighteen(String eighteen) { + this.eighteen = eighteen; + } + public String getEighteen() { + return eighteen; + } + + public void setNineteen(String nineteen) { + this.nineteen = nineteen; + } + public String getNineteen() { + return nineteen; + } + + public void setTwenty(String twenty) { + this.twenty = twenty; + } + public String getTwenty() { + return twenty; + } + + public void setTwentyOne(String twentyOne) { + this.twentyOne = twentyOne; + } + public String getTwentyOne() { + return twentyOne; + } + + public void setTwentyTwo(String twentyTwo) { + this.twentyTwo = twentyTwo; + } + public String getTwentyTwo() { + return twentyTwo; + } + + public void setTwentyThree(String twentyThree) { + this.twentyThree = twentyThree; + } + public String getTwentyThree() { + return twentyThree; + } + + public void setTwentyFour(String twentyFour) { + this.twentyFour = twentyFour; + } + public String getTwentyFour() { + return twentyFour; + } + + public void setTwentyFive(String twentyFive) { + this.twentyFive = twentyFive; + } + public String getTwentyFive() { + return twentyFive; + } + + public void setTwentySix(String twentySix) { + this.twentySix = twentySix; + } + public String getTwentySix() { + return twentySix; + } + + public void setTwentySeven(String twentySeven) { + this.twentySeven = twentySeven; + } + public String getTwentySeven() { + return twentySeven; + } + + public void setTwentyEight(String twentyEight) { + this.twentyEight = twentyEight; + } + public String getTwentyEight() { + return twentyEight; + } + + public void setTwentyNine(String twentyNine) { + this.twentyNine = twentyNine; + } + public String getTwentyNine() { + return twentyNine; + } + + public void setThirty(String thirty) { + this.thirty = thirty; + } + public String getThirty() { + return thirty; + } + + public void setThirtyOne(String thirtyOne) { + this.thirtyOne = thirtyOne; + } + public String getThirtyOne() { + return thirtyOne; + } + +} diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemMapper.java index 2790b7cab..0e2a72971 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemMapper.java @@ -4,6 +4,8 @@ import java.util.List; import com.op.device.domain.EquCheckItem; import com.op.device.domain.EquPlanDetail; +import com.op.device.domain.WorkCenter; +import com.op.device.domain.dto.SummaryReportDTO; import com.op.device.domain.vo.EquCheckItemVO; import org.apache.ibatis.annotations.Param; @@ -94,4 +96,24 @@ public interface EquCheckItemMapper { * @return */ List checkDelItem(String itemCode); + + ////////////////////////////////////////////////汇总页面 + /** + * 检查标准汇总 点检、巡检、保养 + * @param equCheckItem + * @return + */ + List getSummaryReport(EquCheckItem equCheckItem); + + /** + * 工作中心 + * @return + */ + List selectWorkCenter(); + + /** + * 点检、巡检、保养计划工单匹配检查项 + * @return + */ + List selectMatchListByEquipmentCode(SummaryReportDTO summaryReportDTO); } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/IEquCheckItemService.java b/op-modules/op-device/src/main/java/com/op/device/service/IEquCheckItemService.java index b3df82679..1067bd780 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/IEquCheckItemService.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/IEquCheckItemService.java @@ -4,7 +4,9 @@ import java.util.List; import com.op.common.core.web.domain.AjaxResult; import com.op.device.domain.EquCheckItem; +import com.op.device.domain.EquRepairOrder; import com.op.device.domain.dto.EquCheckItemDTO; +import com.op.device.domain.dto.SummaryReportDTO; import com.op.device.domain.vo.EquCheckItemVO; /** @@ -66,11 +68,29 @@ public interface IEquCheckItemService { * 获取全部设备list信息 * @return */ - AjaxResult getEquipmentList(); + public AjaxResult getEquipmentList(); /** * 通过检查项code查询关联设备code列表 * @return */ - AjaxResult getEquipmentCodeListByItemCode(String itemCode); + public AjaxResult getEquipmentCodeListByItemCode(String itemCode); + + /** + * 检查标准汇总 点检、巡检、保养 + * @return + */ + public AjaxResult getSummaryReport(EquCheckItem equCheckItem); + + /** + * 获取工作中心 + * @return + */ + public AjaxResult getWorkCenter(); + + /** + * 点检、巡检、保养计划工单匹配检查项 + * @return + */ + public AjaxResult selectMatchListByEquipmentCode(SummaryReportDTO summaryReportDTO); } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java index 77e4a4af4..6efcb059f 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java @@ -693,6 +693,9 @@ public class DevicePDAServiceImpl implements IDevicePDAService { //维修工单结束时间 equRepairWorkOrder.setWorkEndTime(DateUtils.getNowDate()); + //计算维修工单用时 + //获取工单的开始时间 + ////更新每一项点检/巡检检查项信息 //判空 if(StringUtils.isNotEmpty(equRepairWorkOrder.getDetailList())){ diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquCheckItemServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquCheckItemServiceImpl.java index 4d2e6c046..af72ccf5d 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquCheckItemServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquCheckItemServiceImpl.java @@ -1,7 +1,9 @@ package com.op.device.service.impl; +import java.text.DateFormat; import java.text.Format; import java.text.SimpleDateFormat; +import java.util.Date; import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; @@ -9,10 +11,9 @@ import com.op.common.core.context.SecurityContextHolder; import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.uuid.IdUtils; import com.op.common.core.web.domain.AjaxResult; -import com.op.device.domain.EquCheckItemDetail; -import com.op.device.domain.EquItemEquipment; -import com.op.device.domain.EquPlanDetail; +import com.op.device.domain.*; import com.op.device.domain.dto.EquCheckItemDTO; +import com.op.device.domain.dto.SummaryReportDTO; import com.op.device.domain.vo.EquCheckItemVO; import com.op.device.mapper.EquCheckItemDetailMapper; import com.op.device.mapper.EquItemEquipmentMapper; @@ -160,14 +161,14 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService { @Transactional public AjaxResult updateEquCheckItem(EquCheckItemDTO equCheckItemDTO) { - // 校验检查项是否已存在 + // 检验 EquCheckItem checkQuery = new EquCheckItem(); checkQuery.setItemType(equCheckItemDTO.getItemType()); checkQuery.setItemName(equCheckItemDTO.getItemName()); List check = equCheckItemMapper.selectEquCheckItemList(checkQuery); - if (check.size() > 0) { + if (check.size()>0) { if (!check.get(0).getItemCode().equals(equCheckItemDTO.getItemCode())) { - return error(500, "检查项已存在!不可修改!"); + return error(500,"检查项已存在!不可修改!"); } } @@ -329,4 +330,41 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService { equItemEquipmentMapper.insertEquItemEquipment(equItemEquipment); } } + + /** + * 检查标准汇总 点检、巡检、保养 + * @return + */ + @Override + @DS("#header.poolName") + public AjaxResult getSummaryReport(EquCheckItem equCheckItem){ + List summaryReportList = equCheckItemMapper.getSummaryReport(equCheckItem); + return success(summaryReportList); + } + + /** + * 获取工作中心 + * + * @return + */ + @Override + @DS("#header.poolName") + public AjaxResult getWorkCenter() { + List workCenterList = equCheckItemMapper.selectWorkCenter(); + return success(workCenterList); + } + + + /** + * 点检、巡检、保养计划工单匹配检查项 + * @return + */ + @Override + @DS("#header.poolName") + public AjaxResult selectMatchListByEquipmentCode(SummaryReportDTO summaryReportDTO){ + DateFormat df = new SimpleDateFormat("yyyy-MM"); + summaryReportDTO.setYearMouth(df.format(summaryReportDTO.getOrderEnd())); + List matchList = equCheckItemMapper.selectMatchListByEquipmentCode(summaryReportDTO); + return success(matchList); + } } diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml index 15da54108..ea4a816c5 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml @@ -168,4 +168,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{itemId} + + + + + + + \ No newline at end of file