diff --git a/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/uuid/Seq.java b/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/uuid/Seq.java index d0c22e33..1c0efa56 100644 --- a/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/uuid/Seq.java +++ b/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/uuid/Seq.java @@ -150,6 +150,33 @@ public class Seq { + //检修计划序列类型 + public static final String planRepairSeqType = "PLANREPAIR"; + //检修计划接口序列数 + private static AtomicInteger planRepairSeq = new AtomicInteger(1); + //检修记录标识 + public static final String planRepairCode = "PR"; + //检修工单序列类型 + public static final String repairInstanceSeqTupe = "REPAIRINSTANCE"; + //检修工单接口序列数 + private static AtomicInteger repairInstanceSeq = new AtomicInteger(1); + //检修工单标识 + public static final String repairInstanceCode = "RI"; + + //检修计划序列类型 + public static final String planInspectSeqType = "PLANINSPECT"; + //检修计划接口序列数 + private static AtomicInteger planInspectSeq = new AtomicInteger(1); + //检修记录标识 + public static final String planInspectCode = "PIC"; + //检修工单序列类型 + public static final String InspectInstanceSeqTupe = "INSPECTINSTANCE"; + //检修工单接口序列数 + private static AtomicInteger INSPECTInstanceSeq = new AtomicInteger(1); + //检修工单标识 + public static final String InspectInstanceCode = "IIC"; + + // 保养计划序列类型 public static final String planMaintSeqType = "PLANMAINT"; diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsApiController.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsApiController.java index ded84786..4fc404a4 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsApiController.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsApiController.java @@ -30,17 +30,7 @@ public class DmsApiController extends BaseController { //APS-MyPuRz3G6HfBYcH8dw7Y2ai1D6iZRmXX apifox令牌 /** * PDA-报修 - * - * 需传入 - * 报修来源类型 faultSourceType - * 根据来源类型传入工单编码 faultSourceId - * 故障类别 faultType - * 故障描述 faultDescription - * 涉及操作 designOperations - * 设备id deviceId - * 维修类型 repairType - * 外协id outsrcId(可不传入) - * 图片路径 imgUrl(可不传入) + * */ @PostMapping("/PDAFault") @ResponseBody diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceSuplierController.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceSuplierController.java index 2ef54de0..e51aa650 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceSuplierController.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceSuplierController.java @@ -48,6 +48,12 @@ public class DmsBaseDeviceSuplierController extends BaseController } //todo 新加一个con 拿掉分页 + @GetMapping("/selectDmsBaseDeviceSuplierByDeviceId") + public AjaxResult selectDmsBaseDeviceSuplierByDeviceId(Long deviceId){ + List dmsBaseDeviceSupliers = dmsBaseDeviceSuplierService.selectDmsBaseDeviceSuplierDeviceId(deviceId); + + return success(dmsBaseDeviceSupliers); + } /** * 导出设备供应商信息列表 */ diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsPlanInspect.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsPlanInspect.java index 8d8d6116..019c30cf 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsPlanInspect.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsPlanInspect.java @@ -2,6 +2,7 @@ package com.hw.dms.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.hw.common.core.annotation.Excel; @@ -44,6 +45,12 @@ public class DmsPlanInspect extends BaseEntity @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "计划巡检时间", width = 30, dateFormat = "yyyy-MM-dd") private Date planTime; + /** 时限*/ + @Excel(name ="时限") + private Long timeLimit; + /** 关联sysjob主键id */ + @Excel(name = "关联sysjob主键id") + private Long jobId; /** 循环周期 */ @Excel(name = "循环周期") @@ -59,10 +66,49 @@ public class DmsPlanInspect extends BaseEntity private String cronExpression; + private Long timeLimitDays; + + private Long timeLimitHours; + + + + public Long getTimeLimitDays() { + return timeLimitDays; + } + + public void setTimeLimitDays(Long timeLimitDays) { + this.timeLimitDays = timeLimitDays; + } + + public Long getTimeLimitHours() { + return timeLimitHours; + } + + public void setTimeLimitHours(Long timeLimitHours) { + this.timeLimitHours = timeLimitHours; + } + public String getCronExpression() { return cronExpression; } + + public Long getTimeLimit() { + return timeLimit; + } + + public void setTimeLimit(Long timeLimit) { + this.timeLimit = timeLimit; + } + + public Long getJobId() { + return jobId; + } + + public void setJobId(Long jobId) { + this.jobId = jobId; + } + public void setCronExpression(String cronExpression) { this.cronExpression = cronExpression; } @@ -160,22 +206,20 @@ public class DmsPlanInspect extends BaseEntity @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("planInspectId", getPlanInspectId()) - .append("planInspectCode", getPlanInspectCode()) - .append("planInspectName", getPlanInspectName()) - .append("inspectType", getInspectType()) - .append("inspectRouteId", getInspectRouteId()) - .append("deviceAmount", getDeviceAmount()) - .append("planTime", getPlanTime()) - .append("cyclePeriod", getCyclePeriod()) - .append("performer", getPerformer()) - .append("isFlag", getIsFlag()) - .append("remark", getRemark()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); + return "DmsPlanInspect{" + + "planInspectId=" + planInspectId + + ", planInspectCode='" + planInspectCode + '\'' + + ", planInspectName='" + planInspectName + '\'' + + ", inspectType='" + inspectType + '\'' + + ", inspectRouteId=" + inspectRouteId + + ", deviceAmount=" + deviceAmount + + ", planTime=" + planTime + + ", timeLimit=" + timeLimit + + ", jobId=" + jobId + + ", cyclePeriod='" + cyclePeriod + '\'' + + ", performer='" + performer + '\'' + + ", isFlag='" + isFlag + '\'' + + ", cronExpression='" + cronExpression + '\'' + + '}'; } } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsRecordInspect.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsRecordInspect.java index 349b03d4..d68497f3 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsRecordInspect.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsRecordInspect.java @@ -10,7 +10,7 @@ import com.hw.common.core.web.domain.BaseEntity; /** * 巡检记录对象 dms_record_inspect - * + * * @author Open Platform * @date 2024-01-16 */ @@ -25,6 +25,8 @@ public class DmsRecordInspect extends BaseEntity @Excel(name = "巡检单号") private String billsInspectCode; + /** 计划ID*/ + private Long planInspectId; /** 检查类型(1巡检,2点检) */ @Excel(name = "检查类型(1巡检,2点检)") private String inspectType; @@ -40,8 +42,11 @@ public class DmsRecordInspect extends BaseEntity /** 计划巡检时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "计划巡检时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date planTime; - + private Date planBeginTime; + /** 计划巡检结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "计划巡检时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date planEndTime; /** 实际开始时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd") @@ -68,135 +73,148 @@ public class DmsRecordInspect extends BaseEntity @Excel(name = "是否标识:1-是;0-否") private String isFlag; - public void setRecordInspectId(Long recordInspectId) + public void setRecordInspectId(Long recordInspectId) { this.recordInspectId = recordInspectId; } - public Long getRecordInspectId() + public Long getRecordInspectId() { return recordInspectId; } - public void setBillsInspectCode(String billsInspectCode) + public void setBillsInspectCode(String billsInspectCode) { this.billsInspectCode = billsInspectCode; } - public String getBillsInspectCode() + public String getBillsInspectCode() { return billsInspectCode; } - public void setInspectType(String inspectType) + public void setInspectType(String inspectType) { this.inspectType = inspectType; } - public String getInspectType() + public String getInspectType() { return inspectType; } - public void setInspectRouteId(Long inspectRouteId) + public void setInspectRouteId(Long inspectRouteId) { this.inspectRouteId = inspectRouteId; } - public Long getInspectRouteId() + public Long getInspectRouteId() { return inspectRouteId; } - public void setDeviceAmount(Long deviceAmount) + public void setDeviceAmount(Long deviceAmount) { this.deviceAmount = deviceAmount; } - public Long getDeviceAmount() + public Long getDeviceAmount() { return deviceAmount; } - public void setPlanTime(Date planTime) - { - this.planTime = planTime; - } - public Date getPlanTime() - { - return planTime; - } - public void setRealBeginTime(Date realBeginTime) + public void setRealBeginTime(Date realBeginTime) { this.realBeginTime = realBeginTime; } - public Date getRealBeginTime() + public Date getRealBeginTime() { return realBeginTime; } - public void setRealEndTime(Date realEndTime) + public void setRealEndTime(Date realEndTime) { this.realEndTime = realEndTime; } - public Date getRealEndTime() + public Date getRealEndTime() { return realEndTime; } - public void setPerformer(String performer) + public void setPerformer(String performer) { this.performer = performer; } - public String getPerformer() + public String getPerformer() { return performer; } - public void setInspectStatus(Long inspectStatus) + public void setInspectStatus(Long inspectStatus) { this.inspectStatus = inspectStatus; } - public Long getInspectStatus() + public Long getInspectStatus() { return inspectStatus; } - public void setInspectDuration(BigDecimal inspectDuration) + public void setInspectDuration(BigDecimal inspectDuration) { this.inspectDuration = inspectDuration; } - public BigDecimal getInspectDuration() + public BigDecimal getInspectDuration() { return inspectDuration; } - public void setIsFlag(String isFlag) + public void setIsFlag(String isFlag) { this.isFlag = isFlag; } - public String getIsFlag() + public String getIsFlag() { return isFlag; } + public Long getPlanInspectId() { + return planInspectId; + } + + public void setPlanInspectId(Long planInspectId) { + this.planInspectId = planInspectId; + } + + public Date getPlanBeginTime() { + return planBeginTime; + } + + public void setPlanBeginTime(Date planBeginTime) { + this.planBeginTime = planBeginTime; + } + + public Date getPlanEndTime() { + return planEndTime; + } + + public void setPlanEndTime(Date planEndTime) { + this.planEndTime = planEndTime; + } + @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("recordInspectId", getRecordInspectId()) - .append("billsInspectCode", getBillsInspectCode()) - .append("inspectType", getInspectType()) - .append("inspectRouteId", getInspectRouteId()) - .append("deviceAmount", getDeviceAmount()) - .append("planTime", getPlanTime()) - .append("realBeginTime", getRealBeginTime()) - .append("realEndTime", getRealEndTime()) - .append("performer", getPerformer()) - .append("inspectStatus", getInspectStatus()) - .append("inspectDuration", getInspectDuration()) - .append("isFlag", getIsFlag()) - .append("remark", getRemark()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); + return "DmsRecordInspect{" + + "recordInspectId=" + recordInspectId + + ", billsInspectCode='" + billsInspectCode + '\'' + + ", planInspectId=" + planInspectId + + ", inspectType='" + inspectType + '\'' + + ", inspectRouteId=" + inspectRouteId + + ", deviceAmount=" + deviceAmount + + ", planBeginTime=" + planBeginTime + + ", planEndTime=" + planEndTime + + ", realBeginTime=" + realBeginTime + + ", realEndTime=" + realEndTime + + ", performer='" + performer + '\'' + + ", inspectStatus=" + inspectStatus + + ", inspectDuration=" + inspectDuration + + ", isFlag='" + isFlag + '\'' + + '}'; } } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceSuplierMapper.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceSuplierMapper.java index 58d3e07e..2546cf7b 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceSuplierMapper.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceSuplierMapper.java @@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsBaseDeviceSuplier; /** * 设备供应商信息Mapper接口 - * + * * @author xins * @date 2023-12-28 */ -public interface DmsBaseDeviceSuplierMapper +public interface DmsBaseDeviceSuplierMapper { /** * 查询设备供应商信息 - * + * * @param supplierId 设备供应商信息主键 * @return 设备供应商信息 */ @@ -21,7 +21,7 @@ public interface DmsBaseDeviceSuplierMapper /** * 查询设备供应商信息列表 - * + * * @param dmsBaseDeviceSuplier 设备供应商信息 * @return 设备供应商信息集合 */ @@ -29,7 +29,7 @@ public interface DmsBaseDeviceSuplierMapper /** * 新增设备供应商信息 - * + * * @param dmsBaseDeviceSuplier 设备供应商信息 * @return 结果 */ @@ -37,7 +37,7 @@ public interface DmsBaseDeviceSuplierMapper /** * 修改设备供应商信息 - * + * * @param dmsBaseDeviceSuplier 设备供应商信息 * @return 结果 */ @@ -45,7 +45,7 @@ public interface DmsBaseDeviceSuplierMapper /** * 删除设备供应商信息 - * + * * @param supplierId 设备供应商信息主键 * @return 结果 */ @@ -53,9 +53,11 @@ public interface DmsBaseDeviceSuplierMapper /** * 批量删除设备供应商信息 - * + * * @param supplierIds 需要删除的数据主键集合 * @return 结果 */ public int deleteDmsBaseDeviceSuplierBySupplierIds(Long[] supplierIds); + List selectDmsBaseDeviceSuplierDeviceId(Long deviceId); + } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseInspectRouteMapper.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseInspectRouteMapper.java index 7cb3fa08..e048fddd 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseInspectRouteMapper.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseInspectRouteMapper.java @@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsBaseInspectRoute; /** * 巡检线路信息Mapper接口 - * + * * @author Open Platform * @date 2024-01-16 */ -public interface DmsBaseInspectRouteMapper +public interface DmsBaseInspectRouteMapper { /** * 查询巡检线路信息 - * + * * @param inspectRouteId 巡检线路信息主键 * @return 巡检线路信息 */ @@ -21,7 +21,7 @@ public interface DmsBaseInspectRouteMapper /** * 查询巡检线路信息列表 - * + * * @param dmsBaseInspectRoute 巡检线路信息 * @return 巡检线路信息集合 */ @@ -29,7 +29,7 @@ public interface DmsBaseInspectRouteMapper /** * 新增巡检线路信息 - * + * * @param dmsBaseInspectRoute 巡检线路信息 * @return 结果 */ @@ -37,7 +37,7 @@ public interface DmsBaseInspectRouteMapper /** * 修改巡检线路信息 - * + * * @param dmsBaseInspectRoute 巡检线路信息 * @return 结果 */ @@ -45,7 +45,7 @@ public interface DmsBaseInspectRouteMapper /** * 删除巡检线路信息 - * + * * @param inspectRouteId 巡检线路信息主键 * @return 结果 */ @@ -53,9 +53,11 @@ public interface DmsBaseInspectRouteMapper /** * 批量删除巡检线路信息 - * + * * @param inspectRouteIds 需要删除的数据主键集合 * @return 结果 */ public int deleteDmsBaseInspectRouteByInspectRouteIds(Long[] inspectRouteIds); + + Long selectAmountByInspectRouteId(Long InspectRouteId); } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsPlanInspectMapper.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsPlanInspectMapper.java index 99404475..95e4e1f0 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsPlanInspectMapper.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsPlanInspectMapper.java @@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsPlanInspect; /** * 巡检计划信息Mapper接口 - * + * * @author Open Platform * @date 2024-01-17 */ -public interface DmsPlanInspectMapper +public interface DmsPlanInspectMapper { /** * 查询巡检计划信息 - * + * * @param planInspectId 巡检计划信息主键 * @return 巡检计划信息 */ @@ -21,7 +21,7 @@ public interface DmsPlanInspectMapper /** * 查询巡检计划信息列表 - * + * * @param dmsPlanInspect 巡检计划信息 * @return 巡检计划信息集合 */ @@ -29,7 +29,7 @@ public interface DmsPlanInspectMapper /** * 新增巡检计划信息 - * + * * @param dmsPlanInspect 巡检计划信息 * @return 结果 */ @@ -37,7 +37,7 @@ public interface DmsPlanInspectMapper /** * 修改巡检计划信息 - * + * * @param dmsPlanInspect 巡检计划信息 * @return 结果 */ @@ -45,7 +45,7 @@ public interface DmsPlanInspectMapper /** * 删除巡检计划信息 - * + * * @param planInspectId 巡检计划信息主键 * @return 结果 */ @@ -53,9 +53,12 @@ public interface DmsPlanInspectMapper /** * 批量删除巡检计划信息 - * + * * @param planInspectIds 需要删除的数据主键集合 * @return 结果 */ public int deleteDmsPlanInspectByPlanInspectIds(Long[] planInspectIds); + + DmsPlanInspect selectPlanInspectJoinJobByInspectId(Long planInspectId); + } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceSuplierService.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceSuplierService.java index 7bdb5220..a03d85ea 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceSuplierService.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceSuplierService.java @@ -1,19 +1,21 @@ package com.hw.dms.service; import java.util.List; + +import com.hw.dms.domain.DmsBaseDeviceBom; import com.hw.dms.domain.DmsBaseDeviceSuplier; /** * 设备供应商信息Service接口 - * + * * @author xins * @date 2023-12-28 */ -public interface IDmsBaseDeviceSuplierService +public interface IDmsBaseDeviceSuplierService { /** * 查询设备供应商信息 - * + * * @param supplierId 设备供应商信息主键 * @return 设备供应商信息 */ @@ -21,7 +23,7 @@ public interface IDmsBaseDeviceSuplierService /** * 查询设备供应商信息列表 - * + * * @param dmsBaseDeviceSuplier 设备供应商信息 * @return 设备供应商信息集合 */ @@ -29,7 +31,7 @@ public interface IDmsBaseDeviceSuplierService /** * 新增设备供应商信息 - * + * * @param dmsBaseDeviceSuplier 设备供应商信息 * @return 结果 */ @@ -37,7 +39,7 @@ public interface IDmsBaseDeviceSuplierService /** * 修改设备供应商信息 - * + * * @param dmsBaseDeviceSuplier 设备供应商信息 * @return 结果 */ @@ -45,7 +47,7 @@ public interface IDmsBaseDeviceSuplierService /** * 批量删除设备供应商信息 - * + * * @param supplierIds 需要删除的设备供应商信息主键集合 * @return 结果 */ @@ -53,9 +55,12 @@ public interface IDmsBaseDeviceSuplierService /** * 删除设备供应商信息信息 - * + * * @param supplierId 设备供应商信息主键 * @return 结果 */ public int deleteDmsBaseDeviceSuplierBySupplierId(Long supplierId); + + List selectDmsBaseDeviceSuplierDeviceId(Long deviceId); + } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsPlanInspectService.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsPlanInspectService.java index c464434c..734580b7 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsPlanInspectService.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsPlanInspectService.java @@ -1,19 +1,21 @@ package com.hw.dms.service; import java.util.List; +import java.util.function.LongPredicate; + import com.hw.dms.domain.DmsPlanInspect; /** * 巡检计划信息Service接口 - * + * * @author Open Platform * @date 2024-01-17 */ -public interface IDmsPlanInspectService +public interface IDmsPlanInspectService { /** * 查询巡检计划信息 - * + * * @param planInspectId 巡检计划信息主键 * @return 巡检计划信息 */ @@ -21,7 +23,7 @@ public interface IDmsPlanInspectService /** * 查询巡检计划信息列表 - * + * * @param dmsPlanInspect 巡检计划信息 * @return 巡检计划信息集合 */ @@ -29,7 +31,7 @@ public interface IDmsPlanInspectService /** * 新增巡检计划信息 - * + * * @param dmsPlanInspect 巡检计划信息 * @return 结果 */ @@ -37,7 +39,7 @@ public interface IDmsPlanInspectService /** * 修改巡检计划信息 - * + * * @param dmsPlanInspect 巡检计划信息 * @return 结果 */ @@ -45,7 +47,7 @@ public interface IDmsPlanInspectService /** * 批量删除巡检计划信息 - * + * * @param planInspectIds 需要删除的巡检计划信息主键集合 * @return 结果 */ @@ -53,9 +55,11 @@ public interface IDmsPlanInspectService /** * 删除巡检计划信息信息 - * + * * @param planInspectId 巡检计划信息主键 * @return 结果 */ public int deleteDmsPlanInspectByPlanInspectId(Long planInspectId); + + DmsPlanInspect selectPlanInspectJoinJobByInspectId(Long planInspectId); } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceSuplierServiceImpl.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceSuplierServiceImpl.java index 22aeb515..7d0a6964 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceSuplierServiceImpl.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceSuplierServiceImpl.java @@ -100,4 +100,10 @@ public class DmsBaseDeviceSuplierServiceImpl implements IDmsBaseDeviceSuplierSer { return dmsBaseDeviceSuplierMapper.deleteDmsBaseDeviceSuplierBySupplierId(supplierId); } + + @Override + public List selectDmsBaseDeviceSuplierDeviceId(Long deviceId) { + + return dmsBaseDeviceSuplierMapper.selectDmsBaseDeviceSuplierDeviceId(deviceId); + } } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsPlanInspectServiceImpl.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsPlanInspectServiceImpl.java index 6b50c5de..2b5a8579 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsPlanInspectServiceImpl.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsPlanInspectServiceImpl.java @@ -4,9 +4,14 @@ import java.util.Date; import java.util.List; import com.hw.common.core.constant.SecurityConstants; +import com.hw.common.core.domain.R; import com.hw.common.core.utils.DateUtils; +import com.hw.common.core.utils.uuid.Seq; import com.hw.common.core.web.domain.AjaxResult; import com.hw.common.security.utils.SecurityUtils; +import com.hw.dms.domain.DmsBaseInspectRoute; +import com.hw.dms.domain.DmsPlanMaint; +import com.hw.dms.mapper.DmsBaseInspectRouteMapper; import com.hw.job.api.RemoteJobService; import com.hw.job.api.domain.SysJob; import com.hw.job.api.util.CronUtils; @@ -30,6 +35,8 @@ public class DmsPlanInspectServiceImpl implements IDmsPlanInspectService private DmsPlanInspectMapper dmsPlanInspectMapper; @Autowired private RemoteJobService remoteJobService; + @Autowired + private DmsBaseInspectRouteMapper dmsBaseInspectRouteMapper; /** * 查询巡检计划信息 @@ -40,7 +47,17 @@ public class DmsPlanInspectServiceImpl implements IDmsPlanInspectService @Override public DmsPlanInspect selectDmsPlanInspectByPlanInspectId(Long planInspectId) { - return dmsPlanInspectMapper.selectDmsPlanInspectByPlanInspectId(planInspectId); + DmsPlanInspect dmsPlanInspect = dmsPlanInspectMapper.selectPlanInspectJoinJobByInspectId(planInspectId); + Long timeLimit = dmsPlanInspect.getTimeLimit(); + if (timeLimit != null) { + Long days = timeLimit / (24 * 60 * 60l); + Long hours = timeLimit % (24 * 60 * 60l); +// System.out.println(days); +// System.out.println(hours); + dmsPlanInspect.setTimeLimitDays(days); + dmsPlanInspect.setTimeLimitHours(hours / (60 * 60l)); + } + return dmsPlanInspect; } /** @@ -52,7 +69,13 @@ public class DmsPlanInspectServiceImpl implements IDmsPlanInspectService @Override public List selectDmsPlanInspectList(DmsPlanInspect dmsPlanInspect) { - return dmsPlanInspectMapper.selectDmsPlanInspectList(dmsPlanInspect); + List dmsPlanInspects = dmsPlanInspectMapper.selectDmsPlanInspectList(dmsPlanInspect); + for (DmsPlanInspect d : dmsPlanInspects) { + Long timeLimit = d.getTimeLimit(); + d.setTimeLimitDays(timeLimit / (24 * 60 * 60L)); + d.setTimeLimitHours((timeLimit % (24 * 60 * 60L)) / (60 * 60l)); + } + return dmsPlanInspects; } /** @@ -64,29 +87,38 @@ public class DmsPlanInspectServiceImpl implements IDmsPlanInspectService @Override public int insertDmsPlanInspect(DmsPlanInspect dmsPlanInspect) { + String planInspectCode = Seq.getId(Seq.planInspectSeqType, Seq.planInspectCode); + + SysJob job = new SysJob(); + job.setJobName("点巡检计划编号" + planInspectCode + "工单任务"); + job.setJobGroup("DEFAULT"); + job.setInvokeTarget("ryTask.getDmsBillsInstance(\"" + planInspectCode + "\")"); + job.setCronExpression(dmsPlanInspect.getCronExpression()); + job.setMisfirePolicy("1"); + job.setConcurrent("1"); + job.setStatus("1"); + R jobIdR = remoteJobService.add(SecurityConstants.INNER, job); + String time = dmsPlanInspect.getCronExpression(); //通过cron表达式获取下一次执行时间 Date nextExecution = CronUtils.getNextExecution(time); dmsPlanInspect.setPlanTime(nextExecution); - LoginUser user = SecurityUtils.getLoginUser(); - dmsPlanInspect.setCreateBy(user.getUsername()); + dmsPlanInspect.setPlanInspectCode(planInspectCode); + dmsPlanInspect.setJobId(jobIdR.getData().longValue()); + + Long timeLimitDays = dmsPlanInspect.getTimeLimitDays()==null?0L:dmsPlanInspect.getTimeLimitDays(); + Long timeLimitHours = dmsPlanInspect.getTimeLimitHours() == null?0L:dmsPlanInspect.getTimeLimitHours(); + dmsPlanInspect.setTimeLimit((timeLimitDays * 24 * 60 * 60) + + (timeLimitHours * 60 * 60)); dmsPlanInspect.setIsFlag("1"); + dmsPlanInspect.setCreateBy(SecurityUtils.getUsername()); dmsPlanInspect.setCreateTime(DateUtils.getNowDate()); - int i = dmsPlanInspectMapper.insertDmsPlanInspect(dmsPlanInspect); + //获取设备总数 + Long aLong = dmsBaseInspectRouteMapper.selectAmountByInspectRouteId(dmsPlanInspect.getInspectRouteId()); + dmsPlanInspect.setDeviceAmount(aLong); + return dmsPlanInspectMapper.insertDmsPlanInspect(dmsPlanInspect); - List dmsPlanInspects = dmsPlanInspectMapper.selectDmsPlanInspectList(dmsPlanInspect); - DmsPlanInspect dmsPlanInspect1 = dmsPlanInspects.get(0); - SysJob job = new SysJob(); - job.setJobName("创建计划编号为"+dmsPlanInspect1.getPlanInspectCode()+"工单"); - job.setJobGroup("DEFAULT"); - job.setInvokeTarget("ryTask.getDmsRepairInstance(\""+dmsPlanInspect1.getPlanInspectId()+"\")"); - job.setCronExpression(dmsPlanInspect1.getCronExpression()); - job.setMisfirePolicy("1"); - job.setConcurrent("1"); - job.setStatus("1"); - remoteJobService.add(SecurityConstants.INNER,job); - return i; } /** @@ -127,4 +159,10 @@ public class DmsPlanInspectServiceImpl implements IDmsPlanInspectService { return dmsPlanInspectMapper.deleteDmsPlanInspectByPlanInspectId(planInspectId); } + + @Override + public DmsPlanInspect selectPlanInspectJoinJobByInspectId(Long planInspectId) { + + return dmsPlanInspectMapper.selectPlanInspectJoinJobByInspectId(planInspectId); + } } diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsPlanRepairServiceImpl.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsPlanRepairServiceImpl.java index b4a9408e..19e4686c 100644 --- a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsPlanRepairServiceImpl.java +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsPlanRepairServiceImpl.java @@ -1,7 +1,15 @@ package com.hw.dms.service.impl; +import java.util.Date; import java.util.List; + +import com.hw.common.core.constant.SecurityConstants; +import com.hw.common.core.domain.R; import com.hw.common.core.utils.DateUtils; +import com.hw.common.core.utils.uuid.Seq; +import com.hw.job.api.RemoteJobService; +import com.hw.job.api.domain.SysJob; +import com.hw.job.api.util.CronUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -24,6 +32,9 @@ public class DmsPlanRepairServiceImpl implements IDmsPlanRepairService @Autowired private DmsPlanRepairMapper dmsPlanRepairMapper; + @Autowired + private RemoteJobService remoteJobService; + /** * 查询检修计划信息 * @@ -85,6 +96,23 @@ public class DmsPlanRepairServiceImpl implements IDmsPlanRepairService public int insertDmsPlanRepair(DmsPlanRepair dmsPlanRepair) { +// String planRepairCode = Seq.getId(Seq.planRepairSeqType, Seq.planRepairCode); +// +// SysJob job = new SysJob(); +// job.setJobName("保养计划编号" + planRepairCode + "工单任务"); +// job.setJobGroup("DEFAULT"); +// job.setInvokeTarget("ryTask.getDmsRepairInstance(\"" + planRepairCode + "\")"); +// job.setCronExpression(dmsPlanRepair.getCronExpression()); +// job.setMisfirePolicy("1"); +// job.setConcurrent("1"); +// job.setStatus("1"); +// R jobIdR = remoteJobService.add(SecurityConstants.INNER, job); +// +// String time = dmsPlanRepair.getCronExpression(); +// Date nextExecution = CronUtils.getNextExecution(time); +// dmsPlanRepair.setRepairTime(nextExecution); +// dmsPlanRepair.setJobId(jobIdR.getData().longValue()); +// dmsPlanRepair.setPlanRepairCode(planRepairCode); dmsPlanRepair.setTimeLimit((dmsPlanRepair.getTimeLimitDays()*24*60*60) +(dmsPlanRepair.getTimeLimitHours()*60*60)); diff --git a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceSuplierMapper.xml b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceSuplierMapper.xml index 1e7b0300..a6d42d70 100644 --- a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceSuplierMapper.xml +++ b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceSuplierMapper.xml @@ -27,7 +27,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -106,4 +104,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{supplierId} + diff --git a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseInspectRouteMapper.xml b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseInspectRouteMapper.xml index 9c7344b3..7be44412 100644 --- a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseInspectRouteMapper.xml +++ b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseInspectRouteMapper.xml @@ -99,4 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{inspectRouteId} + diff --git a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsPlanInspectMapper.xml b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsPlanInspectMapper.xml index 9b776231..b4d2fae4 100644 --- a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsPlanInspectMapper.xml +++ b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsPlanInspectMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -12,6 +12,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -20,32 +22,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select plan_inspect_id, plan_inspect_code, plan_inspect_name, inspect_type, inspect_route_id, device_amount, plan_time, cycle_period, performer, is_flag, remark, create_by, create_time, update_by, update_time from dms_plan_inspect + select plan_inspect_id, plan_inspect_code, plan_inspect_name, inspect_type, inspect_route_id, device_amount, plan_time, cycle_period,time_limit,job_id, performer, is_flag, remark, create_by, create_time, update_by, update_time from dms_plan_inspect - + - + insert into dms_plan_inspect @@ -55,6 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" inspect_route_id, device_amount, plan_time, + time_limit, + job_id, cycle_period, performer, is_flag, @@ -71,6 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{inspectRouteId}, #{deviceAmount}, #{planTime}, + #{timeLimit}, + #{jobId}, #{cyclePeriod}, #{performer}, #{isFlag}, @@ -91,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" inspect_route_id = #{inspectRouteId}, device_amount = #{deviceAmount}, plan_time = #{planTime}, + time_limit = #{timeLimit}, + job_id = #{jobId}, cycle_period = #{cyclePeriod}, performer = #{performer}, is_flag = #{isFlag}, @@ -108,9 +120,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from dms_plan_inspect where plan_inspect_id in + delete from dms_plan_inspect where plan_inspect_id in #{planInspectId} - \ No newline at end of file + + + diff --git a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsRecordInspectMapper.xml b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsRecordInspectMapper.xml index 57178a90..39a93542 100644 --- a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsRecordInspectMapper.xml +++ b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsRecordInspectMapper.xml @@ -6,11 +6,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - + + @@ -25,7 +27,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select record_inspect_id, bills_inspect_code, inspect_type, inspect_route_id, device_amount, plan_time, real_begin_time, real_end_time, performer, inspect_status, inspect_duration, is_flag, remark, create_by, create_time, update_by, update_time from dms_record_inspect + select record_inspect_id,plan_inspect_id,bills_inspect_code, inspect_type, inspect_route_id, device_amount, + plan_begin_time,plan_end_time, real_begin_time, real_end_time, performer, inspect_status, inspect_duration, + is_flag, remark, create_by, create_time, update_by, update_time from dms_record_inspect + and check_result_id = #{checkResultId} + and check_rule_name like concat('%',#{checkRuleName},'%') and material_type = #{materialType} and material_id = #{materialId} and material_batch = #{materialBatch} and check_mode = #{checkMode} and check_sample = #{checkSample} - and plan_code = #{planCode} + and plan_code like concat('%',#{planCode},'%') and plan_detail_code = #{planDetailCode} - and saleorder_code = #{saleorderCode} - and po_no = #{poNo} + and saleorder_code like concat ('%',#{saleorderCode},'%') + and po_no like concat('%',#{poNo},'%') and po_line = #{poLine} - and project_no = #{projectNo} + and project_no like concat('%',#{projectNo},'%') and check_status = #{checkStatus} diff --git a/hw-ui/src/api/dms/suplier.js b/hw-ui/src/api/dms/suplier.js index 7bee5c18..7d374d07 100644 --- a/hw-ui/src/api/dms/suplier.js +++ b/hw-ui/src/api/dms/suplier.js @@ -8,6 +8,14 @@ export function listSuplier(query) { params: query }) } +// +export function selectDmsBaseDeviceSuplierByDeviceId(query) { + return request({ + url: '/dms/suplier/selectDmsBaseDeviceSuplierByDeviceId', + method: 'get', + params: query + }) +} // 查询设备供应商信息详细 export function getSuplier(supplierId) { diff --git a/hw-ui/src/api/ems/base/WholePointData.js b/hw-ui/src/api/ems/base/WholePointData.js index 32ba3a66..943f842f 100644 --- a/hw-ui/src/api/ems/base/WholePointData.js +++ b/hw-ui/src/api/ems/base/WholePointData.js @@ -14,7 +14,9 @@ export function listUser(data) { export function listUsers(data) { return request({ url: '/ems/report/pointDnb/lists', - method: 'get', + method: 'post', + // data: qs.stringify(data), + // contentType:'application/x-www-form-urlencoded', data: data, }) } @@ -28,7 +30,7 @@ export function listUser2(data) { // contentType:'application/x-www-form-urlencoded', }) } -// 柱状图1 +// 柱状图1-电整点数据能耗统计 export function dnbCountingData(query) { return request({ url: '/ems/report/board/dnbCountingData', diff --git a/hw-ui/src/api/ems/base/emsRecord.js b/hw-ui/src/api/ems/base/emsRecord.js index a898387f..898b174f 100644 --- a/hw-ui/src/api/ems/base/emsRecord.js +++ b/hw-ui/src/api/ems/base/emsRecord.js @@ -6,8 +6,8 @@ export function listHistory(query) { console.log("listUser1:", query); return request({ url: '/ems/record/dnbInstant/list', - method: 'get', - params: query + method: 'post', + data: query }) } diff --git a/hw-ui/src/components/Crontab/result.vue b/hw-ui/src/components/Crontab/result.vue index b2f1c1ab..7f830806 100644 --- a/hw-ui/src/components/Crontab/result.vue +++ b/hw-ui/src/components/Crontab/result.vue @@ -57,6 +57,7 @@ export default { let DDate = this.dateArr[3]; let MDate = this.dateArr[4]; let YDate = this.dateArr[5]; + // 获取当前时间在数组中的索引 let sIdx = this.getIndex(sDate, nSecond); let mIdx = this.getIndex(mDate, nMin); @@ -448,9 +449,11 @@ export default { this.dateArr[1] = this.getCycleArr(rule, 60, true) } else if (rule.indexOf('/') >= 0) { this.dateArr[1] = this.getAverageArr(rule, 59) - } else if (rule !== '*') { + } else if (rule !== '*' && rule !=='0') { this.dateArr[1] = this.getAssignArr(rule) - } + } else if (rule =='*'){ + this.dateArr[1] = '0'; + } }, // 获取"秒"数组 getSecondArr(rule) { @@ -459,9 +462,13 @@ export default { this.dateArr[0] = this.getCycleArr(rule, 60, true) } else if (rule.indexOf('/') >= 0) { this.dateArr[0] = this.getAverageArr(rule, 59) - } else if (rule !== '*') { + } else if (rule !== '*' &&rule!=='0') { this.dateArr[0] = this.getAssignArr(rule) } + //当分与秒没有被配置时,自动赋值0 + else if (rule=='*'){ + this.dateArr[0] = '0'; + } }, // 根据传进来的min-max返回一个顺序的数组 getOrderArr(min, max) { diff --git a/hw-ui/src/router/index.js b/hw-ui/src/router/index.js index a9abbe6b..5e7509d6 100644 --- a/hw-ui/src/router/index.js +++ b/hw-ui/src/router/index.js @@ -388,6 +388,7 @@ export const dynamicRoutes = [ }, ], }, + //审批保养工单路由 { path: "/dms/dmsMaintInstanceActivity", @@ -513,6 +514,21 @@ export const dynamicRoutes = [ } ] }, + //质检结果详细 + { + path: "/qms/base/checkresultdetail", + component: Layout, + hidden: true, + permissions: ["tool:gen:edit"], + children: [ + { + path: "index/:checkResultId(\\d+)", + component: () => import("@/views/qms/base/checkresultdetail/index"), + name: "checkResultDetail", + meta: { title: "质检结果详细", activeMenu: "/qms/base/checkresultdetail" }, + }, + ], + }, ] diff --git a/hw-ui/src/views/dms/bom/index.vue b/hw-ui/src/views/dms/bom/index.vue index cbdfbf97..04cd7887 100644 --- a/hw-ui/src/views/dms/bom/index.vue +++ b/hw-ui/src/views/dms/bom/index.vue @@ -169,7 +169,8 @@ - + @@ -184,7 +185,7 @@ - + @@ -232,6 +233,7 @@ export default { children: "children", label: "typeName" }, + isShowBom:false, deptName:undefined, ledgerList:[], // 遮罩层 @@ -286,6 +288,16 @@ export default { this.getTreeselectDeviceType(); }, methods: { + change(){ + if (this.form.parentId != 0){ + this.isShowBom = true; + this.form.bomAmount = null; + } + if (this.form.parentId ==0){ + this.isShowBom = false; + this.form.bomAmount = 1; + } + }, /** 查询设备台账信息列表 */ getDeviceLedger() { @@ -437,6 +449,7 @@ export default { this.getList(); }); } else { + addBom(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; diff --git a/hw-ui/src/views/dms/detail/index.vue b/hw-ui/src/views/dms/detail/index.vue index ff12054f..ecde3314 100644 --- a/hw-ui/src/views/dms/detail/index.vue +++ b/hw-ui/src/views/dms/detail/index.vue @@ -197,7 +197,7 @@ - + - - - + + + + + + + + + + + + @@ -199,16 +199,16 @@ - - - - - - + + + + + + + + + + --> - - + + --> - + + :value="item.inspectStandardId.toString()"> @@ -321,6 +321,7 @@ export default { getInspectStandard() { listDmsBaseInspectStandard(this.queryParams).then(response => { this.dmsBaseInspectStandardList = response.rows; + console.log(this.dmsBaseInspectStandardList) }); }, //查询设备信息 diff --git a/hw-ui/src/views/dms/dmsMaintInstanceActivity/index.vue b/hw-ui/src/views/dms/dmsMaintInstanceActivity/index.vue index 54435173..23d018b5 100644 --- a/hw-ui/src/views/dms/dmsMaintInstanceActivity/index.vue +++ b/hw-ui/src/views/dms/dmsMaintInstanceActivity/index.vue @@ -64,12 +64,12 @@ - + - + diff --git a/hw-ui/src/views/dms/dmsPlanInspect/index.vue b/hw-ui/src/views/dms/dmsPlanInspect/index.vue index 68523e42..be329310 100644 --- a/hw-ui/src/views/dms/dmsPlanInspect/index.vue +++ b/hw-ui/src/views/dms/dmsPlanInspect/index.vue @@ -163,6 +163,14 @@ {{ parseTime(scope.row.planTime, '{y}-{m}-{d}') }} + + + @@ -213,7 +221,7 @@ - + {{dict.label}} - - + + + + + + + + + + + diff --git a/hw-ui/src/views/dms/ledger/index.vue b/hw-ui/src/views/dms/ledger/index.vue index eacf84b6..76036d81 100644 --- a/hw-ui/src/views/dms/ledger/index.vue +++ b/hw-ui/src/views/dms/ledger/index.vue @@ -364,7 +364,8 @@ :tree-props="{children: 'children', hasChildren: 'hasChildren'}" > - + + @@ -625,7 +626,7 @@