添加用户年度用水量统计接口

This commit is contained in:
蒾酒
2024-12-31 19:16:52 +08:00
parent d6130cf330
commit f1b42d1f4d
4 changed files with 48 additions and 5 deletions

View File

@ -73,4 +73,9 @@ public class NgRechargeMachines extends BaseEntity
@ApiModelProperty("充值机名称")
private String deviceName;
/** 所属机构 */
@Excel(name = "所属机构")
@ApiModelProperty("所属机构")
private Long deptId;
}

View File

@ -1,6 +1,8 @@
package com.fastbee.rechargecard.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fastbee.rechargecard.domain.UserIrrigationRecord;
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordListDto;
import org.apache.ibatis.annotations.Mapper;
@ -13,7 +15,7 @@ import org.apache.ibatis.annotations.Select;
* @date 2024-12-18
*/
@Mapper
public interface UserIrrigationRecordMapper
public interface UserIrrigationRecordMapper extends BaseMapper<UserIrrigationRecord>
{
/**
* 根据时间段获取灌溉记录列表

View File

@ -20,10 +20,11 @@
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="deviceName" column="device_name" />
<result property="deptId" column="dept_id" />
</resultMap>
<sql id="selectNgRechargeMachinesVo">
select id, location, device_model, serial_number, area_code, installation_date, status, contact_person, contact_phone, remark, create_time, update_time, create_by, update_by, device_name from ng_recharge_machines
select id, location, device_model, serial_number, area_code, installation_date, status, contact_person, contact_phone, remark, create_time, update_time, create_by, update_by, device_name,dept_id from ng_recharge_machines
</sql>
<select id="selectNgRechargeMachinesList" parameterType="NgRechargeMachines" resultMap="NgRechargeMachinesResult">
@ -38,6 +39,7 @@
<if test="contactPerson != null and contactPerson != ''"> and contact_person = #{contactPerson}</if>
<if test="contactPhone != null and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
</where>
</select>
@ -63,6 +65,7 @@
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="deviceName != null">device_name,</if>
<if test="deptId != null">dept_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="location != null">#{location},</if>
@ -79,6 +82,7 @@
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="deptId != null">#{deptId},</if>
</trim>
</insert>
@ -99,6 +103,7 @@
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
</trim>
where id = #{id}
</update>