|
|
@@ -84,6 +84,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
if (u.getAid().equals(TokenManager.getAdminId())){
|
|
|
in.setMainStatus(1);
|
|
|
}
|
|
|
+ in.setAssistAidName(getAssistAidName(in.getAssistAid()));
|
|
|
publicReleaseMapper.insertSelective(in);
|
|
|
AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
|
Admin a=adminMapper.selectByPrimaryKey(my.getReviewer());
|
|
|
@@ -109,11 +110,15 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ private String getAssistAidName(String assistAid) {
|
|
|
+ String [] ss=assistAid.split(",");
|
|
|
+ StringBuffer sb=new StringBuffer();
|
|
|
+ for (String s : ss) {
|
|
|
+ Admin a=adminMapper.selectByPrimaryKey(s);
|
|
|
+ sb=sb.append(a.getName()).append(",");
|
|
|
+ }
|
|
|
+ return sb.deleteCharAt(sb.length() - 1).toString();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
private void sendNoticeAndSoucket(String id,Integer type,String content) {
|
|
|
@@ -162,6 +167,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}else {
|
|
|
log.setStatus(PublicReleaseLog.states.cx.getCode());
|
|
|
}
|
|
|
+ in.setAssistAidName(getAssistAidName(in.getAssistAid()));
|
|
|
publicReleaseLogMapper.insertSelective(log);
|
|
|
return publicReleaseMapper.updateByPrimaryKeySelective(in);
|
|
|
}
|
|
|
@@ -171,9 +177,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
public Pagination<OutPublicReleaseList> listPublicRelease(InputPublicReleaseList in) {
|
|
|
Map<String,Object> map =new HashMap<String, Object>();
|
|
|
map.put("type", in.getType()==null?0:in.getType());
|
|
|
- if (TokenManager.hasRole(AFTConstants.TECH_FINANCE_DIRECTOR)){
|
|
|
-
|
|
|
- }else {
|
|
|
+ if (!TokenManager.hasRole(AFTConstants.TECH_FINANCE_DIRECTOR)){
|
|
|
map.put("aid", TokenManager.getAdminId());
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(in.getClockTime())) map.put("clockTime", in.getClockTime());
|
|
|
@@ -182,15 +186,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
if(StringUtils.isNotEmpty(in.getUserName())) map.put("userName", in.getUserName());
|
|
|
if(in.getStatus()!=null) map.put("status", in.getStatus());
|
|
|
if(in.getClockIn()!=null) map.put("clockIn", in.getClockIn());
|
|
|
- if (in.getAssist()==null){
|
|
|
- map.put("assist",0);
|
|
|
- }else {
|
|
|
- if (in.getType()==3){
|
|
|
- map.put("assist",2);
|
|
|
- }else {
|
|
|
- map.put("assist",in.getAssist());
|
|
|
- }
|
|
|
- }
|
|
|
Pagination<OutPublicReleaseList> p=(Pagination<OutPublicReleaseList>) findPage("listPublicRelease", "countPublicRelease", map, in.getPageNo(), in.getPageSize());
|
|
|
return p;
|
|
|
}
|