2024-08-02 设备-点检巡检保养加创建时间筛选

master
A0010407 6 months ago
parent dab3247888
commit 617f8add00

@ -280,6 +280,15 @@ public class EquOrder extends BaseEntity {
//工具
private String itemTools;
// 创建日期范围list
private List<Date> 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<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreateTimeArray(List<Date> 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)

@ -154,6 +154,16 @@ public class EquOrderServiceImpl implements IEquOrderService {
@DS("#header.poolName")
public List<EquOrder> 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();
}

@ -130,7 +130,8 @@
<if test="attr3 != null and attr3 != ''">and eo.attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''">and eo.del_flag = #{delFlag}</if>
<if test="createBy != null and createBy != ''">and eo.create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null ">and CONVERT(date,eo.create_time) = #{createTime}</if>
<if test="createTimeStart != null ">and CONVERT(date,eo.create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null ">and #{createTimeEnd} >= CONVERT(date,eo.create_time)</if>
<if test="updateBy != null and updateBy != ''">and eo.update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null ">and CONVERT(date,eo.update_time) = #{updateTime}</if>
<if test="upkeep != null ">and eo.upkeep = #{upkeep}</if>

Loading…
Cancel
Save