Browse Source

Merge branch 'test' of jishutao/kede-server into prod

anderx 3 years ago
parent
commit
6008e31014

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

@@ -555,7 +555,9 @@ a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_na
 	<if test="clockIn !=null">
 	and a.clock_in = #{clockIn}
 	</if>
-	ORDER BY (case when a.status=1 then 1 else 2 end),a.status ,a.create_time desc
+    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.status ,a.create_time desc
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>

+ 0 - 3
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -390,9 +390,7 @@
 		select
 		count(0)
 		from(select a.id from `user` a
-		<if test="name != null">
 		left join user_names un on a.id=un.uid
-		</if>
 		left join organization_identity b on a.id = b.uid
 		<if test="departmentId != null and departmentId !=''">
 		INNER join (select id
@@ -410,7 +408,6 @@
 				#{name}
 			</foreach>
 			</if>
-
 		</if>
 	<if test="role == 1 and name != null">
 		and un.name like concat('%', #{name},'%')

+ 1 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -501,7 +501,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				organizationSalesTargetMapper.insertSelective(obs);
 			}
 		}
-		organizationIdentityMapper.updateByPrimaryKey(oi);
+		organizationIdentityMapper.updateByPrimaryKeySelective(oi);
 		userMapper.updateByPrimaryKeySelective(user);
 		return 1;
 	}

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

@@ -260,6 +260,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		}
 		str=str.append(remarks);
 		p.setAuditInfo(str.toString());
+		p.setRejectName(ad.getName());
 		publicReleaseMapper.updateByPrimaryKeySelective(p);
 		addpublicLog(id, status, remarks);
 		AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
@@ -301,6 +302,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 	@Override
 	public int pushTechReject(Integer id,  String remarks) {
+		Integer status=0;
 		PublicRelease use=publicReleaseMapper.selectByPrimaryKey(id);
 		PublicRelease mainPublic= publicReleaseMapper.selectByPrimaryKey(use.getMainId());
 		Admin ad=adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
@@ -312,16 +314,18 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		str=str.append("拒绝技术协单,").append(remarks);
 		PublicRelease newMain=new PublicRelease();
 		newMain.setId(mainPublic.getId());
-		newMain.setStatus(0);
+		newMain.setStatus(4);
 		newMain.setRejectName(ad.getName());
 		newMain.setAuditInfo(str.toString());
+		addpublicLog(mainPublic.getId(), status, remarks);
 		publicReleaseMapper.updateByPrimaryKeySelective(newMain);
 		PublicRelease up=new PublicRelease();
 		up.setId(id);
 		up.setAuditInfo(str.toString());
 		up.setStatus(3);
+		addpublicLog(id, status, remarks);
 		publicReleaseMapper.updateByPrimaryKeySelective(up);
-		return addPublicLogPlus(mainPublic.getId(), mainPublic.getAid(), str.toString(), 0);
+		return addNoticeAndWeChat(mainPublic.getId(), mainPublic.getAid(), str.toString(), status);
 	}
 
 	/**
@@ -332,8 +336,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	 * @param status 0驳回
 	 * @return
 	 */
-	private Integer addPublicLogPlus(Integer id,String aid, String remarks,  Integer status) {
-		addpublicLog(id, status, remarks);
+	private Integer addNoticeAndWeChat(Integer id,String aid, String remarks,  Integer status) {
 		Integer noticeType=0;
 		if (status ==0)noticeType=NoticeStatus.PUBLIC_RELEASE_NO.getCode();
 		sendNoticeAndSoucket(aid,noticeType, remarks);
@@ -512,10 +515,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				TokenManager.hasRole(AFTConstants.CED)|| TokenManager.hasRole(AFTConstants.CED_ASSISTANT)){
 			if(in.getDepId()!=null)map.put("depId", in.getDepId());
 		}else if (TokenManager.hasRole(AFTConstants.COMPANY_MANAGER)||TokenManager.hasRole(AFTConstants.PERSONNEL_AUDITOR)){
-
-
 		}
-
 		if(in.getClockStart()!=null)map.put("clockStart", in.getClockStart());
 		if(in.getClockEnd()!=null)map.put("clockEnd", in.getClockEnd()+" 23:59:59");
 		if(in.getCreateStart()!=null)map.put("createStart", in.getCreateStart());