刷卡-灌溉逻辑+修改灌溉记录和充值记录的导出接口
This commit is contained in:
@ -3,10 +3,11 @@ package com.fastbee.rechargecard.domain.dto;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class UserIrrigationRecordListDto {
|
||||
/** 序号 */
|
||||
private Long id;
|
||||
|
@ -2,6 +2,7 @@ package com.fastbee.rechargecard.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.UserIrrigationRecord;
|
||||
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordListDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
@ -14,6 +15,12 @@ import org.apache.ibatis.annotations.Select;
|
||||
@Mapper
|
||||
public interface UserIrrigationRecordMapper
|
||||
{
|
||||
/**
|
||||
* 根据时间段获取灌溉记录列表
|
||||
* @param userIrrigationRecordListDto
|
||||
* @return
|
||||
*/
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordListByTime(UserIrrigationRecordListDto userIrrigationRecordListDto);
|
||||
/**
|
||||
* 根据卡号和设备编码获取最新的灌溉中的灌溉记录
|
||||
* @param cardNumber
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||
import com.fastbee.rechargecard.domain.UserIrrigationRecord;
|
||||
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordDto;
|
||||
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordListDto;
|
||||
|
||||
/**
|
||||
* 灌溉记录Service接口
|
||||
@ -19,8 +20,8 @@ public interface IUserIrrigationRecordService
|
||||
*
|
||||
* @param userIrrigationRecord 灌溉记录
|
||||
* @return 灌溉记录集合
|
||||
*//*
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordListByTime(UserIrrigationRecord userIrrigationRecord);*/
|
||||
*/
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordListByTime(UserIrrigationRecordListDto userIrrigationRecord);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -8,6 +8,7 @@ import com.fastbee.iot.mapper.DeviceMapper;
|
||||
import com.fastbee.rechargecard.domain.NgIrrigationControllers;
|
||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordDto;
|
||||
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordListDto;
|
||||
import com.fastbee.rechargecard.mapper.NgIrrigationControllersMapper;
|
||||
import com.fastbee.system.mapper.SysUserMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -33,6 +34,10 @@ public class UserIrrigationRecordServiceImpl implements IUserIrrigationRecordSer
|
||||
private NgIrrigationControllersMapper ngIrrigationControllersMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordListByTime(UserIrrigationRecordListDto userIrrigationRecord) {
|
||||
return userIrrigationRecordMapper.selectUserIrrigationRecordListByTime(userIrrigationRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserIrrigationRecordDto> selectUserIrrigationRecordShowListByCardNumber(UserIrrigationRecord userIrrigationRecord) {
|
||||
|
@ -34,6 +34,32 @@
|
||||
select id, user_id, device_number, project_id, dept_id, card_number, area_code, cur_flow, cur_ele, balance, start_time, end_time, duration, unit, last_time, status, remarks, create_time, update_time, create_by, update_by,open_cum_flow,close_cum_flow from user_irrigation_record
|
||||
</sql>
|
||||
|
||||
<select id="selectUserIrrigationRecordListByTime" parameterType="UserIrrigationRecordDto" resultMap="UserIrrigationRecordResult">
|
||||
<include refid="selectUserIrrigationRecordVo"/>
|
||||
<where>
|
||||
<if test="searchStartTime !=null and searchEndTime !=null"> end_time between #{searchStartTime} and #{searchEndTime}</if>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="cardNumber != null and cardNumber != ''"> and card_number = #{cardNumber}</if>
|
||||
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||
<if test="curFlow != null "> and cur_flow = #{curFlow}</if>
|
||||
<if test="curEle != null "> and cur_ele = #{curEle}</if>
|
||||
<if test="balance != null "> and balance = #{balance}</if>
|
||||
<if test="startTime != null "> and start_time = #{startTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
<if test="duration != null "> and duration = #{duration}</if>
|
||||
<if test="unit != null "> and unit = #{unit}</if>
|
||||
<if test="lastTime != null "> and last_time = #{lastTime}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
||||
<if test="openCumFlow != null "> and open_cum_flow = #{openCumFlow}</if>
|
||||
<if test="closeCumFlow != null "> and close_cum_flow = #{closeCumFlow}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUserIrrigationRecordList" parameterType="UserIrrigationRecord" resultMap="UserIrrigationRecordResult">
|
||||
<include refid="selectUserIrrigationRecordVo"/>
|
||||
<where>
|
||||
|
Reference in New Issue
Block a user