Browse Source

客户转交,订单转交修改公出转交审核人

anderx 2 years ago
parent
commit
57685e30ba

+ 7 - 0
src/main/java/com/goafanti/common/dao/PublicExamineMapper.java

@@ -26,4 +26,11 @@ public interface PublicExamineMapper {
     List<PublicExamine> selectByIds(@Param("ids") List<Integer> ids);
 
     void deletePrid(Integer id);
+
+    /**
+     *
+     * @param oldAid 原aid
+     * @param aid
+     */
+    void updateAidByAid(@Param("oldAid")String oldAid, @Param("aid")String aid);
 }

+ 5 - 0
src/main/java/com/goafanti/common/mapper/PublicExamineMapper.xml

@@ -104,6 +104,11 @@
       and aid = #{aid,jdbcType=VARCHAR}
       </if>
   </update>
+  <update id="updateAidByAid">
+    update public_examine a ,(select id,name from admin where id=#{aid})b
+    set a.aid=b.id ,a.aname =b.name
+    where a.aid = #{oldAid}
+  </update>
 
 
   <select id="selectByPrid" parameterType="java.lang.Integer" resultMap="BaseResultMap">

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

@@ -96,6 +96,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	private TOrderMidMapper	tOrderMidMapper;
 	@Resource
 	private TOrderLogMapper	tOrderLogMapper;
+	@Resource
+	private PublicExamineMapper publicExamineMapper;
+
 
 
 
@@ -1284,6 +1287,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			if (AFTConstants.SIGN_USER_TRANSFER_TO_OTHER == operatorType)type = 7;
 
 			addUserTransferLog(uid, aid,oldAid, type, null, now, uList);
+			//转交客户后公出审核人也切换
+			publicExamineMapper.updateAidByAid(oldAid,aid);
 		}
 		if (isUs) {
 			if (AFTConstants.USER_RECEIVE == operatorType) {

+ 10 - 25
src/main/java/com/goafanti/permission/service/impl/NewRoleServiceImpl.java

@@ -1,32 +1,11 @@
 package com.goafanti.permission.service.impl;
 
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import com.goafanti.common.bo.OrderExamineBo;
-import com.goafanti.common.dao.*;
-import com.goafanti.common.model.*;
-import com.goafanti.common.utils.AsyncUtils;
-import com.goafanti.order.bo.NewOrderChangeBo;
-import com.goafanti.order.bo.TOrderTaskBo;
-import com.goafanti.order.enums.ChangeState;
-import com.goafanti.order.enums.NewProjectStatus;
-import com.goafanti.order.enums.OrderChangeProcess;
-import com.goafanti.order.service.OrderChangeService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.goafanti.common.bo.Error;
-import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.*;
 import com.goafanti.common.enums.roleResources;
 import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.*;
+import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -34,6 +13,11 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.permission.bo.RoleBo;
 import com.goafanti.permission.bo.RolePermissionBo;
 import com.goafanti.permission.service.NewRoleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
 @Service
 public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements NewRoleService {
 	@Autowired
@@ -57,7 +41,7 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 	@Autowired
 	private TOrderMidMapper	tOrderMidMapper;
 	@Autowired
-	private OrderExamineMapper	orderExamineMapper;
+	private PublicExamineMapper	publicExamineMapper;
 	@Autowired
 	private UserTransferLogMapper	userTransferLogMapper;
 	@Autowired
@@ -208,6 +192,7 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 				organizationContactBookMapper.updateDimissionTransfer(aid,transferId);
 				//所有客户转交给接受者
 				userMapper.updateDimissionTransfer(aid,transferId);
+				publicExamineMapper.updateAidByAid(aid,transferId);
 			}else if (s==roleResources.QDYW.getCode()) {
 				userTransferLogMapper.insertUserLockLog(aid,transferId,date);
 				patentNewMapper.updateAdmin(aid,transferId);