11 changed files with 262 additions and 4 deletions
@ -0,0 +1,27 @@ |
|||||
|
package com.qs.serve.modules.oms.entity.bo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/10/27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SysFlowCancelBo { |
||||
|
|
||||
|
/** |
||||
|
* 业务数据ID列表 |
||||
|
*/ |
||||
|
List<String> targetIds; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型: |
||||
|
* 1-费用及核销 |
||||
|
* 2-政策 |
||||
|
* 3-订单 |
||||
|
*/ |
||||
|
Integer targetTypeNum; |
||||
|
|
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.qs.serve.modules.oms.entity.bo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/10/27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SysFlowLeaveBo { |
||||
|
|
||||
|
/** |
||||
|
* 交接人ID |
||||
|
*/ |
||||
|
String userId; |
||||
|
|
||||
|
/** |
||||
|
* 业务数据ID列表 |
||||
|
*/ |
||||
|
List<String> targetIds; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型: |
||||
|
* 1-费用及核销 |
||||
|
* 2-政策 |
||||
|
* 3-订单 |
||||
|
*/ |
||||
|
Integer targetTypeNum; |
||||
|
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.qs.serve.modules.sys.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qs.serve.modules.oms.entity.bo.SysFlowCancelBo; |
||||
|
import com.qs.serve.modules.sys.entity.SysUser; |
||||
|
import com.qs.serve.modules.sys.mapper.SysUserMapper; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsCostApply; |
||||
|
import com.qs.serve.modules.tbs.mapper.TbsCostApplyMapper; |
||||
|
import com.qs.serve.modules.tbs.service.TbsCostApplyService; |
||||
|
import com.qs.serve.modules.vtb.entity.VtbVerification; |
||||
|
import com.qs.serve.modules.vtb.mapper.VtbVerificationMapper; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 员工任务交付主要方法 |
||||
|
* @author YenHex |
||||
|
* @since 2023/10/27 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@AllArgsConstructor |
||||
|
public class SysUserFlowApplication { |
||||
|
|
||||
|
private final TbsCostApplyMapper tbsCostApplyMapper; |
||||
|
private final VtbVerificationMapper verificationMapper; |
||||
|
private final SysUserMapper sysUserMapper; |
||||
|
|
||||
|
/** |
||||
|
* 费用核销 任务交付 |
||||
|
*/ |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void tranCostApplyAndVerification(String sourUserId,String targetUserId){ |
||||
|
SysUser sysUser = sysUserMapper.selectById(targetUserId); |
||||
|
tbsCostApplyMapper.updateCostExtUser(sourUserId,sysUser); |
||||
|
verificationMapper.updateCostExtUser(sourUserId,sysUser); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 费用核销 设置数据的继承人 |
||||
|
* @param costIds |
||||
|
* @param targetUserId |
||||
|
* @return |
||||
|
*/ |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void updateCostExtUserByCostIds(List<String> costIds,String targetUserId){ |
||||
|
SysUser sysUser = sysUserMapper.selectById(targetUserId); |
||||
|
tbsCostApplyMapper.updateCostExtUserByCostIds(costIds,sysUser); |
||||
|
verificationMapper.updateCostExtUserByCostIds(costIds,sysUser); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 费用核销 取消继承人 |
||||
|
* @param costIds |
||||
|
*/ |
||||
|
public void cancelCostExtUserByCostIds(List<String> costIds){ |
||||
|
tbsCostApplyMapper.cancelCostExtUserByCostId(costIds); |
||||
|
verificationMapper.cancelCostExtUserByCostIds(costIds); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.qs.serve.modules.vtb.mapper.VtbVerificationMapper"> |
||||
|
|
||||
|
|
||||
|
<update id="updateCostExtUserByCostIds"> |
||||
|
update vtb_verification |
||||
|
set ext_user_id = #{obj.id},ext_user_id=#{obj.code},ext_user_name=#{obj.name} |
||||
|
where del_flag=0 and cost_apply_id in |
||||
|
<foreach collection="checkIds" item="selectId" index="i" open="(" close=")" separator=","> |
||||
|
#{selectId} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
<delete id="cancelCostExtUserByCostIds"> |
||||
|
update vtb_verification set ext_user_id = null,ext_user_id=null,ext_user_name=null where cost_apply_id in |
||||
|
<foreach collection="costIds" item="selectId" index="i" open="(" close=")" separator=","> |
||||
|
#{selectId} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
||||
|
|
Loading…
Reference in new issue