src/main/java/org/springblade/modules/information/controller/InformationsController.java
@@ -8,6 +8,7 @@ import org.springblade.modules.information.service.IInformationService; import org.springblade.modules.information.vo.InformationVO; import org.springblade.modules.information.vo.ResponseVo; import org.springblade.modules.system.vo.UserVO; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -246,4 +247,37 @@ } return R.data(lists); } /** * 根据辖区及保安公司统计未缴纳社保人员 * @param query 分页条件 * @param information 查询条件 * @return */ @GetMapping("/getNotSocialNumber") public R<IPage<UserVO>> getNotSocialNumber(InformationVO information, Query query){ return R.data(informationService.getNotSocialAndInsuranceAndDispatcherNumber(Condition.getPage(query), information,1)); } /** * 根据辖区及保安公司统计未缴纳保险人员 * @param query 分页条件 * @param information 查询条件 * @return */ @GetMapping("/getNotInsuranceNumber") public R<IPage<UserVO>> getNotInsuranceNumber(InformationVO information, Query query){ return R.data(informationService.getNotSocialAndInsuranceAndDispatcherNumber(Condition.getPage(query), information,2)); } /** * 根据辖区及保安公司统计未派遣人员 * @param query 分页条件 * @param information 查询条件 * @return */ @GetMapping("/getNotDispatcherNumber") public R<IPage<UserVO>> getNotDispatcherNumber(InformationVO information, Query query){ return R.data(informationService.getNotSocialAndInsuranceAndDispatcherNumber(Condition.getPage(query), information,3)); } } src/main/java/org/springblade/modules/information/mapper/InformationMapper.java
@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.modules.information.vo.ResponseVo; import org.springblade.modules.system.vo.UserVO; import org.springframework.boot.autoconfigure.quartz.QuartzDataSource; import java.util.List; src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -3480,4 +3480,76 @@ ) </select> <!--保安员列表--> <select id="selectUserPageSecurity" resultMap="userResultMaps"> select bu.*, ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age, bd.dept_name as deptName from blade_user bu left join blade_dept bd on bu.dept_id = bd.id left join blade_role br on br.id = bu.role_id where bu.is_deleted = 0 and br.role_alias = '安保人员' and bu.status = 1 <if test="user.cardid!=null and user.cardid != ''"> and bu.cardid like concat(concat('%', #{user.cardid}),'%') </if> <if test="user.examinationType==0"> and (bu.examination_type = #{user.examinationType} or bu.examination_type is null or bu.examination_type="") </if> <if test="user.examinationType==1"> and bu.examination_type = #{user.examinationType} </if> <if test="user.realName!=null and user.realName != ''"> and bu.real_name like concat(concat('%', #{user.realName}),'%') </if> <if test="user.userType!=null and user.userType != ''"> and bu.user_type = #{user.userType} </if> <if test="user.nativeplace!=null and user.nativeplace != ''"> and bu.nativeplace = #{user.nativeplace} </if> <if test="user.sex!=null and user.sex != ''"> and bu.sex = #{user.sex} </if> <if test="user.status!=null and user.status != ''"> and bu.status = #{user.status} </if> <if test="user.hold!=null and user.hold != ''"> and bu.hold = #{user.hold} </if> <if test="user.jurisdiction!=null and user.jurisdiction != ''"> and bu.jurisdiction = #{user.jurisdiction} </if> <if test="user.securitynumber!=null and user.securitynumber != ''"> and bu.securitynumber like concat('%', #{user.securitynumber},'%') </if> <if test="user.deptId!=null and user.deptId!='' and user.deptId!='1460129345988239362'"> and bu.dept_id =#{user.deptId} </if> <if test="user.type!=null"> and bu.equipment_code is not null </if> <if test="user.useName==null or user.useName==''"> order by bu.id </if> <if test="user.useName!=null and user.useName!='' and user.useName=='examinationType'"> order by bu.examination_type ${user.sort} </if> <if test="user.useName!=null and user.useName!='' and user.useName=='examinationMx'"> order by bu.examination_mx ${user.sort} </if> </select> </mapper> src/main/java/org/springblade/modules/information/service/IInformationService.java
@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.modules.information.vo.ResponseVo; import org.springblade.modules.system.vo.UserVO; import java.util.List; import java.util.Map; @@ -197,4 +198,13 @@ * @return */ List<ResponseVo> getSecurityHoldAndSoidAndDispatchGroupCountList(Integer type); /** * 更具辖区,公司查询未缴纳社保,未缴纳保险,未派遣人数 * @param page * @param information * @param i * @return */ IPage<UserVO> getNotSocialAndInsuranceAndDispatcherNumber(IPage<UserVO> page, InformationVO information, int i); } src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
@@ -23,6 +23,7 @@ import org.springblade.modules.information.service.IInformationService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springblade.modules.information.vo.ResponseVo; import org.springblade.modules.system.vo.UserVO; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -436,4 +437,17 @@ public List<ResponseVo> getSecurityHoldAndSoidAndDispatchGroupCountList(Integer type) { return baseMapper.getSecurityHoldAndSoidAndDispatchGroupCountList(type); } /** * 根据辖区,公司查询未缴纳社保,未缴纳保险,未派遣人数 * @param page * @param information * @param type * @return */ @Override public IPage<UserVO> getNotSocialAndInsuranceAndDispatcherNumber(IPage<UserVO> page, InformationVO information, int type) { return null; // return page.setRecords(baseMapper.getNotSocialAndInsuranceAndDispatcherNumber(page, information,type)); } } src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -215,15 +215,20 @@ blade_role br on br.id = bu.role_id left join sys_information si on bd.id = si.departmentid left join sys_jurisdiction sj on sj.id = si.jurisdiction where bu.is_deleted = 0 and br.role_alias = '安保人员' and bu.status = 1 and bd.parent_id!=1425365577303621633 and bd.id != 1425365577303621633 and bd.id != 1432625856013971457 <if test="user.cardid!=null and user.cardid != ''"> and bu.cardid like concat(concat('%', #{user.cardid}),'%') </if> @@ -236,6 +241,18 @@ <if test="user.realName!=null and user.realName != ''"> and bu.real_name like concat(concat('%', #{user.realName}),'%') </if> <if test="user.jurisdiction!=null and user.jurisdiction != ''"> and (sj.id = #{user.jurisdiction} or sj.parent_id = #{user.jurisdiction}) </if> <if test="user.dispatch!=null and user.dispatch != ''"> and bu.dispatch = #{user.dispatch} </if> <if test="user.soil!=null and user.soil != ''"> and bu.soil = #{user.soil} </if> <if test="user.insurance!=null and user.insurance != ''"> and bu.insurance = #{user.insurance} </if> <if test="user.userType!=null and user.userType != ''"> and bu.user_type = #{user.userType} </if> src/main/java/org/springblade/modules/system/vo/UserVO.java
@@ -95,4 +95,9 @@ */ private Integer age; private Integer type; /** * 辖区 */ private String jurisdiction; }