提交代码

dev_xd
姜玉琦 2025-01-04 19:16:16 +08:00
parent 5d0e06bc7b
commit c5c077d1cb
2 changed files with 23 additions and 24 deletions

View File

@ -4,7 +4,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper">
<resultMap type="ProProjectInfoSubdeptsUsers" id="ProProjectInfoSubdeptsUsersResult">
<result property="id" column="id" />
<result property="parId" column="par_id" />

View File

@ -310,9 +310,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proSubdeptsGroup.setGroupName(pre+craftPostName+"班组"+count);
proSubdeptsGroup.setCraftType(proProjectInfoSubdeptsUsers.getCraftType());
proSubdeptsGroup.setCraftPost(proProjectInfoSubdeptsUsers.getCraftPost());
proSubdeptsGroup.setGroupLeaderName(user.getNickName());
proSubdeptsGroup.setGroupLeaderCode(user.getCardCode());
proSubdeptsGroup.setGroupLeaderPhone(user.getPhonenumber());
proSubdeptsGroup.setGroupLeaderName(proProjectInfoSubdeptsUsers.getUserName());
proSubdeptsGroup.setGroupLeaderCode(proProjectInfoSubdeptsUsers.getCardCode());
proSubdeptsGroup.setGroupLeaderPhone(proProjectInfoSubdeptsUsers.getUserPhone());
proSubdeptsGroup.setUpdateBy(DataSourceEnuns.APP.getInfo());
proSubdeptsGroup.setUpdateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proSubdeptsGroup);
@ -320,9 +320,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsUsers.setSubDeptGroupName(proSubdeptsGroup.getGroupName());
}else{
// 班组主要信息未变更时只修改班组长信息
proSubdeptsGroup.setGroupLeaderName(user.getNickName());
proSubdeptsGroup.setGroupLeaderCode(user.getCardCode());
proSubdeptsGroup.setGroupLeaderPhone(user.getPhonenumber());
proSubdeptsGroup.setGroupLeaderName(proProjectInfoSubdeptsUsers.getUserName());
proSubdeptsGroup.setGroupLeaderCode(proProjectInfoSubdeptsUsers.getCardCode());
proSubdeptsGroup.setGroupLeaderPhone(proProjectInfoSubdeptsUsers.getUserPhone());
proSubdeptsGroup.setUpdateBy(DataSourceEnuns.APP.getInfo());
proSubdeptsGroup.setUpdateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proSubdeptsGroup);
@ -345,9 +345,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proSubdeptsGroup.setGroupName(pre+craftPostName+"班组"+count);
proSubdeptsGroup.setCraftType(proProjectInfoSubdeptsUsers.getCraftType());
proSubdeptsGroup.setCraftPost(proProjectInfoSubdeptsUsers.getCraftPost());
proSubdeptsGroup.setGroupLeaderName(user.getNickName());
proSubdeptsGroup.setGroupLeaderCode(user.getCardCode());
proSubdeptsGroup.setGroupLeaderPhone(user.getPhonenumber());
proSubdeptsGroup.setGroupLeaderName(proProjectInfoSubdeptsUsers.getUserName());
proSubdeptsGroup.setGroupLeaderCode(proProjectInfoSubdeptsUsers.getCardCode());
proSubdeptsGroup.setGroupLeaderPhone(proProjectInfoSubdeptsUsers.getUserPhone());
proSubdeptsGroup.setUseStatus(UseStateEnums.AW.getCode());
proSubdeptsGroup.setApproveStatus(ApproveStatus.await.getCode());
proSubdeptsGroup.setCreateBy(DataSourceEnuns.APP.getInfo());
@ -405,7 +405,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
public ProProjectInfoSubdeptsUsers findProSubDeptsUser(Long proId, String phoneNumber){
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(proId);
query.setPhoneNumber(phoneNumber);
query.setUserPhone(phoneNumber);
List<ProProjectInfoSubdeptsUsers> dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
if(StringUtils.isNotEmpty(dataList)){
return dataList.get(0);
@ -422,7 +422,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
public ProProjectInfoSubdeptsUsers submitUserSignets(SignetFileVo signetFileVo) {
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(signetFileVo.getProId());
query.setPhoneNumber(signetFileVo.getUserPhone());
query.setUserPhone(signetFileVo.getUserPhone());
List<ProProjectInfoSubdeptsUsers> dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
if (StringUtils.isEmpty(dataList)) {
throw new ServiceException("用户信息异常...");
@ -464,10 +464,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
dirFile.mkdirs();
}
proSubdeptsUser.setSubStep(100L);
proSubdeptsUser.setEduSignPath(signetFileVo.getImgPath()+".sign.png");
proSubdeptsUser.setEduFilePath(saveEdusFilePath);
// word文件转PDF文件
Map<String, Object> dataMap = getUserDataMap(proSubdeptsUser);
Map<String, Object> dataMap = getUserDataMap(proSubdeptsUser, signetFileVo.getImgPath());
try {
PoiUtil.createPdfByWordTemplate(temPath, saveWordFilePath, dataMap);
}catch (Exception e){
@ -487,7 +486,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
basSignet.setComId(proSubdeptsUser.getComId());
basSignet.setProjectId(proSubdeptsUser.getProjectId());
basSignet.setUserId(proSubdeptsUser.getUserId());
basSignet.setSignetPath(proSubdeptsUser.getEduSignPath()+".sign.png");
basSignet.setSignetPath(signetFileVo.getImgPath()+".sign.png");
basSignet.setSignetNumber(1L);
basSignet.setCreateBy(DataSourceEnuns.APP.getInfo());
basSignet.setCreateTime(DateUtils.getNowDate());
@ -504,7 +503,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
// 启动工作流审批节点...
Map<String, Object> variables = new HashMap<>();
variables.put("INITIATOR",proSubdeptsUser.getUserId());
variables.put("userName",proSubdeptsUser.getUser().getNickName());
variables.put("userName",proSubdeptsUser.getUserName());
variables.put("userDeptName",proSubdeptsUser.getSubDeptName());
variables.put("comId",proSubdeptsUser.getComId());
variables.put("comName",proSubdeptsUser.getComName());
@ -602,24 +601,25 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
/**
* ...
* @param proSubdeptsUser
* @param signPath
* @return
*/
private Map<String, Object> getUserDataMap(ProProjectInfoSubdeptsUsers proSubdeptsUser){
private Map<String, Object> getUserDataMap(ProProjectInfoSubdeptsUsers proSubdeptsUser,String signPath){
Map<String, Object> dataMap = new HashMap<>();
SysUser sysUser = proSubdeptsUser.getUser();
dataMap.put("fName",sysUser.getNickName());
dataMap.put("fSex",StringUtils.judgeGenderText(sysUser.getCardCode()));
dataMap.put("fAge",StringUtils.getAgeFromIdCard(sysUser.getCardCode()));
dataMap.put("fCode",sysUser.getCardCode());
dataMap.put("fName",proSubdeptsUser.getUserName());
dataMap.put("fSex",StringUtils.judgeGenderText(proSubdeptsUser.getCardCode()));
dataMap.put("fAge",StringUtils.getAgeFromIdCard(proSubdeptsUser.getCardCode()));
dataMap.put("fCode",proSubdeptsUser.getCardCode());
dataMap.put("fIllnessStatus",Objects.equals(ShiFouEnums.FOU.getCode(),proSubdeptsUser.getIllnessStatus())?"无":"有");
dataMap.put("fSupIllnessStatus",Objects.equals(ShiFouEnums.FOU.getCode(),proSubdeptsUser.getSupIllnessStatus())?"无":"有");
dataMap.put("fCraftPost", DictUtils.getDictLabel("pro_craft_post",proSubdeptsUser.getCraftPost()));
dataMap.put("fDate", DateUtils.dateTimeNow("yyyy年MM月dd日"));
dataMap.put("fGroupName", proSubdeptsUser.getSubDeptGroupName());
dataMap.put("fGrade", DictUtils.getDictLabel("educational_type",proSubdeptsUser.getDegreeGrade()));
String userPicturePath = proSubdeptsUser.getUser().getUserPicture().replaceAll(ProfileConfig.profile, ProfileConfig.profilePath);
String userPicturePath = proSubdeptsUser.getUserPicture().replaceAll(ProfileConfig.profile, ProfileConfig.profilePath);
dataMap.put("fUserPicture", userPicturePath+".min.jpg");
String userSignPath = proSubdeptsUser.getEduSignPath().replaceAll(ProfileConfig.profile, ProfileConfig.profilePath);
String userSignPath = signPath.replaceAll(ProfileConfig.profile, ProfileConfig.profilePath);
dataMap.put("fUserSign", userSignPath+".sign.png");
dataMap.put("fGroupSign", SignetKeyEnums.GROUP_SIGN.getCode());
dataMap.put("fProjectSign", SignetKeyEnums.PROJECT_SIGN.getCode());