|
|
@@ -211,8 +211,10 @@ 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)){
|
|
|
- map.put("aid", TokenManager.getAdminId());
|
|
|
+ if (in.getType()==0||in.getType()==1){
|
|
|
+ map.put("aid",TokenManager.getAdminId());
|
|
|
+ }else {
|
|
|
+ if (!TokenManager.hasRole(AFTConstants.TECH_FINANCE_DIRECTOR))map.put("aid",TokenManager.getAdminId());
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(in.getClockTime())) map.put("clockTime", in.getClockTime());
|
|
|
if(StringUtils.isNotEmpty(in.getReleaseStarts())) map.put("releaseStarts", in.getReleaseStarts());
|
|
|
@@ -220,7 +222,7 @@ 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",in.getAssist());
|
|
|
+ map.put("assist",in.getAssist()==null?0:in.getAssist());
|
|
|
Pagination<OutPublicReleaseList> p=(Pagination<OutPublicReleaseList>) findPage("listPublicRelease", "countPublicRelease", map, in.getPageNo(), in.getPageSize());
|
|
|
return p;
|
|
|
}
|
|
|
@@ -551,14 +553,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
|
|
|
@Override
|
|
|
public Object getMyNewPublic() {
|
|
|
- List<OutPublicReleaseList> myPublic = getMyPublic(0,0);
|
|
|
+ List<OutPublicReleaseList> myPublic = getMyPublic(0,1,1);
|
|
|
if (myPublic.isEmpty()){
|
|
|
- List<OutPublicReleaseList> myPublic2 = getMyPublic(3,0);
|
|
|
+ List<OutPublicReleaseList> myPublic2 = getMyPublic(0,1,0);
|
|
|
if (!myPublic2.isEmpty()){
|
|
|
return myPublic2.get(0);
|
|
|
- }else {
|
|
|
- List<OutPublicReleaseList> myPublic3 = getMyPublic(0,0);
|
|
|
- if(!myPublic3.isEmpty())return myPublic3.get(0);
|
|
|
}
|
|
|
}else {
|
|
|
return myPublic.get(0);
|
|
|
@@ -567,20 +566,25 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
- public List<OutPublicReleaseList>getMyPublic(Integer type,Integer dateType){
|
|
|
- InputPublicReleaseList in=new InputPublicReleaseList();
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @param type 查看类型 0我的公出 1公出审核 2管理员 3协单(技术财税总监看全部)
|
|
|
+ * @param assist 0主协单 1子协单
|
|
|
+ * @param dateType 是否含打卡时间 0否 1是
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<OutPublicReleaseList>getMyPublic(Integer type,Integer assist,Integer dateType){
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
if (type==null)type=0;
|
|
|
- in.setType(type);
|
|
|
+ map.put("type",type);
|
|
|
if (dateType==1){
|
|
|
Date date = new Date();
|
|
|
String clockTime=DateUtils.formatDate(date,AFTConstants.YYYYMMDDHHMMSS);
|
|
|
- in.setClockTime(clockTime);
|
|
|
+ map.put("clockTime",clockTime);
|
|
|
}
|
|
|
- in.setPageNo(1);
|
|
|
- in.setPageSize(1);
|
|
|
- Pagination<OutPublicReleaseList> p= (Pagination<OutPublicReleaseList>) listPublicRelease(in);
|
|
|
- List<OutPublicReleaseList> list = (List<OutPublicReleaseList>) p.getList();
|
|
|
+ if (assist!=null)map.put("assist",assist);
|
|
|
+ map.put("aid",TokenManager.getAdminId());
|
|
|
+ List<OutPublicReleaseList> list = (List<OutPublicReleaseList>) findList("listPublicRelease",map,1,1);
|
|
|
return list;
|
|
|
}
|
|
|
|