检查项维护追加部门信息

master^2
FCD 1 month ago
parent 308c9f3480
commit 3b037abdd8

@ -135,6 +135,9 @@ public class EquCheckItem extends BaseEntity {
@Excel(name = "循环周期")
private int itemLoop;
@Excel(name = "部门")
private String deptName;
public int getItemLoop() {
return itemLoop;
}
@ -351,6 +354,14 @@ public class EquCheckItem extends BaseEntity {
return updateBy;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -24,6 +24,7 @@
<result property="itemTools" column="item_tools"/>
<result property="itemLoop" column="item_loop"/>
<result property="itemLoopType" column="item_loop_type"/>
<result property="deptName" column="dept_name"/>
</resultMap>
<sql id="selectEquCheckItemVo">
@ -31,33 +32,56 @@
</sql>
<select id="selectEquCheckItemList" parameterType="EquCheckItem" resultMap="EquCheckItemResult">
<include refid="selectEquCheckItemVo"/>
SELECT
i.item_id,
i.item_code,
i.item_name,
i.item_method,
i.item_type,
i.item_type_name,
i.item_remark,
i.factory_code,
i.attr1,
i.attr2,
i.attr3,
i.del_flag,
i.create_time,
i.create_by,
i.update_time,
i.update_by,
i.item_tools,
i.item_loop,
i.item_loop_type,
d.dept_name
FROM equ_check_item i
LEFT JOIN lanju_op_cloud.dbo.sys_user u ON i.create_by = u.user_name
LEFT JOIN lanju_op_cloud.dbo.sys_dept d ON u.dept_id = d.dept_id
<where>
<if test="itemCode != null and itemCode != ''">and item_code like concat('%', #{itemCode}, '%')</if>
<if test="itemName != null and itemName != ''">and item_name like concat('%', #{itemName}, '%')</if>
<if test="itemMethod != null and itemMethod != ''">and item_method like concat('%', #{itemMethod}, '%')
<if test="itemCode != null and itemCode != ''">and i.item_code like concat('%', #{itemCode}, '%')</if>
<if test="itemName != null and itemName != ''">and i.item_name like concat('%', #{itemName}, '%')</if>
<if test="itemMethod != null and itemMethod != ''">and i.item_method like concat('%', #{itemMethod}, '%')
</if>
<if test="itemType != null and itemType != ''">and item_type = #{itemType}</if>
<if test="itemTypeName != null and itemTypeName != ''">and item_type_name like concat('%', #{itemTypeName},
<if test="itemType != null and itemType != ''">and i.item_type = #{itemType}</if>
<if test="itemTypeName != null and itemTypeName != ''">and i.item_type_name like concat('%', #{itemTypeName},
'%')
</if>
<if test="itemRemark != null and itemRemark != ''">and item_remark = #{itemRemark}</if>
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''">and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''">and del_flag = #{delFlag}</if>
<if test="itemLoop != null and itemLoop != ''">and item_loop = #{itemLoop}</if>
<if test="itemLoopType != null and itemLoopType != ''">and item_loop_type = #{itemLoopType}</if>
<if test="itemTools != null and itemTools != ''">and item_tools like concat('%', #{itemTools}, '%')</if>
<if test="createTimeStart != null ">and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null ">and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''">and create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null ">and CONVERT(date,update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null ">and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
<if test="updateBy != null and updateBy != ''">and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
ORDER BY create_time DESC
<if test="itemRemark != null and itemRemark != ''">and i.tem_remark = #{itemRemark}</if>
<if test="factoryCode != null and factoryCode != ''">and i.factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''">and i.attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''">and i.attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''">and i.attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''">and i.del_flag = #{delFlag}</if>
<if test="itemLoop != null and itemLoop != ''">and i.item_loop = #{itemLoop}</if>
<if test="itemLoopType != null and itemLoopType != ''">and i.item_loop_type = #{itemLoopType}</if>
<if test="itemTools != null and itemTools != ''">and i.item_tools like concat('%', #{itemTools}, '%')</if>
<if test="createTimeStart != null ">and CONVERT(date,i.create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null ">and #{createTimeEnd} >= CONVERT(date,i.create_time)</if>
<if test="createBy != null and createBy != ''">and i.create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null ">and CONVERT(date,i.update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null ">and #{updateTimeEnd} >= CONVERT(date,i.update_time)</if>
<if test="updateBy != null and updateBy != ''">and i.update_by like concat('%', #{updateBy}, '%')</if>
and i.del_flag = '0'
ORDER BY i.create_time DESC
</where>
</select>

Loading…
Cancel
Save