feat(ems): 能源设备添加电表产线和总表标识字段
- 在 EmsMeter 实体类中新增 productionLine 和 isTotalMeter 字段 - 在 EmsMeterBo 业务对象中添加对应的产线和总表标识属性 - 更新 EmsMeterMapper.xml 映射文件以支持新字段的数据库映射 - 在查询条件中增加产线模糊匹配和总表标识精确匹配功能 - 在 EmsMeterVo 视图对象中添加 Excel 导出支持的新字段
This commit is contained in:
@@ -72,5 +72,13 @@ public class EmsMeter extends BaseEntity {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 产线(如:S1、S2、组装线、包装线等)
|
||||||
|
*/
|
||||||
|
private String productionLine;
|
||||||
|
/**
|
||||||
|
* 是否总表:0=否,1=是
|
||||||
|
*/
|
||||||
|
private Integer isTotalMeter;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,5 +75,15 @@ public class EmsMeterBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产线(如:S1、S2、组装线、包装线等)
|
||||||
|
*/
|
||||||
|
private String productionLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否总表:0=否,1=是
|
||||||
|
*/
|
||||||
|
private Integer isTotalMeter;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,6 +89,18 @@ public class EmsMeterVo {
|
|||||||
@ExcelProperty(value = "备注")
|
@ExcelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产线(如:S1、S2、组装线、包装线等)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "产线")
|
||||||
|
private String productionLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否总表:0=否,1=是
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否总表")
|
||||||
|
private Integer isTotalMeter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库区ID
|
* 库区ID
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ public class EmsMeterServiceImpl implements IEmsMeterService {
|
|||||||
lqw.eq(bo.getStatus() != null, EmsMeter::getStatus, bo.getStatus());
|
lqw.eq(bo.getStatus() != null, EmsMeter::getStatus, bo.getStatus());
|
||||||
lqw.eq(bo.getLastCalibrationDate() != null, EmsMeter::getLastCalibrationDate, bo.getLastCalibrationDate());
|
lqw.eq(bo.getLastCalibrationDate() != null, EmsMeter::getLastCalibrationDate, bo.getLastCalibrationDate());
|
||||||
lqw.eq(bo.getThresholdValue() != null, EmsMeter::getThresholdValue, bo.getThresholdValue());
|
lqw.eq(bo.getThresholdValue() != null, EmsMeter::getThresholdValue, bo.getThresholdValue());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getProductionLine()), EmsMeter::getProductionLine, bo.getProductionLine());
|
||||||
|
lqw.eq(bo.getIsTotalMeter() != null, EmsMeter::getIsTotalMeter, bo.getIsTotalMeter());
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="productionLine" column="production_line"/>
|
||||||
|
<result property="isTotalMeter" column="is_total_meter"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="com.klp.ems.domain.vo.EmsMeterVo" id="EmsMeterVoResult">
|
<resultMap type="com.klp.ems.domain.vo.EmsMeterVo" id="EmsMeterVoResult">
|
||||||
@@ -35,6 +37,8 @@
|
|||||||
<result property="lastCalibrationDate" column="last_calibration_date"/>
|
<result property="lastCalibrationDate" column="last_calibration_date"/>
|
||||||
<result property="thresholdValue" column="threshold_value"/>
|
<result property="thresholdValue" column="threshold_value"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="productionLine" column="production_line"/>
|
||||||
|
<result property="isTotalMeter" column="is_total_meter"/>
|
||||||
<result property="warehouseId" column="warehouse_id"/>
|
<result property="warehouseId" column="warehouse_id"/>
|
||||||
<result property="warehouseName" column="warehouse_name"/>
|
<result property="warehouseName" column="warehouse_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@@ -77,6 +81,8 @@
|
|||||||
m.last_calibration_date,
|
m.last_calibration_date,
|
||||||
m.threshold_value,
|
m.threshold_value,
|
||||||
m.remark,
|
m.remark,
|
||||||
|
m.production_line,
|
||||||
|
m.is_total_meter,
|
||||||
COALESCE(w.warehouse_id, 0) as warehouse_id,
|
COALESCE(w.warehouse_id, 0) as warehouse_id,
|
||||||
COALESCE(w.warehouse_name, '') as warehouse_name
|
COALESCE(w.warehouse_name, '') as warehouse_name
|
||||||
FROM ems_meter m
|
FROM ems_meter m
|
||||||
@@ -95,6 +101,12 @@
|
|||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
AND m.status = #{status}
|
AND m.status = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="productionLine != null and productionLine != ''">
|
||||||
|
AND m.production_line LIKE CONCAT('%', #{productionLine}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="isTotalMeter != null">
|
||||||
|
AND m.is_total_meter = #{isTotalMeter}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMeterIds" parameterType="com.klp.ems.domain.bo.MeterFilterBo" resultType="java.lang.Long">
|
<select id="selectMeterIds" parameterType="com.klp.ems.domain.bo.MeterFilterBo" resultType="java.lang.Long">
|
||||||
|
|||||||
Reference in New Issue
Block a user