Commit e57318da authored by hekaiwen's avatar hekaiwen

bug25219修改

parent aa9ca7eb
...@@ -36,4 +36,6 @@ public interface JgMaintenanceContractMapper extends BaseMapper<JgMaintenanceCon ...@@ -36,4 +36,6 @@ public interface JgMaintenanceContractMapper extends BaseMapper<JgMaintenanceCon
List<CompanyEquipCountDto> queryForFlowingEquipList(); List<CompanyEquipCountDto> queryForFlowingEquipList();
List<MaintenanceVo> queryMaintenanceInIds(@Param("ids") List<String> ids); List<MaintenanceVo> queryMaintenanceInIds(@Param("ids") List<String> ids);
String getNameByEquDefine(String equDefine);
} }
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
jfi.FACTORY_NUM, jfi.FACTORY_NUM,
jui.ADDRESS as ADDRESS, jui.ADDRESS as ADDRESS,
jui.RECORD record, jui.RECORD record,
jri.EQU_DEFINE, (SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as EQU_DEFINE,
jri.PRODUCT_NAME, jri.PRODUCT_NAME,
jri.EQU_CODE, jri.EQU_CODE,
(SELECT name from tz_equipment_category where code = jri.EQU_LIST) as EQU_LIST, (SELECT name from tz_equipment_category where code = jri.EQU_LIST) as EQU_LIST,
...@@ -165,6 +165,12 @@ ...@@ -165,6 +165,12 @@
WHERE mc.equip_transfer_id = #{id} WHERE mc.equip_transfer_id = #{id}
</select> </select>
<select id="getNameByEquDefine" resultType="String">
select name
from tz_equipment_category
where code = #{equDefine}
</select>
<select id="queryForFlowingEquipList" resultType="com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto"> <select id="queryForFlowingEquipList" resultType="com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto">
select a.use_unit_code as companyCode, select a.use_unit_code as companyCode,
group_concat(b.equ_id) as records group_concat(b.equ_id) as records
......
...@@ -183,6 +183,12 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -183,6 +183,12 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
vo.setEquipmentLists(list); vo.setEquipmentLists(list);
} }
} else { } else {
//如果EQU_DEFINE是数字进行转换
String equDefineCode = objects.getJSONObject(0).getString("EQU_DEFINE");
if(equDefineCode.chars().anyMatch(Character::isDigit)){
JSONObject firstObject = objects.getJSONObject(0);
firstObject.put("EQU_DEFINE", maintenanceContractMapper.getNameByEquDefine(equDefineCode));
}
List equList = objects.toJavaList(Map.class); List equList = objects.toJavaList(Map.class);
vo.setEquipmentLists(equList); vo.setEquipmentLists(equList);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment