人员明细+报告编制的提交审核批准+能力范围的下拉数据字典
| | |
| | | <artifactId>framework</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.yuanchu.mom</groupId> |
| | | <artifactId>user-server</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.UserDto; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.Department; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DepartmentService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.stereotype.Controller; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @ApiOperation(value = "æ·»å é¨é¨") |
| | | @PostMapping("/addDepartment") |
| | | public Result addDepartment(@RequestBody Department department){ |
| | | public Result addDepartment(@RequestBody Department department) { |
| | | return Result.success(departmentService.addDepartment(department)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åé¨é¨æ ") |
| | | @GetMapping("/selectDepartment") |
| | | public Result selectDepartment(){ |
| | | public Result selectDepartment() { |
| | | return Result.success(departmentService.selectDepartment()); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤é¨é¨") |
| | | @PostMapping("/delDepartment") |
| | | public Result delDepartment(Integer id){ |
| | | public Result delDepartment(Integer id) { |
| | | return Result.success(departmentService.delDepartment(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ ¹æ®éæ©çæ å±ç¤ºç¸å
³ç人å") |
| | | @PostMapping("/showUserById") |
| | | public Result showUserById(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | UserDto user = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), UserDto.class); |
| | | return Result.success(departmentService.showUserById(page, user)); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class UserDto extends OrderBy { |
| | | |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Integer id; |
| | | |
| | | @ValueTableShow(1) |
| | | @ApiModelProperty(value = "ç¨æ·å") |
| | | private String name; |
| | | |
| | | @ValueTableShow(2) |
| | | @ApiModelProperty(value = "å¹´é¾") |
| | | private Integer age; |
| | | |
| | | @ValueTableShow(3) |
| | | @ApiModelProperty(value = "é®ç®±") |
| | | private String email; |
| | | |
| | | @ValueTableShow(4) |
| | | @ApiModelProperty(value = "çµè¯å·ç ") |
| | | private String phone; |
| | | |
| | | |
| | | @ApiModelProperty(value = "é¨é¨æ çid") |
| | | private String departId; |
| | | } |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.dto.DepartmentDto; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.UserDto; |
| | | import com.yuanchu.mom.pojo.Department; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | //è·åé¨é¨æ |
| | | List<Department> selectDepartment(); |
| | | |
| | | //æ ¹æ®éæ©çæ å±ç¤ºç¸å
³ç人å |
| | | IPage<UserDto> showUserById(@Param("page") IPage<UserDto> page, @Param("ids") String ids, @Param("ew") QueryWrapper<UserDto> ew); |
| | | |
| | | //æ ¹æ®é¨é¨id,æ¥è¯¢ä»çææåç±»id |
| | | List<Integer> selectSonById(Integer id); |
| | | } |
| | |
| | | @ValueTableShow(15) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ValueTableShow(9) |
| | | @ApiModelProperty(value = "åå
¸ç±»å") |
| | | private String dic; |
| | | |
| | | } |
| | | |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DepartmentDto; |
| | | import com.yuanchu.mom.dto.UserDto; |
| | | import com.yuanchu.mom.pojo.Department; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.User; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | //å é¤é¨é¨ |
| | | boolean delDepartment(Integer id); |
| | | |
| | | //æ ¹æ®éæ©çæ å±ç¤ºç¸å
³ç人å |
| | | Map<String, Object> showUserById(Page page, UserDto user); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.DepartmentDto; |
| | | import com.yuanchu.mom.dto.UserDto; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | | import com.yuanchu.mom.pojo.Department; |
| | | import com.yuanchu.mom.mapper.DepartmentMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DepartmentService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.var; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | return removeBatchByIds(department); |
| | | } |
| | | |
| | | //æ ¹æ®éæ©çæ å±ç¤ºç¸å
³ç人å |
| | | @Override |
| | | public Map<String, Object> showUserById(Page page, UserDto user) { |
| | | //æ ¹æ®é¨é¨id,æ¥è¯¢ä»çææåç±»id |
| | | List<Integer> list = departmentMapper.selectSonById(Integer.parseInt(user.getDepartId())); |
| | | String ids = list.stream() |
| | | .map(Object::toString) |
| | | .collect(Collectors.joining(",")); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(UserDto.class)); |
| | | map.put("body", departmentMapper.showUserById(page, ids, QueryWrappers.queryWrappers(user))); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | //夿æ¯å¦æåç±»,ç´å°æ²¡æä¸ºæ¢ |
| | | public List<Department> getDepartment(Integer id){ |
| | | public List<Department> getDepartment(Integer id) { |
| | | List<Department> list = new ArrayList<>(); |
| | | Department depart = baseMapper.selectById(id); |
| | | list.add(depart); |
| | | List<Department> departments = baseMapper.selectList(Wrappers.<Department>lambdaQuery().eq(Department::getFatherId, id)); |
| | | if (ObjectUtils.isNotEmpty(departments)){ |
| | | if (ObjectUtils.isNotEmpty(departments)) { |
| | | list.addAll(departments); |
| | | for (Department department : departments){ |
| | | for (Department department : departments) { |
| | | list.addAll(getDepartment(department.getId())); |
| | | } |
| | | } |
| | |
| | | SELECT id, name, father_id |
| | | FROM DepartmentHierarchy; |
| | | </select> |
| | | <select id="showUserById" resultType="com.yuanchu.mom.dto.UserDto"> |
| | | select * from (select id, name, age, email, phone,depart_id |
| | | from user where FIND_IN_SET( SUBSTRING_INDEX(depart_id, ',', -1) ,#{ids}) > 0 ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectSonById" resultType="java.lang.Integer"> |
| | | WITH RECURSIVE DepartmentHierarchy AS ( |
| | | SELECT id, name, father_id |
| | | FROM department |
| | | WHERE id = #{id} |
| | | UNION ALL |
| | | SELECT d.id, d.name, d.father_id |
| | | FROM department d |
| | | JOIN DepartmentHierarchy dh ON d.father_id = dh.id |
| | | ) |
| | | SELECT id |
| | | FROM DepartmentHierarchy; |
| | | </select> |
| | | </mapper> |
| | |
| | | bsm, |
| | | sample, |
| | | inspection_value_type, |
| | | dic, |
| | | template_id, |
| | | son_laboratory |
| | | from structure_item_parameter |
| | |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | |
| | | @Select("select look from power p left join user u on u.role_id = p.role_id where u.id = #{userId} and p.menu_method = #{method}") |
| | | Integer countPower(Integer userId, String method); |
| | | |
| | | @Select("select distinct category from enums") |
| | | List<String> getDic(); |
| | | } |
| | |
| | | <artifactId>spring-expression</artifactId> |
| | | <version>5.3.18</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.yuanchu.mom</groupId> |
| | | <artifactId>user-server</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
| | |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | return Result.success(insReportService.inReport("/word/"+pathName, id)); |
| | | return Result.success(insReportService.inReport("/word/" + pathName, id)); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æä»¶ä¸ä¼ 失败"); |
| | | } |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æäº¤") |
| | | @PostMapping("/writeReport") |
| | | public Result writeReport(Integer id) { |
| | | return Result.success(insReportService.writeReport(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸") |
| | | @PostMapping("/examineReport") |
| | | public Result examineReport(Integer id, Integer isExamine, String examineTell) { |
| | | return Result.success(insReportService.examineReport(id, isExamine, examineTell)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹å") |
| | | @PostMapping("/ratifyReport") |
| | | public Result ratifyReport(Integer id, Integer isRatify, String ratifyTell) { |
| | | return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell)); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ValueTableShow(value = 3,name = "ç¼å¶äºº") |
| | | private String updateUserName; |
| | | @ValueTableShow(value = 3,name = "æäº¤äºº") |
| | | private String writeUserName; |
| | | |
| | | @ValueTableShow(value = 8,name = "æ¹å人") |
| | | @ValueTableShow(value = 10,name = "æ¹å人") |
| | | private String ratifyUser; |
| | | |
| | | @ValueTableShow(value = 5,name = "å®¡æ ¸äºº") |
| | | @ValueTableShow(value = 6,name = "å®¡æ ¸äºº") |
| | | private String examineUser; |
| | | |
| | | } |
| | |
| | | private String urlS; |
| | | |
| | | /** |
| | | * 1ï¼æ¹å 0ï¼æªæ¹å |
| | | * 1ï¼æ¹å 0ï¼ä¸æ¹å |
| | | */ |
| | | @ValueTableShow(value = 9, name = "æ¹åç¶æ") |
| | | @ValueTableShow(value = 11, name = "æ¹åç¶æ") |
| | | private Integer isRatify; |
| | | |
| | | @ValueTableShow(value = 10, name = "æ¹å夿³¨") |
| | | @ValueTableShow(value = 12, name = "æ¹å夿³¨") |
| | | private String ratifyTell; |
| | | |
| | | /** |
| | | * 1ï¼å®¡æ ¸ 0ï¼æªå®¡æ ¸ |
| | | * 1ï¼å®¡æ ¸éè¿ 0ï¼å®¡æ ¸ä¸éè¿ |
| | | */ |
| | | @ValueTableShow(value = 6, name = "å®¡æ ¸ç¶æ") |
| | | @ValueTableShow(value = 7, name = "å®¡æ ¸ç¶æ") |
| | | private Integer isExamine; |
| | | |
| | | @ValueTableShow(value = 7, name = "å®¡æ ¸å¤æ³¨") |
| | | @ValueTableShow(value = 8, name = "å®¡æ ¸å¤æ³¨") |
| | | private String examineTell; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·idï¼æäº¤äººï¼ |
| | | */ |
| | | private Integer writeUserId; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·idï¼æ¹åäººï¼ |
| | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ValueTableShow(value = 2, name = "å建æ¶é´") |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ValueTableShow(value = 4, name = "ç¼å¶æ¶é´") |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * 1ï¼å·²æäº¤ 0ï¼å¾
æäº¤ |
| | | */ |
| | | @ValueTableShow(value = 4, name = "æäº¤ç¶æ") |
| | | private Integer state; |
| | | |
| | | @ValueTableShow(value = 5, name = "æäº¤æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @ValueTableShow(value = 9, name = "å®¡æ ¸æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime examineTime; |
| | | |
| | | @ValueTableShow(value = 13, name = "æ¹åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | int upReportUrl(Integer id); |
| | | |
| | | //æäº¤ |
| | | int writeReport(Integer id); |
| | | |
| | | //å®¡æ ¸ |
| | | int examineReport(Integer id, Integer isExamine, String examineTell); |
| | | |
| | | //æ¹å |
| | | int ratifyReport(Integer id, Integer isRatify, String ratifyTell); |
| | | } |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.yuanchu.mom.dto.ReportPageDto; |
| | | import com.yuanchu.mom.dto.SampleOrderDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.InsReport; |
| | | import com.yuanchu.mom.service.InsReportService; |
| | | import com.yuanchu.mom.mapper.InsReportMapper; |
| | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private InsReportMapper insReportMapper; |
| | |
| | | public int upReportUrl(Integer id) { |
| | | return insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate().eq(InsReport::getId, id).set(InsReport::getUrlS, null)); |
| | | } |
| | | |
| | | //æäº¤ |
| | | @Override |
| | | public int writeReport(Integer id) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | insReport.setId(id); |
| | | insReport.setState(1); |
| | | insReport.setWriteUserId(getLook.selectPowerByMethodAndUserId(null).get("userId"));//æäº¤äºº |
| | | insReport.setWriteTime(LocalDateTime.now());//æäº¤æ¶é´ |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String signatureUrl = userMapper.selectById(insReport.getWriteUserId()).getSignatureUrl(); |
| | | //ç³»ç»çææ¥åå°å |
| | | String url = insReport.getUrl(); |
| | | //æå¨ä¸ä¼ æ¥åå°å |
| | | String urlS = insReport.getUrlS(); |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | @Override |
| | | public int examineReport(Integer id, Integer isExamine, String examineTell) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | insReport.setIsExamine(isExamine); |
| | | if (ObjectUtils.isNotEmpty(examineTell)) { |
| | | insReport.setExamineTell(examineTell); |
| | | } |
| | | insReport.setExamineUserId(getLook.selectPowerByMethodAndUserId(null).get("userId"));//å®¡æ ¸äºº |
| | | insReport.setExamineTime(LocalDateTime.now());//å®¡æ ¸æ¶é´ |
| | | if (isExamine==0){ |
| | | //å¦æå®¡æ ¸ä¸éè¿ |
| | | insReport.setState(0);//æäº¤ç¶ææ¹ä¸ºå¾
æäº¤ |
| | | } |
| | | //è·åå®¡æ ¸äººçç¾åå°å |
| | | String signatureUrl = userMapper.selectById(insReport.getExamineUserId()).getSignatureUrl(); |
| | | //ç³»ç»çææ¥åå°å |
| | | String url = insReport.getUrl(); |
| | | //æå¨ä¸ä¼ æ¥åå°å |
| | | String urlS = insReport.getUrlS(); |
| | | |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | |
| | | //æ¹å |
| | | @Override |
| | | public int ratifyReport(Integer id, Integer isRatify, String ratifyTell) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | insReport.setIsRatify(isRatify); |
| | | if (ObjectUtils.isNotEmpty(ratifyTell)) { |
| | | insReport.setRatifyTell(ratifyTell); |
| | | } |
| | | insReport.setRatifyUserId(getLook.selectPowerByMethodAndUserId(null).get("userId"));//æ¹å人 |
| | | insReport.setRatifyTime(LocalDateTime.now());//æ¹åæ¶é´ |
| | | if (isRatify==0){ |
| | | //妿æ¹åä¸éè¿ |
| | | insReport.setState(0);//æäº¤ç¶ææ¹ä¸ºå¾
æäº¤ |
| | | } |
| | | //è·åå®¡æ ¸äººçç¾åå°å |
| | | String signatureUrl = userMapper.selectById(insReport.getRatifyUserId()).getSignatureUrl(); |
| | | //ç³»ç»çææ¥åå°å |
| | | String url = insReport.getUrl(); |
| | | //æå¨ä¸ä¼ æ¥åå°å |
| | | String urlS = insReport.getUrlS(); |
| | | |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | select * |
| | | from ( |
| | | select |
| | | ir.*,io.entrust_code,u.name update_user_name,u1.name ratify_user,u2.name examine_user |
| | | ir.*,io.entrust_code,u.name write_user_name,u1.name ratify_user,u2.name examine_user |
| | | from ins_report ir |
| | | left join ins_order io on io.id = ir.ins_order_id |
| | | left join user u on u.id = ir.update_user |
| | | left join user u on u.id = ir.write_user_id |
| | | left join user u1 on u1.id = ir.ratify_user_id |
| | | left join user u2 on u2.id = ir.examine_user_id |
| | | ) a |
| | |
| | | return Result.success(enumService.selectEnumByCategory(category)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ°æ®åå
¸çåç±»") |
| | | @PostMapping("/getDic") |
| | | public Result<?> getDic(){ |
| | | return Result.success(enumService.getDic()); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "è§è²") |
| | | private String roleName; |
| | | |
| | | |
| | | } |
| | |
| | | import com.yuanchu.mom.pojo.Enums; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãenumãçæ°æ®åºæä½Mapper |
| | |
| | | @ValueTableShow(value = 13,name = "èªèº«ç
§çå°å") |
| | | private String pictureUrl; |
| | | |
| | | /** |
| | | * ç»ç» |
| | | */ |
| | | @ValueTableShow(value = 14,name = "ç»ç»") |
| | | @ApiModelProperty(value = "å
³èçé¨é¨id") |
| | | private String departId; |
| | | |
| | | } |
| | |
| | | |
| | | List<Enums> selectEnumByCategory(String category); |
| | | |
| | | List<String> getDic(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.mapper.AuthMapper; |
| | | import com.yuanchu.mom.pojo.Enums; |
| | | import com.yuanchu.mom.service.EnumService; |
| | | import com.yuanchu.mom.mapper.EnumMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | private GetLook getLook; |
| | | |
| | | private EnumMapper enumMapper; |
| | | |
| | | private AuthMapper authMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectEnumList(IPage<Enums> page, Enums enums) { |
| | |
| | | public List<Enums> selectEnumByCategory(String category) { |
| | | return enumMapper.selectList(Wrappers.<Enums>lambdaQuery().eq(Enums::getCategory, category).select(Enums::getLabel,Enums::getValue).orderByAsc(Enums::getOrderNum).orderByAsc(Enums::getId)); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getDic() { |
| | | return authMapper.getDic(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | select * from ( |
| | | select u1.id, u1.account, u1.name, u1.state, u1.create_time, u1.update_time, u1.create_user, u1.update_user, |
| | | u1.age, u1.email, u1.phone, u1.department, u1.company, u1.address, u1.is_custom, u1.role_id, u2.name |
| | | create_user_name, u3.name update_user_name, r.name role_name,u1.signature_url,u1.picture_url |
| | | create_user_name, u3.name update_user_name, r.name role_name,u1.signature_url,u1.picture_url,u1.depart_id |
| | | from user u1 |
| | | left join user u2 on u2.id = u1.create_user |
| | | left join user u3 on u3.id = u1.update_user |