Bladeren bron

公出列表,修改我的公出和他人公出审核列表

anderx 2 jaren geleden
bovenliggende
commit
2e9d43a6f0

+ 4 - 3
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -478,12 +478,13 @@
     a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_name mainName,a.reject_name rejectName,
     a.assistant_aid assistantAid ,a.assistant_name assistantName,a.public_again publicAgain,a.user_names userNames
     from public_release a  left join admin c on a.aid =c.id
-
     <if test="type==2">
       left join department d on c.department_id =d.id
     </if>
     <if test="type==4">
-      left join public_release_details b on a.id=b.prid left join user e on b.uid=e.id
+        /*审核列表由4来判断*/
+      left join public_release_details b on a.id=b.prid
+      left join user e on b.uid=e.id
     </if>
       where 1=1
     <if test="type==0">
@@ -546,7 +547,7 @@
     <if test="type==2 or type==4">
       ORDER BY a.create_time desc
     </if>
-    <if test="type==0 and type==1 and type==3">
+    <if test="type==0 or type==1 or type==3">
       ORDER BY (case when a.status=1 then 1 when a.status=2 then 2 when a.status=3 then 5
       when a.status=0 then 3 when a.status=4 then 4
       else 0 end),a.create_time desc

+ 16 - 13
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -465,24 +465,27 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 	private void pushExamines(Pagination<OutPublicReleaseList> p) {
 		List<OutPublicReleaseList> list = (List<OutPublicReleaseList>) p.getList();
-		List<Integer> ids=new ArrayList<>();
-		list.forEach(e ->{ ids.add(e.getId()); });
-		List<PublicExamine> publicExamines = publicExamineMapper.selectByIds(ids);
-		for (OutPublicReleaseList e : list) {
-			if (!publicExamines.isEmpty()){
-				StringBuffer str =new StringBuffer();
-				for (PublicExamine pe : publicExamines) {
-					if (e.getId().equals(pe.getPrid())){
-						str=str.append(pe.getAname());
-						if (pe.getStatus()==0)str=str.append(" 未审核,");
-						if (pe.getStatus()==1)str=str.append(" 已审核,");
+		if (!list.isEmpty()){
+			List<Integer> ids=new ArrayList<>();
+			list.forEach(e ->{ ids.add(e.getId()); });
+			List<PublicExamine> publicExamines = publicExamineMapper.selectByIds(ids);
+			for (OutPublicReleaseList e : list) {
+				if (!publicExamines.isEmpty()){
+					StringBuffer str =new StringBuffer();
+					for (PublicExamine pe : publicExamines) {
+						if (e.getId().equals(pe.getPrid())){
+							str=str.append(pe.getAname());
+							if (pe.getStatus()==0)str=str.append(" 未审核,");
+							if (pe.getStatus()==1)str=str.append(" 已审核,");
+						}
+						if (str.length()>1) e.setAdminExamine(str.substring(0,str.length()-1));
 					}
-					if (str.length()>1) e.setAdminExamine(str.substring(0,str.length()-1));
-				}
 
+				}
 			}
 		}
 
+
 	}
 
 	@Override