岗位履职清单统计
This commit is contained in:
parent
e4af23ba15
commit
4797e1e95b
39
inventory-dao/src/main/java/com/rzyc/bean/PageDto.java
Normal file
39
inventory-dao/src/main/java/com/rzyc/bean/PageDto.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
package com.rzyc.bean;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author dong
|
||||
* @date 2023-09-27 14:16
|
||||
* @Version V1.0
|
||||
*/
|
||||
@ApiModel("分页")
|
||||
public class PageDto {
|
||||
|
||||
@NotNull(message = "页码不能为空")
|
||||
@ApiModelProperty(value = "页码",required = true,example = "1")
|
||||
private Integer page;//当前页
|
||||
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
@ApiModelProperty(value = "每页条数",required = true,example = "10")
|
||||
private Integer pageSize;//每页显示多少条
|
||||
|
||||
public Integer getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(Integer page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
package com.rzyc.bean.user;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.common.utils.excel.ExcelColumn;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* 用户履职完成进度
|
||||
* @author dong
|
||||
* @date 2023-09-27 14:08
|
||||
* @Version V1.0
|
||||
*/
|
||||
@ApiModel("履职完成进度")
|
||||
public class UserPerformInfo {
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private String sysuserid;
|
||||
|
||||
@ExcelColumn(value = "部门名", col = 1)
|
||||
@ApiModelProperty("部门名")
|
||||
private String unitName;
|
||||
|
||||
@ExcelColumn(value = "岗位名", col = 2)
|
||||
@ApiModelProperty("岗位名")
|
||||
private String postName;
|
||||
|
||||
@ExcelColumn(value = "姓名", col = 3)
|
||||
@ApiModelProperty("姓名")
|
||||
private String chinaname;
|
||||
|
||||
@ExcelColumn(value = "登录账户", col = 4)
|
||||
@ApiModelProperty("登录账户")
|
||||
private String sysusername;
|
||||
|
||||
@ExcelColumn(value = "联系电话", col = 5)
|
||||
@ApiModelProperty("联系电话")
|
||||
private String mobileTel;
|
||||
|
||||
@ExcelColumn(value = "履职完成进度", col = 6)
|
||||
@ApiModelProperty("履职完成进度")
|
||||
private String completion;
|
||||
|
||||
@ApiModelProperty("职务id")
|
||||
private String systitle;
|
||||
|
||||
public String getMobileTel() {
|
||||
return mobileTel;
|
||||
}
|
||||
|
||||
public void setMobileTel(String mobileTel) {
|
||||
this.mobileTel = mobileTel;
|
||||
}
|
||||
|
||||
public String getSysuserid() {
|
||||
return sysuserid;
|
||||
}
|
||||
|
||||
public void setSysuserid(String sysuserid) {
|
||||
this.sysuserid = sysuserid;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return unitName;
|
||||
}
|
||||
|
||||
public void setUnitName(String unitName) {
|
||||
this.unitName = unitName;
|
||||
}
|
||||
|
||||
public String getPostName() {
|
||||
return postName;
|
||||
}
|
||||
|
||||
public void setPostName(String postName) {
|
||||
this.postName = postName;
|
||||
}
|
||||
|
||||
public String getChinaname() {
|
||||
return chinaname;
|
||||
}
|
||||
|
||||
public void setChinaname(String chinaname) {
|
||||
this.chinaname = chinaname;
|
||||
}
|
||||
|
||||
public String getSysusername() {
|
||||
return sysusername;
|
||||
}
|
||||
|
||||
public void setSysusername(String sysusername) {
|
||||
this.sysusername = sysusername;
|
||||
}
|
||||
|
||||
public String getCompletion() {
|
||||
return completion;
|
||||
}
|
||||
|
||||
public void setCompletion(String completion) {
|
||||
this.completion = completion;
|
||||
}
|
||||
|
||||
public String getSystitle() {
|
||||
return systitle;
|
||||
}
|
||||
|
||||
public void setSystitle(String systitle) {
|
||||
this.systitle = systitle;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.rzyc.bean.user.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author dong
|
||||
* @date 2023-09-27 14:14
|
||||
* @Version V1.0
|
||||
*/
|
||||
@ApiModel("用户履职分页")
|
||||
public class UserPerformDto {
|
||||
|
||||
@ApiModelProperty("关键字")
|
||||
private String condition;
|
||||
|
||||
@NotNull(message = "用户不能为空")
|
||||
@ApiModelProperty(value = "登录用户id",required = true)
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("职务")
|
||||
private String performId;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public void setCondition(String condition) {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getPerformId() {
|
||||
return performId;
|
||||
}
|
||||
|
||||
public void setPerformId(String performId) {
|
||||
this.performId = performId;
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ import com.rzyc.bean.UserDepart;
|
|||
import com.rzyc.bean.bigdata.user.UnitList;
|
||||
import com.rzyc.bean.user.PerformNum;
|
||||
import com.rzyc.bean.user.PerformRecord;
|
||||
import com.rzyc.bean.user.UserPerformInfo;
|
||||
import com.rzyc.model.ent.SysEnterprise;
|
||||
import com.rzyc.model.user.ListPerform;
|
||||
import com.rzyc.model.user.ListPerformExample;
|
||||
|
|
@ -142,4 +143,8 @@ public interface ListPerformMapper extends BaseMapper<SysEnterprise> {
|
|||
Integer changePositionType(@Param("listPerformId") String listPerformId,
|
||||
@Param("positionType") Integer positionType);
|
||||
|
||||
/*用户履职清单完成情况*/
|
||||
List<UserPerformInfo> userPerformInfo(@Param("condition") String condition,
|
||||
@Param("performId") String performId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -907,4 +907,31 @@
|
|||
where ListPerformId = #{listPerformId}
|
||||
</update>
|
||||
|
||||
<!--用户履职清单完成情况-->
|
||||
<resultMap id="UserPerformListMap" type="com.rzyc.bean.user.UserPerformInfo">
|
||||
<result column="SysUserId" jdbcType="VARCHAR" property="sysuserid" />
|
||||
<result column="unitName" jdbcType="VARCHAR" property="unitName" />
|
||||
<result column="postName" jdbcType="VARCHAR" property="postName" />
|
||||
<result column="ChinaName" jdbcType="VARCHAR" property="chinaname" />
|
||||
<result column="SysUserName" jdbcType="VARCHAR" property="sysusername" />
|
||||
<result column="MobileTel" jdbcType="VARCHAR" property="mobileTel" />
|
||||
<result column="completion" jdbcType="VARCHAR" property="completion" />
|
||||
<result column="SysTitle" jdbcType="VARCHAR" property="systitle" />
|
||||
</resultMap>
|
||||
|
||||
<!--用户履职清单完成情况-->
|
||||
<select id="userPerformInfo" resultMap="UserPerformListMap">
|
||||
SELECT sp.`PerformClassName` unitName,lf.`PerformClassName` postName,
|
||||
lf.`Completion`,
|
||||
su.`SysUserId`,su.`ChinaName`,su.`SysUserName`,su.`SysTitle`,
|
||||
su.`MobileTel`
|
||||
FROM `sysuser` su
|
||||
LEFT JOIN `listperform` lf ON su.`SysTitle` = lf.`ListPerformId`
|
||||
LEFT JOIN listperform sp ON lf.`SupClassId` = sp.`ListPerformId`
|
||||
WHERE su.`State` = '启用'
|
||||
AND (su.ChinaName LIKE #{condition} OR su.`SysUserName` LIKE #{condition} or su.MobileTel LIKE #{condition})
|
||||
AND FIND_IN_SET(#{performId},su.`post_path`)
|
||||
ORDER BY lf.`SysLevel` ASC,sp.`SortId` ASC,lf.`SortId` ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.common.utils.*;
|
||||
import com.common.utils.encryption.PasswdFactory;
|
||||
import com.common.utils.excel.ExcelUtils;
|
||||
import com.common.utils.jwt.JwtUtil;
|
||||
import com.common.utils.model.*;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.rzyc.advice.LoginAuth;
|
||||
import com.rzyc.bean.PageDto;
|
||||
import com.rzyc.bean.UserDepart;
|
||||
import com.rzyc.bean.check.CheckList;
|
||||
import com.rzyc.bean.check.CheckPerform;
|
||||
|
|
@ -32,6 +34,7 @@ import com.rzyc.model.oth.OtheWareHouse;
|
|||
import com.rzyc.model.personal.SysResource;
|
||||
import com.rzyc.model.user.*;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.catalina.User;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -40,6 +43,7 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.*;
|
||||
|
||||
|
|
@ -1870,7 +1874,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
@ApiOperation(value = "修改新增岗位", notes = "修改新增岗位")
|
||||
@PostMapping(value = "changePerform")
|
||||
@ResponseBody
|
||||
public SingleResult<String> changePerform(@Valid ChangePerformDto changePerformDto)throws Exception{
|
||||
public SingleResult<String> changePerform(@Valid @RequestBody ChangePerformDto changePerformDto)throws Exception{
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
ListPerform listPerform = new ListPerform();
|
||||
BeanUtils.copyProperties(listPerform,changePerformDto);
|
||||
|
|
@ -2948,5 +2952,60 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 履职完成进度分页
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2023/9/27 14:13
|
||||
*/
|
||||
@ApiOperation(value = "履职完成进度", notes = "履职完成进度")
|
||||
@GetMapping("/userPerform")
|
||||
@ResponseBody
|
||||
public SingleResult<Pager<UserPerformInfo>> userPerform(@Valid UserPerformDto userPerformDto,@Valid PageDto pageDto)throws Exception{
|
||||
SingleResult<Pager<UserPerformInfo>> result = new SingleResult<>();
|
||||
|
||||
String condition = TypeConversion.getCondition(userPerformDto.getCondition());
|
||||
|
||||
String performId = userPerformDto.getPerformId();
|
||||
if(StringUtils.isBlank(performId)){
|
||||
performId = getUnitId(userPerformDto.getUserId());
|
||||
}
|
||||
//分页
|
||||
PageHelper.startPage(pageDto.getPage(), pageDto.getPageSize());
|
||||
Page<UserPerformInfo> page = (Page<UserPerformInfo>)listPerformMapper.userPerformInfo(condition,performId);
|
||||
Pager<UserPerformInfo> pager = new Pager<>();
|
||||
getDatePage(pager,page);
|
||||
result.setData(pager);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* userPerformExport
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2023/9/27 15:30
|
||||
*/
|
||||
@ApiOperation(value = "导出用户履职情况", notes = "导出用户履职情况")
|
||||
@GetMapping("userPerformExport")
|
||||
@ResponseBody
|
||||
public void userPerformExport(@Valid UserPerformDto userPerformDto, HttpServletResponse response)throws Exception{
|
||||
SingleResult<Pager<UserPerformInfo>> result = new SingleResult<>();
|
||||
|
||||
String condition = TypeConversion.getCondition(userPerformDto.getCondition());
|
||||
|
||||
String performId = userPerformDto.getPerformId();
|
||||
if(StringUtils.isBlank(performId)){
|
||||
performId = getUnitId(userPerformDto.getUserId());
|
||||
}
|
||||
List<UserPerformInfo> userPerformInfos = listPerformMapper.userPerformInfo(condition,performId);
|
||||
if(null != userPerformInfos && userPerformInfos.size() > 0){
|
||||
String excelName = "用户履职记录"+ DateUtils.getNowDateTimeStr("yyyyMMdd") +".xlsx";
|
||||
long t1 = System.currentTimeMillis();
|
||||
ExcelUtils.writeExcel(response, excelName,userPerformInfos, UserPerformInfo.class);
|
||||
long t2 = System.currentTimeMillis();
|
||||
System.out.println(String.format("write over! cost:%sms", (t2 - t1)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user