|
@@ -15,10 +15,13 @@ import com.fasterxml.jackson.databind.exc.InvalidFormatException;
|
|
import com.openhtmltopdf.swing.Java2DRenderer;
|
|
import com.openhtmltopdf.swing.Java2DRenderer;
|
|
import com.openhtmltopdf.util.FSImageWriter;
|
|
import com.openhtmltopdf.util.FSImageWriter;
|
|
import com.zhongzheng.common.annotation.DataScope;
|
|
import com.zhongzheng.common.annotation.DataScope;
|
|
|
|
+import com.zhongzheng.common.core.domain.AjaxResult;
|
|
import com.zhongzheng.common.core.domain.model.LoginUser;
|
|
import com.zhongzheng.common.core.domain.model.LoginUser;
|
|
|
|
+import com.zhongzheng.common.exception.CustomException;
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
import com.zhongzheng.common.utils.SecurityUtils;
|
|
import com.zhongzheng.common.utils.SecurityUtils;
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
|
+import com.zhongzheng.common.utils.file.FileUtils;
|
|
import com.zhongzheng.modules.alioss.bo.OssRequest;
|
|
import com.zhongzheng.modules.alioss.bo.OssRequest;
|
|
import com.zhongzheng.modules.alioss.service.impl.OssServiceImpl;
|
|
import com.zhongzheng.modules.alioss.service.impl.OssServiceImpl;
|
|
import com.zhongzheng.modules.alisms.service.IAliSmsService;
|
|
import com.zhongzheng.modules.alisms.service.IAliSmsService;
|
|
@@ -72,6 +75,7 @@ import java.net.URL;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
+import java.util.zip.ZipOutputStream;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 填写资料审核Service业务层处理
|
|
* 填写资料审核Service业务层处理
|
|
@@ -119,7 +123,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
private String commitmentFailsCode;
|
|
private String commitmentFailsCode;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public UserProfileVo queryById(Long id){
|
|
|
|
|
|
+ public UserProfileVo queryById(Long id) {
|
|
UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
|
|
UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
|
|
userProfileQueryBo.setId(id);
|
|
userProfileQueryBo.setId(id);
|
|
UserProfileVo userProfileVo = baseMapper.selectUserProfile(userProfileQueryBo).get(0);
|
|
UserProfileVo userProfileVo = baseMapper.selectUserProfile(userProfileQueryBo).get(0);
|
|
@@ -133,19 +137,19 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 实体类转化成视图对象
|
|
|
|
- *
|
|
|
|
- * @param collection 实体类集合
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
|
|
+ * 实体类转化成视图对象
|
|
|
|
+ *
|
|
|
|
+ * @param collection 实体类集合
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
private List<UserProfileVo> entity2Vo(Collection<UserProfile> collection) {
|
|
private List<UserProfileVo> entity2Vo(Collection<UserProfile> collection) {
|
|
List<UserProfileVo> voList = collection.stream()
|
|
List<UserProfileVo> voList = collection.stream()
|
|
.map(any -> BeanUtil.toBean(any, UserProfileVo.class))
|
|
.map(any -> BeanUtil.toBean(any, UserProfileVo.class))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
if (collection instanceof Page) {
|
|
if (collection instanceof Page) {
|
|
- Page<UserProfile> page = (Page<UserProfile>)collection;
|
|
|
|
|
|
+ Page<UserProfile> page = (Page<UserProfile>) collection;
|
|
Page<UserProfileVo> pageVo = new Page<>();
|
|
Page<UserProfileVo> pageVo = new Page<>();
|
|
- BeanUtil.copyProperties(page,pageVo);
|
|
|
|
|
|
+ BeanUtil.copyProperties(page, pageVo);
|
|
pageVo.addAll(voList);
|
|
pageVo.addAll(voList);
|
|
voList = pageVo;
|
|
voList = pageVo;
|
|
}
|
|
}
|
|
@@ -172,7 +176,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
|
|
|
|
//新增待审的资料填写
|
|
//新增待审的资料填写
|
|
- UserProfile addProfile = BeanUtil.toBean(bo,UserProfile.class);
|
|
|
|
|
|
+ UserProfile addProfile = BeanUtil.toBean(bo, UserProfile.class);
|
|
addProfile.setCreateTime(DateUtils.getNowTime());
|
|
addProfile.setCreateTime(DateUtils.getNowTime());
|
|
addProfile.setUpdateTime(DateUtils.getNowTime());
|
|
addProfile.setUpdateTime(DateUtils.getNowTime());
|
|
addProfile.setStatus(3);
|
|
addProfile.setStatus(3);
|
|
@@ -194,13 +198,13 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
*
|
|
*
|
|
* @param entity 实体类数据
|
|
* @param entity 实体类数据
|
|
*/
|
|
*/
|
|
- private void validEntityBeforeSave(UserProfile entity){
|
|
|
|
|
|
+ private void validEntityBeforeSave(UserProfile entity) {
|
|
//TODO 做一些数据校验,如唯一约束
|
|
//TODO 做一些数据校验,如唯一约束
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
- if(isValid){
|
|
|
|
|
|
+ if (isValid) {
|
|
//TODO 做一些业务上的校验,判断是否需要校验
|
|
//TODO 做一些业务上的校验,判断是否需要校验
|
|
}
|
|
}
|
|
return this.removeByIds(ids);
|
|
return this.removeByIds(ids);
|
|
@@ -214,12 +218,12 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
userProfileQueryBo.setTypeStatus(1L);
|
|
userProfileQueryBo.setTypeStatus(1L);
|
|
UserProfileVo info = baseMapper.getInfo(userProfileQueryBo);
|
|
UserProfileVo info = baseMapper.getInfo(userProfileQueryBo);
|
|
//第一种方式
|
|
//第一种方式
|
|
- Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(),Map.class);
|
|
|
|
|
|
+ Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(), Map.class);
|
|
|
|
|
|
/* TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
|
|
/* TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
|
|
Template template = engine.getTemplate("word.ftl");*/
|
|
Template template = engine.getTemplate("word.ftl");*/
|
|
//给模板绑定数据
|
|
//给模板绑定数据
|
|
- Calendar rightNow= Calendar.getInstance();
|
|
|
|
|
|
+ Calendar rightNow = Calendar.getInstance();
|
|
Map<String, Object> bindingMap = new HashMap<>();
|
|
Map<String, Object> bindingMap = new HashMap<>();
|
|
bindingMap.put("username", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
|
|
bindingMap.put("username", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
|
|
bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
|
|
bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
|
|
@@ -231,22 +235,22 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
|
|
bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
|
|
bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
|
|
bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
|
|
bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
|
|
bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
|
|
- bindingMap.put("image", ALIYUN_OSS_ENDPOINT+"/"+JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
|
|
|
|
|
|
+ bindingMap.put("image", ALIYUN_OSS_ENDPOINT + "/" + JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
|
|
bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
|
|
bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
|
|
- bindingMap.put("m", rightNow.get(Calendar.MONTH)+1);
|
|
|
|
|
|
+ bindingMap.put("m", rightNow.get(Calendar.MONTH) + 1);
|
|
bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
|
|
bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
|
|
bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
|
|
bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
|
|
bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
|
|
bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
|
|
- File touch = FileUtil.touch(ZHONGZHENG_PROFILE+"word.html");
|
|
|
|
|
|
+ File touch = FileUtil.touch(ZHONGZHENG_PROFILE + "word.html");
|
|
//默认freemake配置
|
|
//默认freemake配置
|
|
Configuration configuration = new Configuration();
|
|
Configuration configuration = new Configuration();
|
|
configuration.setDefaultEncoding("UTF-8");
|
|
configuration.setDefaultEncoding("UTF-8");
|
|
configuration.setClassForTemplateLoading(this.getClass(), "/templates");
|
|
configuration.setClassForTemplateLoading(this.getClass(), "/templates");
|
|
Template template = configuration.getTemplate("wordPhone.ftl");
|
|
Template template = configuration.getTemplate("wordPhone.ftl");
|
|
- Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(touch),"UTF-8"));
|
|
|
|
|
|
+ Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(touch), "UTF-8"));
|
|
try {
|
|
try {
|
|
//写入数据
|
|
//写入数据
|
|
- template.process(bindingMap,out);
|
|
|
|
|
|
+ template.process(bindingMap, out);
|
|
out.flush();
|
|
out.flush();
|
|
out.close();
|
|
out.close();
|
|
|
|
|
|
@@ -258,11 +262,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
final BufferedImage img = renderer.getImage();
|
|
final BufferedImage img = renderer.getImage();
|
|
final FSImageWriter imageWriter = new FSImageWriter();
|
|
final FSImageWriter imageWriter = new FSImageWriter();
|
|
imageWriter.setWriteCompressionQuality(1.0f);
|
|
imageWriter.setWriteCompressionQuality(1.0f);
|
|
- imageWriter.write(img, ZHONGZHENG_PROFILE+"wordJpg.jpg");//输出路径
|
|
|
|
|
|
+ imageWriter.write(img, ZHONGZHENG_PROFILE + "wordJpg.jpg");//输出路径
|
|
|
|
|
|
OssRequest ossRequest = new OssRequest();
|
|
OssRequest ossRequest = new OssRequest();
|
|
- FileInputStream fileInputStream = new FileInputStream(ZHONGZHENG_PROFILE+"wordJpg.jpg");
|
|
|
|
- MultipartFile multipartFile = new MockMultipartFile(ZHONGZHENG_PROFILE+"wordJpg.jpg", ZHONGZHENG_PROFILE+"wordJpg.jpg",
|
|
|
|
|
|
+ FileInputStream fileInputStream = new FileInputStream(ZHONGZHENG_PROFILE + "wordJpg.jpg");
|
|
|
|
+ MultipartFile multipartFile = new MockMultipartFile(ZHONGZHENG_PROFILE + "wordJpg.jpg", ZHONGZHENG_PROFILE + "wordJpg.jpg",
|
|
ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
|
|
ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
|
|
ossRequest.setFile(multipartFile);
|
|
ossRequest.setFile(multipartFile);
|
|
ossRequest.setImageStatus(6);
|
|
ossRequest.setImageStatus(6);
|
|
@@ -280,16 +284,16 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
userProfileQueryBo.setTypeStatus(1L);
|
|
userProfileQueryBo.setTypeStatus(1L);
|
|
UserProfileVo info = baseMapper.getInfo(userProfileQueryBo);
|
|
UserProfileVo info = baseMapper.getInfo(userProfileQueryBo);
|
|
System.out.println(info);
|
|
System.out.println(info);
|
|
- if(Validator.isEmpty(info)){
|
|
|
|
|
|
+ if (Validator.isEmpty(info)) {
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
//第一种方式
|
|
//第一种方式
|
|
- Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(),Map.class);
|
|
|
|
|
|
+ Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(), Map.class);
|
|
|
|
|
|
/* TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
|
|
/* TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
|
|
Template template = engine.getTemplate("word.ftl");*/
|
|
Template template = engine.getTemplate("word.ftl");*/
|
|
//给模板绑定数据
|
|
//给模板绑定数据
|
|
- Calendar rightNow= Calendar.getInstance();
|
|
|
|
|
|
+ Calendar rightNow = Calendar.getInstance();
|
|
Map<String, Object> bindingMap = new HashMap<>();
|
|
Map<String, Object> bindingMap = new HashMap<>();
|
|
bindingMap.put("name", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
|
|
bindingMap.put("name", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
|
|
bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
|
|
bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
|
|
@@ -301,13 +305,13 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
|
|
bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
|
|
bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
|
|
bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
|
|
bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
|
|
bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
|
|
- bindingMap.put("image", ALIYUN_OSS_ENDPOINT+"/"+JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
|
|
|
|
|
|
+ bindingMap.put("image", ALIYUN_OSS_ENDPOINT + "/" + JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
|
|
bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
|
|
bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
|
|
- bindingMap.put("m", rightNow.get(Calendar.MONTH)+1);
|
|
|
|
|
|
+ bindingMap.put("m", rightNow.get(Calendar.MONTH) + 1);
|
|
bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
|
|
bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
|
|
bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
|
|
bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
|
|
bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
|
|
bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
|
|
- File touch = FileUtil.touch(ZHONGZHENG_PROFILE+"word.html");
|
|
|
|
|
|
+ File touch = FileUtil.touch(ZHONGZHENG_PROFILE + "word.html");
|
|
//默认freemake配置
|
|
//默认freemake配置
|
|
Configuration configuration = new Configuration();
|
|
Configuration configuration = new Configuration();
|
|
configuration.setDefaultEncoding("UTF-8");
|
|
configuration.setDefaultEncoding("UTF-8");
|
|
@@ -315,12 +319,12 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
|
|
|
configuration.setClassForTemplateLoading(this.getClass(), "/templates");
|
|
configuration.setClassForTemplateLoading(this.getClass(), "/templates");
|
|
Template template = configuration.getTemplate("wordPhone.ftl");
|
|
Template template = configuration.getTemplate("wordPhone.ftl");
|
|
- // File outFile = new File(ZHONGZHENG_PROFILE+"wordJpg.doc"); //导出文件
|
|
|
|
- Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(touch),"UTF-8"));
|
|
|
|
- // Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile),"UTF-8"));
|
|
|
|
|
|
+ // File outFile = new File(ZHONGZHENG_PROFILE+"wordJpg.doc"); //导出文件
|
|
|
|
+ Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(touch), "UTF-8"));
|
|
|
|
+ // Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile),"UTF-8"));
|
|
try {
|
|
try {
|
|
//写入数据
|
|
//写入数据
|
|
- template.process(bindingMap,out);
|
|
|
|
|
|
+ template.process(bindingMap, out);
|
|
out.flush();
|
|
out.flush();
|
|
out.close();
|
|
out.close();
|
|
|
|
|
|
@@ -341,11 +345,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
final BufferedImage img = renderer.getImage();
|
|
final BufferedImage img = renderer.getImage();
|
|
final FSImageWriter imageWriter = new FSImageWriter();
|
|
final FSImageWriter imageWriter = new FSImageWriter();
|
|
imageWriter.setWriteCompressionQuality(1.0f);
|
|
imageWriter.setWriteCompressionQuality(1.0f);
|
|
- imageWriter.write(img, ZHONGZHENG_PROFILE+"wordJpg.jpg");//输出路径
|
|
|
|
|
|
+ imageWriter.write(img, ZHONGZHENG_PROFILE + "wordJpg.jpg");//输出路径
|
|
|
|
|
|
OssRequest ossRequest = new OssRequest();
|
|
OssRequest ossRequest = new OssRequest();
|
|
- FileInputStream fileInputStream = new FileInputStream(ZHONGZHENG_PROFILE+"wordJpg.jpg");
|
|
|
|
- MultipartFile multipartFile = new MockMultipartFile(ZHONGZHENG_PROFILE+"wordJpg.jpg", ZHONGZHENG_PROFILE+"wordJpg.jpg",
|
|
|
|
|
|
+ FileInputStream fileInputStream = new FileInputStream(ZHONGZHENG_PROFILE + "wordJpg.jpg");
|
|
|
|
+ MultipartFile multipartFile = new MockMultipartFile(ZHONGZHENG_PROFILE + "wordJpg.jpg", ZHONGZHENG_PROFILE + "wordJpg.jpg",
|
|
ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
|
|
ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
|
|
ossRequest.setFile(multipartFile);
|
|
ossRequest.setFile(multipartFile);
|
|
ossRequest.setImageStatus(6);
|
|
ossRequest.setImageStatus(6);
|
|
@@ -360,12 +364,17 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public boolean updateAuditByEditBo(UserProfileEditBo bo,LoginUser loginUser) {
|
|
|
|
- UserProfile update = BeanUtil.toBean(bo,UserProfile.class);
|
|
|
|
|
|
+ public boolean updateAuditByEditBo(UserProfileEditBo bo, LoginUser loginUser) {
|
|
|
|
+ if(Validator.isNotEmpty(bo.getKeyValue())){
|
|
|
|
+ if(bo.getKeyValue().indexOf("http")!=-1){
|
|
|
|
+ throw new CustomException("图片地址错误");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ UserProfile update = BeanUtil.toBean(bo, UserProfile.class);
|
|
UserProfileVo userProfileVo1 = this.queryById(bo.getId());
|
|
UserProfileVo userProfileVo1 = this.queryById(bo.getId());
|
|
//查询此人审核资料是否有权限
|
|
//查询此人审核资料是否有权限
|
|
- if(!loginUser.getUser().isAdmin()){
|
|
|
|
- if (baseMapper.selectCountProfile(loginUser.getUser().getUserId(),userProfileVo1.getGoodsId()) < 1){
|
|
|
|
|
|
+ if (!loginUser.getUser().isAdmin()) {
|
|
|
|
+ if (baseMapper.selectCountProfile(loginUser.getUser().getUserId(), userProfileVo1.getGoodsId()) < 1) {
|
|
throw new IllegalArgumentException("您没有审核权限");
|
|
throw new IllegalArgumentException("您没有审核权限");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -377,7 +386,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
|
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
//发送消息分为资料审核发送,和盖章审核发送 1资料 2盖章
|
|
//发送消息分为资料审核发送,和盖章审核发送 1资料 2盖章
|
|
- if (userProfileVo.getTypeStatus().equals(1)){
|
|
|
|
|
|
+ if (userProfileVo.getTypeStatus().equals(1)) {
|
|
//审核资料发送消息
|
|
//审核资料发送消息
|
|
sendAuidit(update);
|
|
sendAuidit(update);
|
|
if (update.getStatus().equals(1)) {
|
|
if (update.getStatus().equals(1)) {
|
|
@@ -385,7 +394,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
getUserPicInfo(update);
|
|
getUserPicInfo(update);
|
|
}
|
|
}
|
|
|
|
|
|
- }else if (userProfileVo.getTypeStatus().equals(2)){
|
|
|
|
|
|
+ } else if (userProfileVo.getTypeStatus().equals(2)) {
|
|
//审核承诺书发送消息
|
|
//审核承诺书发送消息
|
|
sendAuiditSMS(update);
|
|
sendAuiditSMS(update);
|
|
}
|
|
}
|
|
@@ -395,33 +404,33 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
/**
|
|
/**
|
|
* 同步身份证到用户信息
|
|
* 同步身份证到用户信息
|
|
*/
|
|
*/
|
|
- private void getUserPicInfo(UserProfile bo){
|
|
|
|
|
|
+ private void getUserPicInfo(UserProfile bo) {
|
|
String keyValue = bo.getKeyValue();
|
|
String keyValue = bo.getKeyValue();
|
|
- if(Validator.isNotEmpty(keyValue)){
|
|
|
|
- Map<String, String> maps = JSONObject.parseObject(keyValue,Map.class);
|
|
|
|
- String recent_photos,idcard_face_photo,idcard_national_photo = null;
|
|
|
|
|
|
+ if (Validator.isNotEmpty(keyValue)) {
|
|
|
|
+ Map<String, String> maps = JSONObject.parseObject(keyValue, Map.class);
|
|
|
|
+ String recent_photos, idcard_face_photo, idcard_national_photo = null;
|
|
LambdaUpdateWrapper<User> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
|
LambdaUpdateWrapper<User> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
|
objectLambdaUpdateWrapper.eq(User::getUserId, bo.getUserId());
|
|
objectLambdaUpdateWrapper.eq(User::getUserId, bo.getUserId());
|
|
- if(maps.containsKey("recent_photos")){
|
|
|
|
|
|
+ if (maps.containsKey("recent_photos")) {
|
|
recent_photos = JSONObject.parseObject(String.valueOf(maps.get("recent_photos")), UserProfileFit.class).getValue();
|
|
recent_photos = JSONObject.parseObject(String.valueOf(maps.get("recent_photos")), UserProfileFit.class).getValue();
|
|
objectLambdaUpdateWrapper.set(User::getOneInchPhotos, recent_photos);
|
|
objectLambdaUpdateWrapper.set(User::getOneInchPhotos, recent_photos);
|
|
}
|
|
}
|
|
- if(maps.containsKey("idcard_face_photo")){
|
|
|
|
|
|
+ if (maps.containsKey("idcard_face_photo")) {
|
|
idcard_face_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_face_photo")), UserProfileFit.class).getValue();
|
|
idcard_face_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_face_photo")), UserProfileFit.class).getValue();
|
|
objectLambdaUpdateWrapper.set(User::getIdCardImg1, idcard_face_photo);
|
|
objectLambdaUpdateWrapper.set(User::getIdCardImg1, idcard_face_photo);
|
|
}
|
|
}
|
|
- if(maps.containsKey("idcard_national_photo")){
|
|
|
|
|
|
+ if (maps.containsKey("idcard_national_photo")) {
|
|
idcard_national_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_national_photo")), UserProfileFit.class).getValue();
|
|
idcard_national_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_national_photo")), UserProfileFit.class).getValue();
|
|
objectLambdaUpdateWrapper.set(User::getIdCardImg2, idcard_national_photo);
|
|
objectLambdaUpdateWrapper.set(User::getIdCardImg2, idcard_national_photo);
|
|
}
|
|
}
|
|
- objectLambdaUpdateWrapper.set(User::getUpdateTime,DateUtils.getNowTime());
|
|
|
|
|
|
+ objectLambdaUpdateWrapper.set(User::getUpdateTime, DateUtils.getNowTime());
|
|
iUserService.update(null, objectLambdaUpdateWrapper);
|
|
iUserService.update(null, objectLambdaUpdateWrapper);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
private void sendAuiditSMS(UserProfile bo) {
|
|
private void sendAuiditSMS(UserProfile bo) {
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
- Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(),userProfileVo.getGoodsId());
|
|
|
|
|
|
+ Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(), userProfileVo.getGoodsId());
|
|
if (bo.getStatus().equals(1)) {
|
|
if (bo.getStatus().equals(1)) {
|
|
InformRemindVo informRemindVo = informRemindService.queryById(23L);
|
|
InformRemindVo informRemindVo = informRemindService.queryById(23L);
|
|
//站内信有无启用,启用发送
|
|
//站内信有无启用,启用发送
|
|
@@ -438,11 +447,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGradeId(gradeId);
|
|
informUserAddBo.setGradeId(gradeId);
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
- informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核成功");
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功");
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
}
|
|
}
|
|
//短信有无启用,启用发送
|
|
//短信有无启用,启用发送
|
|
- if (informRemindVo.getNoteStatus().equals(1)){
|
|
|
|
|
|
+ if (informRemindVo.getNoteStatus().equals(1)) {
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
@@ -454,14 +463,14 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
informUserAddBo.setRemind("资料审核通过通知");
|
|
informUserAddBo.setRemind("资料审核通过通知");
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
- informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核成功");
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功");
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
|
|
UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), commitmentCode);
|
|
IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), commitmentCode);
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
InformRemindVo informRemindTwoVo = informRemindService.queryById(24L);
|
|
InformRemindVo informRemindTwoVo = informRemindService.queryById(24L);
|
|
//站内信有无启用,启用发送
|
|
//站内信有无启用,启用发送
|
|
if (informRemindTwoVo.getWayStatus().equals(1)) {
|
|
if (informRemindTwoVo.getWayStatus().equals(1)) {
|
|
@@ -477,11 +486,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGradeId(gradeId);
|
|
informUserAddBo.setGradeId(gradeId);
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
- informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核不通过,请重新完善吧");
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧");
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
}
|
|
}
|
|
//短信有无启用,启用发送
|
|
//短信有无启用,启用发送
|
|
- if (informRemindTwoVo.getNoteStatus().equals(1)){
|
|
|
|
|
|
+ if (informRemindTwoVo.getNoteStatus().equals(1)) {
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
@@ -493,7 +502,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
informUserAddBo.setRemind("资料审核不通过通知");
|
|
informUserAddBo.setRemind("资料审核不通过通知");
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
- informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核不通过,请重新完善吧");
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧");
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
|
|
UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
@@ -506,7 +515,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
private void sendAuidit(UserProfile bo) {
|
|
private void sendAuidit(UserProfile bo) {
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
//查询所在班级
|
|
//查询所在班级
|
|
- Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(),userProfileVo.getGoodsId());
|
|
|
|
|
|
+ Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(), userProfileVo.getGoodsId());
|
|
if (bo.getStatus().equals(1)) {
|
|
if (bo.getStatus().equals(1)) {
|
|
InformRemindVo informRemindVo = informRemindService.queryById(3L);
|
|
InformRemindVo informRemindVo = informRemindService.queryById(3L);
|
|
//站内信有无启用,启用发送
|
|
//站内信有无启用,启用发送
|
|
@@ -523,11 +532,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGradeId(gradeId);
|
|
informUserAddBo.setGradeId(gradeId);
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
- informUserAddBo.setText("尊敬的用户:您填写的"+goodsVo1.getGoodsName()+"课程报名信息审核成功,请尽快去学习吧");
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核成功,请尽快去学习吧");
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
}
|
|
}
|
|
//短信有无启用,启用发送
|
|
//短信有无启用,启用发送
|
|
- if (informRemindVo.getNoteStatus().equals(1)){
|
|
|
|
|
|
+ if (informRemindVo.getNoteStatus().equals(1)) {
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
@@ -546,7 +555,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
param.put("goods", goodsVo1.getGoodsName());
|
|
IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), materialReviewCode);
|
|
IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), materialReviewCode);
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
InformRemindVo informRemindTwoVo = informRemindService.queryById(4L);
|
|
InformRemindVo informRemindTwoVo = informRemindService.queryById(4L);
|
|
//站内信有无启用,启用发送
|
|
//站内信有无启用,启用发送
|
|
if (informRemindTwoVo.getWayStatus().equals(1)) {
|
|
if (informRemindTwoVo.getWayStatus().equals(1)) {
|
|
@@ -562,11 +571,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGradeId(gradeId);
|
|
informUserAddBo.setGradeId(gradeId);
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
- informUserAddBo.setText("尊敬的用户:您填写的"+goodsVo1.getGoodsName()+"课程报名信息审核不通过,请重新完善吧");
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧");
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
}
|
|
}
|
|
//短信有无启用,启用发送
|
|
//短信有无启用,启用发送
|
|
- if (informRemindTwoVo.getNoteStatus().equals(1)){
|
|
|
|
|
|
+ if (informRemindTwoVo.getNoteStatus().equals(1)) {
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
informUserAddBo.setSendTime(DateUtils.getNowTime());
|
|
@@ -578,7 +587,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
informUserAddBo.setRemind("报名资料审核不通过通知");
|
|
informUserAddBo.setRemind("报名资料审核不通过通知");
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
|
|
- informUserAddBo.setText("尊敬的用户:您填写的"+goodsVo1.getGoodsName()+"课程报名信息审核不通过,请重新完善吧");
|
|
|
|
|
|
+ informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧");
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
|
|
UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
@@ -594,118 +603,30 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<UserProfileExportVo> export(UserProfileQueryBo bo) {
|
|
|
|
|
|
+ public Map<String, Object> export(UserProfileQueryBo bo) {
|
|
List<UserProfileVo> userProfileVos = baseMapper.selectUserProfile(bo);
|
|
List<UserProfileVo> userProfileVos = baseMapper.selectUserProfile(bo);
|
|
List<UserProfileExportVo> userProfileExportVos = new ArrayList<>();
|
|
List<UserProfileExportVo> userProfileExportVos = new ArrayList<>();
|
|
- for (UserProfileVo userProfileVo : userProfileVos) {
|
|
|
|
- UserProfileExportVo userProfileExportVo = new UserProfileExportVo();
|
|
|
|
- //将keyvlue转成对象
|
|
|
|
- JsonBean jsonBean = JSON.parseObject(userProfileVo.getKeyValue(), JsonBean.class);
|
|
|
|
-
|
|
|
|
- //赋值
|
|
|
|
- userProfileExportVo.setGoodsName(userProfileVo.getGoodsName());
|
|
|
|
- if (userProfileVo.getStatus().equals(1)) {
|
|
|
|
- userProfileExportVo.setStatus("通过");
|
|
|
|
- }
|
|
|
|
- if (userProfileVo.getStatus().equals(2)) {
|
|
|
|
- userProfileExportVo.setStatus("待审");
|
|
|
|
- }
|
|
|
|
- if (userProfileVo.getStatus().equals(3)) {
|
|
|
|
- userProfileExportVo.setStatus("不通过");
|
|
|
|
- }
|
|
|
|
- userProfileExportVo.setUserAccount(userProfileVo.getUserAccount());
|
|
|
|
- userProfileExportVo.setName(jsonBean.getName().getValue());
|
|
|
|
- userProfileExportVo.setSex(jsonBean.getSex().getValue());
|
|
|
|
- userProfileExportVo.setIdcard(jsonBean.getIdcard().getValue());
|
|
|
|
- userProfileExportVo.setTelphone(jsonBean.getTelphone().getValue());
|
|
|
|
- userProfileExportVo.setEducation(jsonBean.getEducation().getValue());
|
|
|
|
- userProfileExportVo.setSchool(jsonBean.getSchool().getValue());
|
|
|
|
- userProfileExportVo.setGraduation_time(DateUtil.formatDate(jsonBean.getGraduation_time().getValue()));
|
|
|
|
- userProfileExportVo.setWork_unit(jsonBean.getWork_unit().getValue());
|
|
|
|
- userProfileExportVo.setUnit_contact(jsonBean.getUnit_contact().getValue());
|
|
|
|
- userProfileExportVo.setUnit_tel(jsonBean.getUnit_tel().getValue());
|
|
|
|
- userProfileExportVo.setApply_post(jsonBean.getApply_post().getValue());
|
|
|
|
- userProfileExportVo.setMajor(jsonBean.getMajor().getValue());
|
|
|
|
- userProfileExportVo.setWorking_years(jsonBean.getWorking_years().getValue());
|
|
|
|
- if (Validator.isNotEmpty(jsonBean.getRecent_photos())) {
|
|
|
|
- userProfileExportVo.setRecent_photos(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getRecent_photos().getValue());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (Validator.isNotEmpty(jsonBean.getIdcard_face_photo())) {
|
|
|
|
- userProfileExportVo.setIdcard_face_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_face_photo().getValue());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (Validator.isNotEmpty(jsonBean.getIdcard_national_photo())) {
|
|
|
|
- userProfileExportVo.setIdcard_national_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_national_photo().getValue());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (Validator.isNotEmpty(jsonBean.getCommitment_electr_signature())) {
|
|
|
|
- userProfileExportVo.setCommitment_electr_signature(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getCommitment_electr_signature().getValue());
|
|
|
|
- }
|
|
|
|
- //查找盖章得记录
|
|
|
|
- UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
|
|
|
|
- userProfileQueryBo.setTypeStatus(2L);
|
|
|
|
- userProfileQueryBo.setGoodsId(userProfileVo.getGoodsId());
|
|
|
|
- userProfileQueryBo.setUserId(userProfileVo.getUserId());
|
|
|
|
- List<UserProfileVo> userProfile = baseMapper.selectUserProfile(userProfileQueryBo);
|
|
|
|
- if (CollectionUtils.isNotEmpty(userProfile)){
|
|
|
|
- UserProfileVo userProfileVo1 = userProfile.get(0);
|
|
|
|
- JsonBean jsonBean1 = JSON.parseObject(userProfileVo1.getKeyValue(), JsonBean.class);
|
|
|
|
- if (!StringUtils.isEmpty(jsonBean1.getCommitment_seal().getValue())) {
|
|
|
|
- if (StringUtils.isNotBlank(jsonBean1.getCommitment_seal().getValue())) {
|
|
|
|
- userProfileExportVo.setCommitment_seal(ALIYUN_OSS_ENDPOINT + "/" + jsonBean1.getCommitment_seal().getValue());
|
|
|
|
- }
|
|
|
|
|
|
+ String filename = FileUtils.encodingZipFilename("用户盖章资料数据");
|
|
|
|
+ String zipFile = FileUtils.getZipAbsoluteFile(filename);
|
|
|
|
+ try {
|
|
|
|
+ ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(zipFile));
|
|
|
|
+ for (UserProfileVo userProfileVo : userProfileVos) {
|
|
|
|
+ UserProfileExportVo userProfileExportVo = new UserProfileExportVo();
|
|
|
|
+ //将keyvlue转成对象
|
|
|
|
+ JsonBean jsonBean = JSON.parseObject(userProfileVo.getKeyValue(), JsonBean.class);
|
|
|
|
+
|
|
|
|
+ //赋值
|
|
|
|
+ userProfileExportVo.setGoodsName(userProfileVo.getGoodsName());
|
|
|
|
+ if (userProfileVo.getStatus().equals(1)) {
|
|
|
|
+ userProfileExportVo.setStatus("通过");
|
|
}
|
|
}
|
|
- }
|
|
|
|
- userProfileExportVo.setOneTime(DateUtil.formatDateTime(new Date(userProfileVo.getOneTime()*1000)));
|
|
|
|
- userProfileExportVo.setLastTime(DateUtil.formatDateTime(new Date(userProfileVo.getLastTime()*1000)));
|
|
|
|
- userProfileExportVo.setCreateByName(userProfileVo.getCreateByName());
|
|
|
|
- if (userProfileVo.getAuditTime() != null) {
|
|
|
|
- userProfileExportVo.setAuditTime(DateUtil.formatDateTime(new Date(userProfileVo.getAuditTime() * 1000)));
|
|
|
|
- }
|
|
|
|
- userProfileExportVos.add(userProfileExportVo);
|
|
|
|
- }
|
|
|
|
- return userProfileExportVos;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public List<UserProfileExportGaiVo> exportPo(UserProfileQueryBo bo) {
|
|
|
|
- List<UserProfileVo> userProfileVos = baseMapper.selectUserProfile(bo);
|
|
|
|
- List<UserProfileExportGaiVo> userProfileExportVos = new ArrayList<>();
|
|
|
|
- for (UserProfileVo userProfileVo : userProfileVos) {
|
|
|
|
- UserProfileExportGaiVo userProfileExportVo = new UserProfileExportGaiVo();
|
|
|
|
- //将keyvlue转成对象
|
|
|
|
- JsonBean jsonBean1 = JSON.parseObject(userProfileVo.getKeyValue(), JsonBean.class);
|
|
|
|
-
|
|
|
|
- //赋值
|
|
|
|
-
|
|
|
|
- if (!StringUtils.isEmpty(jsonBean1.getCommitment_seal().getValue())) {
|
|
|
|
- if (StringUtils.isNotBlank(jsonBean1.getCommitment_seal().getValue())) {
|
|
|
|
- userProfileExportVo.setCommitment_seal(ALIYUN_OSS_ENDPOINT + "/" + jsonBean1.getCommitment_seal().getValue());
|
|
|
|
|
|
+ if (userProfileVo.getStatus().equals(2)) {
|
|
|
|
+ userProfileExportVo.setStatus("待审");
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
- userProfileExportVo.setGoodsName(userProfileVo.getGoodsName());
|
|
|
|
- if (userProfileVo.getStatus().equals(1)) {
|
|
|
|
- userProfileExportVo.setStatus("通过");
|
|
|
|
- }
|
|
|
|
- if (userProfileVo.getStatus().equals(2)) {
|
|
|
|
- userProfileExportVo.setStatus("待审");
|
|
|
|
- }
|
|
|
|
- if (userProfileVo.getStatus().equals(3)) {
|
|
|
|
- userProfileExportVo.setStatus("不通过");
|
|
|
|
- }
|
|
|
|
- userProfileExportVo.setUserAccount(userProfileVo.getUserAccount());
|
|
|
|
-
|
|
|
|
- //查找盖章得记录
|
|
|
|
- UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
|
|
|
|
- userProfileQueryBo.setTypeStatus(1L);
|
|
|
|
- userProfileQueryBo.setGoodsId(userProfileVo.getGoodsId());
|
|
|
|
- userProfileQueryBo.setUserId(userProfileVo.getUserId());
|
|
|
|
- List<UserProfileVo> userProfile = baseMapper.selectUserProfile(userProfileQueryBo);
|
|
|
|
- if (CollectionUtils.isNotEmpty(userProfile)){
|
|
|
|
- UserProfileVo userProfileVo1 = userProfile.get(0);
|
|
|
|
- JsonBean jsonBean = JSON.parseObject(userProfileVo1.getKeyValue(), JsonBean.class);
|
|
|
|
|
|
+ if (userProfileVo.getStatus().equals(3)) {
|
|
|
|
+ userProfileExportVo.setStatus("不通过");
|
|
|
|
+ }
|
|
|
|
+ userProfileExportVo.setUserAccount(userProfileVo.getUserAccount());
|
|
userProfileExportVo.setName(jsonBean.getName().getValue());
|
|
userProfileExportVo.setName(jsonBean.getName().getValue());
|
|
userProfileExportVo.setSex(jsonBean.getSex().getValue());
|
|
userProfileExportVo.setSex(jsonBean.getSex().getValue());
|
|
userProfileExportVo.setIdcard(jsonBean.getIdcard().getValue());
|
|
userProfileExportVo.setIdcard(jsonBean.getIdcard().getValue());
|
|
@@ -719,28 +640,157 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
userProfileExportVo.setApply_post(jsonBean.getApply_post().getValue());
|
|
userProfileExportVo.setApply_post(jsonBean.getApply_post().getValue());
|
|
userProfileExportVo.setMajor(jsonBean.getMajor().getValue());
|
|
userProfileExportVo.setMajor(jsonBean.getMajor().getValue());
|
|
userProfileExportVo.setWorking_years(jsonBean.getWorking_years().getValue());
|
|
userProfileExportVo.setWorking_years(jsonBean.getWorking_years().getValue());
|
|
- if (Validator.isNotEmpty(jsonBean.getRecent_photos())) {
|
|
|
|
|
|
+ List<String> fileList = new ArrayList<>();
|
|
|
|
+ if (Validator.isNotEmpty(jsonBean.getRecent_photos().getValue())) {
|
|
userProfileExportVo.setRecent_photos(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getRecent_photos().getValue());
|
|
userProfileExportVo.setRecent_photos(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getRecent_photos().getValue());
|
|
|
|
+ fileList.add(jsonBean.getRecent_photos().getValue());
|
|
}
|
|
}
|
|
- if (Validator.isNotEmpty(jsonBean.getIdcard_face_photo())) {
|
|
|
|
|
|
+
|
|
|
|
+ if (Validator.isNotEmpty(jsonBean.getIdcard_face_photo().getValue())) {
|
|
userProfileExportVo.setIdcard_face_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_face_photo().getValue());
|
|
userProfileExportVo.setIdcard_face_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_face_photo().getValue());
|
|
|
|
+ fileList.add(jsonBean.getIdcard_face_photo().getValue());
|
|
}
|
|
}
|
|
- if (Validator.isNotEmpty(jsonBean.getIdcard_national_photo())) {
|
|
|
|
|
|
+
|
|
|
|
+ if (Validator.isNotEmpty(jsonBean.getIdcard_national_photo().getValue())) {
|
|
userProfileExportVo.setIdcard_national_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_national_photo().getValue());
|
|
userProfileExportVo.setIdcard_national_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_national_photo().getValue());
|
|
|
|
+ fileList.add(jsonBean.getIdcard_national_photo().getValue());
|
|
}
|
|
}
|
|
- if (Validator.isNotEmpty(jsonBean.getCommitment_electr_signature())) {
|
|
|
|
|
|
+
|
|
|
|
+ if (Validator.isNotEmpty(jsonBean.getCommitment_electr_signature().getValue())) {
|
|
userProfileExportVo.setCommitment_electr_signature(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getCommitment_electr_signature().getValue());
|
|
userProfileExportVo.setCommitment_electr_signature(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getCommitment_electr_signature().getValue());
|
|
|
|
+ fileList.add(jsonBean.getCommitment_electr_signature().getValue());
|
|
}
|
|
}
|
|
|
|
+ String dir = userProfileExportVo.getName() + "_" + userProfileExportVo.getIdcard();
|
|
|
|
+ ossService.zipCommonDownload(fileList, outStream, dir);
|
|
|
|
+ //查找盖章得记录
|
|
|
|
+ UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
|
|
|
|
+ userProfileQueryBo.setTypeStatus(2L);
|
|
|
|
+ userProfileQueryBo.setGoodsId(userProfileVo.getGoodsId());
|
|
|
|
+ userProfileQueryBo.setUserId(userProfileVo.getUserId());
|
|
|
|
+ List<UserProfileVo> userProfile = baseMapper.selectUserProfile(userProfileQueryBo);
|
|
|
|
+ if (CollectionUtils.isNotEmpty(userProfile)) {
|
|
|
|
+ UserProfileVo userProfileVo1 = userProfile.get(0);
|
|
|
|
+ JsonBean jsonBean1 = JSON.parseObject(userProfileVo1.getKeyValue(), JsonBean.class);
|
|
|
|
+ if (!StringUtils.isEmpty(jsonBean1.getCommitment_seal().getValue())) {
|
|
|
|
+ if (StringUtils.isNotBlank(jsonBean1.getCommitment_seal().getValue())) {
|
|
|
|
+ userProfileExportVo.setCommitment_seal(ALIYUN_OSS_ENDPOINT + "/" + jsonBean1.getCommitment_seal().getValue());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ userProfileExportVo.setOneTime(DateUtil.formatDateTime(new Date(userProfileVo.getOneTime() * 1000)));
|
|
|
|
+ userProfileExportVo.setLastTime(DateUtil.formatDateTime(new Date(userProfileVo.getLastTime() * 1000)));
|
|
|
|
+ userProfileExportVo.setCreateByName(userProfileVo.getCreateByName());
|
|
|
|
+ if (userProfileVo.getAuditTime() != null) {
|
|
|
|
+ userProfileExportVo.setAuditTime(DateUtil.formatDateTime(new Date(userProfileVo.getAuditTime() * 1000)));
|
|
|
|
+ }
|
|
|
|
+ userProfileExportVos.add(userProfileExportVo);
|
|
}
|
|
}
|
|
- userProfileExportVo.setOneTime(DateUtil.formatDateTime(new Date(userProfileVo.getOneTime()*1000)));
|
|
|
|
- userProfileExportVo.setLastTime(DateUtil.formatDateTime(new Date(userProfileVo.getLastTime()*1000)));
|
|
|
|
- userProfileExportVo.setCreateByName(userProfileVo.getCreateByName());
|
|
|
|
- if (userProfileVo.getAuditTime() != null) {
|
|
|
|
- userProfileExportVo.setAuditTime(DateUtil.formatDateTime(new Date(userProfileVo.getAuditTime() * 1000)));
|
|
|
|
|
|
+ outStream.close();
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ System.out.println(e.getMessage() + "压缩");
|
|
|
|
+ }
|
|
|
|
+ Map<String, Object> rs = new HashMap<>();
|
|
|
|
+ rs.put("list", userProfileExportVos);
|
|
|
|
+ rs.put("zip", AjaxResult.success(filename));
|
|
|
|
+ //List<UserProfileExportGaiVo>
|
|
|
|
+ return rs;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Map<String, Object> exportPo(UserProfileQueryBo bo) {
|
|
|
|
+ List<UserProfileVo> userProfileVos = baseMapper.selectUserProfile(bo);
|
|
|
|
+ List<UserProfileExportGaiVo> userProfileExportVos = new ArrayList<>();
|
|
|
|
+ String filename = FileUtils.encodingZipFilename("用户盖章资料数据");
|
|
|
|
+ String zipFile = FileUtils.getZipAbsoluteFile(filename);
|
|
|
|
+ try {
|
|
|
|
+ ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(zipFile));
|
|
|
|
+ for (UserProfileVo userProfileVo : userProfileVos) {
|
|
|
|
+ UserProfileExportGaiVo userProfileExportVo = new UserProfileExportGaiVo();
|
|
|
|
+ //将keyvlue转成对象
|
|
|
|
+ JsonBean jsonBean1 = JSON.parseObject(userProfileVo.getKeyValue(), JsonBean.class);
|
|
|
|
+
|
|
|
|
+ //赋值
|
|
|
|
+
|
|
|
|
+ if (!StringUtils.isEmpty(jsonBean1.getCommitment_seal().getValue())) {
|
|
|
|
+ if (StringUtils.isNotBlank(jsonBean1.getCommitment_seal().getValue())) {
|
|
|
|
+ userProfileExportVo.setCommitment_seal(ALIYUN_OSS_ENDPOINT + "/" + jsonBean1.getCommitment_seal().getValue());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ userProfileExportVo.setGoodsName(userProfileVo.getGoodsName());
|
|
|
|
+ if (userProfileVo.getStatus().equals(1)) {
|
|
|
|
+ userProfileExportVo.setStatus("通过");
|
|
|
|
+ }
|
|
|
|
+ if (userProfileVo.getStatus().equals(2)) {
|
|
|
|
+ userProfileExportVo.setStatus("待审");
|
|
|
|
+ }
|
|
|
|
+ if (userProfileVo.getStatus().equals(3)) {
|
|
|
|
+ userProfileExportVo.setStatus("不通过");
|
|
|
|
+ }
|
|
|
|
+ userProfileExportVo.setUserAccount(userProfileVo.getUserAccount());
|
|
|
|
+
|
|
|
|
+ //查找盖章得记录
|
|
|
|
+ UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
|
|
|
|
+ userProfileQueryBo.setTypeStatus(1L);
|
|
|
|
+ userProfileQueryBo.setGoodsId(userProfileVo.getGoodsId());
|
|
|
|
+ userProfileQueryBo.setUserId(userProfileVo.getUserId());
|
|
|
|
+ List<UserProfileVo> userProfile = baseMapper.selectUserProfile(userProfileQueryBo);
|
|
|
|
+ if (CollectionUtils.isNotEmpty(userProfile)) {
|
|
|
|
+ UserProfileVo userProfileVo1 = userProfile.get(0);
|
|
|
|
+ JsonBean jsonBean = JSON.parseObject(userProfileVo1.getKeyValue(), JsonBean.class);
|
|
|
|
+ userProfileExportVo.setName(jsonBean.getName().getValue());
|
|
|
|
+ userProfileExportVo.setSex(jsonBean.getSex().getValue());
|
|
|
|
+ userProfileExportVo.setIdcard(jsonBean.getIdcard().getValue());
|
|
|
|
+ userProfileExportVo.setTelphone(jsonBean.getTelphone().getValue());
|
|
|
|
+ userProfileExportVo.setEducation(jsonBean.getEducation().getValue());
|
|
|
|
+ userProfileExportVo.setSchool(jsonBean.getSchool().getValue());
|
|
|
|
+ userProfileExportVo.setGraduation_time(DateUtil.formatDate(jsonBean.getGraduation_time().getValue()));
|
|
|
|
+ userProfileExportVo.setWork_unit(jsonBean.getWork_unit().getValue());
|
|
|
|
+ userProfileExportVo.setUnit_contact(jsonBean.getUnit_contact().getValue());
|
|
|
|
+ userProfileExportVo.setUnit_tel(jsonBean.getUnit_tel().getValue());
|
|
|
|
+ userProfileExportVo.setApply_post(jsonBean.getApply_post().getValue());
|
|
|
|
+ userProfileExportVo.setMajor(jsonBean.getMajor().getValue());
|
|
|
|
+ userProfileExportVo.setWorking_years(jsonBean.getWorking_years().getValue());
|
|
|
|
+ List<String> fileList = new ArrayList<>();
|
|
|
|
+ if (Validator.isNotEmpty(jsonBean.getRecent_photos().getValue())) {
|
|
|
|
+ userProfileExportVo.setRecent_photos(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getRecent_photos().getValue());
|
|
|
|
+ fileList.add(jsonBean.getRecent_photos().getValue());
|
|
|
|
+ }
|
|
|
|
+ if (Validator.isNotEmpty(jsonBean.getIdcard_face_photo().getValue())) {
|
|
|
|
+ userProfileExportVo.setIdcard_face_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_face_photo().getValue());
|
|
|
|
+ fileList.add(jsonBean.getIdcard_face_photo().getValue());
|
|
|
|
+ }
|
|
|
|
+ if (Validator.isNotEmpty(jsonBean.getIdcard_national_photo().getValue())) {
|
|
|
|
+ userProfileExportVo.setIdcard_national_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_national_photo().getValue());
|
|
|
|
+ fileList.add(jsonBean.getIdcard_national_photo().getValue());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (Validator.isNotEmpty(jsonBean.getCommitment_electr_signature().getValue())) {
|
|
|
|
+ userProfileExportVo.setCommitment_electr_signature(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getCommitment_electr_signature().getValue());
|
|
|
|
+ fileList.add(jsonBean.getCommitment_electr_signature().getValue());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ String dir = userProfileExportVo.getName() + "_" + userProfileExportVo.getIdcard();
|
|
|
|
+ ossService.zipCommonDownload(fileList, outStream, dir);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ userProfileExportVo.setOneTime(DateUtil.formatDateTime(new Date(userProfileVo.getOneTime() * 1000)));
|
|
|
|
+ userProfileExportVo.setLastTime(DateUtil.formatDateTime(new Date(userProfileVo.getLastTime() * 1000)));
|
|
|
|
+ userProfileExportVo.setCreateByName(userProfileVo.getCreateByName());
|
|
|
|
+ if (userProfileVo.getAuditTime() != null) {
|
|
|
|
+ userProfileExportVo.setAuditTime(DateUtil.formatDateTime(new Date(userProfileVo.getAuditTime() * 1000)));
|
|
|
|
+ }
|
|
|
|
+ userProfileExportVos.add(userProfileExportVo);
|
|
}
|
|
}
|
|
- userProfileExportVos.add(userProfileExportVo);
|
|
|
|
|
|
+ outStream.close();
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ System.out.println(e.getMessage() + "压缩");
|
|
}
|
|
}
|
|
- return userProfileExportVos;
|
|
|
|
|
|
+ Map<String, Object> rs = new HashMap<>();
|
|
|
|
+ rs.put("list", userProfileExportVos);
|
|
|
|
+ rs.put("zip", AjaxResult.success(filename));
|
|
|
|
+ //List<UserProfileExportGaiVo>
|
|
|
|
+ return rs;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|