| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 实体类 |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 身份证 |
| | | */ |
| | | @ApiModelProperty(value = "身份证") |
| | | private String cardid; |
| | | * 身份证 |
| | | */ |
| | | @ApiModelProperty(value = "身份证") |
| | | private String cardid; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 荣誉 |
| | | */ |
| | | @ApiModelProperty(value = "荣誉") |
| | | private String honor; |
| | | * 荣誉 |
| | | */ |
| | | @ApiModelProperty(value = "荣誉") |
| | | private String honor; |
| | | /** |
| | | * 获取时间 |
| | | */ |
| | | @ApiModelProperty(value = "获取时间") |
| | | @TableField("honorTime") |
| | | private LocalDateTime honortime; |
| | | * 获取时间 |
| | | */ |
| | | @ApiModelProperty(value = "获取时间") |
| | | @TableField("honorTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date honortime; |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | /** 未缴社保数量 |
| | | * 通过辖区查询机构id,然后通过机构id查询当前机构交社保的人数(numj单位已交社保数量;numz单位人员总数) |
| | | */ |
| | | @PostMapping("/selectCs") |
| | |
| | | Integer khb=0; |
| | | Integer pqa=0; |
| | | Integer pqb=0; |
| | | String deptname=null; |
| | | String jurname=null; |
| | | //保安员数量 |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Map<String, Object> mapzc = new HashMap<String, Object>(); |
| | |
| | | Map<String, Object> mapkh = new HashMap<String, Object>(); |
| | | Map<String, Object> mappq = new HashMap<String, Object>(); |
| | | Map<String, Object> mapC = new HashMap<String, Object>(); |
| | | List<Map<Object, Integer>> maps = informationService.queryCountB(jurisdiction, deptid); |
| | | List<Map<Object, Object>> maps = informationService.queryCountB(jurisdiction, deptid); |
| | | for (int i=0;i<maps.size();i++){ |
| | | //这个月数量 |
| | | a+=maps.get(i).get("thisnum"); |
| | | String thisnum = maps.get(i).get("thisnum").toString(); |
| | | a+= Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | b+= maps.get(i).get("lastnum"); |
| | | String lastnum = maps.get(i).get("lastnum").toString(); |
| | | b+=Integer.valueOf(lastnum); |
| | | |
| | | } |
| | | map.put("thisnum",a); |
| | | map.put("lastnum",b); |
| | | map.put("List",maps); |
| | | mapC.put("baoan",map); |
| | | //正常保安员数量 |
| | | List<Map<Object, Integer>> maps1 = informationService.queryCountZc(jurisdiction, deptid); |
| | | List<Map<Object, Object>> maps1 = informationService.queryCountZc(jurisdiction, deptid); |
| | | for (int i=0;i<maps1.size();i++){ |
| | | //这个月数量 |
| | | zca+= maps1.get(i).get("thisnum"); |
| | | String thisnum = maps1.get(i).get("thisnum").toString(); |
| | | zca+= Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | zcb+= maps1.get(i).get("lastnum"); |
| | | String lastnum = maps1.get(i).get("lastnum").toString(); |
| | | zcb+= Integer.valueOf(lastnum); |
| | | } |
| | | mapzc.put("thisnum",zca); |
| | | mapzc.put("lastnum",zcb); |
| | | mapzc.put("List",maps1); |
| | | mapC.put("zcbaoan",mapzc); |
| | | //持证保安数量 |
| | | List<Map<Object, Integer>> maps2 = informationService.queryCountCz(jurisdiction, deptid); |
| | | List<Map<Object, Object>> maps2 = informationService.queryCountCz(jurisdiction, deptid); |
| | | for (int i=0;i<maps2.size();i++){ |
| | | //这个月数量 |
| | | cza+=maps2.get(i).get("thisnum"); |
| | | String thisnum = maps2.get(i).get("thisnum").toString(); |
| | | cza+= Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | czb+= maps2.get(i).get("lastnum"); |
| | | String lastnum = maps2.get(i).get("lastnum").toString(); |
| | | czb+= Integer.valueOf(lastnum); |
| | | } |
| | | mapcz.put("thisnum",cza); |
| | | mapcz.put("lastnum",czb); |
| | | mapcz.put("List",maps2); |
| | | mapC.put("czbaoan",mapcz); |
| | | //缴纳社保数量 |
| | | List<Map<Object, Integer>> maps3 = informationService.queryCountSb(jurisdiction, deptid); |
| | | List<Map<Object, Object>> maps3 = informationService.queryCountSb(jurisdiction, deptid); |
| | | for (int i=0;i<maps3.size();i++){ |
| | | //这个月数量 |
| | | sba+=maps3.get(i).get("thisnum"); |
| | | String thisnum = maps3.get(i).get("thisnum").toString(); |
| | | sba+= Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | sbb+=maps3.get(i).get("lastnum"); |
| | | String lastnum = maps3.get(i).get("lastnum").toString(); |
| | | sbb+= Integer.valueOf(lastnum); |
| | | } |
| | | mapsb.put("thisnum",sba); |
| | | mapsb.put("lastnum",sbb); |
| | | mapC.put("sbbaoan",mapsb); |
| | | mapsb.put("List",maps3); |
| | | mapC.put("sheb",mapsb); |
| | | //服务客户数量 |
| | | List<Map<Object, Integer>> maps4 = informationService.queryCountKh(jurisdiction, deptid); |
| | | List<Map<Object, Object>> maps4 = informationService.queryCountKh(jurisdiction, deptid); |
| | | for (int i=0;i<maps4.size();i++){ |
| | | //这个月数量 |
| | | kha+=maps4.get(i).get("thisnum"); |
| | | String thisnum = maps4.get(i).get("thisnum").toString(); |
| | | kha+= Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | khb+=maps4.get(i).get("lastnum"); |
| | | String lastnum = maps4.get(i).get("lastnum").toString(); |
| | | khb+= Integer.valueOf(lastnum); |
| | | } |
| | | mapkh.put("thisnum",kha); |
| | | mapkh.put("lastnum",khb); |
| | | mapkh.put("List",maps4); |
| | | mapC.put("kh",mapkh); |
| | | //保安派遣数量 |
| | | List<Map<Object, Integer>> maps5 = informationService.queryCountPq(jurisdiction, deptid); |
| | | List<Map<Object, Object>> maps5 = informationService.queryCountPq(jurisdiction, deptid); |
| | | for (int i=0;i<maps5.size();i++){ |
| | | //这个月数量 |
| | | pqa+=maps5.get(i).get("thisnum"); |
| | | String thisnum = maps5.get(i).get("thisnum").toString(); |
| | | pqa+= Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | pqb+=maps5.get(i).get("lastnum"); |
| | | String lastnum = maps5.get(i).get("lastnum").toString(); |
| | | pqb+= Integer.valueOf(lastnum); |
| | | } |
| | | mappq.put("thisnum",pqa); |
| | | mappq.put("lastnum",pqb); |
| | | mappq.put("List",maps5); |
| | | mapC.put("paiq",mappq); |
| | | lists.add(mapC); |
| | | return R.data(lists); |
| | |
| | | //保安持证数量 |
| | | Map<String, String> mapcz = informationService.queryYearZc(year,jurisdiction,deptid); |
| | | mapcz = (HashMap<String, String>) sortMapBykeyAsc(mapcz) ;//key升序 |
| | | mapcz1.put("cz",mapcz); |
| | | mapcz1.put("chiz",mapcz); |
| | | lists.add(mapcz1); |
| | | //缴纳社保数 |
| | | Map<String, String> mapsb = informationService.queryYearSoil(year,jurisdiction,deptid); |
| | | mapsb = (HashMap<String, String>) sortMapBykeyAsc(mapsb) ;//key升序 |
| | | mapsb1.put("sb",mapsb); |
| | | mapsb1.put("sheb",mapsb); |
| | | //保安派遣 |
| | | Map<String, String> mapde = informationService.queryYearBanan(year, jurisdiction, deptid); |
| | | mapde = (HashMap<String, String>) sortMapBykeyAsc(mapde) ;//key升序 |
| | | mapsb1.put("paiq",mapde); |
| | | lists.add(mapsb1); |
| | | return R.data(lists); |
| | | } |
| | |
| | | Calendar cal = Calendar.getInstance(); |
| | | String year = String.valueOf(cal.get(Calendar.YEAR)); |
| | | Map<String, String> map = informationService.queryYearKh(year,jurisdiction,deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map) ;//key升序 |
| | | return R.data(map); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询本年所有月份的保安派遣数量 |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearBanan") |
| | | public R queryYearBanan(String jurisdiction,String deptid) { |
| | | Calendar cal = Calendar.getInstance(); |
| | | String year = String.valueOf(cal.get(Calendar.YEAR)); |
| | | Map<String, String> map = informationService.queryYearBanan(year,jurisdiction,deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map) ;//key升序 |
| | | return R.data(map); |
| | | } |
| | |
| | | return sortedMap; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 统计保安员资格异常的数量 |
| | | */ |
| | | @PostMapping("/selectExtype") |
| | | public R selectExtype(String jurisdiction,String deptid) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Integer count=0; |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | List<Map<Object, Integer>> maps = informationService.selectExtype(jurisdiction, deptid); |
| | | for (int i=0;i<maps.size();i++){ |
| | | count+=maps.get(i).get("num"); |
| | | } |
| | | map.put("count",count); |
| | | map.put("list",maps); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | | |
| | | /** |
| | | * 统计保安员表现差的数量 |
| | | */ |
| | | @PostMapping("/selectBx") |
| | | public R selectBx(String jurisdiction,String deptid) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Integer count=0; |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | List<Map<Object, Integer>> maps = informationService.selectExtype(jurisdiction, deptid); |
| | | for (int i=0;i<maps.size();i++){ |
| | | count+=maps.get(i).get("num"); |
| | | } |
| | | map.put("count",count); |
| | | map.put("list",maps); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 分局预警统计 |
| | | */ |
| | | @PostMapping("/selectFj") |
| | | public R selectFj(){ |
| | | //辖区信息 |
| | | List<Map<Object, Object>> list = informationService.selectJur(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | for (int i=0;i<list.size();i++){ |
| | | Integer count=0; |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | //辖区id |
| | | String jurisdiction = list.get(i).get("id").toString(); |
| | | //辖区名称 |
| | | String jurname = list.get(i).get("dept_name").toString(); |
| | | //保安员表现差预警数量 |
| | | List<Map<Object, Integer>> mapbx = informationService.selectBx(jurisdiction, ""); |
| | | for (int ibx=0;ibx<mapbx.size();ibx++){ |
| | | count+=mapbx.get(ibx).get("num"); |
| | | } |
| | | //保安员资格异常的数量 |
| | | List<Map<Object, Integer>> mapEx = informationService.selectExtype(jurisdiction, ""); |
| | | for (int iex=0;iex<mapEx.size();iex++){ |
| | | count+=mapEx.get(iex).get("num"); |
| | | } |
| | | //保安公司未持证数量 |
| | | List<Map<Object, String>> mapgs = informationService.selectInCount(jurisdiction,""); |
| | | count+=mapgs.size(); |
| | | //未缴社保数量 |
| | | List<Map<String, Object>> mapsb = informationService.selectCs(jurisdiction,""); |
| | | for (int isb=0;isb<mapsb.size();isb++){ |
| | | //交社保数 |
| | | String numjs = mapsb.get(isb).get("numj").toString(); |
| | | Integer numj = Integer.parseInt(numjs); |
| | | //单位总人数 |
| | | String numzs = mapsb.get(isb).get("numz").toString(); |
| | | Integer numz = Integer.parseInt(numzs); |
| | | //统计未交社保人数 |
| | | int i1 = numz - numj; |
| | | count+=i1; |
| | | } |
| | | map.put("Count",count); |
| | | map.put("jurname",jurname); |
| | | lists.add(map); |
| | | } |
| | | return R.data(lists); |
| | | } |
| | | } |
| | |
| | | List<Map<String, Object>> selectTo(String jurisdiction,String deptid); |
| | | Map<String, String> queryYearSoil(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearAn(String year,String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountB(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountZc(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountCz(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountSb(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountKh(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountPq(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountB(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountZc(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountCz(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountSb(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountKh(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountPq(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectJur(); |
| | | List<Map<Object,Integer>> selectExtype(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> selectBx(String jurisdiction,String deptid); |
| | | |
| | | Map<String, String> queryYearZ(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearZc(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearCz(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearKh(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearBanan(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearDe(String year,String jurisdiction,String deptid); |
| | | } |
| | |
| | | WHERE A.jurisdiction = #{departmentid} |
| | | </select> |
| | | |
| | | |
| | | <!--保安公司未持证预警--> |
| | | <select id="selectInCount" resultType="java.util.HashMap"> |
| | | SELECT |
| | |
| | | WHERE dept_id IN (SELECT i.departmentid |
| | | FROM sys_information i |
| | | LEFT JOIN sys_jurisdiction j ON j.id = i.jurisdiction where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!=''"> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and i.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | GROUP BY i.departmentid) |
| | |
| | | and deptid =#{deptid} |
| | | </if> |
| | | </select> |
| | | <!--查询本年所有月份的保安派遣的数量--> |
| | | <select id="queryYearDe" resultType="java.util.HashMap"> |
| | | SELECT SUM |
| | | ( CASE WHEN MONTH ( s.dispatcherTime ) = 1 THEN s.num END ) AS '1', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 2 THEN s.num END ) AS '2', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 3 THEN s.num END ) AS '3', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 4 THEN s.num END ) AS '4', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 5 THEN s.num END ) AS '5', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 6 THEN s.num END ) AS '6', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 7 THEN s.num END ) AS '7', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 8 THEN s.num END ) AS '8', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 9 THEN s.num END ) AS '9', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 10 THEN s.num END ) AS '10', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 11 THEN s.num END ) AS '11', |
| | | SUM ( CASE WHEN MONTH ( s.dispatcherTime ) = 12 THEN s.num END ) AS '12' |
| | | FROM |
| | | sys_dispatcher AS s |
| | | WHERE |
| | | YEAR ( s.dispatcherTime ) =#{year} |
| | | AND dept_id IN ( SELECT i.departmentid FROM sys_information i LEFT JOIN sys_jurisdiction j ON j.id= |
| | | i.jurisdiction where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and i.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | GROUP BY i.departmentid ) |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and dept_id =#{deptid} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询本年所有月份的交社保的金额--> |
| | | <select id="queryYearAn" resultType="java.util.HashMap"> |
| | |
| | | ) B ON A.dept_id = B.dept_id) C |
| | | LEFT JOIN blade_dept d ON C.dept_id = d.id |
| | | LEFT JOIN sys_jurisdiction j ON j.id = C.jurisdiction where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!=''"> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and C.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | |
| | | dept_id, |
| | | jurisdiction |
| | | FROM blade_user |
| | | WHERE role_id = '1413323482159321089' |
| | | WHERE role_id = '1413323482159321089' |
| | | AND examination_type = 0 |
| | | AND datediff( |
| | | MONTH, create_time, |
| | |
| | | ) B ON A.dept_id = B.dept_id) C |
| | | LEFT JOIN blade_dept d ON C.dept_id = d.id |
| | | LEFT JOIN sys_jurisdiction j ON j.id = C.jurisdiction where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!=''"> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and C.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | |
| | | dept_id, |
| | | jurisdiction |
| | | FROM blade_user |
| | | WHERE role_id = '1413323482159321089' |
| | | WHERE role_id = '1413323482159321089' |
| | | AND hold = 0 |
| | | AND datediff( |
| | | MONTH, create_time, |
| | |
| | | dept_id, |
| | | jurisdiction |
| | | FROM blade_user |
| | | WHERE role_id = '1413323482159321089' |
| | | WHERE role_id = '1413323482159321089' |
| | | AND hold = 0 |
| | | AND datediff( |
| | | MONTH, create_time, |
| | |
| | | ) B ON A.dept_id = B.dept_id) C |
| | | LEFT JOIN blade_dept d ON C.dept_id = d.id |
| | | LEFT JOIN sys_jurisdiction j ON j.id = C.jurisdiction where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!=''"> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and C.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | |
| | | ) C |
| | | LEFT JOIN blade_dept d ON C.deptid = d.id |
| | | LEFT JOIN sys_jurisdiction j ON j.id = c.jurisdiction where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!=''"> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and C.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | |
| | | dept_id, |
| | | jurisdiction |
| | | FROM sys_dispatcher |
| | | WHERE datediff( |
| | | WHERE datediff( |
| | | MONTH, dispatcherTime, |
| | | getdate()) = 0 |
| | | GROUP BY dept_id, |
| | |
| | | ) C |
| | | LEFT JOIN blade_dept d ON C.dept_id = d.id |
| | | LEFT JOIN sys_jurisdiction j ON j.id = c.jurisdiction WHERE 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!=''"> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and C.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | |
| | | ) B ON A.dept_id = B.dept_id) C |
| | | LEFT JOIN blade_dept d ON C.dept_id = d.id |
| | | LEFT JOIN sys_jurisdiction j ON j.id = c.jurisdiction where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!=''"> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and C.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | |
| | | GROUP BY |
| | | i.departmentid |
| | | ) |
| | | AND role_id='1413323482159321089' AND examination=0 |
| | | AND role_id='1413323482159321089' AND examination_type=0 |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and dept_id =#{deptid} |
| | | </if> |
| | |
| | | <!--查询本年所有月份的客户数量--> |
| | | <select id="queryYearKh" resultType="java.util.HashMap"> |
| | | SELECT COUNT |
| | | ( CASE WHEN MONTH ( s.create_time ) = 1 THEN s.dept_id END ) AS '1', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 2 THEN s.dept_id END ) AS '2', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 3 THEN s.dept_id END ) AS '3', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 4 THEN s.dept_id END ) AS '4', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 5 THEN s.dept_id END ) AS '5', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 6 THEN s.dept_id END ) AS '6', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 7 THEN s.dept_id END ) AS '7', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 8 THEN s.dept_id END ) AS '8', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 9 THEN s.dept_id END ) AS '9', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 10 THEN s.dept_id END ) AS '10', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 11 THEN s.dept_id END ) AS '11', |
| | | COUNT ( CASE WHEN MONTH ( s.create_time ) = 12 THEN s.dept_id END ) AS '12' |
| | | FROM |
| | | sys_dispatcher_unit AS s |
| | | (CASE WHEN MONTH ( |
| | | s.dispatcherTime ) = 1 THEN s.dispatcher_unit_id END ) AS '1', COUNT(CASE WHEN MONTH ( s.dispatcherTime ) = 2 |
| | | THEN s.dispatcher_unit_id END ) AS '2', COUNT(CASE WHEN MONTH ( s.dispatcherTime ) = 3 THEN s.dispatcher_unit_id |
| | | END ) AS '3', COUNT(CASE WHEN MONTH ( s.dispatcherTime ) = 4 THEN s.dispatcher_unit_id END ) AS '4', COUNT(CASE |
| | | WHEN MONTH ( s.dispatcherTime ) = 5 THEN s.dispatcher_unit_id END ) AS '5', COUNT(CASE WHEN MONTH ( |
| | | s.dispatcherTime ) = 6 THEN s.dispatcher_unit_id END ) AS '6', COUNT(CASE WHEN MONTH ( s.dispatcherTime ) = 7 |
| | | THEN s.dispatcher_unit_id END ) AS '7', COUNT(CASE WHEN MONTH ( s.dispatcherTime ) = 8 THEN s.dispatcher_unit_id |
| | | END ) AS '8', COUNT(CASE WHEN MONTH ( s.dispatcherTime ) = 9 THEN s.dispatcher_unit_id END ) AS '9', COUNT(CASE |
| | | WHEN MONTH ( s.dispatcherTime ) = 10 THEN s.dispatcher_unit_id END ) AS '10', COUNT(CASE WHEN MONTH ( |
| | | s.dispatcherTime ) = 11 THEN s.dispatcher_unit_id END ) AS '11', COUNT(CASE WHEN MONTH ( s.dispatcherTime ) = 12 |
| | | THEN s.dispatcher_unit_id END ) AS '12' |
| | | FROM sys_dispatcher AS s |
| | | WHERE |
| | | YEAR ( s.create_time ) =#{year} |
| | | YEAR ( s.dispatcherTime ) =#{year} |
| | | AND dept_id IN ( |
| | | SELECT |
| | | i.departmentid |
| | |
| | | and dept_id =#{deptid} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询本年所有月份的保安派遣数量--> |
| | | <select id="queryYearBanan" resultType="java.util.HashMap"> |
| | | SELECT ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 1 THEN s.num END ), 0) AS '1', ISNULL(SUM(CASE WHEN |
| | | MONTH ( s.dispatcherTime ) = 2 THEN s.num END ), 0) AS '2', ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 3 |
| | | THEN s.num END ), 0) AS '3', ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 4 THEN s.num END ), 0) AS '4', |
| | | ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 5 THEN s.num END ), 0) AS '5', ISNULL(SUM(CASE WHEN MONTH ( |
| | | s.dispatcherTime ) = 6 THEN s.num END ), 0) AS '6', ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 7 THEN |
| | | s.num END ), 0) AS '7', ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 8 THEN s.num END ), 0) AS '8', |
| | | ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 9 THEN s.num END ), 0) AS '9', ISNULL(SUM(CASE WHEN MONTH ( |
| | | s.dispatcherTime ) = 10 THEN s.num END ), 0) AS '10', ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 11 THEN |
| | | s.num END ), 0) AS '11', ISNULL(SUM(CASE WHEN MONTH ( s.dispatcherTime ) = 12 THEN s.num END ), 0) AS '12' |
| | | FROM sys_dispatcher AS s |
| | | WHERE |
| | | YEAR ( s.dispatcherTime ) = '2021' |
| | | AND dept_id IN ( |
| | | SELECT |
| | | i.departmentid |
| | | FROM |
| | | sys_information i |
| | | LEFT JOIN sys_jurisdiction j ON j.id= i.jurisdiction where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and i.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | GROUP BY |
| | | i.departmentid ) |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and deptid =#{deptid} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!--资格审查异常数量--> |
| | | <select id="selectExtype" resultType="java.util.HashMap"> |
| | | SELECT COUNT |
| | | (*) as num, |
| | | d.dept_name, |
| | | j.dept_name AS jurname |
| | | FROM blade_user u |
| | | LEFT JOIN blade_dept d ON d.id = u.dept_id |
| | | LEFT JOIN sys_jurisdiction j ON j.id = u.jurisdiction |
| | | WHERE u.examination_type = 2 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and u.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and u.dept_id =#{deptid} |
| | | </if> |
| | | GROUP BY d.dept_name, |
| | | j.dept_name |
| | | </select> |
| | | <!--表现差的数量--> |
| | | <select id="selectBx" resultType="java.util.HashMap"> |
| | | SELECT COUNT |
| | | (*) as num, |
| | | d.dept_name, |
| | | j.dept_name AS jurname |
| | | FROM sys_performance u |
| | | LEFT JOIN blade_dept d ON d.id = u.departmentid |
| | | LEFT JOIN sys_jurisdiction j ON j.id = u.jurisdiction |
| | | WHERE score = 3 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'"> |
| | | and u.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and u.departmentid =#{deptid} |
| | | </if> |
| | | GROUP BY d.dept_name, |
| | | j.dept_name |
| | | </select> |
| | | |
| | | <!--查询出所有辖区信息--> |
| | | <select id="selectJur" resultType="java.util.HashMap"> |
| | | SELECT id, dept_name |
| | | FROM sys_jurisdiction |
| | | WHERE id!=1123598813738675201 |
| | | </select> |
| | | </mapper> |
| | |
| | | List<Map<String, Object>> selectTo(String jurisdiction,String deptid); |
| | | Map<String, String> queryYearSoil(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearAn(String year,String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountB(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountZc(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountCz(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountSb(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountKh(String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> queryCountPq(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountB(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountZc(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountCz(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountSb(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountKh(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountPq(String jurisdiction,String deptid); |
| | | Map<String, String> queryYearZ(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearZc(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearCz(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearKh(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearBanan(String year,String jurisdiction,String deptid); |
| | | List<Map<Object,Integer>> selectExtype(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectJur(); |
| | | List<Map<Object,Integer>> selectBx(String jurisdiction,String deptid); |
| | | Map<String, String> queryYearDe(String year,String jurisdiction,String deptid); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Integer>> queryCountB(String jurisdiction, String deptid) { |
| | | public List<Map<Object, Object>> queryCountB(String jurisdiction, String deptid) { |
| | | return baseMapper.queryCountB(jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Integer>> queryCountZc(String jurisdiction, String deptid) { |
| | | public List<Map<Object, Object>> queryCountZc(String jurisdiction, String deptid) { |
| | | return baseMapper.queryCountZc(jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Integer>> queryCountCz(String jurisdiction, String deptid) { |
| | | public List<Map<Object, Object>> queryCountCz(String jurisdiction, String deptid) { |
| | | return baseMapper.queryCountCz(jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Integer>> queryCountSb(String jurisdiction, String deptid) { |
| | | public List<Map<Object, Object>> queryCountSb(String jurisdiction, String deptid) { |
| | | return baseMapper.queryCountSb(jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Integer>> queryCountKh(String jurisdiction, String deptid) { |
| | | public List<Map<Object, Object>> queryCountKh(String jurisdiction, String deptid) { |
| | | return baseMapper.queryCountKh(jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Integer>> queryCountPq(String jurisdiction, String deptid) { |
| | | public List<Map<Object, Object>> queryCountPq(String jurisdiction, String deptid) { |
| | | return baseMapper.queryCountPq(jurisdiction, deptid); |
| | | } |
| | | |
| | |
| | | return baseMapper.queryYearKh(year, jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> queryYearBanan(String year, String jurisdiction, String deptid) { |
| | | return baseMapper.queryYearBanan(year, jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Integer>> selectExtype(String jurisdiction, String deptid) { |
| | | return baseMapper.selectExtype(jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectJur() { |
| | | return baseMapper.selectJur(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Integer>> selectBx(String jurisdiction, String deptid) { |
| | | return baseMapper.selectBx(jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> queryYearDe(String year, String jurisdiction, String deptid) { |
| | | return baseMapper.queryYearDe(year, jurisdiction, deptid); |
| | | } |
| | | |
| | | |
| | | } |