|
|
@@ -172,7 +172,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
//根据客户判定出来本次公出,如果有则标记有效
|
|
|
List<UserInterviewProjectBo> userInterviewProjectBos = userInterviewProjectMapper.selectByAid(null, e.getUid());
|
|
|
- List<UserInterviewProjectBo> collect = userInterviewProjectBos.stream().filter(e2 -> e2.getType() == 0).collect(Collectors.toList());
|
|
|
+ List<UserInterviewProjectBo> collect = userInterviewProjectBos.stream().filter(e2 -> e2.getType() == 0&&e2.getStatus()==0).collect(Collectors.toList());
|
|
|
if (!collect.isEmpty()){
|
|
|
OutPublicReleaseDetails newPRD=new OutPublicReleaseDetails();
|
|
|
newPRD.setId(e.getId());
|
|
|
@@ -547,6 +547,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}else {
|
|
|
in.setTechStartProcess(0);
|
|
|
}
|
|
|
+
|
|
|
if (in.getAssist()==1){
|
|
|
in.setAssistProcess(1);
|
|
|
//在有协单的情况下,新增是审核完成才新增,修改是审核完成才修改。
|
|
|
@@ -577,6 +578,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
//处理修改公出
|
|
|
pushUpdatePublic(in, uses, use, log, userNames, date, checkOrderNo);
|
|
|
+ //处理修改发起,将面谈信息与项目恢复
|
|
|
+ pushUpdatePublicInterviewAndProject( use);
|
|
|
}else {
|
|
|
List<PublicRelease> list = publicReleaseMapper.selectByMainId(in.getId(),3,null);
|
|
|
List<PublicRelease> list2 = publicReleaseMapper.selectByMainId(in.getId(),4,null);
|
|
|
@@ -604,6 +607,15 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+ private void pushUpdatePublicInterviewAndProject(PublicRelease use) {
|
|
|
+ List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(use.getId(), null, null);
|
|
|
+ publicReleases.forEach(e->{
|
|
|
+ userInterviewProjectMapper.updateByPrdId(use.getId(), 0);
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private void pushUpdatePublic(InputPublicRelease in, List<User> uses, PublicRelease use, PublicReleaseLog log, String userNames, Date date, Map checkOrderNo) {
|
|
|
if (in.getUids()!=null){
|
|
|
List<String> split = Arrays.asList(in.getUids().split(","));
|
|
|
@@ -1153,8 +1165,21 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
private void pushPublicInterview(PublicRelease use) {
|
|
|
List<OutPublicReleaseDetails> outPublicReleaseDetails = publicReleaseDetailsMapper.selectByPrid(use.getId());
|
|
|
for (OutPublicReleaseDetails e : outPublicReleaseDetails) {
|
|
|
- //撤销后取消面谈项目
|
|
|
- userInterviewProjectMapper.updateByPrdId(e.getId());
|
|
|
+ //撤销后取消面谈项目,如果项目已存在则不恢复,不存在则恢复
|
|
|
+ List<UserInterviewProjectBo> prdList = userInterviewProjectMapper.selectByPrdId(e.getId());
|
|
|
+ List<UserInterviewProjectBo> userList = userInterviewProjectMapper.selectByAid(use.getAid(), e.getUid());
|
|
|
+ if (!userList.isEmpty()&& !prdList.isEmpty()){
|
|
|
+ prdList.forEach(e1 -> {
|
|
|
+ boolean flag=false;
|
|
|
+ userList.forEach(e2 -> {
|
|
|
+ //如果不是同一个面谈项目
|
|
|
+ if (e1.getPid().equals(e2.getPid())){
|
|
|
+ //是一个公出则恢复,不是则不恢复并且去掉有效
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
//将有效面谈去掉
|
|
|
PublicReleaseDetails p=new PublicReleaseDetails();
|
|
|
p.setInterviewStatus(0);
|