Explorar el Código

1.控制台代理人机构显示2345级

wuhp hace 2 años
padre
commit
3665b27ef4

+ 19 - 0
src/main/java/com/ydtech/modules/admin/model/dto/QxFrontlineAgentDto.java

@@ -102,6 +102,25 @@ public class QxFrontlineAgentDto implements Serializable {
     @ApiModelProperty(value = "时间筛选结束")
     private String endDate;
 
+    @ApiModelProperty(value = "手机号")
+    private String mobile;
+
+    @ApiModelProperty(value = "管理人名称")
+    private String leaderName;
+
+    @ApiModelProperty(value = "性别")
+    private String sex;
+
+    @ApiModelProperty(value = "市级部门名称")
+    private String cityName;
+
+    @ApiModelProperty(value = "区级部门名称")
+    private String districtName;
+
+    @ApiModelProperty(value = "省部门名称")
+    private String provinceName;
+
+
 
     private Integer totalManpowerNum;
 

+ 39 - 0
src/main/java/com/ydtech/modules/admin/service/impl/UserReportServiceImpl.java

@@ -21,6 +21,7 @@ import com.ydtech.modules.admin.model.vo.AppCustomerManagementQueryVo;
 import com.ydtech.modules.admin.model.vo.HouLinePersonnelReportVo;
 import com.ydtech.modules.admin.model.vo.QxFrontlineAgentVo;
 import com.ydtech.modules.admin.model.vo.SysUserBaseVO;
+import com.ydtech.modules.admin.service.SysDeptService;
 import com.ydtech.modules.admin.service.UserReportService;
 import com.ydtech.modules.admin.utils.SliceUpDateUtil;
 import com.ydtech.modules.base.model.vo.PageVo;
@@ -73,6 +74,9 @@ public class UserReportServiceImpl implements UserReportService {
     @Autowired
     private SysUserRoleMapper  sysUserRoleMapper;
 
+    @Autowired
+    private SysDeptService sysDeptService;
+
     /**
      *  @version
      *  @author: hxl
@@ -281,6 +285,23 @@ public class UserReportServiceImpl implements UserReportService {
             userItem.setTotalPremium(orderManpower.getTotalPremium());
             //单均保费
             userItem.setAveragePremium(orderManpower.getAveragePremium());
+            String deptId = userItem.getDeptId();
+            if(StringUtils.isNotEmpty(deptId)){
+                int length = deptId.length();
+                if (length > 0) {
+                    if (length > 10) {
+                        String substring = deptId.substring(0, 6);
+                        String substring1 = deptId.substring(0, 8);
+                        String province = deptId.substring(0, 4);
+                        SysDept cityName = sysDeptService.getById(substring);
+                        SysDept districtName = sysDeptService.getById(substring1);
+                        SysDept provinceName = sysDeptService.getById(province);
+                        String deptName = userItem.getDeptName();
+                        String a = provinceName.getName()+"-"+cityName.getName()+"-"+districtName.getName()+"-"+deptName;
+                        userItem.setDeptName(a);
+                    }
+                }
+            }
         }
     }
 
@@ -311,6 +332,24 @@ public class UserReportServiceImpl implements UserReportService {
                 item.setAveragePremium(taskStatisticsDto.getAveragePremium());
                 item.setTotalPremium(taskStatisticsDto.getTotalPremium());
             }
+            String deptId = item.getDeptId();
+            if(StringUtils.isNotEmpty(deptId)){
+                int length = deptId.length();
+                if (length > 0) {
+                    if (length > 10) {
+                        String substring = deptId.substring(0, 6);
+                        String substring1 = deptId.substring(0, 8);
+                        String province = deptId.substring(0, 4);
+                        SysDept cityName = sysDeptService.getById(substring);
+                        SysDept districtName = sysDeptService.getById(substring1);
+                        SysDept provinceName = sysDeptService.getById(province);
+                        String deptName = item.getDeptName();
+                        String a = provinceName.getName()+"-"+cityName.getName()+"-"+districtName.getName()+"-"+deptName;
+                        item.setDeptName(a);
+
+                    }
+                }
+            }
         }
     }
 

+ 1 - 1
src/main/resources/mapper/modules/admin/DeptBalanceMapper.xml

@@ -118,7 +118,7 @@
         su.name as "userName",
         sd.id as "deptId",
         sd.name as "deptName",
-        inf.file_path  as "filePath",
+        inf.url  as "filePath",
         suif.sex as "sex"
         from sys_user su
         left join sys_dept sd on sd.id=su.dept_id

+ 7 - 1
src/main/resources/mapper/modules/admin/SysUserMapper.xml

@@ -1336,15 +1336,21 @@
         SELECT
             sd.name as "deptName",
             su.name as "name",
+            sd.id as "deptId",
             su.id  as "userId",
+            su.mobile as "mobile",
             su.dept_id  as "deptId",
-            inf.file_path  as "filePath",
+            inf.url  as "filePath",
+            sul.name as "leaderName",
+            sui.sex as "sex",
             sur.role_id AS roleId
         FROM
             sys_user su
                 LEFT JOIN sys_dept sd ON sd.id = su.dept_id
                 LEFT JOIN  ins_upload_files   inf on  su.head_sculpture  =inf.id
                 LEFT JOIN sys_user_role sur ON sur.user_id = su.id
+                LEFT JOIN sys_user sul  on  sul.id=su.leader_id
+                LEFT JOIN sys_user_info  sui  on  sui .id =su.id
         <where>
             su.id  LIKE '%M%'
             and su.status = '1'