Commit d0895432 authored by tianbo's avatar tianbo

fix(jg): 修改产权单元查询逻辑并优化数据获取

- 调整CommonMapper.xml中queryTcmUnitSeqByCreditCode的查询条件,支持通过单位名称或代码查询 - 在JgUseRegistrationServiceImpl.java中改进产权单元信息获取方式,避免空指针异常 - 更新TzsAppService.java中的getGroupList调用参数,确保维护信息正确加载
parent 820360c2
......@@ -324,7 +324,7 @@ public class TzsAppService {
// 设备维保信息
JSONObject useJsonObject = new JSONObject();
List maintenanceList = new ArrayList();
getGroupList(null, record, MaintenanceInfo.class, MaintenanceInfoModelForWX.class, maintenanceInfoService, maintenanceList, false, dictionaryList, equipmentCategories);
getGroupList(null, record, MaintenanceInfo.class, MaintenanceInfoModelForWX.class, maintenanceInfoService, maintenanceList, true, dictionaryList, equipmentCategories);
useJsonObject.put("title", "设备维保信息");
if (maintenanceList.size() > 1) {
List maintenanceList1 = new ArrayList();
......
......@@ -3499,7 +3499,7 @@
</select>
<select id="queryTcmUnitSeqByCreditCode" resultType="java.lang.String">
select sequence_nbr seq from tzs_tcm_unit_info where unit_code = #{unitCreditCode}
select sequence_nbr seq from tzs_tcm_unit_info where (unit_code = #{unitCreditCode} or unit_name = #{unitCreditCode})
<if test="unitType != null and unitType != ''">
and unit_type in
<foreach item="item" index="index" collection="unitType.split(',')" open="(" separator="," close=")">
......
......@@ -1030,8 +1030,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (!ValidationUtil.isEmpty(map.getString("estateUnitSeq"))) {
String estateUnitSeq = String.valueOf(map.getString("estateUnitSeq"));
Map<String, String> propertyUnitInfo = commonServiceImpl.queryTcmUnitInfoBySeq(estateUnitSeq, TcmUnitTypeEnum.CQ.getCode());
map.put("estateUnitCode", propertyUnitInfo.get("unitCode"));
map.put("estateUnitName", propertyUnitInfo.get("unitName"));
map.put("estateUnitCode", MapUtil.getStr(propertyUnitInfo, "unitCode"));
map.put("estateUnitName", MapUtil.getStr(propertyUnitInfo, "unitCode") + "_" + MapUtil.getStr(propertyUnitInfo, "unitName"));
}
// 使用地点
......
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