Commit ce7b5517 authored by chenhao's avatar chenhao

修改bug ,联动单位树信息和谈话记录中谈话时间中数据库表更改,以及重点部位数量的统计

parent 4c3814ea
......@@ -17,4 +17,9 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
* @return
*/
public List<DataDictionary> getDataDictionaryListAndCount();
/**
* 获取包含联动单位的联动单位树信息
* @return
*/
public List<DataDictionary> getNoInLinkUnit();
}
......@@ -23,4 +23,26 @@ GROUP BY
</select>
<select id ="getNoInLinkUnit" resultType="com.yeejoin.amos.boot.biz.common.entity.DataDictionary">
SELECT
cbb.*
FROM
cb_data_dictionary cbb
LEFT JOIN (
SELECT
emergency_linkage_unit_code,
COUNT(1) count
FROM
cb_linkage_unit
GROUP BY
emergency_linkage_unit_code
) elink ON elink.emergency_linkage_unit_code = cbb.`code`
WHERE
cbb.type = 'YJLDDW'
AND elink.count IS NOT NULL
</select>
</mapper>
......@@ -38,4 +38,7 @@ public class CompanyDto {
@ApiModelProperty(value = "单位名称")
private String name;
@ApiModelProperty(value = "重点部位数量")
private int keySiteNum;
}
......@@ -220,8 +220,12 @@
a.companyMaleEmployees,
a.companyFemaleEmployees,
a.managementType,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM important_companys a
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance,
case when cks_d.count is null then 0 else cks_d.count end as keySiteNum
FROM important_companys a left join (
SELECT cks.belong_id ,count(cks.belong_id) count from cb_key_site cks GROUP BY cks.belong_id
)cks_d
on a.id=cks_d.belong_id
where a.longitude is not null and a.latitude is not null
<if test='par.distance!=null'>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;=
......
......@@ -154,5 +154,11 @@
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
</sql>
</changeSet>
<changeSet author="chenhao" id="2021-08-31-chenhao-1">
<comment>modify table cb_firefighters_thought add one columns</comment>
<sql>
ALTER TABLE `cb_firefighters_thought` modify talking_time datetime COMMENT '谈话时间';
</sql>
</changeSet>
</databaseChangeLog>
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