增加采集编号字段到设备信息模型,并更新相关查询

This commit is contained in:
syruan 2025-09-22 17:27:07 +08:00
parent c38cc86b12
commit e4e81edd54
2 changed files with 12 additions and 1 deletions

View File

@ -61,6 +61,12 @@ public class DevInfo extends BaseEntity {
@ApiModelProperty(value = "设备唯一标识符") @ApiModelProperty(value = "设备唯一标识符")
private String identifyCode; private String identifyCode;
/**
* 用户手动输入
*/
@ApiModelProperty(value = "采集编号")
private String collectCode;
@ApiModelProperty(value = "装备名称") @ApiModelProperty(value = "装备名称")
@NotBlank @NotBlank
private String deviceName; private String deviceName;

View File

@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectDevInfoVo"> <sql id="selectDevInfoVo">
select ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number, select ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number,
pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time, level_type, pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time, level_type,collect_code,
creator, update_time, person, person_phone, update_by, specification, deposit, is_operator, is_active, update_time, update_by creator, update_time, person, person_phone, update_by, specification, deposit, is_operator, is_active, update_time, update_by
from ma_dev_info from ma_dev_info
</sql> </sql>
@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT SELECT
d.ma_id as maId, d.ma_id as maId,
d.code as code, d.code as code,
d.collect_code as collectCode,
d.identify_code as identifyCode, d.identify_code as identifyCode,
d.day_lease_price as dayLeasePrice, d.day_lease_price as dayLeasePrice,
d.device_name as deviceName, d.device_name as deviceName,
@ -232,6 +233,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDevInfoByMaId" parameterType="Long" resultType="com.bonus.material.device.domain.vo.DevInfoVo"> <select id="selectDevInfoByMaId" parameterType="Long" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
SELECT d.ma_id as maId, SELECT d.ma_id as maId,
d.code as code, d.code as code,
d.collect_code as collectCode,
d.identify_code as identifyCode, d.identify_code as identifyCode,
d.device_name as deviceName, d.device_name as deviceName,
d.device_weight as deviceWeight, d.device_weight as deviceWeight,
@ -308,6 +310,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceCount != null">device_count,</if> <if test="deviceCount != null">device_count,</if>
<if test="deviceUnitType != null and deviceUnitType != ''">device_unit_type,</if> <if test="deviceUnitType != null and deviceUnitType != ''">device_unit_type,</if>
<if test="code != null and code != '' ">code,</if> <if test="code != null and code != '' ">code,</if>
<if test="collectCode != null and collectCode != ''">collect_code,</if>
<if test="identifyCode != null and identifyCode != '' ">identify_code,</if> <if test="identifyCode != null and identifyCode != '' ">identify_code,</if>
<if test="typeId != null and typeId != ''">type_id,</if> <if test="typeId != null and typeId != ''">type_id,</if>
<if test="maStatus != null">ma_status,</if> <if test="maStatus != null">ma_status,</if>
@ -356,6 +359,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceCount != null">#{deviceCount},</if> <if test="deviceCount != null">#{deviceCount},</if>
<if test="deviceUnitType != null and deviceUnitType != ''">#{deviceUnitType},</if> <if test="deviceUnitType != null and deviceUnitType != ''">#{deviceUnitType},</if>
<if test="code != null and code != ''">#{code},</if> <if test="code != null and code != ''">#{code},</if>
<if test="collectCode != null and collectCode != ''">#{collectCode},</if>
<if test="identifyCode != null and identifyCode != ''">#{identifyCode},</if> <if test="identifyCode != null and identifyCode != ''">#{identifyCode},</if>
<if test="typeId != null and typeId != ''">#{typeId},</if> <if test="typeId != null and typeId != ''">#{typeId},</if>
<if test="maStatus != null">#{maStatus},</if> <if test="maStatus != null">#{maStatus},</if>
@ -421,6 +425,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update ma_dev_info update ma_dev_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="code != null and code != '' ">code = #{code},</if> <if test="code != null and code != '' ">code = #{code},</if>
<if test="collectCode != null and collectCode != ''">collect_code = #{collectCode},</if>
<if test="identifyCode != null and identifyCode != '' ">identify_code = #{identifyCode},</if> <if test="identifyCode != null and identifyCode != '' ">identify_code = #{identifyCode},</if>
<if test="deviceName != null and deviceName != '' ">device_name = #{deviceName},</if> <if test="deviceName != null and deviceName != '' ">device_name = #{deviceName},</if>
<if test="deviceWeight != null">device_weight = #{deviceWeight},</if> <if test="deviceWeight != null">device_weight = #{deviceWeight},</if>