|
|
@@ -139,12 +139,15 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
private void addPublicExamine(Integer id, String aid) {
|
|
|
+ Admin admin = adminMapper.selectByPrimaryKey(aid);
|
|
|
+ addPublicExamine(id,admin);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void addPublicExamine(Integer id, Admin a) {
|
|
|
PublicExamine pe=new PublicExamine();
|
|
|
pe.setPrid(id);
|
|
|
- pe.setAid(aid);
|
|
|
+ pe.setAid(a.getAid());
|
|
|
pe.setStatus(0);
|
|
|
publicExamineMapper.insertSelective(pe);
|
|
|
}
|
|
|
@@ -181,10 +184,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
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());
|
|
|
//不是自己的企业则需要审核并设置非自己客户待审核
|
|
|
- addPublicExamine(in.getId(), u.getAid());
|
|
|
+ addPublicExamine(in.getId(), admin);
|
|
|
if(in.getPublicType()==null|| in.getPublicType()==0) in.setPublicType(1);
|
|
|
- Admin admin = adminMapper.selectByPrimaryKey(u.getAid());
|
|
|
pushNoticeAndSoucketAndEmail(my, in, date, admin, str, map);
|
|
|
status.set(0);
|
|
|
}
|
|
|
@@ -493,7 +496,25 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
a=adminMapper.selectByPrimaryKey(a.getReviewer());
|
|
|
if (status==2){//审核通过
|
|
|
str=str.append("同意,");
|
|
|
-
|
|
|
+ List<PublicExamine> publicExamines = publicExamineMapper.selectByPrid(use.getId());
|
|
|
+ int x=0;
|
|
|
+ for (PublicExamine pe : publicExamines) {
|
|
|
+ if (pe.getAid().equals(aid)){
|
|
|
+ pe.setStatus(1);
|
|
|
+ PublicExamine newp=new PublicExamine();
|
|
|
+ newp.setId(pe.getId());
|
|
|
+ newp.setStatus(1);
|
|
|
+ publicExamineMapper.updateByPrimaryKey(newp);
|
|
|
+ x++;
|
|
|
+ }else {
|
|
|
+ if (pe.getStatus()==1){
|
|
|
+ x++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (x==publicExamines.size()){
|
|
|
+ p.setPublicType(2);
|
|
|
+ }
|
|
|
addpublicLog(id, status, remarks);
|
|
|
}else if (status==0){//审核驳回
|
|
|
str=str.append("驳回,");
|
|
|
@@ -798,6 +819,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
//如果不是本人和审核人员则不返回信息
|
|
|
OutPublicRelease out=publicReleaseMapper.selectDtails(id);
|
|
|
List<PublicExamine> ps = publicExamineMapper.selectByPrid(out.getId());
|
|
|
+ out.setPeList(ps);
|
|
|
if(out!=null){
|
|
|
boolean flag=false;
|
|
|
//自己、审核人员与部门负责人可以查看
|
|
|
@@ -812,6 +834,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
if (!ps.isEmpty()){
|
|
|
for (PublicExamine p : ps) {
|
|
|
if (p.getAid().equals(aid)){
|
|
|
+ if (p.getStatus()==1)out.setMyExamine(1);
|
|
|
+ else out.setMyExamine(0);
|
|
|
flag=false;
|
|
|
break;
|
|
|
}
|
|
|
@@ -822,7 +846,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return out;
|
|
|
}else {
|
|
|
if (out.getPublicType()==1){
|
|
|
- out.setPermission(1);
|
|
|
+ if (aid.equals(out.getAid())){
|
|
|
+ out.setPermission(0);
|
|
|
+ }else {
|
|
|
+ out.setPermission(1);
|
|
|
+ }
|
|
|
}else {
|
|
|
if(aid.equals(out.getAid())) {
|
|
|
out.setPermission(0);
|