修改时间格式;解决灌溉记录结束时间相同bug

This commit is contained in:
童丽然 2025-01-07 13:33:45 +08:00
parent c34f3b2a0b
commit 8ac5f1c690
5 changed files with 13 additions and 11 deletions

View File

@ -84,19 +84,19 @@ public class UserConsumptionDetailsDto {
public BigDecimal billingPeriodDuration;
/** 账单生成的日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "账单生成的日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("账单生成的日期")
public Date billingDate;
/** 开泵时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("开泵时间")
public Date startTime;
/** 关泵时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("关泵时间")
public Date endTime;
@ -112,7 +112,7 @@ public class UserConsumptionDetailsDto {
public Integer paymentMethod;
/** 账单支付的时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = " 账单支付的时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(" 账单支付的时间")
public Date paymentTime;

View File

@ -14,9 +14,9 @@ public class UserIrrigationRecordDto
public String deviceName;
public String cardNumber;
public BigDecimal flow;
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
public Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
public Date endTime;
public String deviceNumber;
}

View File

@ -58,14 +58,14 @@ public class UserIrrigationRecordListDto {
private BigDecimal balance;
/** 开泵时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
@Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("开泵时间")
private Date startTime;
/** 关泵时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
@Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("关泵时间")
private Date endTime;

View File

@ -195,7 +195,7 @@ public class UserIrrigationRecordServiceImpl implements IUserIrrigationRecordSer
temp.cardNumber=list.get(i).getCardNumber() == null ? "" : list.get(i).getCardNumber();
temp.flow=list.get(i).getCurFlow()==null ? BigDecimal.valueOf(0) :list.get(i).getCurFlow();
temp.startTime=list.get(i).getStartTime()==null ? null : list.get(i).getStartTime();
temp.endTime=list.get(i).getEndTime()==null ? null :list.get(0).getEndTime();
temp.endTime=list.get(i).getEndTime()==null ? null :list.get(i).getEndTime();
result.add(temp);
}

View File

@ -58,6 +58,7 @@
<if test="openCumFlow != null "> and open_cum_flow = #{openCumFlow}</if>
<if test="closeCumFlow != null "> and close_cum_flow = #{closeCumFlow}</if>
</where>
ORDER BY end_time DESC
</select>
<select id="selectUserIrrigationRecordList" parameterType="UserIrrigationRecord" resultMap="UserIrrigationRecordResult">
@ -83,6 +84,7 @@
<if test="openCumFlow != null "> and open_cum_flow = #{openCumFlow}</if>
<if test="closeCumFlow != null "> and close_cum_flow = #{closeCumFlow}</if>
</where>
ORDER BY end_time DESC
</select>
<select id="selectUserIrrigationRecordListBycardNumber" parameterType="String" resultMap="UserIrrigationRecordResult">