| | |
| | | |
| | | /** |
| | | * 派遣數量統計 |
| | | */ |
| | | @PostMapping("/selectPCount") |
| | | public R selectPCount(String jurisdiction, String deptid) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | Map map1 = informationService.selectPcount(jurisdiction, deptid); |
| | | String pnum = map1.get("pnum").toString(); |
| | | Integer a = Integer.valueOf(pnum); |
| | | Map map2 = informationService.selectWPcount(jurisdiction, deptid); |
| | | String wpnum = map2.get("wpnum").toString(); |
| | | Integer b = Integer.valueOf(wpnum); |
| | | map.put("PCount", a); |
| | | map.put("WPCount", b); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | | // */ |
| | | // @PostMapping("/selectPCount") |
| | | // public R selectPCount(String jurisdiction, String deptid) { |
| | | // Map<String, Object> map = new HashMap<String, Object>(); |
| | | // List<Map<String, Object>> lists = new ArrayList<>(); |
| | | // Map map1 = informationService.selectPcount(jurisdiction, deptid); |
| | | // String pnum = map1.get("pnum").toString(); |
| | | // Integer a = Integer.valueOf(pnum); |
| | | // Map map2 = informationService.selectWPcount(jurisdiction, deptid); |
| | | // String wpnum = map2.get("wpnum").toString(); |
| | | // Integer b = Integer.valueOf(wpnum); |
| | | // map.put("PCount", a); |
| | | // map.put("WPCount", b); |
| | | // lists.add(map); |
| | | // return R.data(lists); |
| | | // } |
| | | |
| | | |
| | | // /** |
| | | // * 单位列表 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 首页保安公司统计接口 |
| | | * |
| | |
| | | map.put("count", count); |
| | | map.put("list", maps); |
| | | lists.add(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | map.put("count", count); |
| | | map.put("list", maps); |
| | | lists.add(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | //保安总人数为0 |
| | | if (znum==0){ |
| | | continue; |
| | | } |
| | | else { |
| | | } else { |
| | | int a = znum / 2; |
| | | if (cznum<=a || sbnum<=a){ |
| | | count++; |
| | |
| | | map.put("count",count); |
| | | map.put("list",list1); |
| | | return R.data(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | //保安总人数为0 |
| | | if (znum==0){ |
| | | continue; |
| | | } |
| | | else { |
| | | } else { |
| | | int a = znum / 2; |
| | | if (cznum<=a || sbnum<=a){ |
| | | count++; |
| | |
| | | map.put("count", count); |
| | | map.put("List", list1); |
| | | return R.data(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | map.put("count", count); |
| | | map.put("List", list1); |
| | | return R.data(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | List<Map<Object, Object>> maps = informationService.selectCf(jurisdiction); |
| | | map.put("count", maps.size()); |
| | | return R.data(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) { |
| | | List<Map<Object, Object>> maps = informationService.selectIn(jurisdiction); |
| | | return R.data(maps); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)){ |
| | | IPage list = informationService.selectTb(Condition.getPage(query), jurisdiction, enterpriseName); |
| | | return R.data(list); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) { |
| | | IPage list = informationService.selectJj(Condition.getPage(query), jurisdiction, enterpriseName); |
| | | return R.data(list); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) { |
| | | IPage list = informationService.selectYw(Condition.getPage(query), jurisdiction, deptid, stats); |
| | | return R.data(list); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/selectPCount") |
| | | public R selectPCount(String jurisdiction, String deptid) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | Integer pnums = 0; |
| | | Integer wpnums = 0; |
| | | if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)) { |
| | | List<Map<String, Object>> list = informationService.seleP(jurisdiction, deptid); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String pnum = list.get(i).get("pnum").toString(); |
| | | Integer a = Integer.parseInt(pnum); |
| | | pnums += a; |
| | | String wpnum = list.get(i).get("wpnum").toString(); |
| | | Integer b = Integer.parseInt(wpnum); |
| | | wpnums += b; |
| | | } |
| | | } else { |
| | | String jurisdictiond = strArrays.substring(0, strArrays.length() - 1); |
| | | List<Map<String, Object>> list = informationService.seleP(jurisdictiond, deptid); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String pnum = list.get(i).get("pnum").toString(); |
| | | Integer a = Integer.parseInt(pnum); |
| | | pnums += a; |
| | | String wpnum = list.get(i).get("wpnum").toString(); |
| | | Integer b = Integer.parseInt(wpnum); |
| | | wpnums += b; |
| | | } |
| | | } |
| | | // Map map1 = informationService.selectPcount(jurisdiction, deptid); |
| | | // String pnum = map1.get("pnum").toString(); |
| | | // Integer a = Integer.valueOf(pnum); |
| | | // Map map2 = informationService.selectWPcount(jurisdiction, deptid); |
| | | // String wpnum = map2.get("wpnum").toString(); |
| | | // Integer b = Integer.valueOf(wpnum); |
| | | map.put("PCount", pnums); |
| | | map.put("WPCount", wpnums); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | | |
| | | } |
| | |
| | | List<Map<Object,String>> selectInCount(String jurisdiction,String deptid); |
| | | List<Map<String, Object>> selectCs(String jurisdiction,String deptid); |
| | | List<Map<String, Object>> selectTo(String jurisdiction,String deptid); |
| | | List<Map<String, Object>> seleP(String jurisdiction,String deptid); |
| | | Map<String, String> queryYearSoil(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearPz(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearAn(String year,String jurisdiction,String deptid); |
| | |
| | | |
| | | |
| | | <!--总保安数量--> |
| | | <!-- <select id="queryCountB" resultType="java.util.HashMap">--> |
| | | <!-- SELECT--> |
| | | <!-- C.thisnum,--> |
| | | <!-- C.lastnum,--> |
| | | <!-- d.dept_name AS deptname,--> |
| | | <!-- j.dept_name AS jurname--> |
| | | <!-- FROM--> |
| | | <!-- (--> |
| | | <!-- SELECT--> |
| | | <!-- IFNULL( A.thisnum, 0 ) AS thisnum,--> |
| | | <!-- IFNULL( B.lastnum, 0 ) AS lastnum,--> |
| | | <!-- A.dept_id,--> |
| | | <!-- A.jurisdiction--> |
| | | <!-- FROM--> |
| | | <!-- (--> |
| | | <!-- SELECT--> |
| | | <!-- COUNT( * ) AS thisnum,--> |
| | | <!-- dept_id,--> |
| | | <!-- jurisdiction--> |
| | | <!-- FROM--> |
| | | <!-- blade_user--> |
| | | <!-- WHERE--> |
| | | <!-- role_id = '1412226235153731586' and status=1 and is_deleted=0--> |
| | | <!-- AND DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ), '%Y%m' )--> |
| | | <!-- GROUP BY--> |
| | | <!-- dept_id,--> |
| | | <!-- jurisdiction--> |
| | | <!-- ) A--> |
| | | <!-- LEFT JOIN (--> |
| | | <!-- SELECT--> |
| | | <!-- COUNT( * ) AS lastnum,--> |
| | | <!-- dept_id,--> |
| | | <!-- jurisdiction--> |
| | | <!-- FROM--> |
| | | <!-- blade_user--> |
| | | <!-- WHERE--> |
| | | <!-- role_id = '1412226235153731586' and status=1 and is_deleted=0--> |
| | | <!-- AND PERIOD_DIFF( date_format( now( ), '%Y%m' ), date_format( create_time, '%Y%m' ) ) = 1--> |
| | | <!-- GROUP BY--> |
| | | <!-- dept_id,--> |
| | | <!-- jurisdiction--> |
| | | <!-- ) 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!='' and jurisdiction!='1372091709474910209'">--> |
| | | <!-- and C.jurisdiction =#{jurisdiction}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="deptid!=null and deptid!=''">--> |
| | | <!-- and C.dept_id =#{deptid}--> |
| | | <!-- </if>--> |
| | | <!-- </select>--> |
| | | <select id="queryCountB" resultType="java.util.HashMap"> |
| | | SELECT |
| | | C.thisnum, |
| | | C.lastnum, |
| | | d.dept_name AS deptname, |
| | | j.dept_name AS jurname |
| | | FROM |
| | | ( |
| | | SELECT |
| | | IFNULL( A.thisnum, 0 ) AS thisnum, |
| | | SELECT IFNULL(A.thisnum, 0) AS thisnum, |
| | | IFNULL( B.lastnum, 0 ) AS lastnum, |
| | | A.dept_id, |
| | | A.jurisdiction |
| | | FROM |
| | | ( |
| | | SELECT |
| | | COUNT( * ) AS thisnum, |
| | | dept_id, |
| | | jurisdiction |
| | | FROM |
| | | blade_user |
| | | WHERE |
| | | role_id = '1412226235153731586' and status=1 and is_deleted=0 |
| | | AND DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ), '%Y%m' ) |
| | | GROUP BY |
| | | dept_id, |
| | | jurisdiction |
| | | ) A |
| | | H.departmentid, |
| | | H.jurisdiction |
| | | FROM (SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction) H |
| | | LEFT JOIN ( |
| | | SELECT |
| | | COUNT( * ) AS lastnum, |
| | | dept_id, |
| | | jurisdiction |
| | | FROM |
| | | blade_user |
| | | WHERE |
| | | role_id = '1412226235153731586' and status=1 and is_deleted=0 |
| | | SELECT COUNT(*) AS thisnum, |
| | | dept_id |
| | | FROM blade_user |
| | | WHERE role_id = '1412226235153731586' |
| | | AND STATUS = 1 |
| | | AND is_deleted = 0 |
| | | AND DATE_FORMAT(create_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m') |
| | | GROUP BY dept_id |
| | | ) A ON A.dept_id = H.departmentid |
| | | LEFT JOIN ( |
| | | SELECT COUNT(*) AS lastnum, |
| | | dept_id |
| | | FROM blade_user |
| | | WHERE role_id = '1412226235153731586' |
| | | AND STATUS = 1 |
| | | AND is_deleted = 0 |
| | | AND PERIOD_DIFF( date_format( now( ), '%Y%m' ), date_format( create_time, '%Y%m' ) ) = 1 |
| | | GROUP BY |
| | | dept_id, |
| | | jurisdiction |
| | | ) 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 |
| | | GROUP BY dept_id |
| | | ) B ON B.dept_id = H.departmentid where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'"> |
| | | and C.jurisdiction =#{jurisdiction} |
| | | and H.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and C.dept_id =#{deptid} |
| | | and H.departmentid =#{deptid} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | J.departmentid, J.cznum, J.ghnum, J.ghnum, J.pcnum, J.sbnum, J.zcnum, J.znum, J.jurname,J.jurisdiction |
| | | </select> |
| | | |
| | | <select id="seleP" resultType="java.util.HashMap"> |
| | | SELECT |
| | | IFNULL(G.pnum, 0) AS pnum, |
| | | IFNULL(J.wpnum, 0) AS wpnum |
| | | FROM (SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction) H |
| | | LEFT JOIN ( |
| | | SELECT COUNT(*) AS pnum, |
| | | dept_id |
| | | FROM blade_user |
| | | WHERE dispatch = 0 |
| | | AND STATUS = 1 |
| | | AND is_deleted = 0 |
| | | GROUP BY dept_id |
| | | ) G ON G.dept_id = H.departmentid |
| | | LEFT JOIN ( |
| | | SELECT COUNT(*) AS wpnum, |
| | | dept_id |
| | | FROM blade_user |
| | | WHERE dispatch = 1 |
| | | AND STATUS = 1 |
| | | AND is_deleted = 0 |
| | | GROUP BY dept_id |
| | | ) J ON J.dept_id = H.departmentid where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'"> |
| | | and H.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and H.departmentid =#{deptid} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--公司经济情况进入图表--> |
| | | <select id="selectJj" resultType="java.util.HashMap"> |
| | | SELECT J.* |
| | |
| | | |
| | | <!--获取保安公司信息(本市保安公司,分公司)包含经纬度--> |
| | | <select id="getSecurityUnitPositionInfo" resultType="org.springblade.modules.information.vo.InformationVO"> |
| | | select |
| | | si.*,sj.dept_name jurisdictionName |
| | | from |
| | | sys_information si |
| | | select si.*, |
| | | sj.dept_name jurisdictionName |
| | | from sys_information si |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | |
| | | </select> |
| | | |
| | | <sql id="getSecurity"> |
| | | select |
| | | dept_id,ifnull(count(*),0) count |
| | | select dept_id, |
| | | ifnull(count(*), 0) count |
| | | from blade_user bu |
| | | left join blade_role br |
| | | on bu.role_id = br.id |
| | |
| | | List<Map<Object,Object>> selJur(); |
| | | String selJurchilder(String id); |
| | | List<Map<Object,Object>> seleJuList(String substring); |
| | | |
| | | //派遣统计图表 |
| | | List<Map<String, Object>> seleP(String jurisdiction,String deptid); |
| | | /** |
| | | * 获取保安公司信息(本市保安公司,分公司)包含经纬度 |
| | | * @return |
| | |
| | | return baseMapper.seleJuList(substring); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> seleP(String jurisdiction, String deptid) { |
| | | return baseMapper.seleP(jurisdiction, deptid); |
| | | } |
| | | |
| | | /** |
| | | * 获取保安公司信息(本市保安公司,分公司)包含经纬度 |
| | | * @return |