@@ -128,6 +128,7 @@
a.predict_amount as "predictAmount",
b.filed_type as filedType,
d.filed_paper_type as filedPaperType,
+ d.proc_ins_id as taskFiledPaperProcInsId,
d.filed_no as filedNo,
d.confirm_filed_no as confirmFiledNo,
e.name as departmentName
@@ -93,6 +93,19 @@ public class UserController {
@Autowired
private RedisUtils redisUtils;
+ /**
+ * 查询当前用户所属部门的部门主任id
+ * @param
+ * @return
+ */
+ @ApiOperation(value = "查询当前用户所属部门的部门主任id")
+ @GetMapping("/getDepartmentId")
+ public ResponseEntity<UserDTO> getDepartmentId() throws Exception{
+ String id = userService.getDepartmentId();
+ UserDTO dto = new UserDTO();
+ dto.setId(id);
+ return ResponseEntity.ok(dto);
+ }
/**
* 查询身份证号码唯一性
@@ -263,4 +263,11 @@ public interface UserMapper extends BaseMapper <User> {
String getMobileById(String id);
List<WorkAttachmentDto2> getByAttachmentId(@Param("id")String id);
+
+ * @param id
+ String getDepartmentId(@Param("id")String id);
}
@@ -632,5 +632,15 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
del_flag = 0
AND attachment_id = #{id}
</select>
+ <select id="getDepartmentId" resultType="java.lang.String">
+ SELECT user_id
+ FROM
+ sys_user_post sup
+ LEFT JOIN sys_post sp ON sp.id = sup.post_id
+ LEFT JOIN sys_user a on sup.user_id = a.id
+ WHERE
+ sp.CODE = 'bmzr' and a.office_id = (SELECT office_id FROM sys_user a WHERE a.id = #{id} )
+ </select>
</mapper>
@@ -945,4 +945,13 @@ public class UserService extends ServiceImpl <UserMapper, User> {
public List<WorkAttachmentDto2> getByAttachmentId(String id) {
return userMapper.getByAttachmentId(id);
+ public String getDepartmentId() {
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+ return userMapper.getDepartmentId(userDTO.getId());