Browse Source

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

anderx 3 years ago
parent
commit
3db2a18afc

+ 11 - 2
src/main/java/com/goafanti/common/dao/OrderExamineMapper.java

@@ -106,5 +106,14 @@ public interface OrderExamineMapper {
 
 	void updateByOrderNo(@Param("orderNo") String orderNo,@Param("status")Integer status);
 
-	void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId);
-}
+	void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId, @Param("type")Integer type);
+
+    /**
+     * 删除变更更审核人
+     * @param aid
+     * @param type 0咨询师 1经理
+     */
+    void deleteByAidAndStatus(@Param("aid")String aid,  @Param("type")Integer type);
+
+
+}

+ 8 - 7
src/main/java/com/goafanti/common/dao/TChangeTaskMapper.java

@@ -78,25 +78,26 @@ public interface TChangeTaskMapper {
 	void insertSelectiveList(@Param("list")List<TChangeTask> list);
 
 	List<TChangeTaskOut> selectByCid(@Param("id")Integer id, @Param("splitStatus")Integer splitStatus);
-	
+
 	/**
-	 * 
+	 *
 	 * @param tid �更项目id
 	 * @param sid �更拆分父项目id
 	 * @param type 处�类型
-	 * @param i 
 	 * @return
 	 */
 	int updateByTid(@Param("tid")Integer tid,@Param("sid")Integer sid,@Param("cid")Integer cid,@Param("type")Integer type);
-	
+
 	int deleteByTid(Integer tid);
 
 	/**
-	 *   获��更�项�??
+	 *   获��更�项�???
 	 * @param splitSuper
-	 * @param cid 
+	 * @param cid
 	 * @return
 	 */
 	List<TChangeTask> selectBySuper(@Param("splitSuper")Integer splitSuper, @Param("cid")Integer cid);
 
-}
+
+	TChangeTask selectBytid(Integer id);
+}

+ 2 - 0
src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java

@@ -2,6 +2,7 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.bo.OrderOperator;
 import com.goafanti.common.bo.UserOrderTask;
+import com.goafanti.common.model.TChangeTask;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.order.bo.*;
 import com.goafanti.organization.bo.ProjectTypePuls;
@@ -66,4 +67,5 @@ public interface TOrderTaskMapper {
                                                    @Param("sort") Integer sort, @Param("startDate") String startDate, @Param("endDate") String endDate);
 
 
+    List<TChangeTask> selectByAid(String aid);
 }

+ 14 - 6
src/main/java/com/goafanti/common/mapper/OrderExamineMapper.xml

@@ -115,7 +115,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Thu Sep 26 16:21:54 CST 2019.
     -->
-    select 
+    select
     <include refid="Base_Column_List" />
     from order_examine
     where id = #{id,jdbcType=INTEGER}
@@ -140,16 +140,17 @@
       <include refid="Example_Where_Clause" />
     </if>
   </delete>
+
   <insert id="insert" parameterType="com.goafanti.common.model.OrderExamine">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Thu Sep 26 16:21:54 CST 2019.
     -->
-    insert into order_examine (id, order_no, type, 
+    insert into order_examine (id, order_no, type,
       aid, status, create_time
       )
-    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
       #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
       )
   </insert>
@@ -312,7 +313,7 @@
   and `type`= #{type}
   </if>
   </select>
-  
+
   <select id="selectByOrderNo" resultType="com.goafanti.common.bo.OrderExamineBo">
     		select a.id,b.name,a.type,a.status
     from order_examine a left join admin b on a.aid=b.id
@@ -324,7 +325,7 @@
   </select>
   <update id="updateByOrderNo">
   update order_examine set status=0
-    where order_no=#{orderNo} 
+    where order_no=#{orderNo}
     <if test="status != null">
     and status=#{status}
     </if>
@@ -332,5 +333,12 @@
    <update id="updateDimissionTransfer">
   update order_examine set aid= #{transferId}
 	where status=0 and aid= #{aid}
+    <if test="type!=null">
+      and type= #{type}
+    </if>
   </update>
-</mapper>
+  <delete id="deleteByAidAndStatus">
+    delete  from order_examine
+    where status=0 and  aid=#{aid} and type=#{type}
+  </delete>
+</mapper>

+ 36 - 27
src/main/java/com/goafanti/common/mapper/TChangeTaskMapper.xml

@@ -99,8 +99,8 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri Oct 16 15:54:00 CST 2020.
     -->
-    id, tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity, commodity_price, 
-    task_comment, type, create_time, split_status, split_super, receiver_name, official_cost, 
+    id, tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity, commodity_price,
+    task_comment, type, create_time, split_status, split_super, receiver_name, official_cost,
     cost_reduction
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.TChangeTaskExample" resultMap="BaseResultMap">
@@ -128,7 +128,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri Oct 16 15:54:00 CST 2020.
     -->
-    select 
+    select
     <include refid="Base_Column_List" />
     from t_change_task
     where id = #{id,jdbcType=INTEGER}
@@ -159,17 +159,17 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri Oct 16 15:54:00 CST 2020.
     -->
-    insert into t_change_task (id, tid, cid, 
-      order_no, main, commodity_id, 
-      commodity_name, commodity_quantity, commodity_price, 
-      task_comment, type, create_time, 
-      split_status, split_super, receiver_name, 
+    insert into t_change_task (id, tid, cid,
+      order_no, main, commodity_id,
+      commodity_name, commodity_quantity, commodity_price,
+      task_comment, type, create_time,
+      split_status, split_super, receiver_name,
       official_cost, cost_reduction)
-    values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER}, 
-      #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{commodityId,jdbcType=VARCHAR}, 
-      #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL}, 
-      #{taskComment,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{splitStatus,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{receiverName,jdbcType=VARCHAR}, 
+    values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER},
+      #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{commodityId,jdbcType=VARCHAR},
+      #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL},
+      #{taskComment,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
+      #{splitStatus,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{receiverName,jdbcType=VARCHAR},
       #{officialCost,jdbcType=INTEGER}, #{costReduction,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TChangeTask">
@@ -473,17 +473,17 @@
       cost_reduction = #{costReduction,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
-  
+
   <insert id="insertSelectiveList" parameterType="java.util.List">
     insert into t_change_task ( tid, cid, split_status,
-      order_no, commodity_id, commodity_name, 
-      commodity_quantity, commodity_price, task_comment, 
+      order_no, commodity_id, commodity_name,
+      commodity_quantity, commodity_price, task_comment,
         split_super , receiver_name, create_time)
-    values 
+    values
     <foreach collection="list" index="index" item="item" separator=",">
       ( #{item.tid,jdbcType=INTEGER}, #{item.cid,jdbcType=INTEGER}, #{item.splitStatus,jdbcType=INTEGER},
-      #{item.orderNo,jdbcType=VARCHAR}, #{item.commodityId,jdbcType=VARCHAR}, #{item.commodityName,jdbcType=VARCHAR}, 
-      #{item.commodityQuantity,jdbcType=INTEGER}, #{item.commodityPrice,jdbcType=DECIMAL}, #{item.taskComment,jdbcType=VARCHAR}, 
+      #{item.orderNo,jdbcType=VARCHAR}, #{item.commodityId,jdbcType=VARCHAR}, #{item.commodityName,jdbcType=VARCHAR},
+      #{item.commodityQuantity,jdbcType=INTEGER}, #{item.commodityPrice,jdbcType=DECIMAL}, #{item.taskComment,jdbcType=VARCHAR},
        #{item.splitSuper,jdbcType=INTEGER}, #{item.receiverName,jdbcType=VARCHAR}, now())
     </foreach>
   </insert>
@@ -493,7 +493,7 @@
 	a.receiver_name receiverName, a.task_comment as taskComment ,a.commodity_price as commodityPrice,a.split_status splitStatus,
 	a.split_super splitSuper
     from t_change_task a left join business_project i on a.commodity_id=i.id
-  	left join business_category c on i.cid=c.id 
+  	left join business_category c on i.cid=c.id
   	where 1=1
   	<if test="splitStatus !=null and splitStatus !=3">
   	and a.split_status= #{splitStatus}
@@ -504,8 +504,8 @@
   	 and a.cid= #{id} order by a.id
   </select>
     <update id="updateByTid">
-  		update t_change_task set type= #{type} 
-  		where 1=1 
+  		update t_change_task set type= #{type}
+  		where 1=1
   		<if test="tid !=null">
   		and tid= #{tid}
   		</if>
@@ -516,19 +516,28 @@
   		and split_super= #{sid}
   		</if>
   </update>
-  
+
    <update id="deleteByTid">
   		delete from t_change_task where tid= #{tid};
   </update>
-  
-  
+
+
 
     <select id="selectBySuper" resultType="com.goafanti.order.bo.TChangeTaskOut">
 	select a.id,a.order_no as orderNo,a.main, c.cname,c.sort cSort,a.commodity_name as commodityName,
   	a.commodity_quantity as commodityQuantity,i.price,a.commodity_id as commodityId,a.type,a.tid,a.receiver_name receiverName,
 	a.task_comment as taskComment ,a.commodity_price as commodityPrice,a.split_status splitStatus,a.split_super splitSuper
     from t_change_task a left join business_project i on a.commodity_id=i.id
-  	left join business_category c on i.cid=c.id 
+  	left join business_category c on i.cid=c.id
   	where a.split_status=2 and a.split_super= #{splitSuper} and a.cid= #{cid} order by a.id
   </select>
-</mapper>
+
+
+
+<select id="selectBytid" resultType="com.goafanti.common.model.TChangeTask">
+    select tct.id,tct.tid,tct.cid,tct.order_no orderNo
+    from t_change_task tct left join new_order_change noc on tct.cid =noc.id
+    where noc.process_state &lt; 4 and noc.status in (0,1,2)
+      and tct.tid= #{tid}
+  </select>
+</mapper>

+ 13 - 0
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -1138,6 +1138,12 @@
     <if test="type==1">
       ,manager_id=#{transferId,jdbcType=VARCHAR}
     </if>
+    <if test="type==3">
+      ,consultant_id= null
+    </if>
+    <if test="type==1">
+      ,manager_id= null
+    </if>
     where task_receiver=#{aid,jdbcType=VARCHAR}
   </update>
 
@@ -1870,6 +1876,13 @@
         and a.process_status = #{status}
       </if>
   </select>
+  <select id="selectByAid" resultType="com.goafanti.common.model.TChangeTask">
+    select b.id,b.cid from t_order_task a
+    left join t_change_task b on a.id=b.tid
+    left join new_order_change noc on b.cid =noc.id
+    where b.id is not null and  noc.process_state &lt; 4 and noc.status in (0,1,2)
+    and a.task_receiver = #{aid}
+  </select>
 
 
 </mapper>

+ 14 - 0
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -2,14 +2,20 @@ package com.goafanti.common.utils;
 
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 import javax.mail.MessagingException;
 
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.common.dao.AdminMapper;
+import com.goafanti.common.dao.NewOrderChangeMapper;
+import com.goafanti.common.dao.TChangeTaskMapper;
 import com.goafanti.common.enums.NoticeStatus;
+import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.TChangeTask;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.order.bo.NewOrderChangeBo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
@@ -26,6 +32,10 @@ public class AsyncUtils {
 	private NoticeMapper noticeMapper;
 	@Autowired
 	private AdminMapper adminMapper;
+	@Autowired
+	private TChangeTaskMapper tChangeTaskMapper;
+	@Autowired
+	private NewOrderChangeMapper newOrderChangeMapper;
 
 
 
@@ -89,4 +99,8 @@ public class AsyncUtils {
 		noticeMapper.batchUpdateUnreaded(dl);
     }
 
+
+
+
+
 }

+ 2 - 3
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -16,9 +16,8 @@ public interface OrderProjectService {
 
 	/**
 	 *
-	 * @param taskId
-	 * @param taskReceiverId
-	 * @param remarks
+	 * @param taskId 项目ID
+	 * @param taskReceiverId 受理人ID
 	 * @param type 0管理员派单 1经理转交 2经理派单 3咨询师转交 4回退
 	 * @return
 	 */

+ 1 - 0
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -147,6 +147,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			t.setConsultantId(taskReceiverId);
 		}else if(type==4) {
 			t.setConsultantId(null);
+			t.setManagerId(taskReceiverId);
 		}
 		t.setReceiverName(a.getName());
 		tOrderTaskMapper.updateByPrimaryKey(t);

+ 4 - 5
src/main/java/com/goafanti/permission/controller/NewRoleApiController.java

@@ -28,7 +28,7 @@ public class NewRoleApiController extends BaseApiController{
 	private NewRoleService newRoleService;
 	@Autowired
 	RoleMapper				roleMapper;
-	
+
 	@RequestMapping(value = "/roles", method = RequestMethod.POST)
 	public Result roles(RoleBo role, Integer pageNo,
 			Integer pageSize) {
@@ -36,7 +36,7 @@ public class NewRoleApiController extends BaseApiController{
 		res.setData(newRoleService.findRoles(role,pageNo,pageSize));
 		return res;
 	}
-	
+
 	@RequestMapping(value = "/role/rolePermission", method = RequestMethod.POST)
 	public Result rolePermission(String id){
 		Result res = new Result();
@@ -80,7 +80,7 @@ public class NewRoleApiController extends BaseApiController{
 	public Result deleteRole(String data) {
 		Result res = new Result();
 		JSONArray ja = (JSONArray) JSON.parse(data);
-		
+
 		if (ja != null && !ja.isEmpty()) {
 			List<String> records = new ArrayList<>();
 			for (int idx = 0; idx < ja.size(); idx++) {
@@ -145,14 +145,13 @@ public class NewRoleApiController extends BaseApiController{
 			res.getError().add(buildError("","角色资源不能为空"));
 			return res;
 		}
-		
+
 		res.setData(newRoleService.addResources(rid, resources));
 		return res;
 	}
 	/**
 	 * 角色资源详情
 	 * @param rid 角色ID
-	 * @param resources 资源
 	 * @return
 	 */
 	@RequestMapping(value = "/role/ResourcesDetail", method = RequestMethod.POST)

+ 94 - 37
src/main/java/com/goafanti/permission/service/impl/NewRoleServiceImpl.java

@@ -10,35 +10,18 @@ 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.order.bo.NewOrderChangeBo;
+import com.goafanti.order.bo.TOrderTaskBo;
 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.AdminMapper;
-import com.goafanti.common.dao.OrderExamineMapper;
-import com.goafanti.common.dao.OrganizationContactBookMapper;
-import com.goafanti.common.dao.PatentNewMapper;
-import com.goafanti.common.dao.RoleMapper;
-import com.goafanti.common.dao.RolePermissionMapper;
-import com.goafanti.common.dao.RoleResourcesMapper;
-import com.goafanti.common.dao.TOrderLogMapper;
-import com.goafanti.common.dao.TOrderMidMapper;
-import com.goafanti.common.dao.TOrderNewMapper;
-import com.goafanti.common.dao.TOrderTaskMapper;
-import com.goafanti.common.dao.TTaskLogMapper;
-import com.goafanti.common.dao.TaskAttributionLogMapper;
-import com.goafanti.common.dao.UserBusinessMapper;
-import com.goafanti.common.dao.UserMapper;
-import com.goafanti.common.dao.UserRoleMapper;
-import com.goafanti.common.dao.UserTransferLogMapper;
 import com.goafanti.common.enums.roleResources;
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.Role;
-import com.goafanti.common.model.RolePermission;
-import com.goafanti.common.model.RoleResources;
-import com.goafanti.common.model.UserRole;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -82,6 +65,13 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 	private TaskAttributionLogMapper	taskAttributionLogMapper;
 	@Autowired
 	private TOrderLogMapper	tOrderLogMapper;
+	@Autowired
+	private TChangeTaskMapper tChangeTaskMapper;
+	@Autowired
+	private NewOrderChangeMapper newOrderChangeMapper;
+
+	@Autowired
+	private OrderChangeLogMapper	orderChangeLogMapper;
 
 
 	@Override
@@ -212,6 +202,8 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 			throw new BusinessException(new Error("","用户角色资源不存在"));
 		}
 		Date date=new Date();
+		Admin admin=adminMapper.selectAllByid(aid);
+		Admin tadmin=adminMapper.selectAllByid(transferId);
 		for (Integer s : list) {
 			if (s==roleResources.YXKH.getCode()) {
 				userTransferLogMapper.insertUserLog(aid,transferId,date);
@@ -227,28 +219,17 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 				roleResourcesMapper.updateLockRelease("1",aid,transferId);//将业务锁转给指定人
 			}
 			if (s == roleResources.YQDD.getCode()) {
-				Admin ad=adminMapper.selectAllByid(aid);
-				Admin ad2=adminMapper.selectAllByid(transferId);
+
 				StringBuffer str=new StringBuffer();
-				str.append(ad.getName()).append("离职转交到").append(ad2.getName());
+				str.append(admin.getName()).append("离职转交到").append(tadmin.getName());
 				tOrderLogMapper.insertOrderLog(aid,TokenManager.getAdminId(),date,str.toString());
 				tOrderNewMapper.updateSalesmanId(aid, transferId);
 				tOrderMidMapper.updateSalesmanId(aid, transferId);
 			}
 			if (s == roleResources.XMRW.getCode()) {
 				// 获取被转角色判断修改对应任务角色
-				int type=0;
-				List<String>  l=adminMapper.getAdminRoleListByAid(transferId);
-				for (String str : l) {
-					if (str.equals(AFTConstants.TECH_MANAGER)) {
-						type=1;
-						break;
-					}
-				}
-				taskAttributionLogMapper.insertList(aid, transferId, date);
-				tOrderTaskMapper.updateDimissionTransfer(aid, transferId, type);
-				tTaskLogMapper.updateDimissionTransfer(aid, transferId);
-				orderExamineMapper.updateDimissionTransfer(aid, transferId);
+				pushTechTransfer(aid,transferId,date,admin,tadmin);
+
 			}
 			if (s!=roleResources.QDYW.getCode()) {
 				roleResourcesMapper.updateDimissionTransfer(s,aid,transferId);
@@ -256,6 +237,82 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 		}
 		return 1;
 	}
+
+	public  void pushTechTransfer(String aid, String transferId,Date date,Admin admin,Admin tadmin) {
+		//获取旧人员与新人员的角色
+		int useType=getTech(aid);
+		int newType=getTech(transferId);
+		//如果不是咨询或者经理不走项目转交
+		if(useType!=-1&&newType!=-1){
+			//获取所有需要修改角色的变更项目
+			List<TChangeTask> list = tOrderTaskMapper.selectByAid(aid);
+			if ((useType==0&&newType==0)||(useType==1&&newType==1)){
+				tOrderTaskMapper.updateDimissionTransfer(aid, transferId, useType);
+				orderExamineMapper.updateDimissionTransfer(aid, transferId,useType);
+			}else if (useType==0&&newType==1){//下转上 下清空
+				tOrderTaskMapper.updateDimissionTransfer(aid, transferId, 3);
+				orderExamineMapper.updateDimissionTransfer(aid, transferId,newType);
+				orderExamineMapper.deleteByAidAndStatus(aid,useType);
+			}else if (useType==1&&newType==0){//上转下  上清空
+				tOrderTaskMapper.updateDimissionTransfer(aid, transferId, 4);
+				orderExamineMapper.updateDimissionTransfer(aid, transferId,newType);
+				orderExamineMapper.deleteByAidAndStatus(aid,useType);
+			}
+			List<Integer> clist=new ArrayList<>();
+			for (TChangeTask tct : list) {
+				TChangeTask nt = new TChangeTask();
+				tct.setId(tct.getId());
+				tct.setReceiverName(tadmin.getName());
+				tChangeTaskMapper.updateByPrimaryKeySelective(tct);
+				if (!clist.contains(tct.getCid()))clist.add(tct.getCid());
+			}
+			for (Integer i : clist) {
+				NewOrderChangeBo changeBo = newOrderChangeMapper.selectById(i);
+				int x=1;
+				if (changeBo.getProcessState()==2){
+					x=orderExamineMapper.checkCountStatus(changeBo.getOrderNo(), 0,0);
+				}else if (changeBo.getProcessState()==3){
+					  x=orderExamineMapper.checkCountStatus(changeBo.getOrderNo(), 1,0);
+				}
+				if (x==0){
+					OrderChangeLog log=new OrderChangeLog();
+					log.setChangeId(i);
+					log.setCreateTime(date);
+					log.setOrderNo(changeBo.getOrderNo());
+					log.setStatus(2);
+					log.setRemarks("离职转交自动通过");
+					log.setAuditor("1");
+					orderChangeLogMapper.insertSelective(log);
+					changeBo.setProcessState(changeBo.getProcessState()+1);
+					newOrderChangeMapper.updateByPrimaryKeySelective(changeBo);
+				}
+			}
+			taskAttributionLogMapper.insertList(aid, transferId, date);
+			tTaskLogMapper.updateDimissionTransfer(aid, transferId);
+		}
+
+	}
+
+	/**
+	 * 判断角色
+	 * @param transferId
+	 * @return 0咨询师 1经理 -1非咨询角色
+	 */
+	private int getTech(String transferId) {
+		List<String>  l=adminMapper.getAdminRoleListByAid(transferId);
+		for (String str : l) {
+			if (str==null){
+				break;
+			}else if (str.equals(AFTConstants.TECH_MANAGER)) {
+				return 1;
+			}else if (str.equals(AFTConstants.TECH)){
+				return 0;
+			}
+		}
+
+		return -1;
+	}
+
 	@Override
 	public List<RoleResources> ResourcesDetail(String rid) {
 		return roleResourcesMapper.selectByRid(rid);

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

@@ -400,7 +400,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					use.setType(3);
 					use.setMainId(useId);
 					use.setId(null);
-					publicReleaseMapper.insert(use);
+					publicReleaseMapper.insertSelective(use);
 					PublicReleaseLog log = new PublicReleaseLog(use.getId(), TokenManager.getAdminId(), PublicReleaseLog.states.ty.getCode(), "同意协单信息", date);
 					publicReleaseLogMapper.insertSelective(log);
 				}

+ 6 - 6
src/main/resources/props/config_local.properties

@@ -1,12 +1,12 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
-jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20220318?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-jdbc.username=root
-jdbc.password=123456
-#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
-#jdbc.password=aftdev
+#jdbc.password=123456
+jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.username=root
+jdbc.password=aftdev
 jdbc.validationQuery=SELECT 'x'
 jdbc.initialSize=3
 jdbc.maxActive=20
@@ -46,7 +46,7 @@ user_remind_days=15
 user_channel_days=90
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.24
+static.host=//static.jishutao.com/1.2.25
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.05
 #static.host=http://172.16.1.187/prod/1.2.05

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -43,7 +43,7 @@ user_remind_days=15
 #\u63D0\u524D\u63D0\u9192\u5929\u6570
 user_channel_days=90
 
-static.host=//static.jishutao.com/1.2.24
+static.host=//static.jishutao.com/1.2.25
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload