Commit 3dff6727 authored by chenzhao's avatar chenzhao

修改bug

parent cfed33b1
......@@ -32,7 +32,7 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
List<FirefightersTreeDto> getFirefightersJobTitleCount();
List<String> getFirefightersName( );
List<Map<String,String>> getFirefightersName( );
List<FirefightersExcelDto> exportToExcel(Boolean isDelete, String name, String postQualification, String fireTeamId,
String state, String areasExpertise, String jobTitle);
......
......@@ -159,9 +159,10 @@ WHERE
<if test='jobTitle!=null'>and f.job_title_code = #{jobTitle}</if>
</select>
<select id="getFirefightersName" resultType="string">
<select id="getFirefightersName" resultType="Map">
SELECT
cb_firefighters.name
cb_firefighters.name AS name,
cb_firefighters.mobile_phone AS phone
FROM
cb_firefighters
WHERE
......
......@@ -18,104 +18,122 @@
<select id="selectPersonListCount" resultType="Integer">
select count(1) from (
SELECT
DISTINCT
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
<if test="fields != null">
<foreach collection="fields" item="item" separator=",">MAX(case f.field_code when #{item} then v.field_value
end) ${item}
</foreach>
</if>
FROM
cb_org_usr u LEFT JOIN
cb_dynamic_form_instance v on u.sequence_nbr = v.instance_id
LEFT JOIN cb_dynamic_form_column f ON f.sequence_nbr = v.form_column_id
where
u.biz_org_type = #{bizOrgType}
AND u.is_delete = 0
<if test="bizOrgName != null">
AND u.biz_org_name = #{bizOrgName}
</if>
<if test="bizOrgCode != null and bizOrgCode != '-1'">
AND u.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_code
)a where a.sequenceNbr is not null
SELECT
DISTINCT
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
g.*
FROM
cb_org_usr u
LEFT JOIN
( SELECT
v.`instance_id`,
max(case v.field_code when 'personNumber' then IFNULL(v.field_value_label,v.field_value) end) personNumber,
max(case v.field_code when 'certificatesTypeCode' then IFNULL(v.field_value_label,v.field_value) end) certificatesTypeCode,
max(case v.field_code when 'gender' then IFNULL(v.field_value_label,v.field_value) end) gender,
max(case v.field_code when 'certificatesNumber' then IFNULL(v.field_value_label,v.field_value) end) certificatesNumber,
max(case v.field_code when 'telephone' then IFNULL(v.field_value_label,v.field_value) end) telephone,
max(case v.field_code when 'state' then IFNULL(v.field_value_label,v.field_value) end) state,
max(case v.field_code when 'safetyTraining' then IFNULL(v.field_value_label,v.field_value) end) safetyTraining,
max(case v.field_code when 'administrativePositionCode' then IFNULL(v.field_value_label,v.field_value) end) administrativePositionCode,
max(case v.field_code when 'internalPositionCode' then IFNULL(v.field_value_label,v.field_value) end) internalPositionCode,
max(case v.field_code when 'fireManagementPostCode' then IFNULL(v.field_value_label,v.field_value) end) fireManagementPostCode,
max(case v.field_code when 'positionType' then IFNULL(v.field_value_label,v.field_value) end) positionType,
max(case v.field_code when 'certificateType' then IFNULL(v.field_value_label,v.field_value) end) certificateType,
max(case v.field_code when 'holdingTime' then IFNULL(v.field_value_label,v.field_value) end) holdingTime,
max(case v.field_code when 'auditCycle' then IFNULL(v.field_value_label,v.field_value) end) auditCycle,
max(case v.field_code when 'personImg' then IFNULL(v.field_value_label,v.field_value) end) personImg,
max(case v.field_code when 'certificateImg' then IFNULL(v.field_value_label,v.field_value) end) certificateImg
FROM
`cb_dynamic_form_instance` v
WHERE
v.group_code = 246
GROUP BY
v.`instance_id`
) g
on u.sequence_nbr = g.instance_id
where
u.biz_org_type = 'person'
AND
u.is_delete = 0
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_code
order by u.rec_date desc
)a where a.sequenceNbr is not null
<if test="fieldsValue != null">
<foreach collection="fieldsValue.keys" item="item">AND a.${item} = #{fieldsValue[${item}]}</foreach>
</if>
</select>
<!--机场单位人员按时间倒叙排列add order by u.rec_date desc 2021-09-08 by kongfm -->
<select id="selectPersonList" resultType="Map">
select * from (
SELECT
DISTINCT
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
g.*
FROM
cb_org_usr u
LEFT JOIN
( SELECT
v.`instance_id`,
max(case v.field_code when 'personNumber' then IFNULL(v.field_value_label,v.field_value) end) personNumber,
max(case v.field_code when 'certificatesTypeCode' then IFNULL(v.field_value_label,v.field_value) end) certificatesTypeCode,
max(case v.field_code when 'gender' then IFNULL(v.field_value_label,v.field_value) end) gender,
max(case v.field_code when 'certificatesNumber' then IFNULL(v.field_value_label,v.field_value) end) certificatesNumber,
max(case v.field_code when 'telephone' then IFNULL(v.field_value_label,v.field_value) end) telephone,
max(case v.field_code when 'state' then IFNULL(v.field_value_label,v.field_value) end) state,
max(case v.field_code when 'safetyTraining' then IFNULL(v.field_value_label,v.field_value) end) safetyTraining,
max(case v.field_code when 'administrativePositionCode' then IFNULL(v.field_value_label,v.field_value) end) administrativePositionCode,
max(case v.field_code when 'internalPositionCode' then IFNULL(v.field_value_label,v.field_value) end) internalPositionCode,
max(case v.field_code when 'fireManagementPostCode' then IFNULL(v.field_value_label,v.field_value) end) fireManagementPostCode,
max(case v.field_code when 'positionType' then IFNULL(v.field_value_label,v.field_value) end) positionType,
max(case v.field_code when 'certificateType' then IFNULL(v.field_value_label,v.field_value) end) certificateType,
max(case v.field_code when 'holdingTime' then IFNULL(v.field_value_label,v.field_value) end) holdingTime,
max(case v.field_code when 'auditCycle' then IFNULL(v.field_value_label,v.field_value) end) auditCycle,
max(case v.field_code when 'personImg' then IFNULL(v.field_value_label,v.field_value) end) personImg,
max(case v.field_code when 'certificateImg' then IFNULL(v.field_value_label,v.field_value) end) certificateImg
FROM
`cb_dynamic_form_instance` v
WHERE
v.group_code = 246
GROUP BY
v.`instance_id`
) g
on u.sequence_nbr = g.instance_id
where
u.biz_org_type = 'person'
AND
u.is_delete = 0
<if test="map.bizOrgName != null">
AND u.biz_org_name like concat('%',#{map.bizOrgName},'%')
</if>
<if test="map.personNumber!= null">
AND v.field_value like concat('%',#{map.personNumber},'%')
</if>
<if test="map.bizOrgCode != null and map.bizOrgCode != '-1'">
AND u.biz_org_code like concat(#{map.bizOrgCode}, '%')
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_code
order by u.rec_date desc
)a where a.sequenceNbr is not null
<if test="map.fieldsValue != null">
<foreach collection="map.fieldsValue.keys" item="item">AND a.${item} = #{map.fieldsValue[${item}]}</foreach>
</if>
LIMIT #{map.pageNum}, #{map.pageSize}
select * from (
SELECT
DISTINCT
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
g.*
FROM
cb_org_usr u
LEFT JOIN
( SELECT
v.`instance_id`,
max(case v.field_code when 'personNumber' then IFNULL(v.field_value_label,v.field_value) end) personNumber,
max(case v.field_code when 'certificatesTypeCode' then IFNULL(v.field_value_label,v.field_value) end) certificatesTypeCode,
max(case v.field_code when 'gender' then IFNULL(v.field_value_label,v.field_value) end) gender,
max(case v.field_code when 'certificatesNumber' then IFNULL(v.field_value_label,v.field_value) end) certificatesNumber,
max(case v.field_code when 'telephone' then IFNULL(v.field_value_label,v.field_value) end) telephone,
max(case v.field_code when 'stateCode' then IFNULL(v.field_value_label,v.field_value) end) state,
max(case v.field_code when 'safetyTraining' then IFNULL(v.field_value_label,v.field_value) end) safetyTraining,
max(case v.field_code when 'administrativePositionCode' then IFNULL(v.field_value_label,v.field_value) end) administrativePositionCode,
max(case v.field_code when 'internalPositionCode' then IFNULL(v.field_value_label,v.field_value) end) internalPositionCode,
max(case v.field_code when 'fireManagementPostCode' then IFNULL(v.field_value_label,v.field_value) end) fireManagementPostCode,
max(case v.field_code when 'positionType' then IFNULL(v.field_value_label,v.field_value) end) positionType,
max(case v.field_code when 'certificateType' then IFNULL(v.field_value_label,v.field_value) end) certificateType,
max(case v.field_code when 'holdingTime' then IFNULL(v.field_value_label,v.field_value) end) holdingTime,
max(case v.field_code when 'auditCycle' then IFNULL(v.field_value_label,v.field_value) end) auditCycle,
max(case v.field_code when 'personImg' then IFNULL(v.field_value_label,v.field_value) end) personImg,
max(case v.field_code when 'certificateImg' then IFNULL(v.field_value_label,v.field_value) end) certificateImg
FROM
`cb_dynamic_form_instance` v
WHERE
v.group_code = 246
GROUP BY
v.`instance_id`
) g
on u.sequence_nbr = g.instance_id
where
u.biz_org_type = 'person'
AND
u.is_delete = 0
<if test="map.bizOrgName != null">
AND u.biz_org_name like concat('%',#{map.bizOrgName},'%')
</if>
<if test="map.personNumber!= null">
AND v.field_value like concat('%',#{map.personNumber},'%')
</if>
<if test="map.bizOrgCode != null and map.bizOrgCode != '-1'">
AND u.biz_org_code like concat(#{map.bizOrgCode}, '%')
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
u.biz_org_code
order by u.rec_date desc
)a where a.sequenceNbr is not null
<if test="map.fieldsValue != null">
<foreach collection="map.fieldsValue.keys" item="item">AND a.${item} = #{map.fieldsValue[${item}]}</foreach>
</if>
LIMIT #{map.pageNum}, #{map.pageSize}
</select>
......
......@@ -36,7 +36,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
List<AlertCalledTodyDto> getTodayAlertCalled();
List<String> getContactName( );
List<Map<String,String>> getContactName( );
List<String> getAddress();
......
......@@ -232,9 +232,10 @@
</select>
<select id="getContactName" resultType="string">
<select id="getContactName" resultType="Map">
SELECT
jc_alert_called.contact_user
jc_alert_called.contact_user AS name,
jc_alert_called.contact_phone AS phone
FROM
jc_alert_called
WHERE
......
......@@ -124,7 +124,7 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
return menus;
}
public List<String> getFirefightersName() {
public List<Map<String,String>> getFirefightersName() {
return firefightersMapper.getFirefightersName();
......
......@@ -362,7 +362,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getAmosId", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "警情填报联系人模糊查询", notes = "警情填报联系人模糊查询")
public ResponseModel< List<String>> getContact ( ) {
public ResponseModel< List<Map<String,String>>> getContact ( ) {
return ResponseHelper.buildResponse(iAlertCalledService.getContactName());
}
......
......@@ -797,9 +797,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 开始*/
public List<String> getContactName() {
List<String> firefightersName = firefightersService.getFirefightersName();
List<String> contactNames = alertCalledMapper.getContactName();
public List<Map<String,String>> getContactName() {
List<Map<String,String>> firefightersName = firefightersService.getFirefightersName();
List<Map<String,String>> contactNames = alertCalledMapper.getContactName();
firefightersName.addAll(contactNames);
return firefightersName;
......
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