Browse Source

Merge remote-tracking branch 'origin/master'

main
xyx 1 year ago
parent
commit
7c4411cb74
  1. 4
      src/main/java/com/biutag/supervision/controller/StatisticsController.java
  2. 2
      src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java
  3. 5
      src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java
  4. 1
      src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java
  5. 1
      src/main/java/com/biutag/supervision/service/SupPoliceService.java
  6. 45
      src/main/resources/mapper/SupPoliceMapper.xml

4
src/main/java/com/biutag/supervision/controller/StatisticsController.java

@ -34,7 +34,7 @@ public class StatisticsController {
boolean authEmpty = (user.getAuthSources().isEmpty() || user.getAuthDepartIds().isEmpty()) && !AppConstants.USER_TYPE_SUPER.equals(user.getUserType());
if (authEmpty) {
Map<String, Object> data = new HashMap<>();
data.put("flowNumber", List.of(new FlowNumber("问题签收", "sign", 0L),
data.put("flowNumber", List.of(new FlowNumber("问题签收", "sign", 0L),
new FlowNumber("核查办理", "verify", 0L),
new FlowNumber("申请延期", "delay", 0L),
new FlowNumber("办结审批", "completedApprove", 0L))
@ -116,7 +116,7 @@ public class StatisticsController {
);
Map<String, Object> data = new HashMap<>();
data.put("flowNumber", List.of(new FlowNumber("问题签收", "sign", signCount),
data.put("flowNumber", List.of(new FlowNumber("问题签收", "sign", signCount),
new FlowNumber("核查办理", "verify", verifyCount),
new FlowNumber("申请延期", "delay", delayCount),
new FlowNumber("办结审批", "completedApprove", completedApproveCount))

2
src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java

@ -44,4 +44,6 @@ public class ModelClueModel {
private String data;
private String negativeId;
}

5
src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java

@ -104,6 +104,9 @@ public class PoliceModel {
// 警员角色
private String policeRole;
private String level;
private Integer level;
private String role;
}

1
src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java

@ -14,4 +14,5 @@ public class PoliceQueryParam extends BasePage {
private String departId;
// 当前单位及其所有子单位
private Boolean departBranch;
private String roleId;
}

1
src/main/java/com/biutag/supervision/service/SupPoliceService.java

@ -49,6 +49,7 @@ public class SupPoliceService extends ServiceImpl<SupPoliceMapper, SupPolice> {
queryWrapper.eq("p.org_id", param.getDepartId());
}
}
queryWrapper.apply(StrUtil.isNotBlank(param.getRoleId()), String.format("find_in_set( '%s', u.role_id) > 0", param.getRoleId()));
queryWrapper.orderByAsc("d.level").orderByDesc("p.position").orderByAsc("p.person_status");
return baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
}

45
src/main/resources/mapper/SupPoliceMapper.xml

@ -5,12 +5,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.biutag.supervision.mapper.SupPoliceMapper">
<select id="queryPage" resultType="com.biutag.supervision.pojo.model.PoliceModel">
select p.id, p.name, p.emp_no, p.id_code, p.job, p.mobile, p.person_status, p.org_id, p.avatar_url, p.created_at, p.updated_at,
p.position, p.person_type, p.police_role, p.employment_date,
d.name depart_name, d.short_name depart_short_name, d1.short_name parent_depart_short_name, d.level
from sup_police p
left join sup_depart d on p.org_id = d.id
left join sup_depart d1 on d.pid = d1.id and d1.level = 2
SELECT
p.id,
p.NAME,
p.emp_no,
p.id_code,
p.job,
p.mobile,
p.person_status,
p.org_id,
p.avatar_url,
p.created_at,
p.updated_at,
p.position,
p.person_type,
p.police_role,
p.employment_date,
d.NAME depart_name,
d.short_name depart_short_name,
d1.short_name parent_depart_short_name,
d.LEVEL,
u.role,
u.role_id
FROM
sup_police p
LEFT JOIN sup_depart d ON p.org_id = d.id
LEFT JOIN sup_depart d1 ON d.pid = d1.id
AND d1.LEVEL != 1
LEFT JOIN (
SELECT
u.user_name,
GROUP_CONCAT( r.role_name SEPARATOR ',' ) role,
GROUP_CONCAT( r.role_id SEPARATOR ',' ) role_id
FROM
`open-platform`.base_user u
LEFT JOIN `open-platform`.base_role_user ru ON ru.user_id = u.user_id
LEFT JOIN `open-platform`.base_role r ON r.role_id = ru.role_id
GROUP BY
u.user_name
) u ON u.user_name = p.id_code
${ew.getCustomSqlSegment}
</select>

Loading…
Cancel
Save