Browse Source

订单调整;离职交接修复;

v1.0
Yen 2 years ago
parent
commit
764b166a0e
  1. 16
      src/main/java/com/qs/serve/modules/bms/controller/BmsRegion2Controller.java
  2. 5
      src/main/java/com/qs/serve/modules/bms/service/impl/BmsSupplierApplicationService.java
  3. 10
      src/main/java/com/qs/serve/modules/goods/controller/GoodsSpuController.java
  4. 2
      src/main/java/com/qs/serve/modules/goods/entity/GoodsSku.java
  5. 6
      src/main/java/com/qs/serve/modules/goods/entity/GoodsSpu.java
  6. 1
      src/main/java/com/qs/serve/modules/goods/entity/bo/GoodsSkuBo.java
  7. 21
      src/main/java/com/qs/serve/modules/goods/service/impl/GoodsSkuServiceImpl.java
  8. 4
      src/main/java/com/qs/serve/modules/pay/entity/PayPayment.java
  9. 2
      src/main/java/com/qs/serve/modules/pay/mapper/PayPaymentItemMapper.java
  10. 3
      src/main/java/com/qs/serve/modules/pay/mapper/PayPaymentMapper.java
  11. 7
      src/main/java/com/qs/serve/modules/sys/service/SysAttachService.java
  12. 34
      src/main/java/com/qs/serve/modules/tbs/controller/TbsBudgetBatchController.java
  13. 11
      src/main/java/com/qs/serve/modules/tbs/entity/TbsBudgetBatch.java
  14. 3
      src/main/java/com/qs/serve/modules/tbs/entity/bo/TbsBudgetBatchBo.java
  15. 25
      src/main/java/com/qs/serve/modules/tbs/service/impl/TbsBudgetBatchOperationServiceImpl.java
  16. 47
      src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostTodoOperationServiceImpl.java
  17. 50
      src/main/java/com/qs/serve/task/PayTask.java
  18. 3
      src/main/resources/mapper/goods/GoodsSpuMapper.xml
  19. 11
      src/main/resources/mapper/pay/PayPaymentItemMapper.xml
  20. 7
      src/main/resources/mapper/tbs/TbsCostApplyMapper.xml
  21. 2
      src/main/resources/mapper/tzc/TzcPolicyMapper.xml
  22. 2
      src/main/resources/mapper/vtb/VtbVerfifcationMapper.xml

16
src/main/java/com/qs/serve/modules/bms/controller/BmsRegion2Controller.java

@ -184,10 +184,24 @@ public class BmsRegion2Controller {
*/
@GetMapping("/tree")
@PreAuthorize("hasRole('bms:region:query')")
public R<List<BmsRegionTreeVo>> getTree(Integer listUserFlag,Integer loadByCurrent,String supplierId){
public R<List<BmsRegionTreeVo>> getTree(Integer listUserFlag,Integer loadByCurrent,String supplierId,Integer onlySupplierFlag){
if(loadByCurrent!=null&&loadByCurrent.equals(1)){
if(onlySupplierFlag!=null&&onlySupplierFlag.equals(1)){
BmsSupplier supplier = bmsSupplierService.getById(supplierId);
List<BmsRegion2> rlist = bmsRegion2Service.listByIds(supplier.listBizRegionIds());
List<BmsRegionTreeVo> treeVoList = new ArrayList<>();
for (BmsRegion2 region2 : rlist) {
BmsRegionTreeVo treeNode = CopierUtil.copy(region2,new BmsRegionTreeVo());
treeNode.setId(region2.getId());
treeNode.setParentId(region2.getPid());
treeNode.setSort(0);
treeVoList.add(treeNode);
}
return R.ok(treeVoList);
}else {
return R.ok(treeByCurrentUser(supplierId));
}
}
return R.ok(bmsRegion2Service.getTree(listUserFlag!=null&&listUserFlag.equals(1)));
}

5
src/main/java/com/qs/serve/modules/bms/service/impl/BmsSupplierApplicationService.java

@ -103,8 +103,11 @@ public class BmsSupplierApplicationService {
String otherCode = supplier.getOtherUserCodes().replace(leaveUser.getCode(),enterUserCode);
supplier.setOtherUserNames(otherName);
supplier.setOtherUserCodes(otherCode);
bmsSupplierMapper.updateRelateUserInfo(supplier);
}else {
supplier.setOtherUserNames("");
supplier.setOtherUserCodes("");
}
bmsSupplierMapper.updateRelateUserInfo(supplier);
}
}

10
src/main/java/com/qs/serve/modules/goods/controller/GoodsSpuController.java

@ -107,6 +107,16 @@ public class GoodsSpuController {
}
for (GoodsSpu spu : goodsSpuList) {
//兼容特殊sku
if(param.getSelectSpecialFlag()!=null&&param.getSelectSpecialFlag().equals(1)){
if(!spu.getSpecialSkuId().equals(0L)){
GoodsSku goodsSku = goodsSkuService.getById(spu.getSpecialSkuId());
spu.setSkuPrice(goodsSku.getSalesPrice());
spu.setVolume(goodsSku.getVolume().toString());
spu.setWeight(goodsSku.getWeight().toString());
continue;
}
}
for (OmsSpuToSkuKey skuKey : toSkuKeys) {
if(spu.getSpuCode().equals(skuKey.getSkuCode())){
GoodsSku goodsSku = goodsSkuService.getByCode(skuKey.getInvCode());

2
src/main/java/com/qs/serve/modules/goods/entity/GoodsSku.java

@ -78,6 +78,8 @@ public class GoodsSku implements Serializable {
/** 是否可以下单 1、是;0否 */
private Integer orderFlag;
private Integer specialFlag;
/** 单位id */
private Long unitId;

6
src/main/java/com/qs/serve/modules/goods/entity/GoodsSpu.java

@ -111,6 +111,9 @@ public class GoodsSpu implements Serializable {
private String belong;
/** 特殊SKUID */
private Long specialSkuId;
/** 销售分组id(默认0,表所有) */
private Long goodsSaleGroupId;
@ -147,6 +150,9 @@ public class GoodsSpu implements Serializable {
@TableField(exist = false)
private List<Long> selectCateIds;
@TableField(exist = false)
private Integer selectSpecialFlag;
@TableField(exist = false)
private BigDecimal skuPrice;

1
src/main/java/com/qs/serve/modules/goods/entity/bo/GoodsSkuBo.java

@ -77,5 +77,6 @@ public class GoodsSkuBo implements Serializable {
private String belong;
private Integer specialFlag;
}

21
src/main/java/com/qs/serve/modules/goods/service/impl/GoodsSkuServiceImpl.java

@ -7,11 +7,13 @@ import com.qs.serve.common.util.*;
import com.qs.serve.modules.goods.common.GoodsConst;
import com.qs.serve.modules.goods.entity.GoodsSkuSpecValue;
import com.qs.serve.modules.goods.entity.GoodsSpecValue;
import com.qs.serve.modules.goods.entity.GoodsSpu;
import com.qs.serve.modules.goods.entity.bo.GoodsSkuBo;
import com.qs.serve.modules.goods.entity.dto.InventoryCusPrice;
import com.qs.serve.modules.goods.entity.so.InventoryCusPriceQuery;
import com.qs.serve.modules.goods.entity.vo.GoodSkuVo;
import com.qs.serve.modules.goods.entity.vo.GoodsSkuSpecValueVo;
import com.qs.serve.modules.goods.mapper.GoodsSpuMapper;
import com.qs.serve.modules.goods.service.GoodsSkuSpecValueService;
import com.qs.serve.modules.goods.service.GoodsSpecValueService;
import com.qs.serve.modules.seeyon.service.impl.SeeYonRequestBaseService;
@ -205,6 +207,25 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper,GoodsSku> im
}else {
this.updateById(goodsSku);
}
//更新特殊标识
LambdaQueryWrapper<GoodsSku> specialSkuLqw = new LambdaQueryWrapper<>();
specialSkuLqw.eq(GoodsSku::getSpecialFlag,1);
specialSkuLqw.eq(GoodsSku::getSpuId,goodsSku.getId());
List<GoodsSku> specialSkuList = super.list(specialSkuLqw);
if(specialSkuList.size()>0){
GoodsSku goodsSku1 = specialSkuList.get(0);
GoodsSpuMapper spuMapper = SpringUtils.getBean(GoodsSpuMapper.class);
GoodsSpu spu = new GoodsSpu();
spu.setId(goodsSku1.getSpuId());
if(goodSkuVo.getSpecialFlag().equals(1)){
spu.setSpecialSkuId(goodsSku1.getId());
}else {
spu.setSpecialSkuId(0L);
}
spuMapper.updateById(spu);
}
}
}

4
src/main/java/com/qs/serve/modules/pay/entity/PayPayment.java

@ -154,10 +154,8 @@ public class PayPayment implements Serializable {
@JsonProperty
private String delFlag;
//private Integer syncActFlag;
/** 同步标识 */
private Integer syncCostFlag;
private Integer syncCostState;
}

2
src/main/java/com/qs/serve/modules/pay/mapper/PayPaymentItemMapper.java

@ -32,5 +32,7 @@ public interface PayPaymentItemMapper extends BaseMapper<PayPaymentItem> {
*/
int updateSyncFlag(@Param("activityIds") List<String> activityIds);
List<AmountDTO> selectCostTotal(@Param("costIds") List<String> costIds);
}

3
src/main/java/com/qs/serve/modules/pay/mapper/PayPaymentMapper.java

@ -16,5 +16,8 @@ public interface PayPaymentMapper extends BaseMapper<PayPayment> {
@InterceptorIgnore(tenantLine = "1")
@Select("select * from pay_payment where erp_id = #{erpId} and del_flag = 0")
PayPayment getByErpId(@Param("erpId")String erpId);
}

7
src/main/java/com/qs/serve/modules/sys/service/SysAttachService.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.qs.serve.modules.sys.entity.SysAttach;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
@ -19,5 +20,11 @@ public interface SysAttachService extends IService<SysAttach> {
List<SysAttach> attaches = IService.super.listByIds(idList);
return attaches;
}
default List<SysAttach> listByIdArrs(String[] ids) {
List<SysAttach> attaches = IService.super.listByIds(Arrays.asList(ids));
return attaches;
}
}

34
src/main/java/com/qs/serve/modules/tbs/controller/TbsBudgetBatchController.java

@ -11,6 +11,8 @@ import com.qs.serve.common.util.PageUtil;
import com.qs.serve.common.util.CopierUtil;
import com.qs.serve.common.util.StringUtils;
import com.qs.serve.modules.seeyon.entity.bo.CtpAddNodeParam;
import com.qs.serve.modules.sys.entity.SysAttach;
import com.qs.serve.modules.sys.service.SysAttachService;
import com.qs.serve.modules.tbs.common.consts.ChangeTypeEnum;
import com.qs.serve.modules.tbs.entity.TbsBudgetBatchItem;
import com.qs.serve.modules.tbs.entity.TbsBudgetChange;
@ -47,6 +49,7 @@ public class TbsBudgetBatchController {
private TbsBudgetBatchOperationServiceImpl budgetBatchOperationService;
private final TbsBudgetBatchItemService budgetBatchItemService;
private final TbsBudgetChangeService tbsBudgetChangeService;
private final SysAttachService sysAttachService;
/**
@ -97,6 +100,8 @@ public class TbsBudgetBatchController {
}
}
budgetBatch.setChangeList(changeList);
List<SysAttach> attachList = sysAttachService.listByIdArrs(budgetBatch.getAttachIds());
budgetBatch.setAttachList(attachList);
return R.ok(budgetBatch);
}
@ -145,5 +150,34 @@ public class TbsBudgetBatchController {
}
/**
* 个人未完成审批统计-预算批量申请
* @return
*/
@PostMapping("/compensate/{code}")
public R<Long> compensate(@PathVariable("code") String code){
LambdaQueryWrapper<TbsBudgetBatch> lqw = new LambdaQueryWrapper<>();
lqw.eq(TbsBudgetBatch::getBatchCode,code);
TbsBudgetBatch budgetBatch = tbsBudgetBatchService.getOne(lqw);
budgetBatchOperationService.runCompensate(budgetBatch.getId().toString());
return R.ok();
}
/**
* test
* @return
*/
//@PostMapping("/ok1/{code}")
@SysLog(module = SystemModule.Budget, title = "补充调用", biz = BizType.OTHER)
public R<Long> compensate2(@PathVariable("code") String code){
LambdaQueryWrapper<TbsBudgetBatch> lqw = new LambdaQueryWrapper<>();
lqw.eq(TbsBudgetBatch::getBatchCode,code);
TbsBudgetBatch budgetBatch = tbsBudgetBatchService.getOne(lqw);
TbsAffairCommitBo param = new TbsAffairCommitBo();
param.setTargetId(budgetBatch.getId().toString());
budgetBatchOperationService.doFinished(param);
return R.ok();
}
}

11
src/main/java/com/qs/serve/modules/tbs/entity/TbsBudgetBatch.java

@ -10,7 +10,9 @@ import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.qs.serve.common.framework.mybatis.handler.meta.SplitStringTypeHandler;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
@ -23,7 +25,7 @@ import javax.validation.constraints.NotBlank;
* @since 2023-08-24
*/
@Data
@TableName("tbs_budget_batch")
@TableName(value = "tbs_budget_batch", autoResultMap = true)
public class TbsBudgetBatch implements Serializable {
private static final long serialVersionUID = 1L;
@ -91,6 +93,10 @@ public class TbsBudgetBatch implements Serializable {
@TableField(fill = FieldFill.UPDATE)
private LocalDateTime updateTime;
/** 附件id */
@TableField(typeHandler = SplitStringTypeHandler.class,jdbcType= JdbcType.VARCHAR)
private String[] attachIds;
/** 所属租户 */
@JsonIgnore
@JsonProperty
@ -112,6 +118,9 @@ public class TbsBudgetBatch implements Serializable {
@TableField(exist = false)
private List<TbsBudgetChange> changeList;
@TableField(exist = false)
private List<?>attachList;;
// public static TbsBudgetBatch toNewObject(TbsBudgetBatch source){
// TbsBudgetBatch budgetBatch = new TbsBudgetBatch();
// budgetBatch.setId(source.getId());

3
src/main/java/com/qs/serve/modules/tbs/entity/bo/TbsBudgetBatchBo.java

@ -19,6 +19,9 @@ public class TbsBudgetBatchBo {
private String remark;
/** 附件ID */
private List<String> attachIds;
List<BudgetMain> budgetList;
@Data

25
src/main/java/com/qs/serve/modules/tbs/service/impl/TbsBudgetBatchOperationServiceImpl.java

@ -63,7 +63,11 @@ public class TbsBudgetBatchOperationServiceImpl implements SeeYonOperationServic
for (TbsBudgetBatchItem batchItem : budgetBatchItemList) {
if(batchItem.getChangeId()==null){
//预算申请
try {
tbsBudgetService.startBudget(batchItem.getBudgetId());
} catch (Exception e) {
log.warn("警告 doFinished().startBudget({}) => {}",batchItem.getBudgetId(),e.getMessage());
}
}else {
//预算修改
changeOperationService.dofinishedAction(batchItem.getChangeId().toString());
@ -112,6 +116,27 @@ public class TbsBudgetBatchOperationServiceImpl implements SeeYonOperationServic
return budgetBatch.getSyFormId()!=null;
}
@Override
public Object compensateBacked(String targetId) {
TbsAffairCommitBo param = new TbsAffairCommitBo();
param.setTargetId(targetId);
return doBacked(param);
}
@Override
public Object compensateFinished(String targetId) {
TbsAffairCommitBo param = new TbsAffairCommitBo();
param.setTargetId(targetId);
return doFinished(param);
}
@Override
public Object compensateRefuse(String targetId) {
TbsAffairCommitBo param = new TbsAffairCommitBo();
param.setTargetId(targetId);
return doRefuse(param);
}
@Override
public void doCommitBacked(String targetId) {
//补偿接口

47
src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostTodoOperationServiceImpl.java

@ -1,5 +1,8 @@
package com.qs.serve.modules.tbs.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qs.serve.common.config.properties.ProjectProperties;
import com.qs.serve.common.model.dto.R;
@ -15,9 +18,11 @@ import com.qs.serve.modules.sys.mapper.SysUserMapper;
import com.qs.serve.modules.tbs.common.TbsCommonCheckState;
import com.qs.serve.modules.tbs.common.TbsSeeYonConst;
import com.qs.serve.modules.tbs.entity.TbsBudget;
import com.qs.serve.modules.tbs.entity.TbsCostApply;
import com.qs.serve.modules.tbs.entity.TbsCostTodo;
import com.qs.serve.modules.tbs.entity.bo.TbsAffairCommitBo;
import com.qs.serve.modules.tbs.entity.bo.TbsSubmitToDoBo;
import com.qs.serve.modules.tbs.mapper.TbsCostApplyMapper;
import com.qs.serve.modules.tbs.mapper.TbsCostTodoMapper;
import com.qs.serve.modules.tbs.service.TbsCostTodoService;
import lombok.AllArgsConstructor;
@ -26,6 +31,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@ -40,6 +46,7 @@ import java.util.Map;
public class TbsCostTodoOperationServiceImpl implements SeeYonOperationService {
private final TbsCostTodoMapper tbsCostTodoMapper;
private final TbsCostApplyMapper tbsCostApplyMapper;
private final SysUserMapper sysUserMapper;
private final ProjectProperties projectProperties;
private final SeeYonRequestService seeYonService;
@ -97,6 +104,11 @@ public class TbsCostTodoOperationServiceImpl implements SeeYonOperationService {
costTodo.setAttachDesc(param.getAttachDesc());
tbsCostTodoMapper.updateById(costTodo);
TbsCostApply costApply = new TbsCostApply();
costApply.setId(costTodo.getCostApplyId());
costApply.setAgreeCheckStatus(1);
tbsCostApplyMapper.updateById(costApply);
}
@Override
@ -119,6 +131,7 @@ public class TbsCostTodoOperationServiceImpl implements SeeYonOperationService {
costTodo.setId(Long.parseLong(param.getTargetId()));
costTodo.setCheckStatus(TbsCommonCheckState.State_3_setback);
tbsCostTodoMapper.updateById(costTodo);
this.updateAgreeStatus(param.getTargetId());
return null;
}
@ -130,6 +143,7 @@ public class TbsCostTodoOperationServiceImpl implements SeeYonOperationService {
costTodo.setFinishedFlag(1);
costTodo.setCheckStatus(TbsCommonCheckState.State_2_finished);
tbsCostTodoMapper.updateById(costTodo);
this.updateAgreeStatus(param.getTargetId());
return null;
}
@ -139,9 +153,42 @@ public class TbsCostTodoOperationServiceImpl implements SeeYonOperationService {
costTodo.setId(Long.parseLong(param.getTargetId()));
costTodo.setCheckStatus(TbsCommonCheckState.State_4_stop);
tbsCostTodoMapper.updateById(costTodo);
this.updateAgreeStatus(param.getTargetId());
return null;
}
/**
* 更新活动的验收状态
* @param targetId
*/
private void updateAgreeStatus(String targetId) {
TbsCostTodo obj = tbsCostTodoMapper.selectById(targetId);
Long costId = obj.getCostApplyId();
LambdaQueryWrapper<TbsCostTodo> lqw = new LambdaQueryWrapper<>();
lqw.eq(TbsCostTodo::getCostApplyId,costId);
List<TbsCostTodo> costTodoList = tbsCostTodoMapper.selectList(lqw);
boolean unfinished = false;
boolean finished = false;
for (TbsCostTodo todo : costTodoList) {
if(!todo.getCheckStatus().equals(TbsCommonCheckState.State_2_finished)){
unfinished = true;
}else {
finished = true;
}
}
TbsCostApply costApply = new TbsCostApply();
costApply.setId(costId);
if(finished && !unfinished){
costApply.setAgreeCheckStatus(3);
}else if(finished){
costApply.setAgreeCheckStatus(2);
}else if (unfinished){
costApply.setAgreeCheckStatus(0);
}
costApply.setAgreeCheckStatus(2);
tbsCostApplyMapper.updateById(costApply);
}
@Override
public boolean checkSyFormIdIsNotNull(String targetId) {
TbsCostTodo obj = tbsCostTodoMapper.selectById(targetId);

50
src/main/java/com/qs/serve/task/PayTask.java

@ -0,0 +1,50 @@
package com.qs.serve.task;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qs.serve.common.model.AmountDTO;
import com.qs.serve.modules.pay.entity.PayPayment;
import com.qs.serve.modules.pay.mapper.PayPaymentItemMapper;
import com.qs.serve.modules.pay.service.PayPaymentService;
import com.qs.serve.modules.tbs.entity.TbsCostApply;
import com.qs.serve.modules.tbs.service.TbsCostApplyService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author YenHex
* @since 2023/11/7
*/
@Slf4j
@Component
@AllArgsConstructor
public class PayTask {
private final PayPaymentService payPaymentService;
private final TbsCostApplyService costApplyService;
private final PayPaymentItemMapper payPaymentItemMapper;
/**
* 同步支付
*/
public void syncCostPayStatus(){
LambdaQueryWrapper<TbsCostApply> costLqw = new LambdaQueryWrapper<>();
costLqw.select(
TbsCostApply::getId,
TbsCostApply::getTotalActivityAmount
);
costLqw.ne(TbsCostApply::getPayStatus,2);
costLqw.apply(" limit 2000");
List<TbsCostApply> costApplyList = costApplyService.list(costLqw);
List<String> costIds = costApplyList.stream().map(a->a.toString()).collect(Collectors.toList());
List<AmountDTO> amountDTOList = payPaymentItemMapper.selectCostTotal(costIds);
for (TbsCostApply costApply : costApplyList) {
}
}
}

3
src/main/resources/mapper/goods/GoodsSpuMapper.xml

@ -87,6 +87,9 @@
<if test="query.updateBy != null and query.updateBy != ''"> and `goods_spu`.`update_by` = #{query.updateBy}</if>
<if test="query.tenantId != null and query.tenantId != ''"> and `goods_spu`.`tenant_id` = #{query.tenantId}</if>
<if test="query.delFlag != null and query.delFlag != ''"> and `goods_spu`.`del_flag` = #{query.delFlag}</if>
<if test="query.selectSpecialFlag != null and query.selectSpecialFlag != 0">
and `goods_spu`.`special_sku_id` is not null and `goods_spu`.`special_sku_id` != '0'
</if>
<if test="query.searchValue != null and query.searchValue != ''"> and (`goods_spu`.`name` like concat('%',#{query.searchValue},'%') or `goods_spu`.`goods_spu` like concat('%',#{query.searchValue},'%')) </if>
<if test="query.selectIds!=null and query.selectIds.size > 0">
and `goods_spu`.`id` in

11
src/main/resources/mapper/pay/PayPaymentItemMapper.xml

@ -101,6 +101,17 @@
</select>
<select id="selectCostTotal" resultType="com.qs.serve.common.model.AmountDTO">
SELECT cost_apply_id as id,sum(pay_amount) as amount FROM `pay_payment`
where del_flag = 0
and cost_apply_id in
<foreach collection="costIds" item="selectId" index="i" open="(" close=")" separator=",">
#{selectId}
</foreach>
GROUP BY cost_apply_id;
</select>
<update id="updateSyncFlag">
update pay_payment_item set sync_act_flag = 1
where activity_id in

7
src/main/resources/mapper/tbs/TbsCostApplyMapper.xml

@ -74,19 +74,22 @@
tbs_cost_apply.`change_source_id`,
tbs_cost_apply.`change_extend_id`,
tbs_cost_apply.`cancel_flag`,
tbs_cost_apply.`ext_user_id`,
tbs_cost_apply.`ext_user_code`,
tbs_cost_apply.`ext_user_name`,
tbs_cost_apply.`template_title` </sql>
<update id="updateCostExtUserByCostIds">
update tbs_cost_apply
set ext_user_id = #{obj.id},ext_user_id=#{obj.code},ext_user_name=#{obj.name}
set ext_user_id = #{obj.id},ext_user_id=#{obj.id},ext_user_name=#{obj.name},ext_user_code=#{obj.code}
where del_flag=0 and id in
<foreach collection="costIds" item="selectId" index="i" open="(" close=")" separator=",">
#{selectId}
</foreach>
</update>
<delete id="cancelCostExtUserByCostId">
update tbs_cost_apply set ext_user_id = null,ext_user_id=null,ext_user_name=null where id in
update tbs_cost_apply set ext_user_id = null,ext_user_id=null,ext_user_name=null,ext_user_code where id in
<foreach collection="costIds" item="selectId" index="i" open="(" close=")" separator=",">
#{selectId}
</foreach>

2
src/main/resources/mapper/tzc/TzcPolicyMapper.xml

@ -7,7 +7,7 @@
<update id="updateCostExtUserByPolicyIds">
update tzc_policy
set ext_user_id = #{obj.id},ext_user_id=#{obj.code},ext_user_name=#{obj.name}
set ext_user_id = #{obj.id},ext_user_code=#{obj.code},ext_user_name=#{obj.name}
where del_flag=0 and id in
<foreach collection="policyIds" item="selectId" index="i" open="(" close=")" separator=",">
#{selectId}

2
src/main/resources/mapper/vtb/VtbVerfifcationMapper.xml

@ -5,7 +5,7 @@
<update id="updateCostExtUserByCostIds">
update vtb_verification
set ext_user_id = #{obj.id},ext_user_id=#{obj.code},ext_user_name=#{obj.name}
set ext_user_id = #{obj.id},ext_user_code=#{obj.code},ext_user_name=#{obj.name},ext_user_code=#{obj.code}
where del_flag=0 and cost_apply_id in
<foreach collection="costIds" item="selectId" index="i" open="(" close=")" separator=",">
#{selectId}

Loading…
Cancel
Save