智慧保安后台管理-外网项目备份
tangzy
2021-09-22 c008e67768a8689ba86cc58354b99e6427ac12c7
1.辖区
9 files modified
56 ■■■■ changed files
src/main/java/org/springblade/modules/auth/endpoint/BladeTokenEndPoint.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/controller/JurisdictionController.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/service/JurisdictionService.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/service/impl/JurisdictionServiceImpl.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/record/entity/Record.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/UserController.java 22 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/auth/endpoint/BladeTokenEndPoint.java
@@ -88,10 +88,10 @@
        ITokenGranter granter = TokenGranterBuilder.getGranter(grantType);
        UserInfo userInfo = granter.grant(tokenParameter);
        if (userInfo == null || userInfo.getUser() == null && s.equals("0")) {
        if (userInfo == null && s.equals("0")) {
            return authInfo.set("error_description", "用户未审核");
        }
        if (userInfo == null || userInfo.getUser() == null && s.equals("2")) {
        if (userInfo == null && s.equals("2")) {
            return authInfo.set("error_description", "审核不通过");
        }
        if (userInfo == null || userInfo.getUser() == null ) {
src/main/java/org/springblade/modules/jurisdiction/controller/JurisdictionController.java
@@ -158,4 +158,14 @@
    }
    /**
     * 辖区id
     * @param deptname
     * @return
     */
    @GetMapping("/selJur")
    public R selJur(String deptname) {
        String s = jurisdictionService.selJur(deptname);
        return R.data(s);
    }
}
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.java
@@ -71,5 +71,6 @@
     * @return
     */
    List<String> getDeptNames(Long[] ids);
    String selJur(String deptname);
}
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
@@ -113,4 +113,9 @@
            sys_jurisdiction dept
        WHERE dept.is_deleted = 0
    </select>
    <select id="selJur" resultType="java.lang.String">
        SELECT id FROM sys_jurisdiction WHERE dept_name=#{deptname}
    </select>
</mapper>
src/main/java/org/springblade/modules/jurisdiction/service/JurisdictionService.java
@@ -79,4 +79,5 @@
     * @return
     */
    boolean submit(Jurisdiction jurisdiction);
    String selJur(String deptname);
}
src/main/java/org/springblade/modules/jurisdiction/service/impl/JurisdictionServiceImpl.java
@@ -107,6 +107,10 @@
        return saveOrUpdate(dept);
    }
    @Override
    public String selJur(String deptname) {
        return baseMapper.selJur(deptname);
    }
}
src/main/java/org/springblade/modules/record/entity/Record.java
@@ -160,6 +160,12 @@
    private String contactscell;
    private String storage;
    private String jurisdiction;
    //派出所审批
    private String papprove;
    //县审批
    private String xapprove;
    //市审批
    private String sapprove;
    @ApiModelProperty(value = "审批时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml
@@ -32,6 +32,9 @@
        <result column="contactscell" property="contactscell"/>
        <result column="storage" property="storage"/>
        <result column="jurisdiction" property="jurisdiction"/>
        <result column="papprove" property="papprove"/>
        <result column="xapprove" property="xapprove"/>
        <result column="sapprove" property="sapprove"/>
        <result column="overtime" property="overtime"/>
    </resultMap>
src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -192,17 +192,17 @@
//            }
//        }
        //根据 deptId 查询dept信息,公安管理员
        Dept dept = iDeptService.getById(user.getDeptId());
        Long sid = 1123598813738675201L;
        if (dept.getParentId().equals(sid)) {
            //获取辖区的数据
            Jurisdiction jurisdiction = new Jurisdiction();
            jurisdiction.setDeptName(dept.getDeptName());
            Jurisdiction one = jurisdictionService.getOne(Condition.getQueryWrapper(jurisdiction));
            user.setJurisdiction(one.getId().toString());
        }
        user.setRoleId("1412226235153731586");
//        //根据 deptId 查询dept信息,公安管理员
//        Dept dept = iDeptService.getById(user.getDeptId());
//        Long sid = 1123598813738675201L;
//        if (dept.getParentId().equals(sid)) {
//            //获取辖区的数据
//            Jurisdiction jurisdiction = new Jurisdiction();
//            jurisdiction.setDeptName(dept.getDeptName());
//            Jurisdiction one = jurisdictionService.getOne(Condition.getQueryWrapper(jurisdiction));
//            user.setJurisdiction(one.getId().toString());
//        }
        //user.setRoleId("1412226235153731586");
        userService.submit(user);
        //        String birthday = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getBirthday());
        String rtime = null;