|
|
@@ -71,7 +71,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
private SystemWebSocketHandler systemWebSocketHandler;
|
|
|
|
|
|
@Override
|
|
|
- public int addPublicRelease(InputPublicRelease in) {
|
|
|
+ public Map<String, Object> addPublicRelease(InputPublicRelease in) {
|
|
|
Date date =new Date();
|
|
|
in.setCreateTime(date);
|
|
|
in.setStatus(1);
|
|
|
@@ -92,16 +92,21 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
User u=userMapper.selectByPrimaryKey(in.getUid());
|
|
|
String str="["+my.getName()+"]发起["+u.getNickname()+"]的外出申请,请及时审核。";
|
|
|
sendNoticeAndSoucket(a.getId(),NoticeStatus.PUBLIC_RELEASE_START.getCode(),str);
|
|
|
+ Map<String, Object>map=new HashMap<String, Object>();
|
|
|
+ map.put("id", in.getId());
|
|
|
if (openid!=null) {
|
|
|
Integer res= weChatUtils.addNotice(openid, in.getStatus(),date,my.getName(),str);
|
|
|
if (res!=0) {
|
|
|
sendEmail(my, a,1);
|
|
|
}
|
|
|
- return res;
|
|
|
+ map.put("code", res);
|
|
|
+
|
|
|
+
|
|
|
}else {
|
|
|
sendEmail(my, a,1);
|
|
|
- return 2;
|
|
|
+ map.put("code", 2);
|
|
|
}
|
|
|
+ return map;
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -244,7 +249,16 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
|
|
|
@Override
|
|
|
public OutPublicRelease dtails(Integer id) {
|
|
|
- return publicReleaseMapper.selectDtails(id,null);
|
|
|
+ OutPublicRelease out=publicReleaseMapper.selectDtails(id,null);
|
|
|
+ //如果不是本人和审核人员则不返回信息
|
|
|
+ if(out!=null&&!TokenManager.getAdminId().equals( out.getAid())&&!TokenManager.getAdminId().equals(out.getSuprId())) {
|
|
|
+ out=null;
|
|
|
+ }else if(TokenManager.getAdminId().equals(out.getSuprId())) {
|
|
|
+ out.setPermission(1);
|
|
|
+ }else {
|
|
|
+ out.setPermission(0);
|
|
|
+ }
|
|
|
+ return out;
|
|
|
}
|
|
|
|
|
|
@Override
|