|
@@ -26,15 +26,16 @@ public interface EquStatusMapper extends SuperMapper<EquStatus>
|
|
"SELECT " +
|
|
"SELECT " +
|
|
" bes.id, bes.status, bes.message, bes.create_time," +
|
|
" bes.id, bes.status, bes.message, bes.create_time," +
|
|
" itp.name, itp.code, itp.place_id, itp.compnay_id, itp.area_id," +
|
|
" itp.name, itp.code, itp.place_id, itp.compnay_id, itp.area_id," +
|
|
- " bp.plc_name, cca.full_name AS area " +
|
|
|
|
|
|
+ " bp.plc_name, cca.full_name AS area, org.label AS company " +
|
|
"FROM bt_equ_status bes " +
|
|
"FROM bt_equ_status bes " +
|
|
"LEFT JOIN imcs_tenant_productionresource itp ON bes.equ_id = itp.id " +
|
|
"LEFT JOIN imcs_tenant_productionresource itp ON bes.equ_id = itp.id " +
|
|
"LEFT JOIN bt_place bp ON itp.place_id = bp.id " +
|
|
"LEFT JOIN bt_place bp ON itp.place_id = bp.id " +
|
|
"LEFT JOIN c_common_area cca ON cca.code LIKE CONCAT(itp.area_id, '%') " +
|
|
"LEFT JOIN c_common_area cca ON cca.code LIKE CONCAT(itp.area_id, '%') " +
|
|
|
|
+ "LEFT JOIN c_core_org org on itp.org_id = org.id " +
|
|
"WHERE 1 = 1 " +
|
|
"WHERE 1 = 1 " +
|
|
" <if test=\"null != params.beginTime\"> AND bes.create_time > = #{params.beginTime}</if> " +
|
|
" <if test=\"null != params.beginTime\"> AND bes.create_time > = #{params.beginTime}</if> " +
|
|
" <if test=\"null != params.endTime\"> AND bes.create_time < = #{params.endTime}</if> " +
|
|
" <if test=\"null != params.endTime\"> AND bes.create_time < = #{params.endTime}</if> " +
|
|
- //" <if test=\"null != params.company and '' != params.company\"> AND ? LIKE ?</if> " +
|
|
|
|
|
|
+ " <if test=\"null != params.company and '' != params.company\"> AND org.label LIKE '%${params.company}%'</if> " +
|
|
"ORDER BY bes.create_time DESC" +
|
|
"ORDER BY bes.create_time DESC" +
|
|
"</script>"
|
|
"</script>"
|
|
)
|
|
)
|