diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItem.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItem.java index 4d3535af..c2c5ac97 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItem.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItem.java @@ -1,6 +1,8 @@ package com.op.device.domain; import java.util.Date; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -81,6 +83,72 @@ public class EquCheckItem extends BaseEntity { @Excel(name = "更新人") private String updatedBy; + // 创建日期范围list + private List createdTimeArray; + + // 更新日期范围list + private List updateTimeArray; + + // 更新日期开始 + private String updateTimeStart; + + // 更新日期结束 + private String updateTimeEnd; + + public List getUpdateTimeArray() { + return updateTimeArray; + } + + public void setUpdateTimeArray(List updateTimeArray) { + this.updateTimeArray = updateTimeArray; + } + + public String getUpdateTimeStart() { + return updateTimeStart; + } + + public void setUpdateTimeStart(String updateTimeStart) { + this.updateTimeStart = updateTimeStart; + } + + public String getUpdateTimeEnd() { + return updateTimeEnd; + } + + public void setUpdateTimeEnd(String updateTimeEnd) { + this.updateTimeEnd = updateTimeEnd; + } + + // 创建日期开始 + private String createTimeStart; + + // 创建日期结束 + private String createTimeEnd; + + public String getCreateTimeStart() { + return createTimeStart; + } + + public void setCreateTimeStart(String createTimeStart) { + this.createTimeStart = createTimeStart; + } + + public String getCreateTimeEnd() { + return createTimeEnd; + } + + public void setCreateTimeEnd(String createTimeEnd) { + this.createTimeEnd = createTimeEnd; + } + + public List getCreatedTimeArray() { + return createdTimeArray; + } + + public void setCreatedTimeArray(List createdTimeArray) { + this.createdTimeArray = createdTimeArray; + } + public void setItemId(String itemId) { this.itemId = itemId; } @@ -213,6 +281,7 @@ public class EquCheckItem extends BaseEntity { .append("createdBy", getCreatedBy()) .append("updatedTime", getUpdatedTime()) .append("updatedBy", getUpdatedBy()) + .append("createdTimeArray",getCreatedTimeArray()) .toString(); } } 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 96340fde..995a784a 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,8 +1,10 @@ package com.op.device.service.impl; +import java.text.SimpleDateFormat; import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.log.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.op.device.mapper.EquCheckItemMapper; @@ -41,6 +43,22 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService { @Override @DS("#header.poolName") public List selectEquCheckItemList(EquCheckItem equCheckItem) { + if (equCheckItem.getCreatedTimeArray() != null) { + // 设置创建日期开始和结束值 + if (equCheckItem.getCreatedTimeArray().size() == 2) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + equCheckItem.setCreateTimeStart(formatter.format(equCheckItem.getCreatedTimeArray().get(0))); + equCheckItem.setCreateTimeEnd(formatter.format(equCheckItem.getCreatedTimeArray().get(1))); + } + } + if (equCheckItem.getUpdateTimeArray() != null) { + // 设置更新日期开始和结束 + if (equCheckItem.getUpdateTimeArray().size() == 2) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + equCheckItem.setUpdateTimeStart(formatter.format(equCheckItem.getUpdateTimeArray().get(0))); + equCheckItem.setUpdateTimeEnd(formatter.format(equCheckItem.getUpdateTimeArray().get(1))); + } + } return equCheckItemMapper.selectEquCheckItemList(equCheckItem); } 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 dd80f567..d6f13f3b 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 @@ -30,9 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"