| | |
| | | |
| | | import io.swagger.annotations.*; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | */ |
| | | @PostMapping("/selectLi") |
| | | public R<IPage> selectLi(String jurisdiction, String deptid, Query query) { |
| | | IPage list = informationService.selectLi(Condition.getPage(query),jurisdiction, deptid); |
| | | IPage list = informationService.selectLi(Condition.getPage(query), jurisdiction, deptid); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/selectTb") |
| | | public R<IPage> selectTb(String jurisdiction, String enterpriseName, Query query) { |
| | | IPage list =informationService.selectTb(Condition.getPage(query),jurisdiction, enterpriseName); |
| | | IPage list = informationService.selectTb(Condition.getPage(query), jurisdiction, enterpriseName); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/selectJj") |
| | | public R<IPage> selectJj(String jurisdiction, String enterpriseName, Query query) { |
| | | IPage list = informationService.selectJj(Condition.getPage(query),jurisdiction, enterpriseName); |
| | | IPage list = informationService.selectJj(Condition.getPage(query), jurisdiction, enterpriseName); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/selectYw") |
| | | public R<IPage> selectYw(String jurisdiction, String deptid, Query query) { |
| | | IPage list = informationService.selectYw(Condition.getPage(query),jurisdiction, deptid); |
| | | IPage list = informationService.selectYw(Condition.getPage(query), jurisdiction, deptid); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | * 保安员详情 |
| | | */ |
| | | @PostMapping("/selectUIn") |
| | | public R selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil) { |
| | | List<Map<Object, Object>> list = informationService.selectUIn(deptid, name, hold, photo, examinationtype, dispatch, soil); |
| | | public R<IPage> selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil,Query query) { |
| | | IPage list = informationService.selectUIn(Condition.getPage(query),deptid, name, hold, photo, examinationtype, dispatch, soil); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/selectDis") |
| | | public R<IPage> selectDis(String jurisdiction, String deptid, String fid, Query query) { |
| | | IPage list = informationService.selectDis(Condition.getPage(query),jurisdiction, deptid, fid); |
| | | IPage list = informationService.selectDis(Condition.getPage(query), jurisdiction, deptid, fid); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | * 违规经营 |
| | | */ |
| | | @PostMapping("/selectWg") |
| | | public R selectWg() { |
| | | List<Map<Object, Object>> list = informationService.selectWg(); |
| | | for (int i=0;i<list.size();i++){ |
| | | public R selectWg(String jurisdiction) { |
| | | List<Map<Object, Object>> list = informationService.selectWg(jurisdiction); |
| | | List list1 = new ArrayList(); |
| | | int count=0; |
| | | Map map = new HashMap(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | //总数 |
| | | String znums = list.get(i).get("znum").toString(); |
| | | int znum=Integer.parseInt(znums); |
| | | int znum = Integer.parseInt(znums); |
| | | //持证人数 |
| | | String cznums = list.get(i).get("cznum").toString(); |
| | | int cznum=Integer.parseInt(cznums); |
| | | int cznum = Integer.parseInt(cznums); |
| | | //缴纳社保人数 |
| | | String sbnums = list.get(i).get("sbnum").toString(); |
| | | int sbnum=Integer.parseInt(sbnums); |
| | | int sbnum = Integer.parseInt(sbnums); |
| | | //保安总人数为0 |
| | | if (znum==0){ |
| | | continue; |
| | | } |
| | | else { |
| | | int a = znum / 2; |
| | | if (cznum<=a || sbnum<=a){ |
| | | count++; |
| | | list1.add(list.get(i)); |
| | | } |
| | | } |
| | | } |
| | | return R.data(list); |
| | | map.put("count",count); |
| | | map.put("list",list1); |
| | | return R.data(map); |
| | | } |
| | | |
| | | /** |
| | | * 经营不善 |
| | | */ |
| | | @PostMapping("/selectJy") |
| | | public R selectJy() { |
| | | List<Map<Object, Object>> list = informationService.selectJy(); |
| | | for (int i=0;i<list.size();i++){ |
| | | |
| | | public R selectJy(String jurisdiction) { |
| | | List<Map<Object, Object>> list = informationService.selectJy(jurisdiction); |
| | | List list1 = new ArrayList(); |
| | | Map map = new HashMap(); |
| | | int count = 0; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String num = list.get(i).get("num").toString(); |
| | | int a = Integer.parseInt(num); |
| | | if (a == 0) { |
| | | count++; |
| | | list1.add(list.get(i)); |
| | | } |
| | | } |
| | | return R.data(list); |
| | | map.put("Count", count); |
| | | map.put("List", list1); |
| | | return R.data(map); |
| | | } |
| | | |
| | | /** |
| | | * 有实无名 |
| | | */ |
| | | @PostMapping("/selectYs") |
| | | public R selectYs(String jurisdiction) { |
| | | List<Map<Object, Object>> list = informationService.selectYs(jurisdiction); |
| | | List list1 = new ArrayList(); |
| | | Map map = new HashMap(); |
| | | int count = 0; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String num = list.get(i).get("num").toString(); |
| | | int a = Integer.parseInt(num); |
| | | if (a == 0) { |
| | | count++; |
| | | list1.add(list.get(i)); |
| | | } |
| | | } |
| | | map.put("Count", count); |
| | | map.put("List", list1); |
| | | return R.data(map); |
| | | } |
| | | |
| | | /** |
| | | * @return |
| | | */ |
| | | @PostMapping("/selectAge") |
| | | public R selectAge(String jurisdiction, String deptid) { |
| | | List<Map<Object, Object>> list = informationService.selectAge(jurisdiction, deptid); |
| | | int qcount = 0;//青年 |
| | | int zcount = 0;//中年 |
| | | int lcount = 0;//老年 |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String age = list.get(i).get("age").toString(); |
| | | int a = Integer.parseInt(age); |
| | | if (a <= 0) { |
| | | continue; |
| | | } else if (a >= 19 && a < 35) { |
| | | qcount ++; |
| | | } else if (a >= 36 && a < 59) { |
| | | zcount++; |
| | | } else { |
| | | lcount++; |
| | | } |
| | | } |
| | | Map map = new HashMap(); |
| | | map.put("qcount",qcount); |
| | | map.put("zcount",zcount); |
| | | map.put("lcount",lcount); |
| | | return R.data(map); |
| | | } |
| | | |
| | | |
| | |
| | | List<Map<Object,Object>> queryCountKh(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountPq(String jurisdiction,String deptid); |
| | | List selectYw(IPage page,String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectUIn(String deptid,String name,String hold,String photo,String examinationtype,String dispatch,String soil); |
| | | List selectUIn(IPage page,String deptid,String name,String hold,String photo,String examinationtype,String dispatch,String soil); |
| | | List<Map<Object,Object>> selectJur(); |
| | | int selectExtypeUser(); |
| | | List<Map<Object,Object>> selectExtype(String jurisdiction,String deptid,String type); |
| | |
| | | List<Map<Object,Object>> selectCl(String jurisdiction); |
| | | List<Map<Object,Object>> selectBx(String jurisdiction,String deptid,String type); |
| | | List<Map<Object,Object>> seCountI(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectAge(String jurisdiction,String deptid); |
| | | String seCountUm(String jurisdiction,String deptid); |
| | | String seCountUg(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectIn(String jurisdiction); |
| | |
| | | List selectJj(IPage page, String jurisdiction,String enterpriseName); |
| | | List selectDis(IPage page,String jurisdiction,String deptid,String fid); |
| | | List<Map<Object,Object>> selectFw(); |
| | | List<Map<Object,Object>> selectWg(); |
| | | List<Map<Object,Object>> selectJy(); |
| | | List<Map<Object,Object>> selectWg(String jurisdiction); |
| | | List<Map<Object,Object>> selectJy(String jurisdiction); |
| | | List<Map<Object,Object>> selectYs(String jurisdiction); |
| | | |
| | | Map<String, String> queryYearZ(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearZc(String year,String jurisdiction,String deptid); |
| | |
| | | and A.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and A.dept_id =#{deptid} |
| | | and d.dept_name like concat(concat('%', #{deptid}),'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | <select id="selectYw" resultType="java.util.HashMap"> |
| | | SELECT |
| | | A.enterpriseName, |
| | | A.departmentid, |
| | | A.jurisdiction, |
| | | A.dept_name as jurname, |
| | | IFNULL( B.num, 0 ) AS fwnum, |
| | | IFNULL( C.znum, 0 ) AS znum |
| | |
| | | AND A.jurisdiction=#{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and A.departmentid=#{deptid} |
| | | and A.dept_name like concat('%', #{deptid},'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | and di.jurisdiction =#{jurisdiction} |
| | | </if> |
| | | <if test="fid!=null and fid!=''"> |
| | | and di.dispatcher_unit_id=#{fid} |
| | | and u.name like concat('%', #{fid},'%') |
| | | </if> |
| | | </select> |
| | | <!--服务单位下拉--> |
| | |
| | | |
| | | <!--违规经营--> |
| | | <select id="selectWg" resultType="java.util.HashMap"> |
| | | SELECT A.enterpriseName, |
| | | A.representative, |
| | | A.establishTime, |
| | | A.registeredCapital, |
| | | A.capital, |
| | | A.representativecell, |
| | | A.contacts, |
| | | A.contactscell, |
| | | A.deptname, |
| | | A.jurname, |
| | | IFNULL(B.cznum, 0) AS cznum, |
| | | IFNULL(C.sbnum, 0) AS sbnum, |
| | | IFNULL(D.znum, 0) AS znum |
| | | SELECT A.*, |
| | | A.deptname, |
| | | A.jurname, |
| | | IFNULL(B.cznum, 0) AS cznum, |
| | | IFNULL(C.sbnum, 0) AS sbnum, |
| | | IFNULL(D.znum, 0) AS znum |
| | | FROM ( |
| | | SELECT u.enterpriseName, |
| | | u.representative, |
| | | u.establishTime, |
| | | u.registeredCapital, |
| | | u.capital, |
| | | u.representativecell, |
| | | u.contacts, |
| | | u.contactscell, |
| | | u.departmentid, |
| | | u.jurisdiction, |
| | | d.dept_name AS deptname, |
| | | j.dept_name AS jurname |
| | | FROM sys_information u |
| | | LEFT JOIN blade_dept d ON d.id = u.departmentid |
| | | LEFT JOIN sys_jurisdiction j ON j.id = u.jurisdiction |
| | | GROUP BY u.enterpriseName, |
| | | u.representative, |
| | | u.establishTime, |
| | | u.registeredCapital, |
| | | u.capital, |
| | | u.representativecell, |
| | | u.contacts, |
| | | u.contactscell, |
| | | u.departmentid, |
| | | u.jurisdiction, |
| | | d.dept_name, |
| | | j.dept_name |
| | | ) A |
| | | LEFT JOIN ( |
| | | SELECT COUNT(*) AS cznum, |
| | | dept_id |
| | | FROM blade_user |
| | | WHERE hold = 1 |
| | | AND role_id = '1412226235153731586' |
| | | AND is_deleted = 0 |
| | | GROUP BY dept_id |
| | | SELECT u.*, |
| | | d.dept_name AS deptname, |
| | | j.dept_name AS jurname |
| | | FROM sys_information u |
| | | LEFT JOIN blade_dept d ON d.id = u.departmentid |
| | | LEFT JOIN sys_jurisdiction j ON j.id = u.jurisdiction |
| | | ) A |
| | | LEFT JOIN ( |
| | | SELECT COUNT(*) AS cznum, |
| | | dept_id |
| | | FROM blade_user |
| | | WHERE hold = 1 |
| | | AND role_id = '1412226235153731586' |
| | | AND is_deleted = 0 |
| | | GROUP BY dept_id |
| | | ) B ON B.dept_id = A.departmentid |
| | | LEFT JOIN ( |
| | | SELECT COUNT(*) AS sbnum, |
| | | dept_id |
| | | FROM blade_user |
| | | WHERE soil = 0 |
| | | AND role_id = '1412226235153731586' |
| | | AND is_deleted = 0 |
| | | GROUP BY dept_id |
| | | LEFT JOIN ( |
| | | SELECT COUNT(*) AS sbnum, |
| | | dept_id |
| | | FROM blade_user |
| | | WHERE soil = 0 |
| | | AND role_id = '1412226235153731586' |
| | | AND is_deleted = 0 |
| | | GROUP BY dept_id |
| | | ) C ON C.dept_id = A.departmentid |
| | | LEFT JOIN (SELECT COUNT(*) AS znum, dept_id |
| | | FROM blade_user |
| | | WHERE role_id = '1412226235153731586' |
| | | AND is_deleted = 0 |
| | | GROUP BY dept_id) D ON D.dept_id = A.departmentid |
| | | LEFT JOIN (SELECT COUNT(*) AS znum, dept_id |
| | | FROM blade_user |
| | | WHERE role_id = '1412226235153731586' |
| | | AND is_deleted = 0 |
| | | GROUP BY dept_id) D ON D.dept_id = A.departmentid where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction != '' and jurisdiction != '1123598813738675201'"> |
| | | and A.jurisdiction = #{jurisdiction} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!--经营不善--> |
| | | <select id="selectJy" resultType="java.util.HashMap"> |
| | | SELECT i.*, |
| | | IFNULL(d.num, 0) as num |
| | | IFNULL(d.num, 0) as num |
| | | FROM sys_information i |
| | | LEFT JOIN (SELECT COUNT(*) num, dept_id FROM sys_dispatcher_unit GROUP BY dept_id) d |
| | | ON i.departmentid = d.dept_id |
| | | LEFT JOIN (SELECT COUNT(*) num, dept_id FROM sys_dispatcher_unit GROUP BY dept_id) d |
| | | ON i.departmentid = d.dept_id where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction != '' and jurisdiction != '1123598813738675201'"> |
| | | and i.jurisdiction = #{jurisdiction} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--有实无名--> |
| | | <select id="selectYs" resultType="java.util.HashMap"> |
| | | SELECT i.*, |
| | | IFNULL(d.num, 0) as num |
| | | FROM sys_information i |
| | | LEFT JOIN (SELECT COUNT(*) num, dept_id FROM blade_user WHERE role_id='1412226235153731586' GROUP BY dept_id) d |
| | | ON i.departmentid = d.dept_id where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction != '' and jurisdiction != '1123598813738675201'"> |
| | | and i.jurisdiction = #{jurisdiction} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectAge" resultType="java.util.HashMap"> |
| | | SELECT |
| | | IFNULL(TIMESTAMPDIFF( YEAR, bu.birthday, CURDATE( ) ),0) AS age |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN sys_information si ON si.departmentid = bu.dept_id |
| | | WHERE bu.`status`=1 AND bu.role_id='1412226235153731586' |
| | | <if test="jurisdiction!=null and jurisdiction != '' and jurisdiction != '1123598813738675201'"> |
| | | and bu.jurisdiction = #{jurisdiction} |
| | | </if> |
| | | <if test="deptid!=null and deptid != ''"> |
| | | and bu.dept_id = #{deptid} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | IPage selectTb(IPage<List> page,String jurisdiction,String enterpriseName); |
| | | IPage selectJj(IPage<List> page,String jurisdiction,String enterpriseName); |
| | | IPage selectYw(IPage<List> page,String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectUIn(String deptid,String name,String hold,String photo,String examinationtype,String dispatch,String soil); |
| | | IPage selectUIn(IPage<List> page,String deptid,String name,String hold,String photo,String examinationtype,String dispatch,String soil); |
| | | IPage selectDis(IPage<List> page,String jurisdiction,String deptid,String fid); |
| | | List<Map<Object,Object>> selectFw(); |
| | | List<Map<Object,Object>> selectCf(String jurisdiction); |
| | | List<Map<Object,Object>> selectCl(String jurisdiction); |
| | | List<Map<Object,Object>> selectWg(); |
| | | List<Map<Object,Object>> selectJy(); |
| | | List<Map<Object,Object>> selectWg(String jurisdiction); |
| | | List<Map<Object,Object>> selectJy(String jurisdiction); |
| | | List<Map<Object,Object>> selectYs(String jurisdiction); |
| | | List<Map<Object,Object>> selectAge(String jurisdiction,String deptid); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch,String soil) { |
| | | return baseMapper.selectUIn(deptid, name, hold, photo, examinationtype, dispatch,soil); |
| | | public IPage selectUIn(IPage page,String deptid, String name, String hold, String photo, String examinationtype, String dispatch,String soil) { |
| | | return page.setRecords(baseMapper.selectUIn(page,deptid, name, hold, photo, examinationtype, dispatch,soil)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object,Object>> selectWg() { |
| | | return baseMapper.selectWg(); |
| | | public List<Map<Object,Object>> selectWg(String jurisdiction) { |
| | | return baseMapper.selectWg(jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectJy() { |
| | | return baseMapper.selectJy(); |
| | | public List<Map<Object, Object>> selectJy(String jurisdiction) { |
| | | return baseMapper.selectJy(jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectYs(String jurisdiction) { |
| | | return baseMapper.selectYs(jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectAge(String jurisdiction, String deptid) { |
| | | return baseMapper.selectAge(jurisdiction, deptid); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "查看详情", notes = "传入id") |
| | | @GetMapping("/detail") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<UserVO> detail(User user) { |
| | | User detail = userService.getOne(Condition.getQueryWrapper(user)); |
| | | return R.data(UserWrapper.build().entityVO(detail)); |