diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquOrder.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquOrder.java index eaa4faa1..18d5d64a 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquOrder.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquOrder.java @@ -280,6 +280,15 @@ public class EquOrder extends BaseEntity { //工具 private String itemTools; + // 创建日期范围list + private List createTimeArray; + + // 创建日期开始 + private String createTimeStart; + + // 创建日期结束 + private String createTimeEnd; + public String getPicturePath() { return picturePath; } @@ -790,6 +799,32 @@ public class EquOrder extends BaseEntity { this.itemTools = itemTools; } + public List getCreateTimeArray() { + return createTimeArray; + } + + public void setCreateTimeArray(List createTimeArray) { + this.createTimeArray = createTimeArray; + } + + + //创建时间 + 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; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOrderServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOrderServiceImpl.java index c405621d..4419651d 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOrderServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOrderServiceImpl.java @@ -154,6 +154,16 @@ public class EquOrderServiceImpl implements IEquOrderService { @DS("#header.poolName") public List selectEquOrderList(EquOrder equOrder) { + // 创建时间列表不为空 + if (equOrder.getCreateTimeArray() != null) { + // 设置创建日期开始和结束值 + if (equOrder.getCreateTimeArray().size() == 2) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + equOrder.setCreateTimeStart(formatter.format(equOrder.getCreateTimeArray().get(0))); + equOrder.setCreateTimeEnd(formatter.format(equOrder.getCreateTimeArray().get(1))); + } + } + // 循环开始时间列表不为空 if (equOrder.getLoopStartArray() != null) { equOrder.setLoopStart(equOrder.getLoopStartArray().get(0)); @@ -202,6 +212,7 @@ public class EquOrderServiceImpl implements IEquOrderService { @DS("#header.poolName") public AjaxResult insertEquOrder(EquOrder equOrder) { equOrder.setCreateTime(DateUtils.getNowDate()); + equOrder.setCreateBy(SecurityUtils.getUsername()); return success(); } 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 27598cf6..a15708eb 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 @@ -130,7 +130,8 @@ and eo.attr3 = #{attr3} and eo.del_flag = #{delFlag} and eo.create_by like concat('%', #{createBy}, '%') - and CONVERT(date,eo.create_time) = #{createTime} + and CONVERT(date,eo.create_time) >= #{createTimeStart} + and #{createTimeEnd} >= CONVERT(date,eo.create_time) and eo.update_by like concat('%', #{updateBy}, '%') and CONVERT(date,eo.update_time) = #{updateTime} and eo.upkeep = #{upkeep}