提交 c88e91df 编写于 作者: 1 13003003657

修改客户离职相关bug

上级 885f34e3
......@@ -100,7 +100,7 @@ public class WeUserController extends BaseController {
/**
* 离职等待分配
* 离职分配
* @param weLeaveUserVo
* @return
*/
......@@ -115,7 +115,7 @@ public class WeUserController extends BaseController {
/**
* 离职分配
* 离职等待分配
* @param weLeaveUserVo
* @return
*/
......@@ -136,9 +136,9 @@ public class WeUserController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('wecom:user:allocateLeaveUserAboutData')")
@PutMapping({"/allocateLeaveUserAboutData"})
public AjaxResult allocateLeaveUserAboutData(WeLeaveUserInfoAllocateVo weLeaveUserInfoAllocateVo) {
public AjaxResult allocateLeaveUserAboutData(@RequestBody WeLeaveUserInfoAllocateVo weLeaveUserInfoAllocateVo) {
weUserService.allocateLeaveUserAboutData(weLeaveUserInfoAllocateVo);
return AjaxResult.success("离职分配成功");
}
......
......@@ -2,6 +2,7 @@ package com.linkwechat.wecom.mapper;
import java.util.List;
import com.linkwechat.wecom.domain.WeFlowerCustomerRel;
import org.apache.ibatis.annotations.Param;
/**
* 具有外部联系人功能企业员工也客户的关系Mapper接口
......@@ -62,10 +63,10 @@ public interface WeFlowerCustomerRelMapper
/**
* 批量插入
* @param WeFlowerCustomerRels
* @param weFlowerCustomerRels
* @return
*/
public int batchInsetWeFlowerCustomerRel(List<WeFlowerCustomerRel> WeFlowerCustomerRels);
public int batchInsetWeFlowerCustomerRel(@Param("weFlowerCustomerRels") List<WeFlowerCustomerRel> weFlowerCustomerRels);
/**
......@@ -73,5 +74,5 @@ public interface WeFlowerCustomerRelMapper
* @param ids
* @return
*/
public int batchLogicDeleteByIds(List<Long> ids);
public int batchLogicDeleteByIds(@Param("ids") List<Long> ids);
}
package com.linkwechat.wecom.mapper;
import com.linkwechat.wecom.domain.WeGroup;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -22,7 +23,7 @@ public interface WeGroupMapper {
int deleteWeGroupByIds(Long[] paramArrayOfLong);
int batchLogicDeleteByIds(List<Long> ids);
int batchLogicDeleteByIds(@Param("ids") List<Long> ids);
int batchInsetWeGroup(List<WeGroup> weGroups);
int batchInsetWeGroup(@Param("weGroups") List<WeGroup> weGroups);
}
......@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="batchInsetWeFlowerCustomerRel" >
insert into we_flower_customer_rel (id, user_id, remark, description, create_time, remark_corp_name, remark_mobiles, oper_userid, add_way, state, customer_id)
values
<foreach collection="list" item="tag" index="index" separator=",">
<foreach collection="weFlowerCustomerRels" item="tag" index="index" separator=",">
(#{tag.id},#{tag.userId},#{tag.remark},#{tag.description},#{tag.createTime},#{tag.remarkCorpName},#{tag.remarkMobiles},#{tag.operUserid},#{tag.addWay},#{tag.state},#{tag.customerId})
</foreach>
</insert>
......
......@@ -153,21 +153,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="leaveUserList" parameterType="WeLeaveUserVo" resultType="com.linkwechat.wecom.domain.vo.WeLeaveUserVo">
SELECT
we.user_name,
we.department,
we.dimission_time,
count(case WHEN we.user_id=wfcr.user_id THEN 1 ELSE 0 END) as allocateCustomerNum,
count(case WHEN wg.group_leader_user_id=we.user_id THEN 1 ELSE 0 END) as allocateGroupNum
we.user_name as userName,
we.department,
we.dimission_time as dimissionTime,
(SELECT count(wfcr.id) FROM we_flower_customer_rel wfcr WHERE wfcr.user_id=we.user_id) allocateCustomerNum,
(SELECT count(wg.id) FROM we_group wg WHERE wg.group_leader_user_id=we.user_id) allocateGroupNum
FROM
we_user we
INNER JOIN we_flower_customer_rel wfcr on we.user_id=wfcr.user_id
INNER JOIN we_group wg on wg.group_leader_user_id=we.user_id
<where>
<if test="userName != null and userName !=''">and wc.user_name=#{userName}</if>
<if test="userName != null and userName !=''">and we.user_name=#{userName}</if>
<if test="beginTime != null and beginTime !='' and endTime != null and endTime !=''">
DATE_FORMAT(we.dimission_time,'%Y-%m-%d') BETWEEN #{beginTime} AND #{endTime}
</if>
<if test="isActivate null ">and is_activate = #{isActivate}</if>
<if test="isActivate != null ">and we.is_activate = #{isActivate}</if>
</where>
</select>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册