Преглед на файлове

我的公出未审核显示修改

anderx преди 1 година
родител
ревизия
254e05cc23

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

@@ -661,7 +661,7 @@
         date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_status updateStatus,a.district_name districtName,
         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,
-        a.clock_in clockIn,
+        a.clock_in clockIn,a.assist_process assistProcess,
         a.tech_start_process techStartProcess
         from public_release a  left join admin c on a.aid =c.id
         left join expense_account ea ON a.id = ea.prid AND ea.status IN (0, 1, 2, 3)
@@ -717,8 +717,14 @@
             and a.public_type in (0,2)
             and a.assist in(0,1)
             and a.tech_start_process in (0,2)
-            and a.assist_process in (0,1)
+            and a.assist_process in (0,1,2,3,4)
             and apr.reviewer_id = #{aid} and apr.type=0
+            <if test="status == 1">
+                and a.status = #{status} and  a.assist_process in (0,1)
+            </if>
+            <if test="status == 2">
+                and a.status = #{status} and  a.assist_process in (2,3,4)
+            </if>
         </if>
         <if test="type==2">
             and a.public_type in (0,2)
@@ -764,7 +770,7 @@
         <if test="userName !=null">
             and e.nickname like concat('%',#{userName},'%')
         </if>
-        <if test="type!=4 and type !=5">
+        <if test="type!=4 and type !=5 and type != 1">
             <if test="status !=null ">
                 and a.status = #{status}
             </if>
@@ -1125,6 +1131,7 @@
           and a.assist in(0,1)
           and a.tech_start_process in (0,2)
           and a.status =1
+          and a.assist_process in (0,1)
           and c.reviewer = #{aid}
     </select>
     <select id="selectCountByOtherUnaudited" resultType="java.lang.Integer">

+ 9 - 0
src/main/java/com/goafanti/weChat/bo/OutPublicReleaseList.java

@@ -38,10 +38,19 @@ public class OutPublicReleaseList {
 
 
 	private Integer publicAssistAdvice;
+	private Integer assistProcess;
 
 
 	private List<OutPublicReleaseDetails> prdList;
 
+	public Integer getAssistProcess() {
+		return assistProcess;
+	}
+
+	public void setAssistProcess(Integer assistProcess) {
+		this.assistProcess = assistProcess;
+	}
+
 	public Integer getPublicAssistAdvice() {
 		return publicAssistAdvice;
 	}

+ 40 - 8
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -732,14 +732,30 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 						if(str.length()>1)e.setAdminExamine(str.substring(0,str.length()-1)+" 未审核");
 					}else {
 						if (((e.getPublicType()==0||e.getPublicType()==2)
-								&&(e.getTechStartProcess()==0||e.getTechStartProcess()==2))){
+								&&(e.getTechStartProcess()==0||e.getTechStartProcess()==2))
+								&&(e.getAssistProcess()==0||e.getAssistProcess()==1)
+						){
 							StringBuffer str =new StringBuffer();
 							adminPublicReviewerBos= adminPublicReviewerMapper.selectByAid(e.getAid());
 							for (AdminPublicReviewerBo ap : adminPublicReviewerBos) {
 								if(ap.getType()==0)str=str.append(ap.getReviewerName()+",");
 							}
 							e.setAdminExamine(str.substring(0,str.length()-1)+" 未审核");
-						}else {
+						}else if (e.getType()==0&&e.getAssistProcess()==2){
+							//获取技术协单
+							List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(e.getId(), null, null);
+							StringBuffer str =new StringBuffer();
+							for (PublicRelease e2 : publicReleases) {
+								if (e2.getStatus()==1){
+									adminPublicReviewerBos= adminPublicReviewerMapper.selectByAid(e2.getAid());
+									List<AdminPublicReviewerBo> collect = adminPublicReviewerBos.stream().filter(e1 -> e1.getType() == 1).collect(Collectors.toList());
+									for (AdminPublicReviewerBo e1 : collect) {
+										str.append(e1.getReviewerName()+",");
+									}
+								}
+							}
+							e.setAdminExamine(str.substring(0,str.length()-1)+" 未审核");
+						} else {
 							String s = publicReleaseDetailsMapper.selectUserAdminByPrid(e.getId());
 							e.setAdminExamine(s+" 未审核");
 						}
@@ -1528,11 +1544,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			}
 			if (out.getType()==0||out.getType()==1||out.getType()==2){
 				if (adminPublicReviewerBos==null)adminPublicReviewerBos = adminPublicReviewerMapper.selectByAid(out.getAid());
-				List<AdminPublicReviewerBo> collect = adminPublicReviewerBos.stream().filter(e -> e.getType() == 0).collect(Collectors.toList());
-				for (AdminPublicReviewerBo e : collect) {
-					if (e.getReviewerId().equals(aid)){
-						flag=false;
-						break;
+				if (out.getAssistProcess()==0||out.getAssistProcess()==1){
+					List<AdminPublicReviewerBo> collect = adminPublicReviewerBos.stream().filter(e -> e.getType() == 0).collect(Collectors.toList());
+					for (AdminPublicReviewerBo e : collect) {
+						if (e.getReviewerId().equals(aid)){
+							flag=false;
+							break;
+						}
 					}
 				}
 			}else if(out.getType()==3){
@@ -1589,12 +1607,26 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				for (AdminPublicReviewerBo e : collect) {
 					str.append(e.getReviewerName()+",");
 				}
-			}else {
+			}else if (out.getType()==0&&out.getAssistProcess()==2){
+				//获取技术协单
+				List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(out.getId(), null, null);
+				for (PublicRelease e : publicReleases) {
+					if (e.getStatus()==1){
+						adminPublicReviewerBos = adminPublicReviewerMapper.selectByAid(e.getAid());
+						List<AdminPublicReviewerBo> collect = adminPublicReviewerBos.stream().filter(e1 -> e1.getType() == 1).collect(Collectors.toList());
+						for (AdminPublicReviewerBo e1 : collect) {
+							str.append(e1.getReviewerName()+",");
+						}
+					}
+				}
+			} else {
 				List<AdminPublicReviewerBo> collect = adminPublicReviewerBos.stream().filter(e -> e.getType() == 0).collect(Collectors.toList());
 				for (AdminPublicReviewerBo e : collect) {
 					str.append(e.getReviewerName()+",");
 				}
 			}
+
+
 			if(str.length()>1)out.setAdminExamine(str.substring(0,str.length()-1)+" 未审核");
 		}else if (out.getStatus()==0) {
 			out.setAdminExamine("");