Commit 7ad348d7 by liulianglang

单位筛选

parent 90de310c
......@@ -87,12 +87,12 @@ public class AjtjParam extends BaseModel {
public void setUnitcodeList(List<String> dwList) {
this.unitcodeList = new ArrayList<>();
List<String> dws = new ArrayList<>();
if (dwList.size() < 1000){
if (dwList.size() < 500){
this.unitcodeList.add(dwList);
return;
}
for (String dw : dwList) {
if (dws.size() < 1000){
if (dws.size() < 500){
dws.add(dw);
} else {
this.unitcodeList.add(new ArrayList<>(dws));
......@@ -104,4 +104,8 @@ public class AjtjParam extends BaseModel {
this.unitcodeList.add(dws);
}
}
public void setUnitcodeList2(List<List<String>> list,String type) {
this.unitcodeList = list;
}
}
......@@ -15,7 +15,7 @@ public interface AjtjMapper {
//各月份发案数分析
List<AjtjResult> getFapafyuest(AjtjParam ajtjParam);
int getqnrqFaCount(@Param("qnrq") String qnrq,@Param("ajlbsql") String ajlbsql);
int getqnrqFaCount(@Param("qnrq") String qnrq,@Param("ajlbsql") String ajlbsql,@Param("unitcodeList") List<List<String>> unitcodeList );
//各月份破案数分析
List<AjtjResult> getPayuest(AjtjParam ajtjParam);
......@@ -25,15 +25,15 @@ public interface AjtjMapper {
List<AjtjResult> getGmrsqlPayuest(AjtjParam ajtjParam);
//单个月份单独统计
int getqnrqPaCount(@Param("qnrq") String qnrq,@Param("ajlbsql") String ajlbsql);
int getqnrqPaCount(@Param("qnrq") String qnrq,@Param("ajlbsql") String ajlbsql,@Param("unitcodeList") List<List<String>> unitcodeList);
int getqnrqSwrsCount(String qnrq);
int getqnrqSwrsCount(@Param("qnrq") String qnrq,@Param("unitcodeList") List<List<String>> unitcodeList);
//关联人员被害死亡人数
int getqnrqAjYsdrCount(String qnrq);
int getqnrqAjYsdrCount(@Param("qnrq") String qnrq,@Param("unitcodeList") List<List<String>> unitcodeList);
int getqnrqZarsCount(String qnrq);
int getqnrqZarsCount(@Param("qnrq") String qnrq,@Param("unitcodeList") List<List<String>> unitcodeList);
int getqnrqPbrsCount(String qnrq);
int getqnrqPbrsCount(@Param("qnrq") String qnrq,@Param("unitcodeList") List<List<String>> unitcodeList);
int getFaCount(AjtjParam ajtjParam);
......
......@@ -44,6 +44,15 @@
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
) asj
group by asj.larq
order by asj.larq
......@@ -103,7 +112,15 @@
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getFaAjlbCount" resultType="org.springblade.founder.tjfx.entity.Ajjgfbtj">
......@@ -140,6 +157,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
......@@ -172,6 +198,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<![CDATA[ sum(case when asj.ajlbdm like '0607%' then 1 else 0 end) ]]> as dpfzajcount
from tb_st_asj asj where asj.xxsc_pdbz='0'
and to_char(ASJ.LARQ,'yyyy-MM')=to_char(sysdate,'yyyy-MM')
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<!--各月份破案数分析-->
......@@ -215,6 +250,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
) asj
group by asj.larq
order by asj.larq
......@@ -232,6 +276,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
) asj
group by asj.larq
order by asj.larq
......@@ -250,6 +303,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
) asj
group by asj.larq
order by asj.larq
......@@ -266,6 +328,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
) asj
group by asj.larq
order by asj.larq
......@@ -282,6 +353,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
) asj
group by asj.larq
order by asj.larq
......@@ -294,6 +374,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="ajlbsql !=null and ajlbsql!=''">
${ajlbsql}
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getqnrqSwrsCount" resultType="java.lang.Integer">
......@@ -301,18 +390,44 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
SELECT sum(asjswry_rs)
FROM tb_st_asj asj
where asj.xxsc_pdbz='0' and to_char(ASJ.LARQ,'yyyy-MM') =#{qnrq}
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getqnrqAjYsdrCount" resultType="java.lang.Integer">
select count(1) from tb_st_asj asj left join tb_xw_rybh rybh on rybh.asjbh=asj.asjbh
where asj.xxsc_pdbz='0' and rybh.rsshcddm='1' and rybh.xxsc_pdbz='0' and to_char(ASJ.LARQ,'yyyy-MM') =#{qnrq}
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getqnrqZarsCount" resultType="java.lang.Integer">
SELECT sum(zary_rs)
FROM tb_st_asj asj
where asj.xxsc_pdbz='0' and to_char(ASJ.LARQ,'yyyy-MM') =#{qnrq}
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getqnrqPbrsCount" resultType="java.lang.Integer">
......@@ -320,6 +435,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
SELECT count(1)
FROM tb_st_asj asj left join tb_xw_zbfzxyr xyr on xyr.asjbh=asj.asjbh
where asj.xxsc_pdbz='0' and xyr.xxsc_pdbz='0' and to_char(ASJ.LARQ,'yyyy-MM') =#{qnrq}
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getPaCount" resultType="java.lang.Integer">
......@@ -335,7 +459,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="jabz!=null and jabz!='' and jabz == '1'.toString()"><!--破现案查询-->
and to_char(ASJ.LARQ,'yyyy')=to_char(ASJ.ZCZJ_ZXSJ01,'yyyy')
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
......@@ -358,7 +490,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="jabz!=null and jabz!='' and jabz == '1'.toString()"><!--破现案查询-->
and to_char(ASJ.LARQ,'yyyy')=to_char(ASJ.ZCZJ_ZXSJ01,'yyyy')
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getAjSwrs" resultType="java.lang.Integer">
......@@ -372,7 +512,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getAjYsdrCount" resultType="java.lang.Integer">
......@@ -385,7 +533,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
......@@ -400,7 +556,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
......@@ -415,7 +579,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
......@@ -433,6 +605,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="month!=null and month!=''">
AND to_char(ASJ.LARQ,'yyyy-MM')=#{month}
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
order by asj.larq desc
</select>
......@@ -452,7 +633,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="month!=null and month!=''">
AND to_char(ASJ.LARQ,'yyyy-MM')=#{month}
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getFaList" resultType="org.springblade.founder.tjfx.entity.TbStAsj">
......@@ -506,6 +695,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="month!=null and month!=''">
AND to_char(ASJ.LARQ,'yyyy-MM')=#{month}
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
<include refid="pagination-tail" />
</select>
<select id="getSwryListCount" resultType="java.lang.Integer">
......@@ -520,6 +718,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="month!=null and month!=''">
AND to_char(ASJ.LARQ,'yyyy-MM')=#{month}
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getZaryList" resultType="org.springblade.founder.tjfx.entity.TbXwZbfzxyr">
SELECT
......@@ -543,6 +750,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="month!=null and month!=''">
AND to_char(ASJ.LARQ,'yyyy-MM')=#{month}
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
<select id="getZaryListCount" resultType="java.lang.Integer">
......@@ -558,6 +774,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="month!=null and month!=''">
AND to_char(ASJ.LARQ,'yyyy-MM')=#{month}
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select>
......@@ -654,7 +879,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="ajType!=null and ajType!='' and ajType == '2'.toString()"><!--破案查询-->
and asj.ZCJDDM = '0600'
</if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</sql>
<sql id="aj-common-column">
asj.asjbh as asjbh,
......
......@@ -56,7 +56,7 @@ public class AjtjServiceImpl implements AjtjService {
String rq = lastnum.getMonthName();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,"");
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,"",ajtjParam.getUnitcodeList());
//计算百分百
faan.get(faan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -106,7 +106,7 @@ public class AjtjServiceImpl implements AjtjService {
String rq = lastnum.getMonthName();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,"");
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,"",ajtjParam.getUnitcodeList());
//计算百分百
poan.get(poan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -130,6 +130,7 @@ public class AjtjServiceImpl implements AjtjService {
public List<AjtjResult> getGmrsqlFapafyuest(AjtjParam ajtjParam) {
String ajlbsql=" and asj.ajlbdm like '0400%' ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
List<AjtjResult> faans = ajtjMapper.getGmrsqlFapafyuest(ajtjParam);
List<AjtjResult> faan =NumberUtil.listToMap(faans,ajtjParam);
try {
......@@ -157,7 +158,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,ajlbsql);
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,ajlbsql,ajtjParam.getUnitcodeList());
//计算百分百
faan.get(faan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa.intValue()));
// if (qnfa > lastfanum) {
......@@ -181,7 +182,7 @@ public class AjtjServiceImpl implements AjtjService {
public List<AjtjResult> getGmrsqlPayuest(AjtjParam ajtjParam) {
String ajlbsql=" and asj.ajlbdm like '0400%' ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
List<AjtjResult> poans = ajtjMapper.getGmrsqlPayuest(ajtjParam);
List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam);
try {
......@@ -209,7 +210,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,ajlbsql);
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,ajlbsql,ajtjParam.getUnitcodeList());
//计算百分百
poan.get(poan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -235,6 +236,7 @@ public class AjtjServiceImpl implements AjtjService {
" ,'02002202'\n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
List<AjtjResult> faans = ajtjMapper.getGmrsqlFapafyuest(ajtjParam);
List<AjtjResult> faan =NumberUtil.listToMap(faans,ajtjParam);
try {
......@@ -262,7 +264,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,ajlbsql);
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,ajlbsql,ajtjParam.getUnitcodeList());
//计算百分百
faan.get(faan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -289,7 +291,7 @@ public class AjtjServiceImpl implements AjtjService {
" ,'02002202'\n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
List<AjtjResult> poans = ajtjMapper.getGmrsqlPayuest(ajtjParam);
List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam);
try {
......@@ -317,7 +319,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,ajlbsql);
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,ajlbsql,ajtjParam.getUnitcodeList());
//计算百分百
poan.get(poan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -343,6 +345,7 @@ public class AjtjServiceImpl implements AjtjService {
" ,'040001000600' ,'040001009900' \n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
List<AjtjResult> faans = ajtjMapper.getGmrsqlFapafyuest(ajtjParam);
List<AjtjResult> faan =NumberUtil.listToMap(faans,ajtjParam);
try {
......@@ -370,7 +373,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,ajlbsql);
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,ajlbsql,ajtjParam.getUnitcodeList());
//计算百分百
faan.get(faan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -397,7 +400,7 @@ public class AjtjServiceImpl implements AjtjService {
" ,'040001000600' ,'040001009900' \n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
List<AjtjResult> poans = ajtjMapper.getGmrsqlPayuest(ajtjParam);
List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam);
try {
......@@ -425,7 +428,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,ajlbsql);
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,ajlbsql,ajtjParam.getUnitcodeList());
//计算百分百
poan.get(poan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -450,6 +453,7 @@ public class AjtjServiceImpl implements AjtjService {
" '02002601','02002604','02002607','02002610','02002613','02003101','02003103','03020100'\n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
List<AjtjResult> faans = ajtjMapper.getGmrsqlFapafyuest(ajtjParam);
List<AjtjResult> faan =NumberUtil.listToMap(faans,ajtjParam);
try {
......@@ -477,7 +481,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,ajlbsql);
Integer qnfa = ajtjMapper.getqnrqFaCount(qnrq,ajlbsql,ajtjParam.getUnitcodeList());
//计算百分百
faan.get(faan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -503,7 +507,7 @@ public class AjtjServiceImpl implements AjtjService {
" '02002601','02002604','02002607','02002610','02002613','02003101','02003103','03020100'\n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
List<AjtjResult> poans = ajtjMapper.getGmrsqlPayuest(ajtjParam);
List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam);
try {
......@@ -531,7 +535,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,ajlbsql);
Integer qnfa = ajtjMapper.getqnrqPaCount(qnrq,ajlbsql,ajtjParam.getUnitcodeList());
//计算百分百
poan.get(poan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -554,7 +558,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override
public List<AjtjResult> getAjZarsyuest(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
List<AjtjResult> poans = ajtjMapper.getAjZarsyuest(ajtjParam);
List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam);
try {
......@@ -581,7 +585,7 @@ public class AjtjServiceImpl implements AjtjService {
String rq = lastnum.getMonthName();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqZarsCount(qnrq);
Integer qnfa = ajtjMapper.getqnrqZarsCount(qnrq,ajtjParam.getUnitcodeList());
//计算百分百
poan.get(poan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -603,7 +607,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override
public List<AjtjResult> getAjPbrsyuest(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
List<AjtjResult> poans = ajtjMapper.getAjPbrsyuest(ajtjParam);
List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam);
try {
......@@ -630,7 +634,7 @@ public class AjtjServiceImpl implements AjtjService {
String rq = lastnum.getMonthName();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqPbrsCount(qnrq);
Integer qnfa = ajtjMapper.getqnrqPbrsCount(qnrq,ajtjParam.getUnitcodeList());
//计算百分百
poan.get(poan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -651,7 +655,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override
public List<AjtjResult> getAjSwrsyuest(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
List<AjtjResult> poans = ajtjMapper.getAjRybhSwrsyuest(ajtjParam);
List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam);
try {
......@@ -678,7 +682,7 @@ public class AjtjServiceImpl implements AjtjService {
String rq = lastnum.getMonthName();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
String qnrq = sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(rq), 1));
Integer qnfa = ajtjMapper.getqnrqAjYsdrCount(qnrq);
Integer qnfa = ajtjMapper.getqnrqAjYsdrCount(qnrq,ajtjParam.getUnitcodeList());
//计算百分百
poan.get(poan.size() - 1).setTb("同比"+NumberUtil.getTbhb(lastfanum.intValue(),qnfa));
// if (qnfa > lastfanum) {
......@@ -700,6 +704,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override
public List<LianTj> getlipoanzzt(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
List<LianTj> tj = new ArrayList<>();
LianTj jntj = new LianTj();
jntj.setType("jn");
......@@ -715,6 +720,7 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
AjtjParam qntjParam = new AjtjParam();
try {
qntjParam.setUnitcodeList2(ajtjParam.getUnitcodeList(),"");
qntjParam.setLarqQssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(kssj), 1)));
qntjParam.setLarqJssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(jssj), 1)));
Integer qnlian = ajtjMapper.getFaCount(qntjParam);
......@@ -766,6 +772,7 @@ public class AjtjServiceImpl implements AjtjService {
qntj.setType("qn");
String ajlbsql=" and asj.ajlbdm like '0400%' ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
Integer lian = ajtjMapper.getGmrsqlFaCount(ajtjParam);
Integer poan = ajtjMapper.getGmrsqlPaCount(ajtjParam);
ajtjParam.setJabz("1");
......@@ -777,6 +784,8 @@ public class AjtjServiceImpl implements AjtjService {
AjtjParam qntjParam = new AjtjParam();
qntjParam.setAjlbsql(ajlbsql);
try {
qntjParam.setUnitcode(ajtjParam.getUnitcode());
setDwxx(qntjParam);
qntjParam.setLarqQssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(kssj), 1)));
qntjParam.setLarqJssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(jssj), 1)));
Integer qnlian = ajtjMapper.getGmrsqlFaCount(qntjParam);
......@@ -831,6 +840,7 @@ public class AjtjServiceImpl implements AjtjService {
" ,'02002202'\n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
Integer lian = ajtjMapper.getGmrsqlFaCount(ajtjParam);
Integer poan = ajtjMapper.getGmrsqlPaCount(ajtjParam);
ajtjParam.setJabz("1");
......@@ -842,6 +852,8 @@ public class AjtjServiceImpl implements AjtjService {
AjtjParam qntjParam = new AjtjParam();
qntjParam.setAjlbsql(ajlbsql);
try {
qntjParam.setUnitcode(ajtjParam.getUnitcode());
setDwxx(qntjParam);
qntjParam.setLarqQssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(kssj), 1)));
qntjParam.setLarqJssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(jssj), 1)));
Integer qnlian = ajtjMapper.getGmrsqlFaCount(qntjParam);
......@@ -897,6 +909,7 @@ public class AjtjServiceImpl implements AjtjService {
" ,'040001000600' ,'040001009900' \n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
Integer lian = ajtjMapper.getGmrsqlFaCount(ajtjParam);
Integer poan = ajtjMapper.getGmrsqlPaCount(ajtjParam);
ajtjParam.setJabz("1");
......@@ -908,6 +921,8 @@ public class AjtjServiceImpl implements AjtjService {
AjtjParam qntjParam = new AjtjParam();
qntjParam.setAjlbsql(ajlbsql);
try {
qntjParam.setUnitcode(ajtjParam.getUnitcode());
setDwxx(qntjParam);
qntjParam.setLarqQssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(kssj), 1)));
qntjParam.setLarqJssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(jssj), 1)));
Integer qnlian = ajtjMapper.getGmrsqlFaCount(qntjParam);
......@@ -962,6 +977,7 @@ public class AjtjServiceImpl implements AjtjService {
" '02002601','02002604','02002607','02002610','02002613','02003101','02003103','03020100'\n" +
" ) ";
ajtjParam.setAjlbsql(ajlbsql);
setDwxx(ajtjParam);
Integer lian = ajtjMapper.getGmrsqlFaCount(ajtjParam);
Integer poan = ajtjMapper.getGmrsqlPaCount(ajtjParam);
ajtjParam.setJabz("1");
......@@ -973,6 +989,8 @@ public class AjtjServiceImpl implements AjtjService {
AjtjParam qntjParam = new AjtjParam();
qntjParam.setAjlbsql(ajlbsql);
try {
qntjParam.setUnitcode(ajtjParam.getUnitcode());
setDwxx(qntjParam);
qntjParam.setLarqQssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(kssj), 1)));
qntjParam.setLarqJssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(jssj), 1)));
Integer qnlian = ajtjMapper.getGmrsqlFaCount(qntjParam);
......@@ -1019,7 +1037,7 @@ public class AjtjServiceImpl implements AjtjService {
public ZztTjResult getAjZarszzt(AjtjParam ajtjParam) {
ZztTjResult jntj = new ZztTjResult();
setDwxx(ajtjParam);
Integer jnone =ajtjMapper.getAjPbrs(ajtjParam);
Integer jntwo = ajtjMapper.getAjZars(ajtjParam);
......@@ -1028,6 +1046,8 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
AjtjParam qntjParam = new AjtjParam();
try {
qntjParam.setUnitcode(ajtjParam.getUnitcode());
setDwxx(qntjParam);
qntjParam.setLarqQssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(kssj), 1)));
qntjParam.setLarqJssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(jssj), 1)));
Integer qnone = ajtjMapper.getAjPbrs(qntjParam);
......@@ -1065,7 +1085,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override
public TbJnQntj getAjSwrstj(AjtjParam ajtjParam) {
TbJnQntj tj=new TbJnQntj();
setDwxx(ajtjParam);
Integer jnsw = ajtjMapper.getAjYsdrCount(ajtjParam);
......@@ -1074,6 +1094,8 @@ public class AjtjServiceImpl implements AjtjService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
AjtjParam qntjParam = new AjtjParam();
try {
qntjParam.setUnitcode(ajtjParam.getUnitcode());
setDwxx(qntjParam);
qntjParam.setLarqQssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(kssj), 1)));
qntjParam.setLarqJssj(sdf.format(DateUtil.getDateBeforeToYear(sdf.parse(jssj), 1)));
Integer qnsw = ajtjMapper.getAjYsdrCount(qntjParam);
......@@ -1100,6 +1122,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override
public Ajjgfbtj getAjjgfbt(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
Ajjgfbtj fbtj= ajtjMapper.getFaAjlbCount(ajtjParam);
int total=fbtj.getTotal(); //总数
int dqcount=fbtj.getDqcount(); //盗窃
......@@ -1116,6 +1139,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override
public Ajjgfbtj getByueAjjgfbt(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
Ajjgfbtj fbtj= ajtjMapper.getByueAjjgfbt(ajtjParam);
int total=fbtj.getTotal(); //总数
int dqcount=fbtj.getDqcount(); //盗窃
......@@ -1133,35 +1157,44 @@ public class AjtjServiceImpl implements AjtjService {
@Override
public List<TbStAsj> getYuefFaList(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
return ajtjMapper.getYuefFaList(ajtjParam);
}
@Override
public int getYuefFaListCount(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
return ajtjMapper.getYuefFaListCount(ajtjParam);
}
@Override
public List<TbStAsj> getFaList(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
return ajtjMapper.getFaList(ajtjParam);
}
@Override
public int getFaListCount(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
return ajtjMapper.getFaListCount(ajtjParam);
}
@Override
public List<TbXwRybh> getSwryList(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
return ajtjMapper.getSwryList(ajtjParam);
}
@Override
public int getSwryListCount(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
return ajtjMapper.getSwryListCount(ajtjParam);
}
@Override
public List<TbXwZbfzxyr> getZaryList(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
return ajtjMapper.getZaryList(ajtjParam);
}
@Override
public int getZaryListCount(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
return ajtjMapper.getZaryListCount(ajtjParam);
}
......
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