Commit c88e91df by 13003003657

修改客户离职相关bug

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