|
|
@@ -123,8 +123,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}else {
|
|
|
in.setTechStartProcess(1);
|
|
|
}
|
|
|
- }else if (in.getType() == 2) {
|
|
|
-
|
|
|
}
|
|
|
publicReleaseMapper.insertSelective(in);
|
|
|
if (in.getType()==1&&in.getOrderNo()!=null){
|
|
|
@@ -484,7 +482,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
throw new BusinessException("该公出已签到,无法取消");
|
|
|
}
|
|
|
}
|
|
|
- pushUpdatePublic(in, uses, use, log, userNames, date, checkOrderNo);
|
|
|
}else if (in.getAssist()==0){
|
|
|
publicReleaseMapper.updateAssist(in);
|
|
|
in.setAssistProcess(0);
|
|
|
@@ -494,79 +491,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
throw new BusinessException("该协单公出已打卡,无法取消");
|
|
|
}
|
|
|
}
|
|
|
- pushUpdatePublic(in, uses, use, log, userNames, date, checkOrderNo);
|
|
|
- }else if (in.getAssist()==4){
|
|
|
- List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(in.getId(), null, null);
|
|
|
- for (PublicRelease e : publicReleases) {
|
|
|
- if (e.getClockIn()==1){
|
|
|
- throw new BusinessException("该协单公出已打卡,无法取消");
|
|
|
- }
|
|
|
- }
|
|
|
- AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
|
- publicReleaseMapper.deleteById(in.getId());
|
|
|
- publicReleaseMapper.deleteByMainId(in.getId());
|
|
|
- String[] split = in.getAssistAid().split(",");
|
|
|
- List<sendListBo> aidList = new ArrayList<>();
|
|
|
- List<PublicReleaseDetails> prdList=new ArrayList<>();
|
|
|
- List<User> users=new ArrayList<>();
|
|
|
- StringBuilder str =new StringBuilder();
|
|
|
- //每一个协单都是单独的一份
|
|
|
- for (String s : split) {
|
|
|
- Admin publicAdmin = adminMapper.selectByPrimaryKey(s);
|
|
|
- in.setAid(s);
|
|
|
- in.setType(3);
|
|
|
- in.setMainName(my.getName());
|
|
|
- in.setAssistProcess(2);
|
|
|
- publicReleaseMapper.insert(in);
|
|
|
- addPRD(in, users, str, prdList);
|
|
|
- addPublicReleaseDateClock(in);
|
|
|
- userNames=str.substring(0,str.length()-1);
|
|
|
- in.setUserNames(userNames);
|
|
|
- PublicRelease updateName=new PublicRelease();
|
|
|
- updateName.setId(in.getId());
|
|
|
- updateName.setUserNames(userNames);
|
|
|
- publicReleaseMapper.update(updateName);
|
|
|
- addpublicLog(in.getId(), PublicReleaseLog.states.fq.getCode(), "发起[仅技术协单公出]申请");
|
|
|
- sendNoticeAndSoucket(in.getAid(),1, "["+my.getName()+"]发起["+userNames+"]的发起[仅技术协单公出]邀请。");
|
|
|
- List<AdminPublicReviewerBo> adminPublicReviewerBos = adminPublicReviewerMapper.selectByAid(in.getAid());
|
|
|
- //通知技术协单人
|
|
|
- //处理通知技术协单审核人
|
|
|
- adminPublicReviewerBos=adminPublicReviewerBos.stream().filter(e -> e.getType() == 1).collect(Collectors.toList());
|
|
|
- //如果没有直接改变状态
|
|
|
- if (adminPublicReviewerBos.size()==0){
|
|
|
- addpublicLog(in.getId(), PublicReleaseLog.states.ty.getCode(), "未设置技术协单审核人,跳过审核");
|
|
|
-// sendNoticeAndSoucket(my.getId(), 2, "你发起的["+userNames+"]仅技术协单公出申请,已通过。");
|
|
|
- PublicRelease updateStatus=new PublicRelease();
|
|
|
- updateStatus.setId(in.getId());
|
|
|
- updateStatus.setAssistProcess(4);
|
|
|
- updateStatus.setStatus(2);
|
|
|
- publicReleaseMapper.update(updateStatus);
|
|
|
- }else {
|
|
|
- for (AdminPublicReviewerBo adminPublicReviewerBo : adminPublicReviewerBos) {
|
|
|
- if (aidList.contains(adminPublicReviewerBo.getAid())==false){
|
|
|
- sendListBo bo =new sendListBo(adminPublicReviewerBo.getAid(),
|
|
|
- s,in.getId(),userNames);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (!aidList.isEmpty()){
|
|
|
- for (sendListBo e : aidList) {
|
|
|
- Admin a = adminMapper.selectByPrimaryKey(e.getAid());
|
|
|
- sendNoticeAndSoucket(e.getAid(),1, "["+my.getName()+"]发起["+e.getUserNames()+"]仅技术协单公出申请,请及时审核。");
|
|
|
- if (a.getOpenId() !=null) {
|
|
|
- Integer res= weChatUtils.addNotice(a.getOpenId(), in.getStatus(), e.getPrid(), date, my.getName(),"["+ my.getName()+"]发起仅协单申请");
|
|
|
- if (res!=0) {
|
|
|
- sendEmail(my, a,1);
|
|
|
- }
|
|
|
- }else {
|
|
|
- //返回没有绑定微信
|
|
|
- sendEmail(my, a,1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
}
|
|
|
+ //处理修改公出
|
|
|
+ pushUpdatePublic(in, uses, use, log, userNames, date, checkOrderNo);
|
|
|
|
|
|
}else {
|
|
|
List<PublicRelease> list = publicReleaseMapper.selectByMainId(in.getId(),3,null);
|
|
|
@@ -603,7 +530,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
in.setStatus(1);
|
|
|
log.setStatus(PublicReleaseLog.states.xg.getCode());
|
|
|
in.setUpdateStatus(1);
|
|
|
-
|
|
|
//如果是业务切公出则撤销营销审核与审核人
|
|
|
pushUpdateType(in, use);
|
|
|
//如果是业务公出,切审核状态为其他,则重置审核
|