Przeglądaj źródła

我的列表审核人显示修改

anderx 1 rok temu
rodzic
commit
5368990a27

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

@@ -362,13 +362,14 @@
 
 
     <select id="listPublicRelease" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
-        select  a.id ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.aid,
+        select  a.id ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.aid,a.public_type publicType,
         date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
         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,
-        ea.total_amount expenseAmount ,a.clock_in clockIn
+        ea.total_amount expenseAmount ,a.clock_in clockIn,c2.name reviewerName,a.tech_start_process techStartProcess
         from public_release a  left join admin c on a.aid =c.id
+            left join admin c2 on c.reviewer=c2.id
         left join (select * from expense_account where status in (0,1,2,3)) ea on a.id =ea.prid
         <if test="type==2">
             left join department d on c.department_id =d.id
@@ -379,6 +380,7 @@
         </if>
         <if test="type==5">
             left join t_order_new ton on a.order_no =ton.order_no
+            left join t_order_mid tom on a.order_no=ton.order_no
         </if>
         where 1=1
         <include refid="listPublicReleaseSql"/>

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

@@ -25,13 +25,40 @@ public class OutPublicReleaseList {
 	private String 	assistAidName;
 	private String	mainName;
 	private String rejectName;
+	private String reviewerName;
 	private String assistantAid;
 	private String assistantName;
 	private String userNames;
 	private String adminExamine;
 	private Integer publicAgain;
+	private Integer publicType;
+	private Integer techStartProcess;
 	private BigDecimal expenseAmount;
 
+	public Integer getTechStartProcess() {
+		return techStartProcess;
+	}
+
+	public void setTechStartProcess(Integer techStartProcess) {
+		this.techStartProcess = techStartProcess;
+	}
+
+	public Integer getPublicType() {
+		return publicType;
+	}
+
+	public void setPublicType(Integer publicType) {
+		this.publicType = publicType;
+	}
+
+	public String getReviewerName() {
+		return reviewerName;
+	}
+
+	public void setReviewerName(String reviewerName) {
+		this.reviewerName = reviewerName;
+	}
+
 	public BigDecimal getExpenseAmount() {
 		return expenseAmount;
 	}

+ 2 - 2
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -184,8 +184,8 @@ public class AdminReleaseApiController extends CertifyApiController{
 	 * 公出审核、外出审核 营销
 	 * @return
 	 */
-	@RequestMapping(value = "/MarketersExamine", method = RequestMethod.POST)
-	public Result MarketersExamine(Integer id ,Integer status,String remarks){
+	@RequestMapping(value = "/marketersExamine", method = RequestMethod.POST)
+	public Result marketersExamine(Integer id ,Integer status,String remarks){
 		Result res =new Result();
 		if (id==null) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));

+ 9 - 4
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -556,7 +556,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		Map<String,Object> map =new HashMap<String, Object>();
 		map.put("type", in.getType()==null?0:in.getType());
 		//先修改他人公出做测试
- 		if(in.getType()==4)map.put("type", 5);
+// 		if(in.getType()==4)map.put("type", 5);
 		if (in.getType()==3) {
 			in.setAssist(2);
 			if (!TokenManager.hasRole(AFTConstants.TECH_FINANCE_DIRECTOR))map.put("aid",TokenManager.getAdminId());
@@ -586,6 +586,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			list.forEach(e ->{ ids.add(e.getId()); });
 			List<PublicExamine> publicExamines = publicExamineMapper.selectByIds(ids);
 			for (OutPublicReleaseList e : list) {
+				if (e.getStatus()==1&&
+						((e.getPublicType()==0||e.getPublicType()==2)||(e.getTechStartProcess()==0||e.getTechStartProcess()==2))
+				){
+					e.setAdminExamine(e.getReviewerName()+" 未审核");
+				}
 				if (!publicExamines.isEmpty()){
 					StringBuffer str =new StringBuffer();
 					for (PublicExamine pe : publicExamines) {
@@ -725,7 +730,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					}
 				}
 				if (x==publicExamines.size()){
-					p.setPublicType(2);
+					p.setTechStartProcess(2);
 					flag=true;
 				}
 				addpublicLog(id, status, str.toString());
@@ -735,7 +740,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				a=publicAdmin;
 				str=str.append("不同意公出我的企业,").append(remarks);;
 				content=content.append("未通过审核,请修改后重新发起。");
-				p.setPublicType(3);
+				p.setTechStartProcess(3);
 				p.setStatus(0);
 				p.setAuditInfo(str.toString());
 				p.setRejectName(ad.getName());
@@ -746,7 +751,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		if (flag){
 			sendNoticeAndSoucket(a.getId(),status,content.toString());
 		}
-		if (p.getStatus()!=null||p.getPublicType()!=null){
+		if (p.getStatus()!=null||p.getPublicType()!=null||p.getTechStartProcess()!=null){
 			publicReleaseMapper.updateByPrimaryKeySelective(p);
 			updateAdminUserCountPublicRelease(use.getAid(),use.getReleaseStart());
 		}