|
|
@@ -180,34 +180,38 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
//默认上级审核
|
|
|
AtomicReference<Integer> status= new AtomicReference<>(1);
|
|
|
Map<String, Object>map=new HashMap<String, Object>();
|
|
|
- if (my.getPublicPurview()==0){
|
|
|
- users.forEach(u->{
|
|
|
- if (!u.getAid().equals(my.getId())){
|
|
|
- StringBuffer str2=new StringBuffer();
|
|
|
- str2=str2.append(my.getName()).append("(需审核),准备公出您的企业");
|
|
|
- str2=str2.append("[").append(u.getNickname()).append("]!!!。");
|
|
|
- sendEmailAndNoticeAndSoucket(u.getAid(),3,str2.toString());
|
|
|
- Admin admin = adminMapper.selectByPrimaryKey(u.getAid());
|
|
|
- if (in.getType()==0){
|
|
|
- //不是自己的企业则需要审核并设置非自己客户待审核
|
|
|
- addPublicExamine(in.getId(), admin);
|
|
|
- if(in.getPublicType()==null|| in.getPublicType()==0)in.setPublicType(1);
|
|
|
+ //不是业务员
|
|
|
+ if (in.getType()==0){
|
|
|
+ if (my.getPublicPurview()==0){
|
|
|
+ users.forEach(u->{
|
|
|
+ if (!u.getAid().equals(my.getId())){
|
|
|
+ StringBuffer str2=new StringBuffer();
|
|
|
+ str2=str2.append(my.getName()).append("(需审核),准备公出您的企业");
|
|
|
+ str2=str2.append("[").append(u.getNickname()).append("]!!!。");
|
|
|
+ sendEmailAndNoticeAndSoucket(u.getAid(),3,str2.toString());
|
|
|
+ Admin admin = adminMapper.selectByPrimaryKey(u.getAid());
|
|
|
+ if (in.getType()==0){
|
|
|
+ //不是自己的企业则需要审核并设置非自己客户待审核
|
|
|
+ addPublicExamine(in.getId(), admin);
|
|
|
+ if(in.getPublicType()==null|| in.getPublicType()==0)in.setPublicType(1);
|
|
|
+ }
|
|
|
+ pushNoticeAndSoucketAndEmail(my, in, date, admin, str, map);
|
|
|
+ status.set(0);
|
|
|
}
|
|
|
- pushNoticeAndSoucketAndEmail(my, in, date, admin, str, map);
|
|
|
- status.set(0);
|
|
|
- }
|
|
|
- });
|
|
|
- }else {
|
|
|
- users.forEach(u->{
|
|
|
- if (!u.getAid().equals(my.getId())){
|
|
|
- StringBuffer str2=new StringBuffer();
|
|
|
- str2=str2.append("业务员").append(my.getName()).append("(无需审核),准备公出您的企业");
|
|
|
- str2=str2.append("[").append(u.getNickname()).append("]!!!");
|
|
|
- sendNoticeAndSoucket(u.getAid(),3,str2.toString());
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ users.forEach(u->{
|
|
|
+ if (!u.getAid().equals(my.getId())){
|
|
|
+ StringBuffer str2=new StringBuffer();
|
|
|
+ str2=str2.append("业务员").append(my.getName()).append("(无需审核),准备公出您的企业");
|
|
|
+ str2=str2.append("[").append(u.getNickname()).append("]!!!");
|
|
|
+ sendNoticeAndSoucket(u.getAid(),3,str2.toString());
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (status.get()==1){
|
|
|
pushNoticeAndSoucketAndEmail(my, in, date, a, str, map);
|
|
|
}
|
|
|
@@ -313,15 +317,16 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
List<User> uses=null;
|
|
|
PublicRelease use = publicReleaseMapper.selectByPrimaryKey(in.getId());
|
|
|
- if (in.getUids()!=null){
|
|
|
- List<String> split = Arrays.asList(in.getUids().split(","));
|
|
|
- List<OutPublicReleaseDetails> prList = publicReleaseDetailsMapper.selectByPCid(in.getId());
|
|
|
- uses=pushPublicReleaseDetails(split,prList,use,in);
|
|
|
- }
|
|
|
+
|
|
|
String userNames=publicReleaseDetailsMapper.getNamesByPrid(in.getId());
|
|
|
PublicReleaseLog log=new PublicReleaseLog(in.getId(),TokenManager.getAdminId(),null,in.getReason(),date);
|
|
|
in.setUserNames(userNames);
|
|
|
if(in.getStatus()==null||in.getStatus()!=3) {
|
|
|
+ if (in.getUids()!=null){
|
|
|
+ List<String> split = Arrays.asList(in.getUids().split(","));
|
|
|
+ List<OutPublicReleaseDetails> prList = publicReleaseDetailsMapper.selectByPCid(in.getId());
|
|
|
+ uses=pushPublicReleaseDetails(split,prList,use,in);
|
|
|
+ }
|
|
|
in.setStatus(1);
|
|
|
log.setStatus(PublicReleaseLog.states.xg.getCode());
|
|
|
in.setUpdateStatus(1);
|