Browse Source

营销员驳回与上级驳回修改

anderx 2 years ago
parent
commit
d2edfe88ab

+ 4 - 1
src/main/java/com/goafanti/common/mapper/PublicExamineMapper.xml

@@ -98,7 +98,10 @@
   <update id="updatePrid">
     update public_examine
     set  `status` = #{status,jdbcType=INTEGER}
-    where prid = #{prid,jdbcType=INTEGER} and aid = #{aid,jdbcType=VARCHAR}
+    where prid = #{prid,jdbcType=INTEGER}
+      <if test="aid != null">
+      and aid = #{aid,jdbcType=VARCHAR}
+      </if>
   </update>
 
 

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

@@ -499,7 +499,7 @@
     </if>
       where 1=1
     <if test="type==0">
-      and a.public_type in (0,1,2)
+      and a.public_type in (0,1,2,3)
       <if test="assist ==0">
         and a.assist in(0,1)
       </if>
@@ -582,7 +582,7 @@
     </if>
     where 1=1
     <if test="type==0">
-      and a.public_type in (0,2)
+      and a.public_type in (0,1,2,3)
       <if test="assist ==0">
         and a.assist in(0,1)
       </if>

+ 15 - 2
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -502,7 +502,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		//当前审核人员
 		Admin ad=adminMapper.selectByPrimaryKey(aid);
 		//公出负责人
-		Admin a=adminMapper.selectByPrimaryKey(use.getAid());
+		Admin a;
+		Admin publicAdmin =adminMapper.selectByPrimaryKey(use.getAid());
+		a=publicAdmin;
 		StringBuffer str=new StringBuffer();
 		str=str.append("(").append(ad.getName()).append(")");
 		StringBuffer content=new StringBuffer().append("[").append(use.getUserNames()).append("]公司的外出申请,");
@@ -514,7 +516,14 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				if (use.getAssist()==2){
 					content=content.append("技术协单被[").append(ad.getName()).append("]拒绝!");
 				}else {
-					content=content.append("[").append(use.getUserNames()).append("]公司的外出申请,未通过公出审核!");
+					content=content.append("未通过公出审核!");
+				}
+				if(use.getPublicType()>1){
+					p.setPublicType(1);
+					PublicExamine inpe=new PublicExamine();
+					inpe.setStatus(0);
+					inpe.setPrid(use.getId());
+					publicExamineMapper.updatePrid(inpe);
 				}
 			}else if(status==2){
 				str=str.append("同意,");
@@ -559,10 +568,14 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				}
 				addpublicLog(id, status, str.toString());
 			}else if (status==0){//审核驳回
+				//切换通知人公出负责人
+				a=publicAdmin;
 				str=str.append("不同意公出我的企业,").append(remarks);;
 				content=content.append("未通过审核,请修改后重新发起。");
 				p.setPublicType(3);
 				p.setStatus(0);
+				p.setAuditInfo(str.toString());
+				p.setRejectName(ad.getName());
 				addpublicLog(id, 0, str.toString());
 			}