diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquOrderStandard.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquOrderStandard.java index e6821ea2..a974f580 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquOrderStandard.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquOrderStandard.java @@ -100,6 +100,16 @@ public class EquOrderStandard extends BaseEntity { private String repairPicture; + private List checkPictrueList; + + public List getCheckPictrueList() { + return checkPictrueList; + } + + public void setCheckPictrueList(List checkPictrueList) { + this.checkPictrueList = checkPictrueList; + } + public List getPicturePaths() { return picturePaths; } diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquFileMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquFileMapper.java index 7b6d3fde..ac521b1a 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/EquFileMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquFileMapper.java @@ -74,4 +74,11 @@ public interface EquFileMapper { //删除照图片 public void deleteEquFileBySourceId(String orderId); + + /** + * 获取图片 + * @param selectTemp + * @return + */ + List selectUrlList(BaseFileData selectTemp); } diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java index 35a8bda8..6e5f38d5 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java @@ -104,5 +104,6 @@ public interface EquRepairOrderMapper { public List getBaseFileBatch(String orderId); //联系方式 + @DS("master") EquTeamUser getRepairPhoneNumber(EquTeamUser equTeamUser); } 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 c6655dcd..98e3c887 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 @@ -119,6 +119,16 @@ public class DevicePDAServiceImpl implements IDevicePDAService { List detailList = equOrderDetailMapper.selectEquOrderDetailByOrderCode(order.getOrderCode()); for (EquOrderDetail detail : detailList) { List standardList = equOrderStandardMapper.selectEquOrderStandardByParentCode(detail.getId()); + for (EquOrderStandard standard : standardList) { + // 未达标图片 + BaseFileData selectTemp = new BaseFileData(); + selectTemp.setSourceId(standard.getId()); + selectTemp.setImageType("3"); + List checkPictrueList = equFileMapper.selectUrlList(selectTemp); + if (checkPictrueList != null) { + standard.setCheckPictrueList(checkPictrueList); + } + } detail.setStandardList(standardList); } order.setDetailList(detailList); @@ -170,8 +180,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService { boolean hasError = false; - EquOrderEqu equ = equOrder.getEqu(); - List detailList = equ.getDetailList(); + List detailList = equOrder.getDetailList(); for (EquOrderDetail detail : detailList) { List standardList = detail.getStandardList(); for (EquOrderStandard standard : standardList) { @@ -200,18 +209,15 @@ public class DevicePDAServiceImpl implements IDevicePDAService { int up = standard.getActualValue().compareTo(standard.getDetailUpLimit()); int down = standard.getActualValue().compareTo(standard.getDetailDownLimit()); standard.setDetailReach("1"); - standard.setErrorFlag("0"); if (!(up != 1 && down != -1)) { hasError = true; - standard.setErrorFlag("1"); standard.setDetailReach("0"); } }else { - // TODO 未达标 + // 未达标 standard.setErrorFlag("0"); if (standard.getDetailReach().equals("0")) { hasError = true; - standard.setErrorFlag("1"); } } @@ -247,7 +253,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService { // 获取故障报修流水号 EquRepairOrder equRepairOrder = new EquRepairOrder(); String serialNum = String.format("%03d", equRepairOrderMapper.selectOrderCodeSerialNumber()); - String equipmentCode = equOrder.getEqu().getEquipmentCode(); + String equipmentCode = equOrder.getEquipmentCode(); //报修单号 equRepairOrder.setOrderCode("BX"+DateUtils.dateTimeNow(DateUtils.YYYYMMDD) + equipmentCode + serialNum); //在主表中存入报修单号信息 @@ -285,7 +291,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService { } if (!hasError) { - // TODO 删除报修单 + // 删除报修单 if (equOrder.getRepairCode() != null) { if (!equOrder.getRepairCode().isEmpty()) { equRepairOrderMapper.deleteEquRepairOrderByRepairCode(equOrder.getRepairCode()); @@ -398,6 +404,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService { * @return */ @Override + @DS("#header.poolName") public AjaxResult startMaintenanceTask(PDADTO pdadto) { EquOrder order = equOrderMapper.selectEquOrderByOrderCode(pdadto.getOrderCode()); // 改为进行中 diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepOrderServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepOrderServiceImpl.java index 955e48d5..23a3a7f5 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepOrderServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepOrderServiceImpl.java @@ -106,6 +106,7 @@ public class EquUpkeepOrderServiceImpl implements IEquUpkeepOrderService { equOrder.setUpdateBy(SecurityContextHolder.getUserName()); equOrder.setUpdateTime(DateUtils.getNowDate()); equOrder.setPlanType("maintenance"); + equOrder.setUpkeep("0"); equOrder.setEquipmentCode(equPlan.getEquipmentItem().get(0).getEquipmentCode()); // 工单插入数据库 equOrderMapper.insertEquOrder(equOrder); @@ -137,7 +138,7 @@ public class EquUpkeepOrderServiceImpl implements IEquUpkeepOrderService { // 插入备件信息 equSpareApplyMapper.insertEquSpareApply(apply); - // TODO 减少备件仓库中备件数量 + // 减少备件仓库中备件数量 sparePartsLedgerMapper.updateSpareNumReduce(apply); } } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/InspectionWorkServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/InspectionWorkServiceImpl.java index 5b5336e9..aa85dd7d 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/InspectionWorkServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/InspectionWorkServiceImpl.java @@ -1,6 +1,7 @@ package com.op.device.service.impl; import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.domain.BaseFileData; import com.op.common.core.web.domain.AjaxResult; import com.op.device.domain.*; import com.op.device.domain.vo.InspectionWorkVO; @@ -37,6 +38,8 @@ public class InspectionWorkServiceImpl implements IInspectionWorkService { private EquOrderEquSpareMapper equOrderEquSpareMapper; @Autowired private EquSpareApplyMapper equSpareApplyMapper; + @Autowired + private EquFileMapper equFileMapper; /** * 查询巡检记录 @@ -82,6 +85,15 @@ public class InspectionWorkServiceImpl implements IInspectionWorkService { standard.setDetailReach("达标"); } } + // 未达标图片 + BaseFileData selectTemp = new BaseFileData(); + selectTemp.setSourceId(standard.getId()); + selectTemp.setImageType("3"); + List checkPictrueList = equFileMapper.selectUrlList(selectTemp); + if (checkPictrueList != null) { + standard.setCheckPictrueList(checkPictrueList); + } + } detail.setStandardList(standardList); } diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquFileMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquFileMapper.xml index ef5150b6..fffe32f3 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquFileMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquFileMapper.xml @@ -68,7 +68,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and image_type = #{imageType} - + + + insert into base_file file_id, @@ -105,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - INSERT INTO base_file(file_id, file_name, file_address, source_id, remark, create_by, create_time) + INSERT INTO base_file(file_id, file_name, file_address, source_id, remark, create_by, create_time,image_type) VALUES ( @@ -115,7 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{baseFile.sourceId}, #{baseFile.remark}, #{baseFile.createBy}, - #{baseFile.createTime} + #{baseFile.createTime}, + #{baseFile.imageType} ) diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquOrderMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquOrderMapper.xml index 65da4369..6a668b7e 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquOrderMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquOrderMapper.xml @@ -137,7 +137,7 @@