提交代码

dev_xd
姜玉琦 2025-01-04 18:20:48 +08:00
parent a1f7d8df78
commit 355f842d06
46 changed files with 959 additions and 1568 deletions

View File

@ -426,8 +426,8 @@ public class SysUser extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("comId", getComId())
.append("userId", getUserId()) .append("userId", getUserId())
.append("comId", getComId())
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("userName", getUserName()) .append("userName", getUserName())
.append("nickName", getNickName()) .append("nickName", getNickName())

View File

@ -21,6 +21,7 @@ import com.yanzhu.system.api.RemoteUserService;
import com.yanzhu.system.api.domain.SysUser; import com.yanzhu.system.api.domain.SysUser;
import com.yanzhu.system.api.model.LoginUser; import com.yanzhu.system.api.model.LoginUser;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
@ -53,7 +54,7 @@ public class SysLoginService
public LoginUser login(String username, String password) public LoginUser login(String username, String password)
{ {
// 用户名或密码为空 错误 // 用户名或密码为空 错误
if (StringUtils.isAnyBlank(username, password)) if (StringUtils.isAnyBlank(username, password))
{ {
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户/密码必须填写"); recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户/密码必须填写");
throw new ServiceException("用户/密码必须填写"); throw new ServiceException("用户/密码必须填写");

View File

@ -42,7 +42,7 @@ public class SysPasswordService
public void validate(SysUser user, String password) public void validate(SysUser user, String password)
{ {
String username = user.getUserName(); String username = user.getUserName();
redisService.setCacheObject(getCacheKey(username), 0, lockTime, TimeUnit.MINUTES);
Integer retryCount = redisService.getCacheObject(getCacheKey(username)); Integer retryCount = redisService.getCacheObject(getCacheKey(username));
if (retryCount == null) if (retryCount == null)

View File

@ -7,9 +7,9 @@ package com.yanzhu.common.core.enums;
*/ */
public enum UseStateEnums { public enum UseStateEnums {
AW("0", "待入场"), AW("9", "待入场"),
IN("1", "进场"), IN("0", "进场"),
OUT("2", "离场"); OUT("1", "离场");
private final String code; private final String code;
private final String info; private final String info;

View File

@ -3,11 +3,8 @@ package com.yanzhu.common.core.utils;
import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.*;
import java.time.LocalDateTime; import java.time.format.DateTimeFormatter;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateFormatUtils;
@ -193,4 +190,36 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault()); ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
return Date.from(zdt.toInstant()); return Date.from(zdt.toInstant());
} }
/**
*
* @param birthDay
* @return
*/
public static int calculatedAgeByBirthDay(String birthDay){
int age = 0;
try {
// 出生日期
LocalDate birthDate = LocalDate.parse(birthDay, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
// 当前日期
LocalDate currentDate = LocalDate.now();
// 计算年龄
Period period = Period.between(birthDate, currentDate);
age = period.getYears();
}catch (Exception e){
try {
Calendar now = Calendar.getInstance();
now.setTime(new Date()); // 当前时间
Calendar birth = Calendar.getInstance();
birth.setTime(parseDate(birthDay, parsePatterns));
age = now.get(Calendar.YEAR) - birth.get(Calendar.YEAR);
if (now.get(Calendar.DAY_OF_YEAR) > birth.get(Calendar.DAY_OF_YEAR)) {
age += 1;
}
}catch (Exception ex){
ex.printStackTrace();
}
}
return age;
}
} }

View File

@ -112,13 +112,13 @@ public class ProProjectInfoSubdepts extends BaseEntity
@Excel(name = "删除标识") @Excel(name = "删除标识")
private Long isDel; private Long isDel;
/** 委托人正面照片 */ /** 委托人进场照片 */
private String leaderCardImgPos;
/** 委托人反面照片 */
private String leaderCardImgInv;
/** 委托人半身照片 */
private String leaderUserPicture; private String leaderUserPicture;
/** 委托代理人学历 */
/** 委托人详细信息 */
private String leaderUserInfos;
/** 委托人学历信息 */
private String leaderDegreeGrade; private String leaderDegreeGrade;
/** /**
@ -311,22 +311,6 @@ public class ProProjectInfoSubdepts extends BaseEntity
this.projectName = projectName; this.projectName = projectName;
} }
public String getLeaderCardImgPos() {
return leaderCardImgPos;
}
public void setLeaderCardImgPos(String leaderCardImgPos) {
this.leaderCardImgPos = leaderCardImgPos;
}
public String getLeaderCardImgInv() {
return leaderCardImgInv;
}
public void setLeaderCardImgInv(String leaderCardImgInv) {
this.leaderCardImgInv = leaderCardImgInv;
}
public String getLeaderUserPicture() { public String getLeaderUserPicture() {
return leaderUserPicture; return leaderUserPicture;
} }
@ -375,6 +359,14 @@ public class ProProjectInfoSubdepts extends BaseEntity
this.subDeptTypeName = subDeptTypeName; this.subDeptTypeName = subDeptTypeName;
} }
public String getLeaderUserInfos() {
return leaderUserInfos;
}
public void setLeaderUserInfos(String leaderUserInfos) {
this.leaderUserInfos = leaderUserInfos;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -92,16 +92,14 @@ public class ProProjectInfoSubdeptsGroup extends BaseEntity
@Excel(name = "删除标识") @Excel(name = "删除标识")
private Long isDel; private Long isDel;
/** 班组长正面照片 */
private String groupLeaderCardImgPos;
/** 班组长反面照片 */
private String groupLeaderCardImgInv;
/** 班组长半身照片 */ /** 班组长半身照片 */
private String groupLeaderUserPicture; private String groupLeaderUserPicture;
/** 班组长半身照片 */ /** 班组长委托代理书 */
private String groupLeaderSubPowerPath; private String groupLeaderSubPowerPath;
/** 班组长学历信息 */ /** 班组长学历信息 */
private String groupLeaderDegreeGrade; private String groupLeaderDegreeGrade;
/** 班组长人员信息 */
private String groupLeaderUserInfos;
public void setId(Long id) public void setId(Long id)
{ {
@ -282,22 +280,6 @@ public class ProProjectInfoSubdeptsGroup extends BaseEntity
this.projectName = projectName; this.projectName = projectName;
} }
public String getGroupLeaderCardImgPos() {
return groupLeaderCardImgPos;
}
public void setGroupLeaderCardImgPos(String groupLeaderCardImgPos) {
this.groupLeaderCardImgPos = groupLeaderCardImgPos;
}
public String getGroupLeaderCardImgInv() {
return groupLeaderCardImgInv;
}
public void setGroupLeaderCardImgInv(String groupLeaderCardImgInv) {
this.groupLeaderCardImgInv = groupLeaderCardImgInv;
}
public String getGroupLeaderUserPicture() { public String getGroupLeaderUserPicture() {
return groupLeaderUserPicture; return groupLeaderUserPicture;
} }
@ -322,6 +304,14 @@ public class ProProjectInfoSubdeptsGroup extends BaseEntity
this.groupLeaderDegreeGrade = groupLeaderDegreeGrade; this.groupLeaderDegreeGrade = groupLeaderDegreeGrade;
} }
public String getGroupLeaderUserInfos() {
return groupLeaderUserInfos;
}
public void setGroupLeaderUserInfos(String groupLeaderUserInfos) {
this.groupLeaderUserInfos = groupLeaderUserInfos;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -3,14 +3,11 @@ package com.yanzhu.manage.domain;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yanzhu.common.core.annotation.Excel; import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity; import com.yanzhu.common.core.web.domain.BaseEntity;
import com.yanzhu.system.api.domain.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date; import java.util.Date;
/** /**
* pro_project_info_subdepts_users * pro_project_info_subdepts_users
* *
* @author JiangYuQi * @author JiangYuQi
* @date 2024-08-25 * @date 2024-08-25
@ -19,105 +16,179 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Excel(name = "所属项目")
private String projectName;
/** 分包单位名称 */
@Excel(name = "所属单位")
private String subDeptName;
/** 主键 */ /** 主键 */
private Long id; private Long id;
/** 上级主键 */ /** 上级主键 */
private Long parId; private Long parId;
@Excel(name = "姓名")
private String userName;
@Excel(name = "身份证")
private String cardCode;
@Excel(name = "性别")
private String userSex;
@Excel(name = "民族")
private String userNation;
@Excel(name = "年龄")
private Integer userAge;
/** 公司主键 */ /** 公司主键 */
private Long comId; private Long comId;
/** 项目主键 */ @Excel(name = "所属单位")
private String comName;
/** 项目主键 */
private Long projectId; private Long projectId;
/** 分包单位 */ @Excel(name = "项目名称")
private String projectName;
/** 分包单位 */
private Long subDeptId; private Long subDeptId;
/** 单位类型 */ /** 分包单位名称 */
private String subDeptName;
/** 单位类型 */
private String subDeptType; private String subDeptType;
@Excel(name = "单位类型")
private String subDeptTypeName; private String subDeptTypeName;
/** 用户主键 */ /**
* &&---
private Long userId; */
@Excel(name = "用户岗位")
private String userPost;
/** 班组编号(外键) */ /** 班组编号(外键) */
private Long subDeptGroup; private Long subDeptGroup;
/** 班组名称 */ /** 班组名称 */
@Excel(name = "班组名称") @Excel(name = "班组名称")
private String subDeptGroupName; private String subDeptGroupName;
/** 工种类型 */ /** 委托书 */
private String subDeptPowerPath;
/** 用户主键 */
private Long userId;
/** 人员姓名 */
@Excel(name = "人员姓名")
private String userName;
/** 证件类型 */
@Excel(name = "证件类型")
private String cardType;
/** 证件号码 */
@Excel(name = "证件号码")
private String cardCode;
/** 人员性别 */
@Excel(name = "人员性别")
private String userSex;
/** 人员年龄 **/
@Excel(name = "人员年龄")
private int userAge;
/** 所属民族 **/
@Excel(name = "所属民族")
private String userNation;
/** 用户肖像 */
@Excel(name = "入场照片")
private String userPicture;
/** 手机号码 */
@Excel(name = "联系电话")
private String userPhone;
/** 劳务人员学历 */
private String degreeGrade;
/** 劳务人员学历 */
@Excel(name = "学历类型")
private String degreeGradeName;
/** 手机号码 */
private String userInfos;
/** 工种类型 */
private String craftType; private String craftType;
@Excel(name = "工种类型") @Excel(name = "工种类型")
private String craftTypeName; private String craftTypeName;
/** 工种岗位 */
/** 工种岗位 */
private String craftPost; private String craftPost;
@Excel(name = "工种岗位") @Excel(name = "工种岗位")
private String craftPostName; private String craftPostName;
/** 委托书 */
@Excel(name = "委托书")
private String subDeptPowerPath;
@Excel(name = "状态")
private String enterState;
/** 学习状态 */ /** 学习状态 */
@Excel(name = "学习状态") @Excel(name = "安全教育状态")
private String eduStatus; private String eduStatus;
/** 学习文件地址 */ /** 学习文件地址 */
private String eduFilePath; private String eduFilePath;
/** 学习签名地址 */
private String eduSignPath;
/** 学习时间 */ /** 学习时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "学习时间")
private Date eduDate; private Date eduDate;
/** 审批状态 */ /** 审批状态 */
@Excel(name = "审批状态")
private Long approveStatus; private Long approveStatus;
/** 进场状态 */ /** 进场时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "进场时间")
private Date useDate;
/** 进场状态 */
@Excel(name = "进场状态")
private String useStatus; private String useStatus;
/** 进行步骤 */ /** 进场状态 */
@Excel(name = "进场唯一代码")
private String admitGuid;
/** 二维码 */
private String qrCode;
/** 疾病状态 */
@Excel(name = "疾病状态")
private Long illnessStatus;
/** 严重疾病状态 */
@Excel(name = "严重疾病状态")
private Long supIllnessStatus;
/** 进行步骤 */
private Long subStep; private Long subStep;
private String comName; /** 删除标识 */
@Excel(name = "数据状态")
private Long isDel;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getParId() {
return parId;
}
public void setParId(Long parId) {
this.parId = parId;
}
public Long getComId() {
return comId;
}
public void setComId(Long comId) {
this.comId = comId;
}
public String getComName() { public String getComName() {
return comName; return comName;
@ -127,37 +198,92 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
this.comName = comName; this.comName = comName;
} }
/** 疾病状态 */ public Long getProjectId() {
return projectId;
private Long illnessStatus;
/** 严重疾病状态 */
private Long supIllnessStatus;
private String phoneNumber;
/** 劳务人员学历 */
private String degreeGrade;
/** 劳务人员学历 */
private String degreeGradeName;
/**
*
*/
private String userPost;
/**
*
*/
private String qrCode;
public String getEnterState() {
return enterState;
} }
public void setEnterState(String enterState) { public void setProjectId(Long projectId) {
this.enterState = enterState; this.projectId = projectId;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public Long getSubDeptId() {
return subDeptId;
}
public void setSubDeptId(Long subDeptId) {
this.subDeptId = subDeptId;
}
public String getSubDeptName() {
return subDeptName;
}
public void setSubDeptName(String subDeptName) {
this.subDeptName = subDeptName;
}
public String getSubDeptType() {
return subDeptType;
}
public void setSubDeptType(String subDeptType) {
this.subDeptType = subDeptType;
}
public String getSubDeptTypeName() {
return subDeptTypeName;
}
public void setSubDeptTypeName(String subDeptTypeName) {
this.subDeptTypeName = subDeptTypeName;
}
public String getUserPost() {
return userPost;
}
public void setUserPost(String userPost) {
this.userPost = userPost;
}
public Long getSubDeptGroup() {
return subDeptGroup;
}
public void setSubDeptGroup(Long subDeptGroup) {
this.subDeptGroup = subDeptGroup;
}
public String getSubDeptGroupName() {
return subDeptGroupName;
}
public void setSubDeptGroupName(String subDeptGroupName) {
this.subDeptGroupName = subDeptGroupName;
}
public String getSubDeptPowerPath() {
return subDeptPowerPath;
}
public void setSubDeptPowerPath(String subDeptPowerPath) {
this.subDeptPowerPath = subDeptPowerPath;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
} }
public String getUserName() { public String getUserName() {
@ -168,6 +294,14 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
this.userName = userName; this.userName = userName;
} }
public String getCardType() {
return cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getCardCode() { public String getCardCode() {
return cardCode; return cardCode;
} }
@ -184,275 +318,20 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
this.userSex = userSex; this.userSex = userSex;
} }
public String getUserNation() { public String getUserPicture() {
return userNation; return userPicture;
} }
public void setUserNation(String userNation) { public void setUserPicture(String userPicture) {
this.userNation = userNation; this.userPicture = userPicture;
} }
public Integer getUserAge() { public String getUserPhone() {
return userAge; return userPhone;
} }
public void setUserAge(Integer userAge) { public void setUserPhone(String userPhone) {
this.userAge = userAge; this.userPhone = userPhone;
}
public String getCraftTypeName() {
return craftTypeName;
}
public void setCraftTypeName(String craftTypeName) {
this.craftTypeName = craftTypeName;
}
public String getCraftPostName() {
return craftPostName;
}
public void setCraftPostName(String craftPostName) {
this.craftPostName = craftPostName;
}
public SysUser getUser() {
return user;
}
public void setUser(SysUser user) {
this.user = user;
}
public String getAdmitGuid() {
return admitGuid;
}
public void setAdmitGuid(String admitGuid) {
this.admitGuid = admitGuid;
}
private String admitGuid;
private SysUser user;
/** 删除标识 */
private Long isDel;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public Long getParId() {
return parId;
}
public void setParId(Long parId) {
this.parId = parId;
}
public void setComId(Long comId)
{
this.comId = comId;
}
public Long getComId()
{
return comId;
}
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
}
public void setSubDeptId(Long subDeptId)
{
this.subDeptId = subDeptId;
}
public Long getSubDeptId()
{
return subDeptId;
}
public void setSubDeptType(String subDeptType)
{
this.subDeptType = subDeptType;
}
public String getSubDeptType()
{
return subDeptType;
}
public void setSubDeptName(String subDeptName)
{
this.subDeptName = subDeptName;
}
public String getSubDeptName()
{
return subDeptName;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setSubDeptGroup(Long subDeptGroup)
{
this.subDeptGroup = subDeptGroup;
}
public Long getSubDeptGroup()
{
return subDeptGroup;
}
public void setSubDeptGroupName(String subDeptGroupName)
{
this.subDeptGroupName = subDeptGroupName;
}
public String getSubDeptGroupName()
{
return subDeptGroupName;
}
public void setCraftType(String craftType)
{
this.craftType = craftType;
}
public String getCraftType()
{
return craftType;
}
public void setCraftPost(String craftPost)
{
this.craftPost = craftPost;
}
public String getCraftPost()
{
return craftPost;
}
public void setEduStatus(String eduStatus)
{
this.eduStatus = eduStatus;
}
public String getEduStatus()
{
return eduStatus;
}
public void setEduFilePath(String eduFilePath)
{
this.eduFilePath = eduFilePath;
}
public String getEduFilePath()
{
return eduFilePath;
}
public void setEduSignPath(String eduSignPath)
{
this.eduSignPath = eduSignPath;
}
public String getEduSignPath()
{
return eduSignPath;
}
public void setEduDate(Date eduDate)
{
this.eduDate = eduDate;
}
public Date getEduDate()
{
return eduDate;
}
public void setApproveStatus(Long approveStatus)
{
this.approveStatus = approveStatus;
}
public Long getApproveStatus()
{
return approveStatus;
}
public void setUseStatus(String useStatus)
{
this.useStatus = useStatus;
}
public String getUseStatus()
{
return useStatus;
}
public void setSubStep(Long subStep)
{
this.subStep = subStep;
}
public Long getSubStep()
{
return subStep;
}
public void setIllnessStatus(Long illnessStatus)
{
this.illnessStatus = illnessStatus;
}
public Long getIllnessStatus()
{
return illnessStatus;
}
public void setSupIllnessStatus(Long supIllnessStatus)
{
this.supIllnessStatus = supIllnessStatus;
}
public Long getSupIllnessStatus()
{
return supIllnessStatus;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
} }
public String getDegreeGrade() { public String getDegreeGrade() {
@ -463,20 +342,116 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
this.degreeGrade = degreeGrade; this.degreeGrade = degreeGrade;
} }
public String getSubDeptPowerPath() { public String getDegreeGradeName() {
return subDeptPowerPath; return degreeGradeName;
} }
public void setSubDeptPowerPath(String subDeptPowerPath) { public void setDegreeGradeName(String degreeGradeName) {
this.subDeptPowerPath = subDeptPowerPath; this.degreeGradeName = degreeGradeName;
} }
public String getUserPost() { public String getUserInfos() {
return userPost; return userInfos;
} }
public void setUserPost(String userPost) { public void setUserInfos(String userInfos) {
this.userPost = userPost; this.userInfos = userInfos;
}
public String getCraftType() {
return craftType;
}
public void setCraftType(String craftType) {
this.craftType = craftType;
}
public String getCraftTypeName() {
return craftTypeName;
}
public void setCraftTypeName(String craftTypeName) {
this.craftTypeName = craftTypeName;
}
public String getCraftPost() {
return craftPost;
}
public void setCraftPost(String craftPost) {
this.craftPost = craftPost;
}
public String getCraftPostName() {
return craftPostName;
}
public void setCraftPostName(String craftPostName) {
this.craftPostName = craftPostName;
}
public String getEduFilePath() {
return eduFilePath;
}
public void setEduFilePath(String eduFilePath) {
this.eduFilePath = eduFilePath;
}
public int getUserAge() {
return userAge;
}
public void setUserAge(int userAge) {
this.userAge = userAge;
}
public String getEduStatus() {
return eduStatus;
}
public void setEduStatus(String eduStatus) {
this.eduStatus = eduStatus;
}
public Date getEduDate() {
return eduDate;
}
public void setEduDate(Date eduDate) {
this.eduDate = eduDate;
}
public Long getApproveStatus() {
return approveStatus;
}
public void setApproveStatus(Long approveStatus) {
this.approveStatus = approveStatus;
}
public Date getUseDate() {
return useDate;
}
public void setUseDate(Date useDate) {
this.useDate = useDate;
}
public String getUseStatus() {
return useStatus;
}
public void setUseStatus(String useStatus) {
this.useStatus = useStatus;
}
public String getAdmitGuid() {
return admitGuid;
}
public void setAdmitGuid(String admitGuid) {
this.admitGuid = admitGuid;
} }
public String getQrCode() { public String getQrCode() {
@ -487,52 +462,90 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
this.qrCode = qrCode; this.qrCode = qrCode;
} }
public String getSubDeptTypeName() { public Long getIllnessStatus() {
return subDeptTypeName; return illnessStatus;
} }
public void setSubDeptTypeName(String subDeptTypeName) { public void setIllnessStatus(Long illnessStatus) {
this.subDeptTypeName = subDeptTypeName; this.illnessStatus = illnessStatus;
} }
public String getDegreeGradeName() { public Long getSupIllnessStatus() {
return degreeGradeName; return supIllnessStatus;
} }
public void setDegreeGradeName(String degreeGradeName) { public void setSupIllnessStatus(Long supIllnessStatus) {
this.degreeGradeName = degreeGradeName; this.supIllnessStatus = supIllnessStatus;
}
public Long getSubStep() {
return subStep;
}
public void setSubStep(Long subStep) {
this.subStep = subStep;
}
public Long getIsDel() {
return isDel;
}
public void setIsDel(Long isDel) {
this.isDel = isDel;
}
public String getUserNation() {
return userNation;
}
public void setUserNation(String userNation) {
this.userNation = userNation;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "ProProjectInfoSubdeptsUsers{" +
.append("id", getId()) "id=" + id +
.append("comId", getComId()) ", parId=" + parId +
.append("projectId", getProjectId()) ", comId=" + comId +
.append("subDeptId", getSubDeptId()) ", comName='" + comName + '\'' +
.append("subDeptType", getSubDeptType()) ", projectId=" + projectId +
.append("subDeptName", getSubDeptName()) ", projectName='" + projectName + '\'' +
.append("userId", getUserId()) ", subDeptId=" + subDeptId +
.append("subDeptGroup", getSubDeptGroup()) ", subDeptName='" + subDeptName + '\'' +
.append("subDeptGroupName", getSubDeptGroupName()) ", subDeptType='" + subDeptType + '\'' +
.append("userPost", getUserPost()) ", subDeptTypeName='" + subDeptTypeName + '\'' +
.append("craftType", getCraftType()) ", userPost='" + userPost + '\'' +
.append("craftPost", getCraftPost()) ", subDeptGroup=" + subDeptGroup +
.append("eduStatus", getEduStatus()) ", subDeptGroupName='" + subDeptGroupName + '\'' +
.append("eduFilePath", getEduFilePath()) ", subDeptPowerPath='" + subDeptPowerPath + '\'' +
.append("eduSignPath", getEduSignPath()) ", userId=" + userId +
.append("eduDate", getEduDate()) ", userName='" + userName + '\'' +
.append("approveStatus", getApproveStatus()) ", cardType='" + cardType + '\'' +
.append("useStatus", getUseStatus()) ", cardCode='" + cardCode + '\'' +
.append("subStep", getSubStep()) ", userSex='" + userSex + '\'' +
.append("illnessStatus", getIllnessStatus()) ", userAge=" + userAge +
.append("supIllnessStatus", getSupIllnessStatus()) ", userPicture='" + userPicture + '\'' +
.append("isDel", getIsDel()) ", userPhone='" + userPhone + '\'' +
.append("createBy", getCreateBy()) ", degreeGrade='" + degreeGrade + '\'' +
.append("createTime", getCreateTime()) ", degreeGradeName='" + degreeGradeName + '\'' +
.append("updateBy", getUpdateBy()) ", userInfos='" + userInfos + '\'' +
.append("updateTime", getUpdateTime()) ", craftType='" + craftType + '\'' +
.append("remark", getRemark()) ", craftTypeName='" + craftTypeName + '\'' +
.toString(); ", craftPost='" + craftPost + '\'' +
", craftPostName='" + craftPostName + '\'' +
", eduStatus='" + eduStatus + '\'' +
", eduFilePath='" + eduFilePath + '\'' +
", eduDate=" + eduDate +
", approveStatus=" + approveStatus +
", useDate=" + useDate +
", useStatus='" + useStatus + '\'' +
", admitGuid='" + admitGuid + '\'' +
", qrCode='" + qrCode + '\'' +
", illnessStatus=" + illnessStatus +
", supIllnessStatus=" + supIllnessStatus +
", subStep=" + subStep +
", isDel=" + isDel +
'}';
} }
} }

View File

@ -1,190 +0,0 @@
package com.yanzhu.manage.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* pro_project_info_users
*
* @author JiangYuQi
* @date 2024-08-25
*/
public class ProProjectInfoUsers extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 公司主键 */
@Excel(name = "公司主键")
private Long comId;
/** 公司名称 */
@Excel(name = "公司名称")
private String comName;
/** 项目主键 */
@Excel(name = "项目主键")
private Long projectId;
/** 项目名称 */
@Excel(name = "项目名称")
private String projectName;
/** 用户主键 */
@Excel(name = "用户主键")
private Long userId;
/** 用户姓名 */
@Excel(name = "用户姓名")
private String userName;
/** 用户编号 */
@Excel(name = "用户编号")
private String userCode;
/** 用户电话 */
@Excel(name = "用户电话")
private String userPhone;
/** 进场状态 */
@Excel(name = "进场状态")
private String useStatus;
/** 项目排序 */
@Excel(name = "项目排序")
private Long sortBy;
/** 删除标识 */
@Excel(name = "删除标识")
private Long isDel;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public Long getComId() {
return comId;
}
public void setComId(Long comId) {
this.comId = comId;
}
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public String getUserName()
{
return userName;
}
public void setUserCode(String userCode)
{
this.userCode = userCode;
}
public String getUserCode()
{
return userCode;
}
public void setUserPhone(String userPhone)
{
this.userPhone = userPhone;
}
public String getUserPhone()
{
return userPhone;
}
public void setUseStatus(String useStatus)
{
this.useStatus = useStatus;
}
public String getUseStatus()
{
return useStatus;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
public String getComName() {
return comName;
}
public void setComName(String comName) {
this.comName = comName;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public Long getSortBy() {
return sortBy;
}
public void setSortBy(Long sortBy) {
this.sortBy = sortBy;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("comId", getComId())
.append("projectId", getProjectId())
.append("userId", getUserId())
.append("userName", getUserName())
.append("userCode", getUserCode())
.append("userPhone", getUserPhone())
.append("useStatus", getUseStatus())
.append("isDel", getIsDel())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

View File

@ -2,6 +2,7 @@ package com.yanzhu.manage.mapper;
import java.util.List; import java.util.List;
import com.yanzhu.manage.domain.BasSignet; import com.yanzhu.manage.domain.BasSignet;
import org.apache.ibatis.annotations.Param;
/** /**
* Mapper * Mapper
@ -51,6 +52,15 @@ public interface BasSignetMapper
*/ */
public int deleteBasSignetById(Long id); public int deleteBasSignetById(Long id);
/**
*
*
* @param proId
* @param userId
* @return
*/
public int deleteBasSignetByParams(@Param("proId") Long proId, @Param("userId") Long userId);
/** /**
* *
* *

View File

@ -1,79 +0,0 @@
package com.yanzhu.manage.mapper;
import java.util.List;
import java.util.Map;
import com.yanzhu.manage.domain.ProProjectInfoUsers;
/**
* Mapper
*
* @author JiangYuQi
* @date 2024-08-25
*/
public interface ProProjectInfoUsersMapper
{
/**
*
*
* @param id
* @return
*/
public ProProjectInfoUsers selectProProjectInfoUsersById(Long id);
/**
*
*
* @param proProjectInfoUsers
* @return
*/
public List<ProProjectInfoUsers> selectProProjectInfoUsersList(ProProjectInfoUsers proProjectInfoUsers);
/**
*
*
* @param proProjectInfoUsers
* @return
*/
public int insertProProjectInfoUsers(ProProjectInfoUsers proProjectInfoUsers);
/**
*
*
* @param proProjectInfoUsers
* @return
*/
public int updateProProjectInfoUsers(ProProjectInfoUsers proProjectInfoUsers);
/**
*
*
* @param id
* @return
*/
public int deleteProProjectInfoUsersById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteProProjectInfoUsersByIds(Long[] ids);
/**
*
*
* @param userId
* @return
*/
public int cancelDefaultSortByUserId(Long userId);
/**
*
*
* @param userId ID
* @return
*/
public List<Map<String, Object>> selectProjectsByUserId(Long userId);
}

View File

@ -101,6 +101,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from bas_signet where id = #{id} delete from bas_signet where id = #{id}
</delete> </delete>
<delete id="deleteBasSignetByParams" parameterType="Long">
delete from bas_signet where project_id = #{proId} and user_id = #{userId}
</delete>
<delete id="deleteBasSignetByIds" parameterType="String"> <delete id="deleteBasSignetByIds" parameterType="String">
delete from bas_signet where id in delete from bas_signet where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">

View File

@ -3,12 +3,13 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper"> <mapper namespace="com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper">
<resultMap type="ProProjectInfoSubdeptsUsers" id="ProProjectInfoSubdeptsUsersResult"> <resultMap type="ProProjectInfoSubdeptsUsers" id="ProProjectInfoSubdeptsUsersResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="parId" column="par_id" /> <result property="parId" column="par_id" />
<result property="comId" column="com_id" /> <result property="comId" column="com_id" />
<result property="comName" column="comName"/> <result property="comName" column="com_name"/>
<result property="projectId" column="project_id" /> <result property="projectId" column="project_id" />
<result property="projectName" column="project_name" /> <result property="projectName" column="project_name" />
<result property="subDeptId" column="sub_dept_id" /> <result property="subDeptId" column="sub_dept_id" />
@ -17,78 +18,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="subDeptName" column="sub_dept_name" /> <result property="subDeptName" column="sub_dept_name" />
<result property="subDeptPowerPath" column="sub_dept_power_path" /> <result property="subDeptPowerPath" column="sub_dept_power_path" />
<result property="userId" column="user_id" /> <result property="userId" column="user_id" />
<result property="userPost" column="user_post" />
<result property="subDeptGroup" column="sub_dept_group" /> <result property="subDeptGroup" column="sub_dept_group" />
<result property="subDeptGroupName" column="sub_dept_group_name" /> <result property="subDeptGroupName" column="sub_dept_group_name" />
<result property="userPost" column="user_post" /> <result property="userName" column="user_name" />
<result property="cardType" column="card_type" />
<result property="cardCode" column="card_code" />
<result property="userSex" column="user_sex" />
<result property="userPicture" column="user_picture" />
<result property="userPhone" column="user_phone" />
<result property="degreeGrade" column="degree_grade" />
<result property="degreeGradeName" column="degree_grade_name" />
<result property="userInfos" column="user_infos" />
<result property="craftType" column="craft_type" /> <result property="craftType" column="craft_type" />
<result property="craftTypeName" column="craft_type_name" />
<result property="craftPost" column="craft_post" /> <result property="craftPost" column="craft_post" />
<result property="craftPostName" column="craft_post_name" />
<result property="eduStatus" column="edu_status" /> <result property="eduStatus" column="edu_status" />
<result property="eduFilePath" column="edu_file_path" /> <result property="eduFilePath" column="edu_file_path" />
<result property="eduSignPath" column="edu_sign_path" />
<result property="eduDate" column="edu_date" /> <result property="eduDate" column="edu_date" />
<result property="approveStatus" column="approve_status" /> <result property="approveStatus" column="approve_status" />
<result property="useDate" column="use_date" />
<result property="useStatus" column="use_status" /> <result property="useStatus" column="use_status" />
<result property="admitGuid" column="admit_guid" />
<result property="qrCode" column="qr_code" /> <result property="qrCode" column="qr_code" />
<result property="subStep" column="sub_step" /> <result property="subStep" column="sub_step" />
<result property="illnessStatus" column="illness_status" /> <result property="illnessStatus" column="illness_status" />
<result property="supIllnessStatus" column="sup_illness_status" /> <result property="supIllnessStatus" column="sup_illness_status" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="enterState" column="enter_state" />
<result property="craftTypeName" column="craft_type_name" />
<result property="craftPostName" column="craft_post_name" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="admitGuid" column="admitGuid"/>
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="degreeGrade" column="degree_grade" />
<result property="degreeGradeName" column="degree_grade_name" />
<association property="user" javaType="com.yanzhu.system.api.domain.SysUser" resultMap="ProSysUserResult"></association>
</resultMap>
<resultMap id="ProSysUserResult" type="com.yanzhu.system.api.domain.SysUser">
<result property="userName" column="user_name" />
<result property="nickName" column="nick_name" />
<result property="userType" column="user_type" />
<result property="cardType" column="card_type" />
<result property="cardCode" column="card_code" />
<result property="admitGuid" column="usAdmitGuid"/>
<result property="userPicture" column="user_picture" />
<result property="cardImgPos" column="card_img_pos" />
<result property="cardImgInv" column="card_img_inv" />
<result property="userInfos" column="user_infos" />
<result property="email" column="email" />
<result property="phonenumber" column="phonenumber" />
<result property="sex" column="sex" />
<result property="avatar" column="avatar" />
<result property="password" column="password" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="loginIp" column="login_ip" />
<result property="loginDate" column="login_date" />
</resultMap> </resultMap>
<sql id="selectProProjectInfoSubdeptsUsersVo"> <sql id="selectProProjectInfoSubdeptsUsersVo">
SELECT psu.id, psu.par_id, psu.com_id, psu.project_id, pi.project_name, psu.sub_dept_id, psu.sub_dept_type, dic3.dict_label as sub_dept_type_name, psu.sub_dept_name, psu.sub_dept_power_path, psu.user_id, psu.sub_dept_group, select psu.id, psu.par_id, psu.com_id, psu.project_id, pi.project_name, psu.sub_dept_id, psu.sub_dept_type, dic3.dict_label as sub_dept_type_name, psu.sub_dept_name, psu.sub_dept_power_path, psu.user_id, psu.user_post, psu.sub_dept_group,
psu.sub_dept_group_name, psu.user_post, psu.craft_type, psu.craft_post, psu.edu_status, psu.edu_file_path, psu.edu_sign_path, psu.edu_date, psu.approve_status, psu.sub_dept_group_name, psu.user_name, psu.card_type, psu.card_code, psu.user_sex, psu.user_picture, psu.user_phone, psu.degree_grade, dic4.dict_label as degree_grade_name, psu.user_infos, psu.craft_type, psu.craft_post, psu.edu_status, psu.edu_file_path, psu.edu_date, psu.approve_status,
psu.use_status, psu.qr_code, psu.sub_step, psu.illness_status, psu.sup_illness_status, psu.is_del, psu.create_by, psu.create_time, psu.update_by, psu.update_time, psu.use_date, psu.use_status, psu.admit_guid, psu.qr_code, psu.sub_step, psu.illness_status, psu.sup_illness_status, psu.is_del, psu.create_by, psu.create_time, psu.update_by, psu.update_time,
psu.remark, psu.degree_grade, dic4.dict_label as degree_grade_name, su.`user_name`,su.`nick_name`,su.`user_type`,su.`card_type`,su.`card_code`,su.admitGuid,su.admitGuid usAdmitGuid, psu.remark
dic1.dict_label craft_type_name,dic2.dict_label craft_post_name,psu.enter_state,sd.dept_name comName, from pro_project_info_subdepts_users psu
su.`user_picture`, su.`card_img_inv`,su.`card_img_pos`,su.`user_infos`,su.`email`,su.`phonenumber`,su.`sex`,su.`avatar`,su.`login_ip`,su.`login_date` left join pro_project_info pi on pi.id = psu.project_id
FROM pro_project_info_subdepts_users psu left join sys_dept sd on sd.dept_id = pi.com_id
LEFT JOIN sys_user su ON psu.user_id=su.user_id left join sys_dict_data dic1 on psu.`craft_type`=dic1.`dict_value` and dic1.`dict_type`='pro_craft_type'
LEFT JOIN pro_project_info pi ON pi.id = psu.project_id left join sys_dict_data dic2 on psu.`craft_post`=dic2.`dict_value` and dic2.`dict_type`='pro_craft_post'
LEFT JOIN sys_dept sd ON sd.dept_id = pi.com_id left join sys_dict_data dic3 on psu.`sub_dept_type`=dic3.`dict_value` and dic3.`dict_type`='sub_dept_type'
LEFT JOIN sys_dict_data dic1 ON psu.`craft_type`=dic1.`dict_value` AND dic1.`dict_type`='pro_craft_type' left join sys_dict_data dic4 on psu.`degree_grade`=dic4.`dict_value` and dic4.`dict_type`='educational_type'
LEFT JOIN sys_dict_data dic2 ON psu.`craft_post`=dic2.`dict_value` AND dic2.`dict_type`='pro_craft_post'
LEFT JOIN sys_dict_data dic3 ON psu.`sub_dept_type`=dic3.`dict_value` AND dic3.`dict_type`='sub_dept_type'
LEFT JOIN sys_dict_data dic4 ON psu.`degree_grade`=dic4.`dict_value` AND dic4.`dict_type`='educational_type'
</sql> </sql>
<select id="selectProProjectInfoSubdeptsUsersList" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult"> <select id="selectProProjectInfoSubdeptsUsersList" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult">
<include refid="selectProProjectInfoSubdeptsUsersVo"/> <include refid="selectProProjectInfoSubdeptsUsersVo"/>
<where> <where>
and psu.is_del != 2
<if test="comId != null "> and psu.com_id = #{comId}</if> <if test="comId != null "> and psu.com_id = #{comId}</if>
<if test="parId != null "> and psu.par_id = #{parId}</if> <if test="parId != null "> and psu.par_id = #{parId}</if>
<if test="projectId != null "> and psu.project_id = #{projectId}</if> <if test="projectId != null "> and psu.project_id = #{projectId}</if>
@ -96,24 +78,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="subDeptType != null and subDeptType != ''"> and psu.sub_dept_type = #{subDeptType}</if> <if test="subDeptType != null and subDeptType != ''"> and psu.sub_dept_type = #{subDeptType}</if>
<if test="subDeptName != null and subDeptName != ''"> and psu.sub_dept_name like concat('%', #{subDeptName}, '%')</if> <if test="subDeptName != null and subDeptName != ''"> and psu.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
<if test="userId != null "> and psu.user_id = #{userId}</if> <if test="userId != null "> and psu.user_id = #{userId}</if>
<if test="userPost != null "> and psu.user_post = #{userPost}</if>
<if test="subDeptGroup != null "> and psu.sub_dept_group = #{subDeptGroup}</if> <if test="subDeptGroup != null "> and psu.sub_dept_group = #{subDeptGroup}</if>
<if test="subDeptGroupName != null and subDeptGroupName != ''"> and psu.sub_dept_group_name like concat('%', #{subDeptGroupName}, '%')</if> <if test="subDeptGroupName != null and subDeptGroupName != ''"> and psu.sub_dept_group_name like concat('%', #{subDeptGroupName}, '%')</if>
<if test="userPost != null and userPost != ''"> and psu.user_post = #{userPost}</if>
<if test="craftType != null and craftType != ''"> and psu.craft_type = #{craftType}</if> <if test="craftType != null and craftType != ''"> and psu.craft_type = #{craftType}</if>
<if test="craftPost != null and craftPost != ''"> and psu.craft_post = #{craftPost}</if> <if test="craftPost != null and craftPost != ''"> and psu.craft_post = #{craftPost}</if>
<if test="eduStatus != null and eduStatus != ''"> and psu.edu_status = #{eduStatus}</if> <if test="eduStatus != null and eduStatus != ''"> and psu.edu_status = #{eduStatus}</if>
<if test="enterState != null and enterState != ''"> and psu.enter_state = #{enterState}</if>
<if test="eduFilePath != null and eduFilePath != ''"> and psu.edu_file_path = #{eduFilePath}</if>
<if test="eduSignPath != null and eduSignPath != ''"> and psu.edu_sign_path = #{eduSignPath}</if>
<if test="eduDate != null "> and psu.edu_date = #{eduDate}</if> <if test="eduDate != null "> and psu.edu_date = #{eduDate}</if>
<if test="admitGuid!=null and admitGuid!=''">and su.admitGuid=#{admitGuid}</if>
<if test="approveStatus != null "> and psu.approve_status = #{approveStatus}</if> <if test="approveStatus != null "> and psu.approve_status = #{approveStatus}</if>
<if test="useStatus != null and useStatus != ''"> and psu.use_status = #{useStatus}</if> <if test="useStatus != null and useStatus != ''"> and psu.use_status = #{useStatus}</if>
<if test="admitGuid!=null and admitGuid!=''">and psu.admit_guid = #{admitGuid}</if>
<if test="subStep != null "> and psu.sub_step = #{subStep}</if> <if test="subStep != null "> and psu.sub_step = #{subStep}</if>
<if test="illnessStatus != null "> and psu.illness_status = #{illnessStatus}</if> <if test="illnessStatus != null "> and psu.illness_status = #{illnessStatus}</if>
<if test="supIllnessStatus != null "> and psu.sup_illness_status = #{supIllnessStatus}</if> <if test="supIllnessStatus != null "> and psu.sup_illness_status = #{supIllnessStatus}</if>
<if test="phoneNumber != null and phoneNumber != ''"> and su.phonenumber = #{phoneNumber}</if> <if test="userPhone != null and userPhone != ''"> and psu.user_phone = #{userPhone}</if>
<if test="degreeGrade != null and degreeGrade != ''"> and su.degree_grade = #{degreeGrade}</if>
<if test="isDel != null "> and psu.is_del = #{isDel}</if> <if test="isDel != null "> and psu.is_del = #{isDel}</if>
</where> </where>
</select> </select>
@ -140,29 +118,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="subDeptName != null">sub_dept_name,</if> <if test="subDeptName != null">sub_dept_name,</if>
<if test="subDeptPowerPath != null">sub_dept_power_path,</if> <if test="subDeptPowerPath != null">sub_dept_power_path,</if>
<if test="userId != null">user_id,</if> <if test="userId != null">user_id,</if>
<if test="userPost != null">user_post,</if>
<if test="subDeptGroup != null">sub_dept_group,</if> <if test="subDeptGroup != null">sub_dept_group,</if>
<if test="subDeptGroupName != null">sub_dept_group_name,</if> <if test="subDeptGroupName != null">sub_dept_group_name,</if>
<if test="userPost != null">user_post,</if> <if test="userName != null">user_name,</if>
<if test="cardType != null">card_type,</if>
<if test="cardCode != null">card_code,</if>
<if test="userSex != null">user_sex,</if>
<if test="userPicture != null">user_picture,</if>
<if test="userPhone != null">user_phone,</if>
<if test="degreeGrade != null">degree_grade,</if>
<if test="userInfos != null">user_infos,</if>
<if test="craftType != null">craft_type,</if> <if test="craftType != null">craft_type,</if>
<if test="craftPost != null">craft_post,</if> <if test="craftPost != null">craft_post,</if>
<if test="eduStatus != null">edu_status,</if> <if test="eduStatus != null">edu_status,</if>
<if test="eduFilePath != null">edu_file_path,</if> <if test="eduFilePath != null">edu_file_path,</if>
<if test="eduSignPath != null">edu_sign_path,</if>
<if test="eduDate != null">edu_date,</if> <if test="eduDate != null">edu_date,</if>
<if test="approveStatus != null">approve_status,</if> <if test="approveStatus != null">approve_status,</if>
<if test="useDate != null">use_date,</if>
<if test="useStatus != null">use_status,</if> <if test="useStatus != null">use_status,</if>
<if test="admitGuid != null">admit_guid,</if>
<if test="qrCode != null">qr_code,</if> <if test="qrCode != null">qr_code,</if>
<if test="subStep != null">sub_step,</if> <if test="subStep != null">sub_step,</if>
<if test="illnessStatus != null">illness_status,</if> <if test="illnessStatus != null">illness_status,</if>
<if test="supIllnessStatus != null">sup_illness_status,</if> <if test="supIllnessStatus != null">sup_illness_status,</if>
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="enterState != null">enter_state,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="degreeGrade != null">degree_grade,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="parId != null">#{parId},</if> <if test="parId != null">#{parId},</if>
@ -173,29 +158,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="subDeptName != null">#{subDeptName},</if> <if test="subDeptName != null">#{subDeptName},</if>
<if test="subDeptPowerPath != null">#{subDeptPowerPath},</if> <if test="subDeptPowerPath != null">#{subDeptPowerPath},</if>
<if test="userId != null">#{userId},</if> <if test="userId != null">#{userId},</if>
<if test="userPost != null">#{userPost},</if>
<if test="subDeptGroup != null">#{subDeptGroup},</if> <if test="subDeptGroup != null">#{subDeptGroup},</if>
<if test="subDeptGroupName != null">#{subDeptGroupName},</if> <if test="subDeptGroupName != null">#{subDeptGroupName},</if>
<if test="userPost != null">#{userPost},</if> <if test="userName != null">#{userName},</if>
<if test="cardType != null">#{cardType},</if>
<if test="cardCode != null">#{cardCode},</if>
<if test="userSex != null">#{userSex},</if>
<if test="userPicture != null">#{userPicture},</if>
<if test="userPhone != null">#{userPhone},</if>
<if test="degreeGrade != null">#{degreeGrade},</if>
<if test="userInfos != null">#{userInfos},</if>
<if test="craftType != null">#{craftType},</if> <if test="craftType != null">#{craftType},</if>
<if test="craftPost != null">#{craftPost},</if> <if test="craftPost != null">#{craftPost},</if>
<if test="eduStatus != null">#{eduStatus},</if> <if test="eduStatus != null">#{eduStatus},</if>
<if test="eduFilePath != null">#{eduFilePath},</if> <if test="eduFilePath != null">#{eduFilePath},</if>
<if test="eduSignPath != null">#{eduSignPath},</if>
<if test="eduDate != null">#{eduDate},</if> <if test="eduDate != null">#{eduDate},</if>
<if test="approveStatus != null">#{approveStatus},</if> <if test="approveStatus != null">#{approveStatus},</if>
<if test="useDate != null">#{useDate},</if>
<if test="useStatus != null">#{useStatus},</if> <if test="useStatus != null">#{useStatus},</if>
<if test="admitGuid != null">#{admitGuid},</if>
<if test="qrCode != null">#{qrCode},</if> <if test="qrCode != null">#{qrCode},</if>
<if test="subStep != null">#{subStep},</if> <if test="subStep != null">#{subStep},</if>
<if test="illnessStatus != null">#{illnessStatus},</if> <if test="illnessStatus != null">#{illnessStatus},</if>
<if test="supIllnessStatus != null">#{supIllnessStatus},</if> <if test="supIllnessStatus != null">#{supIllnessStatus},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="enterState != null">#{enterState},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="degreeGrade != null">#{degreeGrade},</if>
</trim> </trim>
</insert> </insert>
@ -210,43 +202,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="subDeptName != null">sub_dept_name = #{subDeptName},</if> <if test="subDeptName != null">sub_dept_name = #{subDeptName},</if>
<if test="subDeptPowerPath != null">sub_dept_power_path = #{subDeptPowerPath},</if> <if test="subDeptPowerPath != null">sub_dept_power_path = #{subDeptPowerPath},</if>
<if test="userId != null">user_id = #{userId},</if> <if test="userId != null">user_id = #{userId},</if>
<if test="userPost != null">user_post = #{userPost},</if>
<if test="subDeptGroup != null">sub_dept_group = #{subDeptGroup},</if> <if test="subDeptGroup != null">sub_dept_group = #{subDeptGroup},</if>
<if test="subDeptGroupName != null">sub_dept_group_name = #{subDeptGroupName},</if> <if test="subDeptGroupName != null">sub_dept_group_name = #{subDeptGroupName},</if>
<if test="userPost != null">user_post = #{userPost},</if> <if test="userName != null">user_name = #{userName},</if>
<if test="cardType != null">card_type = #{cardType},</if>
<if test="cardCode != null">card_code = #{cardCode},</if>
<if test="userSex != null">user_sex = #{userSex},</if>
<if test="userPicture != null">user_picture = #{userPicture},</if>
<if test="userPhone != null">user_phone = #{userPhone},</if>
<if test="degreeGrade != null">degree_grade = #{degreeGrade},</if>
<if test="userInfos != null">user_infos = #{userInfos},</if>
<if test="craftType != null">craft_type = #{craftType},</if> <if test="craftType != null">craft_type = #{craftType},</if>
<if test="craftPost != null">craft_post = #{craftPost},</if> <if test="craftPost != null">craft_post = #{craftPost},</if>
<if test="eduStatus != null">edu_status = #{eduStatus},</if> <if test="eduStatus != null">edu_status = #{eduStatus},</if>
<if test="eduFilePath != null">edu_file_path = #{eduFilePath},</if> <if test="eduFilePath != null">edu_file_path = #{eduFilePath},</if>
<if test="eduSignPath != null">edu_sign_path = #{eduSignPath},</if>
<if test="eduDate != null">edu_date = #{eduDate},</if> <if test="eduDate != null">edu_date = #{eduDate},</if>
<if test="approveStatus != null">approve_status = #{approveStatus},</if> <if test="approveStatus != null">approve_status = #{approveStatus},</if>
<if test="useDate != null">use_date = #{useDate},</if>
<if test="useStatus != null">use_status = #{useStatus},</if> <if test="useStatus != null">use_status = #{useStatus},</if>
<if test="admitGuid != null">admit_guid = #{admitGuid},</if>
<if test="qrCode != null">qr_code = #{qrCode},</if> <if test="qrCode != null">qr_code = #{qrCode},</if>
<if test="subStep != null">sub_step = #{subStep},</if> <if test="subStep != null">sub_step = #{subStep},</if>
<if test="illnessStatus != null">illness_status = #{illnessStatus},</if> <if test="illnessStatus != null">illness_status = #{illnessStatus},</if>
<if test="supIllnessStatus != null">sup_illness_status = #{supIllnessStatus},</if> <if test="supIllnessStatus != null">sup_illness_status = #{supIllnessStatus},</if>
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="enterState != null">enter_state = #{enterState},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="degreeGrade != null">degree_grade = #{degreeGrade},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteProProjectInfoSubdeptsUsersById" parameterType="Long"> <update id="deleteProProjectInfoSubdeptsUsersById" parameterType="Long">
delete from pro_project_info_subdepts_users where id = #{id} update pro_project_info_subdepts_users set is_del = 2 where id = #{id}
</delete> </update>
<delete id="deleteProProjectInfoSubdeptsUsersByIds" parameterType="String"> <update id="deleteProProjectInfoSubdeptsUsersByIds" parameterType="String">
delete from pro_project_info_subdepts_users where id in update pro_project_info_subdepts_users set is_del = 2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </update>
<select id="findUserByUserPhone" parameterType="String" resultType="int"> <select id="findUserByUserPhone" parameterType="String" resultType="int">
select count(1) from sys_user where phonenumber=#{phonenumber} select count(1) from sys_user where phonenumber=#{phonenumber}
@ -266,7 +265,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM FROM
pro_project_info_subdepts_users pro_project_info_subdepts_users
WHERE WHERE
enter_state =0 use_status = 0
<if test="comId != null">and com_id = #{comId}</if> <if test="comId != null">and com_id = #{comId}</if>
<if test="projectId != null">and project_id = #{projectId}</if> <if test="projectId != null">and project_id = #{projectId}</if>
GROUP BY GROUP BY
@ -275,7 +274,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ON u.craft_type = dic.dict_value ON u.craft_type = dic.dict_value
WHERE WHERE
dic.dict_type = 'pro_craft_type'; dic.dict_type = 'pro_craft_type';
</select> </select>
<select id="groupByCraftTypeByAttendance" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult"> <select id="groupByCraftTypeByAttendance" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult">

View File

@ -1,133 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.manage.mapper.ProProjectInfoUsersMapper">
<resultMap type="ProProjectInfoUsers" id="ProProjectInfoUsersResult">
<result property="id" column="id" />
<result property="comId" column="com_id" />
<result property="comName" column="com_name" />
<result property="projectId" column="project_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="userCode" column="user_code" />
<result property="userPhone" column="user_phone" />
<result property="useStatus" column="use_status" />
<result property="sortBy" column="sort_by" />
<result property="isDel" column="is_del" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectProProjectInfoUsersVo">
select pu.id, pu.com_id, sd.dept_name as com_name, pu.project_id, pi.project_name, pu.user_id, pu.user_name, pu.user_code, pu.user_phone, pu.use_status, pu.sort_by, pu.is_del, pu.create_by, pu.create_time, pu.update_by, pu.update_time, pu.remark from pro_project_info_users pu
left join pro_project_info pi on pi.id = pu.project_id
left join sys_dept sd on sd.dept_id = pi.com_id
</sql>
<select id="selectProProjectInfoUsersList" parameterType="ProProjectInfoUsers" resultMap="ProProjectInfoUsersResult">
<include refid="selectProProjectInfoUsersVo"/>
<where>
<if test="activeComId != null "> and sd.dept_id = #{activeComId}</if>
<if test="comId != null "> and pu.com_id = #{comId}</if>
<if test="projectId != null "> and pu.project_id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="userId != null "> and pu.user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and pu.user_name like concat('%', #{userName}, '%')</if>
<if test="userCode != null and userCode != ''"> and pu.user_code = #{userCode}</if>
<if test="userPhone != null and userPhone != ''"> and pu.user_phone = #{userPhone}</if>
<if test="useStatus != null and useStatus != ''"> and pu.use_status = #{useStatus}</if>
<if test="isDel != null "> and pu.is_del = #{isDel}</if>
</where>
order by pu.id desc
</select>
<select id="selectProProjectInfoUsersById" parameterType="Long" resultMap="ProProjectInfoUsersResult">
<include refid="selectProProjectInfoUsersVo"/>
where pu.id = #{id}
</select>
<insert id="insertProProjectInfoUsers" parameterType="ProProjectInfoUsers" useGeneratedKeys="true" keyProperty="id">
insert into pro_project_info_users
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="comId != null">com_id,</if>
<if test="projectId != null">project_id,</if>
<if test="userId != null">user_id,</if>
<if test="userName != null">user_name,</if>
<if test="userCode != null">user_code,</if>
<if test="userPhone != null">user_phone,</if>
<if test="useStatus != null">use_status,</if>
<if test="sortBy != null">sort_by,</if>
<if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="comId != null">#{comId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="userId != null">#{userId},</if>
<if test="userName != null">#{userName},</if>
<if test="userCode != null">#{userCode},</if>
<if test="userPhone != null">#{userPhone},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="sortBy != null">#{sortBy},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateProProjectInfoUsers" parameterType="ProProjectInfoUsers">
update pro_project_info_users
<trim prefix="SET" suffixOverrides=",">
<if test="comId != null">com_id = #{comId},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null">user_name = #{userName},</if>
<if test="userCode != null">user_code = #{userCode},</if>
<if test="userPhone != null">user_phone = #{userPhone},</if>
<if test="useStatus != null">use_status = #{useStatus},</if>
<if test="sortBy != null">sort_by = #{sortBy},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<update id="deleteProProjectInfoUsersById" parameterType="Long">
update pro_project_info_users set is_del=1 where id = #{id}
</update>
<update id="deleteProProjectInfoUsersByIds" parameterType="String">
update pro_project_info_users set is_del=1 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="cancelDefaultSortByUserId" parameterType="Long">
update pro_project_info_users set sort_by=100 where user_id = #{userId}
</update>
<!--根据用户编号查询入场项目信息-->
<select id="selectProjectsByUserId" parameterType="Long" resultType="Map">
select pu.project_id as projectId, pi.project_name as projectName, pi.com_id as comId from pro_project_info_users pu
left join pro_project_info pi on pi.id = pu.project_id
where pu.user_id=#{userId} and pu.is_del=0 and pu.use_status=1 order by pu.sort_by asc
</select>
</mapper>

View File

@ -117,7 +117,7 @@
left join sys_role_menu rm on m.menu_id = rm.menu_id left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role r on r.role_id = ur.role_id left join sys_role r on r.role_id = ur.role_id
left join sys_role_dept rd on rd.role_id = r.role.id left join sys_role_dept rd on rd.role_id = r.role_id
where m.status = '0' and r.status = '0' and ur.user_id = #{userId} and rd.dept_id = #{deptId} where m.status = '0' and r.status = '0' and ur.user_id = #{userId} and rd.dept_id = #{deptId}
</select> </select>

View File

@ -198,7 +198,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user( insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if>
<if test="comId != null and comId != 0">com_id,</if> <if test="comId != null and comId != 0">com_id,</if>
<if test="deptId != null and deptId != 0">dept_id,</if> <if test="deptId != null and deptId != 0">dept_id,</if>
<if test="userName != null and userName != ''">user_name,</if> <if test="userName != null and userName != ''">user_name,</if>
@ -221,7 +220,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
create_time create_time
)values( )values(
<if test="userId != null and userId != 0">#{userId},</if>
<if test="comId != null and comId != 0">#{comId},</if> <if test="comId != null and comId != 0">#{comId},</if>
<if test="deptId != null and deptId != 0">#{deptId},</if> <if test="deptId != null and deptId != 0">#{deptId},</if>
<if test="userName != null and userName != ''">#{userName},</if> <if test="userName != null and userName != ''">#{userName},</if>

View File

@ -26,8 +26,8 @@ public class SystemUtils {
*/ */
@Bean @Bean
public void initSettings() { public void initSettings() {
if(!Objects.equals("dev",active)){ //if(!Objects.equals("dev",active)){
isLinux = true; isLinux = true;
} //}
} }
} }

View File

@ -71,7 +71,7 @@ public class BasSignetController extends BaseController
{ {
if(Objects.nonNull(pageBasSignet.getId())){ if(Objects.nonNull(pageBasSignet.getId())){
BasSignet basSignet = basSignetService.selectBasSignetById(pageBasSignet.getId()); BasSignet basSignet = basSignetService.selectBasSignetById(pageBasSignet.getId());
basSignet.setSignetPath(pageBasSignet.getSignetPath()+".sign.png.min.png"); basSignet.setSignetPath(pageBasSignet.getSignetPath()+".sign.png");
basSignet.setUpdateBy(DataSourceEnuns.APP.getInfo()); basSignet.setUpdateBy(DataSourceEnuns.APP.getInfo());
basSignet.setUpdateTime(DateUtils.getNowDate()); basSignet.setUpdateTime(DateUtils.getNowDate());
return toAjax(basSignetService.updateBasSignet(basSignet)); return toAjax(basSignetService.updateBasSignet(basSignet));
@ -81,7 +81,7 @@ public class BasSignetController extends BaseController
basSignet.setComId(proProjectInfo.getComId()); basSignet.setComId(proProjectInfo.getComId());
basSignet.setProjectId(proProjectInfo.getId()); basSignet.setProjectId(proProjectInfo.getId());
basSignet.setUserId(SecurityUtils.getUserId()); basSignet.setUserId(SecurityUtils.getUserId());
basSignet.setSignetPath(pageBasSignet.getSignetPath()+".sign.png.min.png"); basSignet.setSignetPath(pageBasSignet.getSignetPath()+".sign.png");
basSignet.setCreateBy(DataSourceEnuns.APP.getInfo()); basSignet.setCreateBy(DataSourceEnuns.APP.getInfo());
basSignet.setCreateTime(DateUtils.getNowDate()); basSignet.setCreateTime(DateUtils.getNowDate());
return toAjax(basSignetService.insertBasSignet(basSignet)); return toAjax(basSignetService.insertBasSignet(basSignet));

View File

@ -1,6 +1,8 @@
package com.yanzhu.manage.controller; package com.yanzhu.manage.controller;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.yanzhu.common.core.text.Convert;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.poi.ExcelUtil; import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController; import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult; import com.yanzhu.common.core.web.domain.AjaxResult;
@ -13,13 +15,12 @@ import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService; import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
import com.yanzhu.manage.service.IUniService; import com.yanzhu.manage.service.IUniService;
import com.yanzhu.system.api.domain.SysUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* Controller * Controller
@ -78,21 +79,16 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
{ {
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers); List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
for(ProProjectInfoSubdeptsUsers u :list){ for(ProProjectInfoSubdeptsUsers u :list){
SysUser su=u.getUser(); if(Objects.nonNull(u.getUserInfos())){
u.setUserName(su.getUserName()); JSONObject jo = JSONObject.parseObject(u.getUserInfos());
u.setCardCode(su.getCardCode()); u.setUserNation(jo.getString("nation"));
u.setUserSex(su.getSex()); if(Objects.nonNull(jo.getString("birthDay"))){
u.setEnterState("0".equals(u.getEnterState())?"在场":"离场"); u.setUserAge(DateUtils.calculatedAgeByBirthDay(jo.getString("birthDay")));
JSONObject jo=JSONObject.parseObject(su.getUserInfos()); }
u.setUserNation(jo.getString("nation"));
Date dt=jo.getDate("birthDay");
if(dt!=null){
int age=(int)((new Date().getTime()-dt.getTime())/1000/3600/24/365);
u.setUserAge(age);
} }
} }
ExcelUtil<ProProjectInfoSubdeptsUsers> util = new ExcelUtil<ProProjectInfoSubdeptsUsers>(ProProjectInfoSubdeptsUsers.class); ExcelUtil<ProProjectInfoSubdeptsUsers> util = new ExcelUtil<ProProjectInfoSubdeptsUsers>(ProProjectInfoSubdeptsUsers.class);
util.exportExcel(response, list, "分包单位工人数据"); util.exportExcel(response, list, "花名册人员数据");
} }
/** /**
@ -160,14 +156,14 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
public AjaxResult updateEnterState(@RequestBody List<Long> ids,@PathVariable int state){ public AjaxResult updateEnterState(@RequestBody List<Long> ids,@PathVariable int state){
try { try {
for (Long id : ids) { for (Long id : ids) {
ProProjectInfoSubdeptsUsers user=proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersById(id); ProProjectInfoSubdeptsUsers user = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersById(id);
if(user!=null) { if(Objects.nonNull(user)) {
if (state == 0) {//进场 if (state == 0) {//进场
uniService.syncUserAuthDevice(id); uniService.syncUserAuthDevice(id);
} else { } else {
uniService.syncUserRevoke(id); uniService.syncUserRevoke(id);
} }
user.setEnterState(""+state); user.setUseStatus(Convert.toStr(state));
proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsers(user); proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsers(user);
} }
} }

View File

@ -1,121 +0,0 @@
package com.yanzhu.manage.controller;
import com.yanzhu.common.core.domain.R;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.InnerAuth;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.manage.domain.ProProjectInfoUsers;
import com.yanzhu.manage.service.IProProjectInfoUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* Controller
*
* @author JiangYuQi
* @date 2024-08-25
*/
@RestController
@RequestMapping("/proProjectInfoUsers")
public class ProProjectInfoUsersController extends BaseController
{
@Autowired
private IProProjectInfoUsersService proProjectInfoUsersService;
/**
*
*/
@RequiresPermissions("manage:proProjectInfoUsers:list")
@GetMapping("/list")
public TableDataInfo list(ProProjectInfoUsers proProjectInfoUsers)
{
startPage();
List<ProProjectInfoUsers> list = proProjectInfoUsersService.selectProProjectInfoUsersList(proProjectInfoUsers);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("manage:proProjectInfoUsers:export")
@Log(title = "项目人员", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProProjectInfoUsers proProjectInfoUsers)
{
List<ProProjectInfoUsers> list = proProjectInfoUsersService.selectProProjectInfoUsersList(proProjectInfoUsers);
ExcelUtil<ProProjectInfoUsers> util = new ExcelUtil<ProProjectInfoUsers>(ProProjectInfoUsers.class);
util.exportExcel(response, list, "项目人员数据");
}
/**
*
*/
@RequiresPermissions("manage:proProjectInfoUsers:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(proProjectInfoUsersService.selectProProjectInfoUsersById(id));
}
/**
*
*/
@RequiresPermissions("manage:proProjectInfoUsers:add")
@Log(title = "项目人员", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProProjectInfoUsers proProjectInfoUsers)
{
return toAjax(proProjectInfoUsersService.insertProProjectInfoUsers(proProjectInfoUsers));
}
/**
*
*/
@RequiresPermissions("manage:proProjectInfoUsers:edit")
@Log(title = "项目人员", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProProjectInfoUsers proProjectInfoUsers)
{
return toAjax(proProjectInfoUsersService.updateProProjectInfoUsers(proProjectInfoUsers));
}
/**
*
*/
@RequiresPermissions("manage:proProjectInfoUsers:remove")
@Log(title = "项目人员", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(proProjectInfoUsersService.deleteProProjectInfoUsersByIds(ids));
}
/**
*
*/
@GetMapping("/changeDefaultProject/{id}")
public AjaxResult changeDefaultProject(@PathVariable("id") Long id)
{
return toAjax(proProjectInfoUsersService.editDefaultProjectById(id));
}
/**
*
*/
@InnerAuth
@GetMapping("/projects/{userId}")
public R<List<Map<String, Object>>> getProjects(@PathVariable("userId") Long userId)
{
List<Map<String, Object>> list = proProjectInfoUsersService.selectProjectsByUserId(userId);
return R.ok(list);
}
}

View File

@ -31,9 +31,9 @@ public class UniCallBackController {
@Autowired @Autowired
private IAttendanceUbiDeviceService attendanceUbiDeviceService; private IAttendanceUbiDeviceService attendanceUbiDeviceService;
/** /**
* *
* @param jo
* @return * @return
*/ */
@PostMapping("/recognize") @PostMapping("/recognize")
@ -121,38 +121,36 @@ public class UniCallBackController {
ProProjectInfoSubdeptsUsers userWhere=new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers userWhere=new ProProjectInfoSubdeptsUsers();
userWhere.setProjectId(projectId); userWhere.setProjectId(projectId);
userWhere.setAdmitGuid(admitGuid); userWhere.setAdmitGuid(admitGuid);
List<ProProjectInfoSubdeptsUsers> userList=proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(userWhere); List<ProProjectInfoSubdeptsUsers> userList = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(userWhere);
if(userList.size()>0){ if(userList!=null && userList.size()>0){
ProProjectInfoSubdeptsUsers proUser=userList.get(0); ProProjectInfoSubdeptsUsers proUser = userList.get(0);
if(proUser!=null && proUser.getUser()!=null){ AttendanceUbiData addData = new AttendanceUbiData();
AttendanceUbiData addData=new AttendanceUbiData(); addData.setAdmitGuid(admitGuid);
addData.setAdmitGuid(admitGuid); addData.setComName(proUser.getComName());
addData.setComName(proUser.getComName()); addData.setProjectName(proUser.getProjectName());
addData.setProjectName(proUser.getProjectName()); addData.setSubDeptId(proUser.getSubDeptId());
addData.setSubDeptId(proUser.getSubDeptId()); addData.setSubDeptName(proUser.getSubDeptName());
addData.setSubDeptName(proUser.getSubDeptName()); addData.setComId(proUser.getComId());
addData.setComId(proUser.getComId()); addData.setUserId(proUser.getUserId());
addData.setUserId(proUser.getUserId()); addData.setProjectId(projectId);
addData.setProjectId(projectId); addData.setEventGuid(eventGuid);
addData.setEventGuid(eventGuid); addData.setUserName(proUser.getUserName());
addData.setUserName(proUser.getUser().getUserName()); addData.setSubDeptGroup(proUser.getSubDeptGroup());
addData.setSubDeptGroup(proUser.getSubDeptGroup()); addData.setSubDeptGroupName(proUser.getSubDeptGroupName());
addData.setSubDeptGroupName(proUser.getSubDeptGroupName()); addData.setCraftPost(proUser.getCraftPost());
addData.setCraftPost(proUser.getCraftPost()); addData.setCraftType(proUser.getCraftType());
addData.setCraftType(proUser.getCraftType()); if(device.getDirection()==0) {
if(device.getDirection()==0) { addData.setInTime(showTime);
addData.setInTime(showTime); addData.setInData(data);
addData.setInData(data); addData.setInPhoto(filePath);
addData.setInPhoto(filePath); }else{
}else{ addData.setOutPhoto(filePath);
addData.setOutPhoto(filePath); addData.setOutData(data);
addData.setOutData(data); addData.setOutTime(showTime);
addData.setOutTime(showTime);
}
addData.setDeviceNo(deviceNo);
attendanceUbiDataService.insertAttendanceUbiData(addData);
return AjaxResult.success("增加成功");
} }
addData.setDeviceNo(deviceNo);
attendanceUbiDataService.insertAttendanceUbiData(addData);
return AjaxResult.success("增加成功");
} }
}else{ }else{
//修改操作 //修改操作

View File

@ -0,0 +1,29 @@
package com.yanzhu.manage.enums;
/**
*
*/
public enum DeptGroupEnums {
MANAGE("DEFAULT", "管理班组");
private final String code;
private final String info;
DeptGroupEnums(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -1,79 +0,0 @@
package com.yanzhu.manage.service;
import java.util.List;
import java.util.Map;
import com.yanzhu.manage.domain.ProProjectInfoUsers;
/**
* Service
*
* @author JiangYuQi
* @date 2024-08-25
*/
public interface IProProjectInfoUsersService
{
/**
*
*
* @param id
* @return
*/
public ProProjectInfoUsers selectProProjectInfoUsersById(Long id);
/**
*
*
* @param proProjectInfoUsers
* @return
*/
public List<ProProjectInfoUsers> selectProProjectInfoUsersList(ProProjectInfoUsers proProjectInfoUsers);
/**
*
*
* @param proProjectInfoUsers
* @return
*/
public int insertProProjectInfoUsers(ProProjectInfoUsers proProjectInfoUsers);
/**
*
*
* @param proProjectInfoUsers
* @return
*/
public int updateProProjectInfoUsers(ProProjectInfoUsers proProjectInfoUsers);
/**
*
*
* @param ids
* @return
*/
public int deleteProProjectInfoUsersByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteProProjectInfoUsersById(Long id);
/**
*
*
* @param id
* @return
*/
public int editDefaultProjectById(Long id);
/**
*
*
* @param userId ID
* @return
*/
public List<Map<String, Object>> selectProjectsByUserId(Long userId);
}

View File

@ -184,7 +184,7 @@ public class BusExamUserServiceImpl implements IBusExamUserService
BusExamUser busExamUser = new BusExamUser(); BusExamUser busExamUser = new BusExamUser();
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(proId); query.setProjectId(proId);
query.setPhoneNumber(phoneNumber); query.setUserPhone(phoneNumber);
List<ProProjectInfoSubdeptsUsers> userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); List<ProProjectInfoSubdeptsUsers> userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
if(StringUtils.isEmpty(userList)){ if(StringUtils.isEmpty(userList)){
throw new ServiceException("用户信息异常...不能抽取试题..."); throw new ServiceException("用户信息异常...不能抽取试题...");

View File

@ -145,7 +145,7 @@ public class BusTrainingVideoServiceImpl implements IBusTrainingVideoService
List<VideoMenuVo> menuVos = new ArrayList<>(); List<VideoMenuVo> menuVos = new ArrayList<>();
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(proId); query.setProjectId(proId);
query.setPhoneNumber(phoneNumber); query.setUserPhone(phoneNumber);
List<ProProjectInfoSubdeptsUsers> userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); List<ProProjectInfoSubdeptsUsers> userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
if(StringUtils.isEmpty(userList)){ if(StringUtils.isEmpty(userList)){
throw new ServiceException("用户信息异常..."); throw new ServiceException("用户信息异常...");

View File

@ -20,6 +20,7 @@ import com.yanzhu.manage.mapper.ProProjectInfoMapper;
import com.yanzhu.manage.mapper.ProProjectInfoSettingMapper; import com.yanzhu.manage.mapper.ProProjectInfoSettingMapper;
import com.yanzhu.manage.service.IProProjectInfoService; import com.yanzhu.manage.service.IProProjectInfoService;
import com.yanzhu.manage.utils.WxQrCodeUtils; import com.yanzhu.manage.utils.WxQrCodeUtils;
import com.yanzhu.manage.utils.pdf.FileUtil;
import com.yanzhu.system.api.RemoteDeptService; import com.yanzhu.system.api.RemoteDeptService;
import com.yanzhu.system.api.domain.SysDept; import com.yanzhu.system.api.domain.SysDept;
import com.yanzhu.system.api.domain.SysUser; import com.yanzhu.system.api.domain.SysUser;
@ -32,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import java.io.File;
import java.util.List; import java.util.List;
/** /**
@ -154,7 +156,8 @@ public class ProProjectInfoServiceImpl implements IProProjectInfoService
String savePath = ProfileConfig.profilePath+"/"+filePath; String savePath = ProfileConfig.profilePath+"/"+filePath;
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=1&QRPID="+proProjectInfo.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=1&QRPID="+proProjectInfo.getId(),280);
FileUtil.copyFile(file,new File(savePath));
proProjectInfo.setProjectQrCode(profilePath); proProjectInfo.setProjectQrCode(profilePath);
proProjectInfoMapper.updateProProjectInfo(proProjectInfo); proProjectInfoMapper.updateProProjectInfo(proProjectInfo);
}catch (Exception e){ }catch (Exception e){
@ -184,8 +187,9 @@ public class ProProjectInfoServiceImpl implements IProProjectInfoService
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
String scene = "QRPID="+proProjectInfo.getId()+"&signType=1"; String pagePath = "pages/project_qr/index?QRPID="+proProjectInfo.getId()+"&signType=1";
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", scene, accessToken); File file = wxMaService.getQrcodeService().createQrcode(pagePath,280);
FileUtil.copyFile(file,new File(savePath));
proProjectInfo.setProjectQrCode(profilePath); proProjectInfo.setProjectQrCode(profilePath);
}catch (Exception e){ }catch (Exception e){
log.error(e.getMessage()); log.error(e.getMessage());
@ -246,8 +250,9 @@ public class ProProjectInfoServiceImpl implements IProProjectInfoService
String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png"; String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png";
String savePath = ProfileConfig.profilePath+"/"+filePath; String savePath = ProfileConfig.profilePath+"/"+filePath;
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=1&QRPID="+proProjectInfo.getId(),280);
FileUtil.copyFile(file,new File(savePath));
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=1&QRPID="+proProjectInfo.getId(), accessToken);
proProjectInfo.setProjectQrCode(profilePath); proProjectInfo.setProjectQrCode(profilePath);
res = proProjectInfoMapper.updateProProjectInfo(proProjectInfo); res = proProjectInfoMapper.updateProProjectInfo(proProjectInfo);
}catch (Exception e){ }catch (Exception e){

View File

@ -2,7 +2,10 @@ package com.yanzhu.manage.service.impl;
import cn.binarywang.wx.miniapp.api.WxMaService; import cn.binarywang.wx.miniapp.api.WxMaService;
import com.yanzhu.common.core.constant.SecurityConstants; import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.enums.*; import com.yanzhu.common.core.enums.ApproveStatus;
import com.yanzhu.common.core.enums.CardTypeEnums;
import com.yanzhu.common.core.enums.ShiFouEnums;
import com.yanzhu.common.core.enums.UseStateEnums;
import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.exception.ServiceException;
import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.core.utils.StringUtils;
@ -17,7 +20,7 @@ import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper; import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsGroupService; import com.yanzhu.manage.service.IProProjectInfoSubdeptsGroupService;
import com.yanzhu.manage.service.IUniService; import com.yanzhu.manage.service.IUniService;
import com.yanzhu.manage.utils.WxQrCodeUtils; import com.yanzhu.manage.utils.pdf.FileUtil;
import com.yanzhu.system.api.RemoteUserService; import com.yanzhu.system.api.RemoteUserService;
import com.yanzhu.system.api.domain.SysUser; import com.yanzhu.system.api.domain.SysUser;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -26,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -102,21 +106,17 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsGroup.setSubDeptCode(info.getSubDeptCode()); proProjectInfoSubdeptsGroup.setSubDeptCode(info.getSubDeptCode());
proProjectInfoSubdeptsGroup.setSubDeptType(info.getSubDeptType()); proProjectInfoSubdeptsGroup.setSubDeptType(info.getSubDeptType());
} }
proProjectInfoSubdeptsGroup.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsGroup.setCreateTime(DateUtils.getNowDate());
int res = proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
// 班组组长信息 // 班组组长信息
if(StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){ if(res>0 && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderPhone()); sysUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
sysUser.setNickName(proProjectInfoSubdeptsGroup.getGroupLeaderName()); sysUser.setNickName(proProjectInfoSubdeptsGroup.getGroupLeaderName());
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
sysUser.setPhonenumber(proProjectInfoSubdeptsGroup.getGroupLeaderPhone()); sysUser.setPhonenumber(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
sysUser.setCardCode(proProjectInfoSubdeptsGroup.getGroupLeaderCode()); sysUser.setUpdateBy(SecurityUtils.getUsername());
sysUser.setUserPicture(proProjectInfoSubdeptsGroup.getGroupLeaderUserPicture()); sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setCardImgPos(proProjectInfoSubdeptsGroup.getGroupLeaderCardImgPos());
sysUser.setCardImgInv(proProjectInfoSubdeptsGroup.getGroupLeaderCardImgInv());
sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdeptsGroup.getGroupLeaderCode()));
sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setCreateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdeptsGroup.getProjectId()); sysUser.setActiveProjectId(proProjectInfoSubdeptsGroup.getProjectId());
Long userId = sysUser.getUserId(); Long userId = sysUser.getUserId();
@ -126,13 +126,8 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
// 已注册账号!!忽略异常... // 已注册账号!!忽略异常...
} }
if(Objects.nonNull(userId)){ if(Objects.nonNull(userId)){
proProjectInfoSubdeptsGroup.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsGroup.setCreateTime(DateUtils.getNowDate());
int res = proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
// 系统添加的人员默认增加入场信息 // 系统添加的人员默认增加入场信息
uniService.syncUniUser(userId,info.getId()); uniService.syncUniUser(userId,info.getId());
if(res>0){ if(res>0){
// 保存单位人员信息 // 保存单位人员信息
ProProjectInfoSubdeptsUsers subdeptsUser = new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers subdeptsUser = new ProProjectInfoSubdeptsUsers();
@ -146,9 +141,16 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
subdeptsUser.setSubDeptGroupName(proProjectInfoSubdeptsGroup.getGroupName()); subdeptsUser.setSubDeptGroupName(proProjectInfoSubdeptsGroup.getGroupName());
subdeptsUser.setUserId(userId); subdeptsUser.setUserId(userId);
subdeptsUser.setUserPost(UserPostEnums.BZZ.getCode()); subdeptsUser.setUserPost(UserPostEnums.BZZ.getCode());
subdeptsUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderName());
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
subdeptsUser.setCardCode(proProjectInfoSubdeptsGroup.getGroupLeaderCode());
subdeptsUser.setUserPhone(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
subdeptsUser.setUserPicture(proProjectInfoSubdeptsGroup.getGroupLeaderUserPicture());
subdeptsUser.setUserSex(StringUtils.judgeGender(proProjectInfoSubdeptsGroup.getGroupLeaderCode()));
subdeptsUser.setDegreeGrade(proProjectInfoSubdeptsGroup.getGroupLeaderDegreeGrade());
subdeptsUser.setUserInfos(proProjectInfoSubdeptsGroup.getGroupLeaderUserInfos());
subdeptsUser.setCraftType(proProjectInfoSubdeptsGroup.getCraftType()); subdeptsUser.setCraftType(proProjectInfoSubdeptsGroup.getCraftType());
subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost()); subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost());
subdeptsUser.setDegreeGrade(proProjectInfoSubdeptsGroup.getGroupLeaderDegreeGrade());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setSubStep(1L); subdeptsUser.setSubStep(1L);
subdeptsUser.setUseStatus(UseStateEnums.IN.getCode()); subdeptsUser.setUseStatus(UseStateEnums.IN.getCode());
@ -164,7 +166,8 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=4&QRPID="+info.getId()+"&PARID="+subdeptsUser.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(),280);
FileUtil.copyFile(file,new File(savePath));
subdeptsUser.setQrCode(profilePath); subdeptsUser.setQrCode(profilePath);
res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser); res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
}catch (Exception e){ }catch (Exception e){
@ -172,10 +175,9 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
} }
} }
} }
return res;
} }
} }
return 0; return res;
} }
/** /**
@ -188,21 +190,18 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
@Transactional @Transactional
public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup) public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
{ {
proProjectInfoSubdeptsGroup.setUpdateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsGroup.setUpdateTime(DateUtils.getNowDate());
int res = proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
// 班组组长信息 // 班组组长信息
if(StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){ if(res>0 && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderPhone()); sysUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
sysUser.setNickName(proProjectInfoSubdeptsGroup.getGroupLeaderName()); sysUser.setNickName(proProjectInfoSubdeptsGroup.getGroupLeaderName());
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
sysUser.setPhonenumber(proProjectInfoSubdeptsGroup.getGroupLeaderPhone()); sysUser.setPhonenumber(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
sysUser.setCardCode(proProjectInfoSubdeptsGroup.getGroupLeaderCode()); sysUser.setUpdateBy(SecurityUtils.getUsername());
sysUser.setUserPicture(proProjectInfoSubdeptsGroup.getGroupLeaderUserPicture()); sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setCardImgPos(proProjectInfoSubdeptsGroup.getGroupLeaderCardImgPos());
sysUser.setCardImgInv(proProjectInfoSubdeptsGroup.getGroupLeaderCardImgInv());
sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdeptsGroup.getGroupLeaderCode()));
sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setCreateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdeptsGroup.getProjectId()); sysUser.setActiveProjectId(proProjectInfoSubdeptsGroup.getProjectId());
Long userId = sysUser.getUserId(); Long userId = sysUser.getUserId();
@ -211,18 +210,13 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
}catch (Exception e){ }catch (Exception e){
// 已注册账号!!忽略异常... // 已注册账号!!忽略异常...
} }
if(Objects.nonNull(userId)){ if(Objects.nonNull(userId)){
proProjectInfoSubdeptsGroup.setUpdateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsGroup.setUpdateTime(DateUtils.getNowDate());
int res = proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
// 判断班组组长是否变更 // 判断班组组长是否变更
ProProjectInfoSubdeptsGroup entity = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(proProjectInfoSubdeptsGroup.getId()); ProProjectInfoSubdeptsGroup entity = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(proProjectInfoSubdeptsGroup.getId());
if(Objects.equals(entity.getGroupLeaderPhone(),proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){ if(Objects.equals(entity.getGroupLeaderPhone(),proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(proProjectInfoSubdeptsGroup.getProjectId()); query.setProjectId(proProjectInfoSubdeptsGroup.getProjectId());
query.setPhoneNumber(proProjectInfoSubdeptsGroup.getGroupLeaderPhone()); query.setUserPhone(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
List<ProProjectInfoSubdeptsUsers> dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); List<ProProjectInfoSubdeptsUsers> dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
if (StringUtils.isEmpty(dataList)) { if (StringUtils.isEmpty(dataList)) {
throw new ServiceException("用户信息异常..."); throw new ServiceException("用户信息异常...");
@ -230,6 +224,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
ProProjectInfoSubdeptsUsers subdeptsUser = dataList.get(0); ProProjectInfoSubdeptsUsers subdeptsUser = dataList.get(0);
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdeptsGroup.getGroupLeaderSubPowerPath()); subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdeptsGroup.getGroupLeaderSubPowerPath());
subdeptsUser.setSubDeptGroupName(proProjectInfoSubdeptsGroup.getGroupName()); subdeptsUser.setSubDeptGroupName(proProjectInfoSubdeptsGroup.getGroupName());
subdeptsUser.setUserPost(UserPostEnums.BZZ.getCode()); subdeptsUser.setUserPost(UserPostEnums.BZZ.getCode());
subdeptsUser.setCraftType(proProjectInfoSubdeptsGroup.getCraftType()); subdeptsUser.setCraftType(proProjectInfoSubdeptsGroup.getCraftType());
subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost()); subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost());
@ -241,7 +236,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
// 判断当前用户是否已有账号 // 判断当前用户是否已有账号
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(proProjectInfoSubdeptsGroup.getProjectId()); query.setProjectId(proProjectInfoSubdeptsGroup.getProjectId());
query.setPhoneNumber(proProjectInfoSubdeptsGroup.getGroupLeaderPhone()); query.setUserPhone(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
List<ProProjectInfoSubdeptsUsers> dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); List<ProProjectInfoSubdeptsUsers> dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
if (StringUtils.isEmpty(dataList)) { if (StringUtils.isEmpty(dataList)) {
if(res>0){ if(res>0){
@ -274,7 +269,8 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=4&QRPID="+subdeptsUser.getProjectName()+"&PARID="+subdeptsUser.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(),280);
FileUtil.copyFile(file,new File(savePath));
subdeptsUser.setQrCode(profilePath); subdeptsUser.setQrCode(profilePath);
res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser); res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
}catch (Exception e){ }catch (Exception e){
@ -300,7 +296,8 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=4&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(),280);
FileUtil.copyFile(file,new File(savePath));
subdeptsUser.setQrCode(profilePath); subdeptsUser.setQrCode(profilePath);
res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser); res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
}catch (Exception e){ }catch (Exception e){
@ -313,7 +310,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
return res; return res;
} }
} }
return 0; return res;
} }
/** /**

View File

@ -13,25 +13,24 @@ import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.config.ProfileConfig; import com.yanzhu.manage.config.ProfileConfig;
import com.yanzhu.manage.domain.ProProjectInfo; import com.yanzhu.manage.domain.ProProjectInfo;
import com.yanzhu.manage.domain.ProProjectInfoSubdepts; import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
import com.yanzhu.manage.enums.CraftTypeEnums; import com.yanzhu.manage.enums.*;
import com.yanzhu.manage.enums.SubDeptsEnums; import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsGroupMapper;
import com.yanzhu.manage.enums.CraftPostEnums;
import com.yanzhu.manage.enums.UserPostEnums;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper; import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper; import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsService; import com.yanzhu.manage.service.IProProjectInfoSubdeptsService;
import com.yanzhu.manage.service.IUniService; import com.yanzhu.manage.service.IUniService;
import com.yanzhu.manage.utils.WxQrCodeUtils; import com.yanzhu.manage.utils.pdf.FileUtil;
import com.yanzhu.system.api.RemoteUserService; import com.yanzhu.system.api.RemoteUserService;
import com.yanzhu.system.api.domain.SysUser; import com.yanzhu.system.api.domain.SysUser;
import me.chanjar.weixin.mp.api.WxMpService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -62,6 +61,9 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
@Autowired @Autowired
private ProProjectInfoSubdeptsUsersMapper proProjectInfoSubdeptsUsersMapper; private ProProjectInfoSubdeptsUsersMapper proProjectInfoSubdeptsUsersMapper;
@Autowired
private ProProjectInfoSubdeptsGroupMapper proProjectInfoSubdeptsGroupMapper;
private static final Logger log = LoggerFactory.getLogger(ProProjectInfoSubdeptsServiceImpl.class); private static final Logger log = LoggerFactory.getLogger(ProProjectInfoSubdeptsServiceImpl.class);
/** /**
@ -111,16 +113,9 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone()); sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName()); sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone()); sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setCardType(CardTypeEnums.SFZ.getCode()); sysUser.setUpdateBy(SecurityUtils.getUsername());
sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode()); sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
sysUser.setCardImgPos(proProjectInfoSubdepts.getLeaderCardImgPos());
sysUser.setCardImgInv(proProjectInfoSubdepts.getLeaderCardImgInv());
sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setCreateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId()); sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId());
try { try {
@ -132,12 +127,30 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
} }
} }
} }
proProjectInfoSubdepts.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdepts.setApproveStatus(ApproveStatus.passed.getCode()); proProjectInfoSubdepts.setApproveStatus(ApproveStatus.passed.getCode());
proProjectInfoSubdepts.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdepts.setCreateTime(DateUtils.getNowDate()); proProjectInfoSubdepts.setCreateTime(DateUtils.getNowDate());
int res = proProjectInfoSubdeptsMapper.insertProProjectInfoSubdepts(proProjectInfoSubdepts); int res = proProjectInfoSubdeptsMapper.insertProProjectInfoSubdepts(proProjectInfoSubdepts);
// 保存单位管理班组
ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup = new ProProjectInfoSubdeptsGroup();
proProjectInfoSubdeptsGroup.setComId(proProjectInfoSubdepts.getComId());
proProjectInfoSubdeptsGroup.setProjectId(proProjectInfoSubdepts.getProjectId());
proProjectInfoSubdeptsGroup.setSubDeptId(proProjectInfoSubdepts.getId());
proProjectInfoSubdeptsGroup.setSubDeptType(proProjectInfoSubdepts.getSubDeptType());
proProjectInfoSubdeptsGroup.setSubDeptName(proProjectInfoSubdepts.getSubDeptName());
proProjectInfoSubdeptsGroup.setGroupName(DeptGroupEnums.MANAGE.getInfo());
proProjectInfoSubdeptsGroup.setGroupCode(DeptGroupEnums.MANAGE.getCode());
proProjectInfoSubdeptsGroup.setCraftType(CraftTypeEnums.GLRY.getCode());
proProjectInfoSubdeptsGroup.setApproveStatus(proProjectInfoSubdepts.getApproveStatus());
proProjectInfoSubdeptsGroup.setUseStatus(proProjectInfoSubdepts.getUseStatus());
proProjectInfoSubdeptsGroup.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsGroup.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
// 将人员信息同步至单位人员表 // 将人员信息同步至单位人员表
if(res>0 && (Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode()))){ if(res>0 && (Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode()))){
// 保存单位人员信息 // 保存单位人员信息
ProProjectInfoSubdeptsUsers subdeptsUser = new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers subdeptsUser = new ProProjectInfoSubdeptsUsers();
subdeptsUser.setComId(info.getComId()); subdeptsUser.setComId(info.getComId());
@ -145,12 +158,21 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId()); subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId());
subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName()); subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName());
subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType()); subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType());
subdeptsUser.setSubDeptGroup(proProjectInfoSubdeptsGroup.getId());
subdeptsUser.setSubDeptGroupName(proProjectInfoSubdeptsGroup.getGroupName());
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath()); subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath());
subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId()); subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId());
subdeptsUser.setUserPost(UserPostEnums.WTDL.getCode()); subdeptsUser.setUserPost(UserPostEnums.WTDL.getCode());
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
subdeptsUser.setUserSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setUserInfos(proProjectInfoSubdepts.getLeaderUserInfos());
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());
subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode()); subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode());
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setSubStep(1L); subdeptsUser.setSubStep(1L);
subdeptsUser.setCreateBy(SecurityUtils.getUsername()); subdeptsUser.setCreateBy(SecurityUtils.getUsername());
@ -167,7 +189,8 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=2&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=2&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(),280);
FileUtil.copyFile(file,new File(savePath));
subdeptsUser.setQrCode(profilePath); subdeptsUser.setQrCode(profilePath);
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
proProjectInfoSubdepts.setQrCode(profilePath); proProjectInfoSubdepts.setQrCode(profilePath);
@ -201,16 +224,9 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone()); sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName()); sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone()); sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setCardType(CardTypeEnums.SFZ.getCode()); sysUser.setUpdateBy(DataSourceEnuns.APP.getInfo());
sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode()); sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
sysUser.setCardImgPos(proProjectInfoSubdepts.getLeaderCardImgPos());
sysUser.setCardImgInv(proProjectInfoSubdepts.getLeaderCardImgInv());
sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
sysUser.setCreateBy(DataSourceEnuns.APP.getInfo());
sysUser.setCreateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId()); sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId());
try { try {
@ -226,6 +242,23 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
proProjectInfoSubdepts.setApproveStatus(ApproveStatus.await.getCode()); proProjectInfoSubdepts.setApproveStatus(ApproveStatus.await.getCode());
proProjectInfoSubdepts.setCreateTime(DateUtils.getNowDate()); proProjectInfoSubdepts.setCreateTime(DateUtils.getNowDate());
int res = proProjectInfoSubdeptsMapper.insertProProjectInfoSubdepts(proProjectInfoSubdepts); int res = proProjectInfoSubdeptsMapper.insertProProjectInfoSubdepts(proProjectInfoSubdepts);
// 保存单位管理班组
ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup = new ProProjectInfoSubdeptsGroup();
proProjectInfoSubdeptsGroup.setComId(proProjectInfoSubdepts.getComId());
proProjectInfoSubdeptsGroup.setProjectId(proProjectInfoSubdepts.getProjectId());
proProjectInfoSubdeptsGroup.setSubDeptId(proProjectInfoSubdepts.getId());
proProjectInfoSubdeptsGroup.setSubDeptType(proProjectInfoSubdepts.getSubDeptType());
proProjectInfoSubdeptsGroup.setSubDeptName(proProjectInfoSubdepts.getSubDeptName());
proProjectInfoSubdeptsGroup.setGroupName(DeptGroupEnums.MANAGE.getInfo());
proProjectInfoSubdeptsGroup.setGroupCode(DeptGroupEnums.MANAGE.getCode());
proProjectInfoSubdeptsGroup.setCraftType(CraftTypeEnums.GLRY.getCode());
proProjectInfoSubdeptsGroup.setApproveStatus(proProjectInfoSubdepts.getApproveStatus());
proProjectInfoSubdeptsGroup.setUseStatus(proProjectInfoSubdepts.getUseStatus());
proProjectInfoSubdeptsGroup.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsGroup.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
// 将人员信息同步至单位人员表 // 将人员信息同步至单位人员表
if(res>0 && (Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode()))){ if(res>0 && (Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode()))){
// 保存单位人员信息 // 保存单位人员信息
@ -235,12 +268,21 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId()); subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId());
subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName()); subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName());
subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType()); subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType());
subdeptsUser.setSubDeptGroup(proProjectInfoSubdeptsGroup.getId());
subdeptsUser.setSubDeptGroupName(proProjectInfoSubdeptsGroup.getGroupName());
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath()); subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath());
subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId()); subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId());
subdeptsUser.setUserPost(UserPostEnums.WTDL.getCode()); subdeptsUser.setUserPost(UserPostEnums.WTDL.getCode());
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
subdeptsUser.setUserSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setUserInfos(proProjectInfoSubdepts.getLeaderUserInfos());
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());
subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode()); subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode());
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setApproveStatus(ApproveStatus.await.getCode()); subdeptsUser.setApproveStatus(ApproveStatus.await.getCode());
if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){ if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){
@ -267,31 +309,6 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
if(Objects.isNull(info)){ if(Objects.isNull(info)){
throw new ServiceException("项目信息异常..."); throw new ServiceException("项目信息异常...");
} }
if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.LWFB.getCode())){
// 单位委托人信息
if(StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderPhone())){
SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
sysUser.setCardImgPos(proProjectInfoSubdepts.getLeaderCardImgPos());
sysUser.setCardImgInv(proProjectInfoSubdepts.getLeaderCardImgInv());
sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
sysUser.setUpdateBy(SecurityUtils.getUsername());
sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId());
try {
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
}catch (Exception e){
e.printStackTrace();
}
}
}
proProjectInfoSubdepts.setUpdateBy(SecurityUtils.getUsername()); proProjectInfoSubdepts.setUpdateBy(SecurityUtils.getUsername());
proProjectInfoSubdepts.setUpdateTime(DateUtils.getNowDate()); proProjectInfoSubdepts.setUpdateTime(DateUtils.getNowDate());
int res = proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts); int res = proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
@ -304,14 +321,33 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
subdeptsUser.setComId(info.getComId()); subdeptsUser.setComId(info.getComId());
subdeptsUser.setProjectId(info.getId()); subdeptsUser.setProjectId(info.getId());
subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId()); subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId());
//查询管理班组
ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(proProjectInfoSubdepts.getProjectId());
query.setSubDeptId(proProjectInfoSubdepts.getId());
query.setGroupCode(DeptGroupEnums.MANAGE.getCode());
List<ProProjectInfoSubdeptsGroup> groups = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(query);
if(Objects.nonNull(groups) && groups.size()>0){
subdeptsUser.setSubDeptGroup(groups.get(0).getId());
subdeptsUser.setSubDeptGroupName(groups.get(0).getGroupName());
}
} }
subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName()); subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName());
subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType()); subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType());
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath()); subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath());
subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId()); subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId());
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
subdeptsUser.setUserSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setUserInfos(proProjectInfoSubdepts.getLeaderUserInfos());
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());
subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode()); subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode());
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
if(Objects.isNull(subdeptsUser.getApproveStatus())){ if(Objects.isNull(subdeptsUser.getApproveStatus())){
subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode()); subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode());
@ -319,11 +355,13 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){ if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){
subdeptsUser.setSubStep(1L); subdeptsUser.setSubStep(1L);
} }
subdeptsUser.setCreateBy(SecurityUtils.getUsername());
subdeptsUser.setCreateTime(DateUtils.getNowDate());
if(Objects.isNull(subdeptsUser.getId())){ if(Objects.isNull(subdeptsUser.getId())){
subdeptsUser.setCreateBy(SecurityUtils.getUsername());
subdeptsUser.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(subdeptsUser); proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(subdeptsUser);
}else{ }else{
subdeptsUser.setUpdateBy(SecurityUtils.getUsername());
subdeptsUser.setUpdateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
} }
} }
@ -344,34 +382,6 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
if(Objects.isNull(info)){ if(Objects.isNull(info)){
throw new ServiceException("项目信息异常..."); throw new ServiceException("项目信息异常...");
} }
if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.LWFB.getCode())){
// 单位委托人信息
if(StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderPhone())){
SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
sysUser.setCardImgPos(proProjectInfoSubdepts.getLeaderCardImgPos());
sysUser.setCardImgInv(proProjectInfoSubdepts.getLeaderCardImgInv());
sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
sysUser.setUpdateBy(DataSourceEnuns.APP.getInfo());
sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId());
try {
R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData());
}catch (Exception e){
// 已注册账号!!忽略异常...
e.printStackTrace();
}
}
}
proProjectInfoSubdepts.setUpdateBy(DataSourceEnuns.APP.getInfo()); proProjectInfoSubdepts.setUpdateBy(DataSourceEnuns.APP.getInfo());
proProjectInfoSubdepts.setUpdateTime(DateUtils.getNowDate()); proProjectInfoSubdepts.setUpdateTime(DateUtils.getNowDate());
int res = proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts); int res = proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
@ -384,15 +394,33 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
subdeptsUser.setComId(info.getComId()); subdeptsUser.setComId(info.getComId());
subdeptsUser.setProjectId(info.getId()); subdeptsUser.setProjectId(info.getId());
subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId()); subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId());
//查询管理班组
ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(proProjectInfoSubdepts.getProjectId());
query.setSubDeptId(proProjectInfoSubdepts.getId());
query.setGroupCode(DeptGroupEnums.MANAGE.getCode());
List<ProProjectInfoSubdeptsGroup> groups = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(query);
if(Objects.nonNull(groups) && groups.size()>0){
subdeptsUser.setSubDeptGroup(groups.get(0).getId());
subdeptsUser.setSubDeptGroupName(groups.get(0).getGroupName());
}
} }
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
subdeptsUser.setUserSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setUserInfos(proProjectInfoSubdepts.getLeaderUserInfos());
subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName()); subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName());
subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType()); subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType());
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath()); subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath());
subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId()); subdeptsUser.setUserPost(UserPostEnums.WTDL.getCode());
subdeptsUser.setCraftType(UserPostEnums.WTDL.getCode());
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());
subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode()); subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode());
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
if(Objects.isNull(subdeptsUser.getApproveStatus())){ if(Objects.isNull(subdeptsUser.getApproveStatus())){
subdeptsUser.setApproveStatus(ApproveStatus.await.getCode()); subdeptsUser.setApproveStatus(ApproveStatus.await.getCode());
@ -400,11 +428,14 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){ if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){
subdeptsUser.setSubStep(1L); subdeptsUser.setSubStep(1L);
} }
subdeptsUser.setCreateBy(DataSourceEnuns.APP.getInfo());
subdeptsUser.setCreateTime(DateUtils.getNowDate());
if(Objects.isNull(subdeptsUser.getId())){ if(Objects.isNull(subdeptsUser.getId())){
subdeptsUser.setCreateBy(DataSourceEnuns.APP.getInfo());
subdeptsUser.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(subdeptsUser); proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(subdeptsUser);
}else{ }else{
subdeptsUser.setUpdateBy(DataSourceEnuns.APP.getInfo());
subdeptsUser.setUpdateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
} }
} }
@ -464,7 +495,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
ProProjectInfoSubdepts data = dataList.get(0); ProProjectInfoSubdepts data = dataList.get(0);
ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers();
userQuery.setProjectId(proId); userQuery.setProjectId(proId);
userQuery.setPhoneNumber(phoneNumber); userQuery.setUserId(data.getSubDeptLeaderId());
List<ProProjectInfoSubdeptsUsers> userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery); List<ProProjectInfoSubdeptsUsers> userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery);
if(StringUtils.isNotEmpty(userList)){ if(StringUtils.isNotEmpty(userList)){
data.setProProjectInfoSubdeptsUsers(userList.get(0)); data.setProProjectInfoSubdeptsUsers(userList.get(0));

View File

@ -14,13 +14,11 @@ import com.yanzhu.manage.enums.CraftPostEnums;
import com.yanzhu.manage.enums.CraftTypeEnums; import com.yanzhu.manage.enums.CraftTypeEnums;
import com.yanzhu.manage.enums.SignetKeyEnums; import com.yanzhu.manage.enums.SignetKeyEnums;
import com.yanzhu.manage.enums.UserPostEnums; import com.yanzhu.manage.enums.UserPostEnums;
import com.yanzhu.manage.mapper.BasTemplateMapper; import com.yanzhu.manage.mapper.*;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsGroupMapper;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService; import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
import com.yanzhu.manage.service.IUniService; import com.yanzhu.manage.service.IUniService;
import com.yanzhu.manage.utils.WxQrCodeUtils; import com.yanzhu.manage.utils.WxQrCodeUtils;
import com.yanzhu.manage.utils.pdf.FileUtil;
import com.yanzhu.manage.utils.pdf.PoiUtil; import com.yanzhu.manage.utils.pdf.PoiUtil;
import com.yanzhu.security.utils.DictUtils; import com.yanzhu.security.utils.DictUtils;
import com.yanzhu.system.api.RemoteFlowService; import com.yanzhu.system.api.RemoteFlowService;
@ -52,6 +50,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Autowired @Autowired
private WxMaService wxMaService; private WxMaService wxMaService;
@Autowired
private BasSignetMapper basSignetMapper;
@Autowired @Autowired
private BasTemplateMapper basTemplateMapper; private BasTemplateMapper basTemplateMapper;
@ -114,22 +115,20 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.LWGR.getCode()); proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.LWGR.getCode());
} }
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode()); proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode());
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setCreateBy(SecurityUtils.getUsername()); proProjectInfoSubdeptsUsers.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setSubStep(1L); proProjectInfoSubdeptsUsers.setSubStep(1L);
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode()); proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode());
SysUser user = proProjectInfoSubdeptsUsers.getUser();
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL)){ SysUser sysUser = new SysUser();
user.setUserType(UserTypeEnums.FBWTDL.getCode()); sysUser.setUserName(proProjectInfoSubdeptsUsers.getUserPhone());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL)){ sysUser.setNickName(proProjectInfoSubdeptsUsers.getUserName());
user.setUserType(UserTypeEnums.FBXMJL.getCode()); sysUser.setPhonenumber(proProjectInfoSubdeptsUsers.getUserPhone());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ)){ sysUser.setUpdateBy(SecurityUtils.getUsername());
user.setUserType(UserTypeEnums.FBBZZZ.getCode()); sysUser.setUpdateTime(DateUtils.getNowDate());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){ sysUser.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
user.setUserType(UserTypeEnums.FBLWRY.getCode()); Long userId= remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER).getData();
}
user.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId= remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
proProjectInfoSubdeptsUsers.setUserId(userId); proProjectInfoSubdeptsUsers.setUserId(userId);
uniService.syncUniUser(userId,proProjectInfoSubdeptsUsers.getProjectId()); uniService.syncUniUser(userId,proProjectInfoSubdeptsUsers.getProjectId());
int res = proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); int res = proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
@ -143,9 +142,11 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.XMJL.getCode())){ if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.XMJL.getCode())){
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=3&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=3&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(),280);
FileUtil.copyFile(file,new File(savePath));
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.getCode())){ }else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.getCode())){
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=4&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(),280);
FileUtil.copyFile(file,new File(savePath));
} }
proProjectInfoSubdeptsUsers.setQrCode(profilePath); proProjectInfoSubdeptsUsers.setQrCode(profilePath);
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
@ -169,7 +170,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
if(Objects.isNull(parUsers)){ if(Objects.isNull(parUsers)){
throw new ServiceException("用户信息异常...请重新扫码"); throw new ServiceException("用户信息异常...请重新扫码");
} }
SysUser user = proProjectInfoSubdeptsUsers.getUser();
proProjectInfoSubdeptsUsers.setComId(parUsers.getComId()); proProjectInfoSubdeptsUsers.setComId(parUsers.getComId());
proProjectInfoSubdeptsUsers.setProjectId(parUsers.getProjectId()); proProjectInfoSubdeptsUsers.setProjectId(parUsers.getProjectId());
@ -202,9 +202,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proSubdeptsGroup.setGroupName(pre+craftPostName+"班组"+count); proSubdeptsGroup.setGroupName(pre+craftPostName+"班组"+count);
proSubdeptsGroup.setCraftType(proProjectInfoSubdeptsUsers.getCraftType()); proSubdeptsGroup.setCraftType(proProjectInfoSubdeptsUsers.getCraftType());
proSubdeptsGroup.setCraftPost(proProjectInfoSubdeptsUsers.getCraftPost()); proSubdeptsGroup.setCraftPost(proProjectInfoSubdeptsUsers.getCraftPost());
proSubdeptsGroup.setGroupLeaderName(user.getNickName()); proSubdeptsGroup.setGroupLeaderName(proProjectInfoSubdeptsUsers.getUserName());
proSubdeptsGroup.setGroupLeaderCode(user.getCardCode()); proSubdeptsGroup.setGroupLeaderCode(proProjectInfoSubdeptsUsers.getCardCode());
proSubdeptsGroup.setGroupLeaderPhone(user.getPhonenumber()); proSubdeptsGroup.setGroupLeaderPhone(proProjectInfoSubdeptsUsers.getUserPhone());
proSubdeptsGroup.setUseStatus(UseStateEnums.AW.getCode()); proSubdeptsGroup.setUseStatus(UseStateEnums.AW.getCode());
proSubdeptsGroup.setApproveStatus(ApproveStatus.await.getCode()); proSubdeptsGroup.setApproveStatus(ApproveStatus.await.getCode());
proSubdeptsGroup.setCreateBy(DataSourceEnuns.APP.getInfo()); proSubdeptsGroup.setCreateBy(DataSourceEnuns.APP.getInfo());
@ -219,24 +219,15 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
} }
} }
// 完善人员信息... // 完善人员信息...
user.setUserName(proProjectInfoSubdeptsUsers.getPhoneNumber()); SysUser sysUser = new SysUser();
user.setPhonenumber(proProjectInfoSubdeptsUsers.getPhoneNumber()); sysUser.setUserName(proProjectInfoSubdeptsUsers.getUserPhone());
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL)){ sysUser.setNickName(proProjectInfoSubdeptsUsers.getUserName());
user.setUserType(UserTypeEnums.FBWTDL.getCode()); sysUser.setPhonenumber(proProjectInfoSubdeptsUsers.getUserPhone());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL)){ sysUser.setUpdateBy(SecurityUtils.getUsername());
user.setUserType(UserTypeEnums.FBXMJL.getCode()); sysUser.setUpdateTime(DateUtils.getNowDate());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ)){ sysUser.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName());
user.setUserType(UserTypeEnums.FBBZZZ.getCode()); sysUser.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){ Long userId = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER).getData();
user.setUserType(UserTypeEnums.FBLWRY.getCode());
}
user.setCardType(CardTypeEnums.SFZ.getCode());
user.setSex(StringUtils.judgeGender(user.getCardCode()));
user.setCreateBy(DataSourceEnuns.APP.getInfo());
user.setCreateTime(DateUtils.getNowDate());
user.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName());
user.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
proProjectInfoSubdeptsUsers.setUserId(userId); proProjectInfoSubdeptsUsers.setUserId(userId);
proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
return proProjectInfoSubdeptsUsers; return proProjectInfoSubdeptsUsers;
@ -261,22 +252,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
} }
proProjectInfoSubdeptsUsers.setUpdateBy(SecurityUtils.getUsername()); proProjectInfoSubdeptsUsers.setUpdateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsUsers.setUpdateTime(DateUtils.getNowDate()); proProjectInfoSubdeptsUsers.setUpdateTime(DateUtils.getNowDate());
SysUser user = proProjectInfoSubdeptsUsers.getUser();
// 完善人员信息...
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL)){
user.setUserType(UserTypeEnums.FBWTDL.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL)){
user.setUserType(UserTypeEnums.FBXMJL.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ)){
user.setUserType(UserTypeEnums.FBBZZZ.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){
user.setUserType(UserTypeEnums.FBLWRY.getCode());
}
user.setUpdateBy(SecurityUtils.getUsername());
user.setUpdateTime(DateUtils.getNowDate());
user.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
proProjectInfoSubdeptsUsers.setUserId(userId);
return proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); return proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
} }
@ -294,7 +269,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
if(Objects.isNull(parUsers)){ if(Objects.isNull(parUsers)){
throw new ServiceException("用户信息异常...请重新扫码"); throw new ServiceException("用户信息异常...请重新扫码");
} }
SysUser user = proProjectInfoSubdeptsUsers.getUser();
proProjectInfoSubdeptsUsers.setComId(parUsers.getComId()); proProjectInfoSubdeptsUsers.setComId(parUsers.getComId());
proProjectInfoSubdeptsUsers.setProjectId(parUsers.getProjectId()); proProjectInfoSubdeptsUsers.setProjectId(parUsers.getProjectId());
@ -316,7 +290,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup(); ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId()); query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
query.setSubDeptId(proProjectInfoSubdeptsUsers.getSubDeptId()); query.setSubDeptId(proProjectInfoSubdeptsUsers.getSubDeptId());
query.setGroupLeaderPhone(user.getPhonenumber()); query.setGroupLeaderPhone(proProjectInfoSubdeptsUsers.getUserPhone());
List<ProProjectInfoSubdeptsGroup> groupList = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(query); List<ProProjectInfoSubdeptsGroup> groupList = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(query);
if(StringUtils.isNotEmpty(groupList)){ if(StringUtils.isNotEmpty(groupList)){
ProProjectInfoSubdeptsGroup proSubdeptsGroup = groupList.get(0); ProProjectInfoSubdeptsGroup proSubdeptsGroup = groupList.get(0);
@ -389,25 +363,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
} }
} }
// 完善人员信息
user.setUserName(user.getPhonenumber());
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL)){
user.setUserType(UserTypeEnums.FBWTDL.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL)){
user.setUserType(UserTypeEnums.FBXMJL.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ)){
user.setUserType(UserTypeEnums.FBBZZZ.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){
user.setUserType(UserTypeEnums.FBLWRY.getCode());
}
user.setCardType(CardTypeEnums.SFZ.getCode());
user.setSex(StringUtils.judgeGender(user.getCardCode()));
user.setUpdateBy(DataSourceEnuns.APP.getInfo());
user.setUpdateTime(DateUtils.getNowDate());
user.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName());
user.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
proProjectInfoSubdeptsUsers.setUserId(userId);
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
return proProjectInfoSubdeptsUsers; return proProjectInfoSubdeptsUsers;
} }
@ -509,13 +464,14 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
dirFile.mkdirs(); dirFile.mkdirs();
} }
proSubdeptsUser.setSubStep(100L); proSubdeptsUser.setSubStep(100L);
proSubdeptsUser.setEduSignPath(signetFileVo.getImgPath()); proSubdeptsUser.setEduSignPath(signetFileVo.getImgPath()+".sign.png");
proSubdeptsUser.setEduFilePath(saveEdusFilePath); proSubdeptsUser.setEduFilePath(saveEdusFilePath);
// word文件转PDF文件 // word文件转PDF文件
Map<String, Object> dataMap = getUserDataMap(proSubdeptsUser); Map<String, Object> dataMap = getUserDataMap(proSubdeptsUser);
try { try {
PoiUtil.createPdfByWordTemplate(temPath, saveWordFilePath, dataMap); PoiUtil.createPdfByWordTemplate(temPath, saveWordFilePath, dataMap);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace();
throw new ServiceException("承诺书生成失败...服务器异常!!!"); throw new ServiceException("承诺书生成失败...服务器异常!!!");
} }
@ -524,6 +480,19 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proSubdeptsUser.setApproveStatus(ApproveStatus.check.getCode()); proSubdeptsUser.setApproveStatus(ApproveStatus.check.getCode());
} }
int res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proSubdeptsUser); int res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proSubdeptsUser);
// 保存业务签名
basSignetMapper.deleteBasSignetByParams(proSubdeptsUser.getProjectId(),proSubdeptsUser.getUserId());
BasSignet basSignet = new BasSignet();
basSignet.setComId(proSubdeptsUser.getComId());
basSignet.setProjectId(proSubdeptsUser.getProjectId());
basSignet.setUserId(proSubdeptsUser.getUserId());
basSignet.setSignetPath(proSubdeptsUser.getEduSignPath()+".sign.png");
basSignet.setSignetNumber(1L);
basSignet.setCreateBy(DataSourceEnuns.APP.getInfo());
basSignet.setCreateTime(DateUtils.getNowDate());
basSignetMapper.insertBasSignet(basSignet);
// 待审核时启动工作流审批 // 待审核时启动工作流审批
if(res>0 && Objects.equals(proSubdeptsUser.getApproveStatus(),ApproveStatus.check.getCode())){ if(res>0 && Objects.equals(proSubdeptsUser.getApproveStatus(),ApproveStatus.check.getCode())){
// 工作流配置查询 // 工作流配置查询
@ -584,7 +553,8 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=2&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=2&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(),280);
FileUtil.copyFile(file,new File(savePath));
proProjectInfoSubdepts.setQrCode(profilePath); proProjectInfoSubdepts.setQrCode(profilePath);
proProjectInfoSubdeptsUsers.setQrCode(profilePath); proProjectInfoSubdeptsUsers.setQrCode(profilePath);
}catch (Exception e){ }catch (Exception e){
@ -599,7 +569,8 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=3&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=3&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(),280);
FileUtil.copyFile(file,new File(savePath));
proProjectInfoSubdeptsUsers.setQrCode(profilePath); proProjectInfoSubdeptsUsers.setQrCode(profilePath);
}catch (Exception e){ }catch (Exception e){
log.error(e.getMessage()); log.error(e.getMessage());
@ -615,7 +586,8 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
String profilePath = ProfileConfig.profile+"/"+filePath; String profilePath = ProfileConfig.profile+"/"+filePath;
log.info("accessToken...{}",accessToken); log.info("accessToken...{}",accessToken);
// 生成二维码 // 生成二维码
WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=4&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(), accessToken); File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(),280);
FileUtil.copyFile(file,new File(savePath));
proProjectInfoSubdeptsUsers.setQrCode(profilePath); proProjectInfoSubdeptsUsers.setQrCode(profilePath);
}catch (Exception e){ }catch (Exception e){
log.error(e.getMessage()); log.error(e.getMessage());
@ -648,7 +620,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
String userPicturePath = proSubdeptsUser.getUser().getUserPicture().replaceAll(ProfileConfig.profile, ProfileConfig.profilePath); String userPicturePath = proSubdeptsUser.getUser().getUserPicture().replaceAll(ProfileConfig.profile, ProfileConfig.profilePath);
dataMap.put("fUserPicture", userPicturePath+".min.jpg"); dataMap.put("fUserPicture", userPicturePath+".min.jpg");
String userSignPath = proSubdeptsUser.getEduSignPath().replaceAll(ProfileConfig.profile, ProfileConfig.profilePath); String userSignPath = proSubdeptsUser.getEduSignPath().replaceAll(ProfileConfig.profile, ProfileConfig.profilePath);
dataMap.put("fUserSign", userSignPath+".sign.png.min.png"); dataMap.put("fUserSign", userSignPath+".sign.png");
dataMap.put("fGroupSign", SignetKeyEnums.GROUP_SIGN.getCode()); dataMap.put("fGroupSign", SignetKeyEnums.GROUP_SIGN.getCode());
dataMap.put("fProjectSign", SignetKeyEnums.PROJECT_SIGN.getCode()); dataMap.put("fProjectSign", SignetKeyEnums.PROJECT_SIGN.getCode());
dataMap.put("fCompanySign", SignetKeyEnums.COMPANY_SIGN.getCode()); dataMap.put("fCompanySign", SignetKeyEnums.COMPANY_SIGN.getCode());

View File

@ -1,133 +0,0 @@
package com.yanzhu.manage.service.impl;
import com.yanzhu.common.core.context.SecurityContextHolder;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.domain.ProProjectInfoUsers;
import com.yanzhu.manage.mapper.ProProjectInfoUsersMapper;
import com.yanzhu.manage.service.IProProjectInfoUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* Service
*
* @author JiangYuQi
* @date 2024-08-25
*/
@Service
public class ProProjectInfoUsersServiceImpl implements IProProjectInfoUsersService
{
@Autowired
private ProProjectInfoUsersMapper proProjectInfoUsersMapper;
/**
*
*
* @param id
* @return
*/
@Override
public ProProjectInfoUsers selectProProjectInfoUsersById(Long id)
{
return proProjectInfoUsersMapper.selectProProjectInfoUsersById(id);
}
/**
*
*
* @param proProjectInfoUsers
* @return
*/
@Override
public List<ProProjectInfoUsers> selectProProjectInfoUsersList(ProProjectInfoUsers proProjectInfoUsers)
{
return proProjectInfoUsersMapper.selectProProjectInfoUsersList(proProjectInfoUsers);
}
/**
*
*
* @param proProjectInfoUsers
* @return
*/
@Override
public int insertProProjectInfoUsers(ProProjectInfoUsers proProjectInfoUsers)
{
proProjectInfoUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoUsers.setCreateBy(SecurityContextHolder.getUserName());
return proProjectInfoUsersMapper.insertProProjectInfoUsers(proProjectInfoUsers);
}
/**
*
*
* @param proProjectInfoUsers
* @return
*/
@Override
public int updateProProjectInfoUsers(ProProjectInfoUsers proProjectInfoUsers)
{
proProjectInfoUsers.setUpdateTime(DateUtils.getNowDate());
proProjectInfoUsers.setUpdateBy(SecurityContextHolder.getUserName());
return proProjectInfoUsersMapper.updateProProjectInfoUsers(proProjectInfoUsers);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteProProjectInfoUsersByIds(Long[] ids)
{
return proProjectInfoUsersMapper.deleteProProjectInfoUsersByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteProProjectInfoUsersById(Long id)
{
return proProjectInfoUsersMapper.deleteProProjectInfoUsersById(id);
}
/**
*
*
* @param id
* @return
*/
@Override
@Transactional
public int editDefaultProjectById(Long id){
int res = proProjectInfoUsersMapper.cancelDefaultSortByUserId(SecurityUtils.getUserId());
if(res>0){
ProProjectInfoUsers entity = new ProProjectInfoUsers();
entity.setId(id);
entity.setSortBy(0L);
proProjectInfoUsersMapper.updateProProjectInfoUsers(entity);
}
return res;
}
/**
*
*
* @param userId ID
* @return
*/
@Override
public List<Map<String, Object>> selectProjectsByUserId(Long userId){
return proProjectInfoUsersMapper.selectProjectsByUserId(userId);
}
}

View File

@ -513,8 +513,8 @@ public class UniServiceImpl implements IUniService{
faceJo.put("url",user.getUserPicture()); faceJo.put("url",user.getUserPicture());
//faceJo.put("url","https://uniubi-aiot.oss-cn-hangzhou.aliyuncs.com/detect/20241007/211204-71D9BCBE526C4F57B8D31ECAE03AEBFB"); //faceJo.put("url","https://uniubi-aiot.oss-cn-hangzhou.aliyuncs.com/detect/20241007/211204-71D9BCBE526C4F57B8D31ECAE03AEBFB");
faceJo.put("faceTag",""); faceJo.put("faceTag","");
HttpServletRequest request =((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest(); HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest();
String url= request.getRemoteAddr(); //String url= request.getRemoteAddr();
if(StringUtils.isNotEmpty(faceGuid)){ if(StringUtils.isNotEmpty(faceGuid)){
JSONObject faceDel=new JSONObject(); JSONObject faceDel=new JSONObject();
faceDel.put("projectId",projectId); faceDel.put("projectId",projectId);
@ -522,13 +522,15 @@ public class UniServiceImpl implements IUniService{
faceDel.put("faceGuid",faceGuid); faceDel.put("faceGuid",faceGuid);
faceDelete(faceDel); faceDelete(faceDel);
} }
//注册图像 //注册图像
JSONObject faceRes= faceRegister(faceJo); JSONObject faceRes = faceRegister(faceJo);
if(faceRes!=null) { if(faceRes!=null) {
jo.put("faceGuid", faceRes.getString("faceGuid")); jo.put("faceGuid", faceRes.getString("faceGuid"));
jo.put("uniFaceInfo", faceRes.toJSONString()); jo.put("uniFaceInfo", faceRes.toJSONString());
hasUpdate=true; hasUpdate=true;
} }
user.setUserInfos(jo.toJSONString()); user.setUserInfos(jo.toJSONString());
if(hasUpdate){ if(hasUpdate){
Long ret= remoteUserService.registerUserInfo(user,SecurityConstants.INNER).getData(); Long ret= remoteUserService.registerUserInfo(user,SecurityConstants.INNER).getData();

View File

@ -18,6 +18,15 @@ public class WxQrCodeUtils {
*/ */
public static void generateQrCode(String filePath, String page, String scene, String accessToken) { public static void generateQrCode(String filePath, String page, String scene, String accessToken) {
try { try {
// 文件夹生成
File desc = new File(filePath);
if (!desc.exists())
{
if (!desc.getParentFile().exists())
{
desc.getParentFile().mkdirs();
}
}
//调用微信接口生成二维码 //调用微信接口生成二维码
URL url = new URL("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken); URL url = new URL("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken);
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(); HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
@ -31,11 +40,11 @@ public class WxQrCodeUtils {
PrintWriter printWriter = new PrintWriter(httpURLConnection.getOutputStream()); PrintWriter printWriter = new PrintWriter(httpURLConnection.getOutputStream());
// 发送请求参数 // 发送请求参数
JSONObject paramJson = new JSONObject(); JSONObject paramJson = new JSONObject();
//这就是你二维码里携带的参数 String型 名称不可变 // 这就是你二维码里携带的参数 String型 名称不可变
paramJson.put("scene", scene); paramJson.put("scene", scene);
//注意该接口传入的是page而不是path // 注意该接口传入的是page而不是path
paramJson.put("page", page); paramJson.put("page", page);
//这是设置扫描二维码后跳转的页面 // 这是设置扫描二维码后跳转的页面
paramJson.put("width", 200); paramJson.put("width", 200);
paramJson.put("is_hyaline", true); paramJson.put("is_hyaline", true);
paramJson.put("auto_color", true); paramJson.put("auto_color", true);
@ -43,7 +52,7 @@ public class WxQrCodeUtils {
// flush输出流的缓冲 // flush输出流的缓冲
printWriter.flush(); printWriter.flush();
//开始获取数据 // 开始获取数据
BufferedInputStream bis = new BufferedInputStream(httpURLConnection.getInputStream()); BufferedInputStream bis = new BufferedInputStream(httpURLConnection.getInputStream());
OutputStream os = new FileOutputStream(new File(filePath)); OutputStream os = new FileOutputStream(new File(filePath));
int len; int len;

View File

@ -32,10 +32,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.*;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -141,14 +138,29 @@ public class SysUserController extends BaseController {
sysUser.setActiveProjectName(Convert.toStr(list.get(0).get("project_name"))); sysUser.setActiveProjectName(Convert.toStr(list.get(0).get("project_name")));
} }
} }
// 角色集合
Set<String> roles = permissionService.getRolePermission(sysUser);
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(sysUser);
LoginUser sysUserVo = new LoginUser(); LoginUser sysUserVo = new LoginUser();
sysUserVo.setSysUser(sysUser); sysUserVo.setSysUser(sysUser);
sysUserVo.setRoles(roles); if(Objects.nonNull(sysUser.getRoles()) && sysUser.getRoles().size()>0){
sysUserVo.setPermissions(permissions); // 权限集合
if(StringUtils.isNotEmpty(sysUser.getUserType())){
if(Objects.equals(UserTypeEnums.ZSRY.getCode(),sysUser.getUserType()) || Objects.equals(UserTypeEnums.LSRY.getCode(),sysUser.getUserType())){
// 角色集合
Set<String> roles = permissionService.getRolePermission(sysUser);
sysUserVo.setRoles(roles);
Set<String> permissions = permissionService.getMenuPermission(sysUser);
sysUserVo.setPermissions(permissions);
}else{
Set<String> roles = sysUser.getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.toSet());
sysUserVo.setRoles(roles);
}
}
}else{
Set<String> roles = new HashSet<String>();
roles.add("visitors");
sysUserVo.setRoles(roles);
}
return R.ok(sysUserVo); return R.ok(sysUserVo);
} }
@ -214,14 +226,28 @@ public class SysUserController extends BaseController {
@GetMapping("getInfo") @GetMapping("getInfo")
public AjaxResult getInfo() { public AjaxResult getInfo() {
SysUser user = SecurityUtils.getLoginUser().getSysUser(); SysUser user = SecurityUtils.getLoginUser().getSysUser();
// 角色集合
Set<String> roles = permissionService.getRolePermission(user);
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(user);
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("user", user); ajax.put("user", user);
ajax.put("roles", roles); if(Objects.nonNull(user.getRoles()) && user.getRoles().size()>0){
ajax.put("permissions", permissions); // 权限集合
if(StringUtils.isNotEmpty(user.getUserType())){
if(Objects.equals(UserTypeEnums.ZSRY.getCode(),user.getUserType()) || Objects.equals(UserTypeEnums.LSRY.getCode(),user.getUserType())){
// 角色集合
Set<String> roles = permissionService.getRolePermission(user);
ajax.put("roles", roles);
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(user);
ajax.put("permissions", permissions);
}else{
Set<String> roles = user.getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.toSet());
ajax.put("roles", roles);
}
}
}else{
Set<String> roles = new HashSet<String>();
roles.add("visitors");
ajax.put("roles", roles);
}
return ajax; return ajax;
} }

View File

@ -337,7 +337,7 @@ public class SysUserServiceImpl implements ISysUserService
userMapper.insertUser(user); userMapper.insertUser(user);
} }
Long userId = user.getUserId(); Long userId = user.getUserId();
if(Objects.nonNull(info.getUserType()) && Objects.nonNull(user.getActiveProjectId())){ if(Objects.nonNull(user.getUserType()) && Objects.nonNull(user.getActiveProjectId())){
// 删除用户与角色关联 // 删除用户与角色关联
List<SysUserRole> sysUserRoleList = new ArrayList<>(); List<SysUserRole> sysUserRoleList = new ArrayList<>();
SysUserRole userRole = new SysUserRole(); SysUserRole userRole = new SysUserRole();
@ -345,7 +345,7 @@ public class SysUserServiceImpl implements ISysUserService
userRole.setDeptId(user.getActiveProjectId()); userRole.setDeptId(user.getActiveProjectId());
userRoleMapper.deleteUserRoleByUserRole(userRole); userRoleMapper.deleteUserRoleByUserRole(userRole);
if(Objects.equals(info.getUserType(), UserTypeEnums.FBWTDL.getCode())){ if(Objects.equals(user.getUserType(), UserTypeEnums.FBWTDL.getCode())){
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBWTDL.getKeys()+"_"+user.getActiveProjectId()); List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBWTDL.getKeys()+"_"+user.getActiveProjectId());
if(StringUtils.isEmpty(list)){ if(StringUtils.isEmpty(list)){
//新增单位角色... //新增单位角色...
@ -356,7 +356,7 @@ public class SysUserServiceImpl implements ISysUserService
} }
sysUserRoleList.add(userRole); sysUserRoleList.add(userRole);
userRoleMapper.batchUserRole(sysUserRoleList); userRoleMapper.batchUserRole(sysUserRoleList);
}else if(Objects.equals(info.getUserType(), UserTypeEnums.FBXMJL.getCode())){ }else if(Objects.equals(user.getUserType(), UserTypeEnums.FBXMJL.getCode())){
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBXMJL.getKeys()+"_"+user.getActiveProjectId()); List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBXMJL.getKeys()+"_"+user.getActiveProjectId());
if(StringUtils.isEmpty(list)){ if(StringUtils.isEmpty(list)){
//新增单位角色... //新增单位角色...
@ -367,7 +367,7 @@ public class SysUserServiceImpl implements ISysUserService
} }
sysUserRoleList.add(userRole); sysUserRoleList.add(userRole);
userRoleMapper.batchUserRole(sysUserRoleList); userRoleMapper.batchUserRole(sysUserRoleList);
}else if(Objects.equals(info.getUserType(), UserTypeEnums.FBBZZZ.getCode())){ }else if(Objects.equals(user.getUserType(), UserTypeEnums.FBBZZZ.getCode())){
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBBZZZ.getKeys()+"_"+user.getActiveProjectId()); List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBBZZZ.getKeys()+"_"+user.getActiveProjectId());
if(StringUtils.isEmpty(list)){ if(StringUtils.isEmpty(list)){
//新增单位角色... //新增单位角色...

View File

@ -4,7 +4,8 @@ module.exports = {
appId: "wx46466c7828eede2b", appId: "wx46466c7828eede2b",
baseUrl: 'https:xiangguan.sxyanzhu.com', baseUrl: 'https:xiangguan.sxyanzhu.com',
//baseUrl: 'http://127.0.0.1:8080', //baseUrl: 'http://127.0.0.1:8080',
baseImgUrl: 'https:xiangguan.sxyanzhu.com/file', baseImgUrl: 'https:xiangguan.sxyanzhu.com',
//baseImgUrl: 'https:xiangguan.sxyanzhu.com/file',
//baseImgUrl: 'http://127.0.0.1:9300', //baseImgUrl: 'http://127.0.0.1:9300',
noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin'] noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin']
}; };

View File

@ -141,11 +141,8 @@ Page({
encryptedData: e.detail.encryptedData encryptedData: e.detail.encryptedData
} }
maLogin(data).then(res =>{ maLogin(data).then(res =>{
setToken(res.access_token) setToken(res.data.access_token);
//跳转页面 this.getUserInfoByCache();
wx.redirectTo({
url: '../index/index',
})
}) })
}else{ }else{
//用户决绝授权 //用户决绝授权

View File

@ -5,6 +5,7 @@
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view> </view>
</van-col> </van-col>
<van-col span="16"> <van-col span="16">

View File

@ -5,6 +5,7 @@
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view> </view>
</van-col> </van-col>
<van-col span="16"> <van-col span="16">

View File

@ -4,6 +4,7 @@
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view> </view>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">

View File

@ -4,6 +4,7 @@
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view> </view>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">

View File

@ -371,7 +371,7 @@ Page({
findProSubDeptsUserByParams(proId).then(res => { findProSubDeptsUserByParams(proId).then(res => {
app.globalData.subDeptUserData = res.data; app.globalData.subDeptUserData = res.data;
this.setData({ this.setData({
subDeptUserInfo: res.data subDeptUserInfo: res.data[0]
}); });
}); });
}, },

View File

@ -78,7 +78,7 @@
</van-collapse> </van-collapse>
</view> </view>
<view class="echarts_max" wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78'}}"> <view class="echarts_max" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}">
<view class="echarts_min"> <view class="echarts_min">
<view class="eharts_title module_title_flex"> <view class="eharts_title module_title_flex">
劳务人员 劳务人员
@ -114,7 +114,7 @@
</view> </view>
</view> </view>
<view class="echarts_max" wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78'}}"> <view class="echarts_max" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}">
<view class="echarts_min"> <view class="echarts_min">
<view class="eharts_title module_title_flex"> <view class="eharts_title module_title_flex">
今日出勤 今日出勤
@ -143,8 +143,8 @@
</view> </view>
</view> </view>
</view> </view>
{{subDeptUserInfo.qrCode+'------------------'}}
<view class="echarts_max" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}"> <view class="echarts_max bt30" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}">
<view class="echarts_min"> <view class="echarts_min">
<view class="eharts_title module_title_flex"> <view class="eharts_title module_title_flex">
我的二维码 我的二维码

View File

@ -248,4 +248,8 @@
.qrcode image{ .qrcode image{
width: 100px; width: 100px;
height: 100px; height: 100px;
}
.bt30{
margin-bottom: 20px;
} }

View File

@ -284,9 +284,11 @@ Page({
findProSubDeptsInfo(this.data.proId, phoneNumber).then(deptRes => { findProSubDeptsInfo(this.data.proId, phoneNumber).then(deptRes => {
if (deptRes.code == 200 && deptRes.data) { if (deptRes.code == 200 && deptRes.data) {
deptRes.data.subDeptLeaderPhone = phoneNumber; deptRes.data.subDeptLeaderPhone = phoneNumber;
deptRes.data.leaderDegreeGrade = deptRes.data.proProjectInfoSubdeptsUsers.degreeGrade; if(deptRes.data.proProjectInfoSubdeptsUsers){
deptRes.data.eduFilePath = deptRes.data.proProjectInfoSubdeptsUsers.eduFilePath; deptRes.data.leaderDegreeGrade = deptRes.data.proProjectInfoSubdeptsUsers.degreeGrade;
deptRes.data.subStep = deptRes.data.proProjectInfoSubdeptsUsers.subStep; deptRes.data.eduFilePath = deptRes.data.proProjectInfoSubdeptsUsers.eduFilePath;
deptRes.data.subStep = deptRes.data.proProjectInfoSubdeptsUsers.subStep;
}
if (deptRes.data.subDeptInfos) { if (deptRes.data.subDeptInfos) {
let subDeptInfosJSON = JSON.parse(deptRes.data.subDeptInfos); let subDeptInfosJSON = JSON.parse(deptRes.data.subDeptInfos);
deptRes.data.subDeptInfos = subDeptInfosJSON; deptRes.data.subDeptInfos = subDeptInfosJSON;
@ -783,14 +785,17 @@ Page({
* 下载签名文件 * 下载签名文件
*/ */
downloadSignetFiles() { downloadSignetFiles() {
let that = this; let _baseUrl = config.baseUrl;
let _eduFilePath = this.data.form.eduFilePath;
wx.downloadFile({ wx.downloadFile({
// 示例 url并非真实存在 // 示例 url并非真实存在
url: config.baseUrl + '/file/NoSecurity/download?fileName=' + that.data.form.eduFilePath, url: _baseUrl + '/file/NoSecurity/download?fileName=' + _eduFilePath,
success: function (res) { success: function (res) {
const filePath = res.tempFilePath const filePath = res.tempFilePath
const fileTypes = filePath.split(".");
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
fileType: fileTypes[fileTypes.length - 1],
success: function (res) { success: function (res) {
console.log('打开文档成功') console.log('打开文档成功')
}, },
@ -1415,7 +1420,9 @@ Page({
//验证图片上传完毕 //验证图片上传完毕
if (uploads.length == uploadFiles.length) { if (uploads.length == uploadFiles.length) {
_form.subDeptInfos = JSON.stringify(subDeptInfos); _form.subDeptInfos = JSON.stringify(subDeptInfos);
wx.showLoading({mask: true,title: '正在处理'});
registerSubDepts(_form).then(res => { registerSubDepts(_form).then(res => {
wx.hideLoading({success: (res) => {}});
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
"form.id": res.data.id, "form.id": res.data.id,
@ -1602,7 +1609,9 @@ Page({
userInfos.bankCardNo = userModel.bankCardNo; userInfos.bankCardNo = userModel.bankCardNo;
userModel.userInfos = JSON.stringify(userInfos); userModel.userInfos = JSON.stringify(userInfos);
_form.user = userModel; _form.user = userModel;
wx.showLoading({mask: true,title: '正在处理'});
registerSubDeptsUsers(_form).then(res => { registerSubDeptsUsers(_form).then(res => {
wx.hideLoading({success: (res) => {}});
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
"form.id": res.data.id, "form.id": res.data.id,
@ -1775,9 +1784,10 @@ Page({
* 这里考虑上传图片异步问题封装为同步 * 这里考虑上传图片异步问题封装为同步
*/ */
syncUploadImage(file) { syncUploadImage(file) {
let _baseUrl = config.baseUrl;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.uploadFile({ wx.uploadFile({
url: config.baseUrl + "/file/NoSecurity/upload", // 上传的服务器接口地址 url: _baseUrl + "/file/NoSecurity/upload", // 上传的服务器接口地址
filePath: file, filePath: file,
header: { header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"

View File

@ -121,6 +121,15 @@ Page({
}); });
}, },
/**
* 返回上级页面
*/
BACK() {
wx.redirectTo({
url: '../project_more/index',
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

View File

@ -4,6 +4,7 @@
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="BACK"> <view class="header_img" bindtap="BACK">
<image src="/images/left.png"></image> <image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view> </view>
</van-col> </van-col>
<van-col span="13"> <van-col span="13">