Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -39,7 +39,7 @@ public class LngPriceProc implements Serializable {
|
||||
* 公司编码(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("公司编码(天然气公司/惠贸)")
|
||||
private String comCode;
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 服务商编码(惠州接收站/阳江接收站)
|
||||
|
||||
@ -0,0 +1,143 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 加工合同
|
||||
* @Author 管理员
|
||||
* @Date: 2026-02-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_price_proc_dtl")
|
||||
@ApiModel(value = "加工合同对象", description = "加工合同")
|
||||
public class LngPriceProcDtl implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-主信息主键(lng_contract.id)
|
||||
*/
|
||||
@ApiModelProperty("合同-主信息主键(lng_contract.id)")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 价格-加工服务主键(lng_price_proc.id)
|
||||
*/
|
||||
@ApiModelProperty("价格-加工服务主键(lng_price_proc.id)")
|
||||
private Long ppId;
|
||||
|
||||
/**
|
||||
* 阶梯
|
||||
*/
|
||||
@ApiModelProperty("阶梯")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short sort;
|
||||
|
||||
/**
|
||||
* 约定
|
||||
*/
|
||||
@ApiModelProperty("约定")
|
||||
private String sortDesc;
|
||||
|
||||
/**
|
||||
* 比值(吨/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("比值(吨/吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal rateTonGj;
|
||||
|
||||
/**
|
||||
* 阶梯气量(吉焦)
|
||||
*/
|
||||
@ApiModelProperty("阶梯气量(吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyGj;
|
||||
|
||||
/**
|
||||
* 管道气加工费率(元/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("管道气加工费率(元/吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal pricePngGj;
|
||||
|
||||
/**
|
||||
* LNG加工费率(元/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("LNG加工费率(元/吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceLngGj;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -34,12 +34,30 @@ public class LngPriceTransPng implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("合同-主信息主键(lng_contract.id)")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 合同-管输-上下载点主键
|
||||
*/
|
||||
@ApiModelProperty("合同-管输-上下载点主键")
|
||||
private Long ktpId;
|
||||
|
||||
/**
|
||||
* 上载点
|
||||
*/
|
||||
@ApiModelProperty("上载点")
|
||||
private String pointUpCode;
|
||||
|
||||
/**
|
||||
* 交割点
|
||||
*/
|
||||
@ApiModelProperty("交割点")
|
||||
private String pointDelyCode;
|
||||
|
||||
/**
|
||||
* 公司编码(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("公司编码(天然气公司/惠贸)")
|
||||
private String comCode;
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 托运商编码(管道公司/管网)
|
||||
|
||||
@ -0,0 +1,150 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 管输合同
|
||||
* @Author 管理员
|
||||
* @Date: 2026-02-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_price_trans_png_dtl")
|
||||
@ApiModel(value = "管输合同对象", description = "管输合同")
|
||||
public class LngPriceTransPngDtl implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-主信息主键(lng_contract.id)
|
||||
*/
|
||||
@ApiModelProperty("合同-主信息主键(lng_contract.id)")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 价格-管输主键(lng_price_trans_png.id)
|
||||
*/
|
||||
@ApiModelProperty("价格-管输主键(lng_price_trans_png.id)")
|
||||
private Long ppId;
|
||||
|
||||
/**
|
||||
* 阶梯
|
||||
*/
|
||||
@ApiModelProperty("阶梯")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short sort;
|
||||
|
||||
/**
|
||||
* 约定
|
||||
*/
|
||||
@ApiModelProperty("约定")
|
||||
private String sortDesc;
|
||||
|
||||
/**
|
||||
* 阶梯气量(方)
|
||||
*/
|
||||
@ApiModelProperty("阶梯气量(方)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyM3;
|
||||
|
||||
/**
|
||||
* 阶梯气量(吉焦)(隐藏)
|
||||
*/
|
||||
@ApiModelProperty("阶梯气量(吉焦)(隐藏)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyGj;
|
||||
|
||||
/**
|
||||
* 管输单价(元/方)
|
||||
*/
|
||||
@ApiModelProperty("管输单价(元/方)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceTransM3;
|
||||
|
||||
/**
|
||||
* 管输单价(元/吉焦)(隐藏)
|
||||
*/
|
||||
@ApiModelProperty("管输单价(元/吉焦)(隐藏)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceTransGj;
|
||||
|
||||
/**
|
||||
* 比值(方/吉焦)(隐藏)
|
||||
*/
|
||||
@ApiModelProperty("比值(方/吉焦)(隐藏)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal rateM3Gj;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -3,7 +3,12 @@ package com.xjrsoft.module.contract.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractProc;
|
||||
import com.xjrsoft.module.contract.vo.LngContractProcVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
@ -14,4 +19,9 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface LngContractProcMapper extends MPJBaseMapper<LngContractProc>, BaseMapper<LngContractProc> {
|
||||
|
||||
@Select("SELECT t1.*, t2.full_name AS staName" +
|
||||
" FROM lng_contract_proc t1" +
|
||||
" LEFT JOIN lng_b_station_lng t2 on t2.code = t1.sta_code" +
|
||||
" WHERE t1.k_id = #{contractId}")
|
||||
List<LngContractProcVo> selectByContractId(@Param("contractId") Long contractId);
|
||||
}
|
||||
|
||||
@ -3,7 +3,12 @@ package com.xjrsoft.module.contract.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractTransPng;
|
||||
import com.xjrsoft.module.contract.vo.LngContractTransPngVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
@ -14,4 +19,10 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface LngContractTransPngMapper extends MPJBaseMapper<LngContractTransPng>, BaseMapper<LngContractTransPng> {
|
||||
|
||||
@Select("SELECT t1.*, t2.full_name AS pointUpName, t3.full_name AS pointDelyName" +
|
||||
" FROM lng_contract_trans_png t1" +
|
||||
" LEFT JOIN lng_b_station_lng t2 on t2.code = t1.point_up_code" +
|
||||
" LEFT JOIN lng_b_station_png t3 on t3.code = t1.point_dely_code" +
|
||||
" WHERE t1.k_id = #{contractId}")
|
||||
List<LngContractTransPngVo> selectByContractId(@Param("contractId") Long contractId);
|
||||
}
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngPriceProcDtl;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-02-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPriceProcDtlMapper extends MPJBaseMapper<LngPriceProcDtl>, BaseMapper<LngPriceProcDtl> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngPriceTransPngDtl;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-02-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPriceTransPngDtlMapper extends MPJBaseMapper<LngPriceTransPngDtl>, BaseMapper<LngPriceTransPngDtl> {
|
||||
|
||||
}
|
||||
@ -31,6 +31,7 @@ public class ContractProcServiceImpl extends MPJBaseServiceImpl<LngContractMappe
|
||||
|
||||
private final LngContractProcMapper lngContractProcMapper;
|
||||
private final LngPriceProcMapper lngPriceProcMapper;
|
||||
private final LngPriceProcDtlMapper lngPriceProcDtlMapper;
|
||||
private final LngContractFactMapper lngContractFactMapper;
|
||||
private final LngContractFactRelMapper lngContractFactRelMapper;
|
||||
private final LngContractApproRelMapper lngContractApproRelMapper;
|
||||
@ -43,19 +44,19 @@ public class ContractProcServiceImpl extends MPJBaseServiceImpl<LngContractMappe
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
LngContractPVo vo = BeanUtil.toBean(lngContract, LngContractPVo.class);
|
||||
List<LngContractProc> lngContractProcList = lngContractProcMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractProc>()
|
||||
.eq(LngContractProc::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractProcList)) {
|
||||
vo.setLngContractProcList(BeanUtil.copyToList(lngContractProcList,
|
||||
LngContractProcVo.class));
|
||||
}
|
||||
List<LngContractProcVo> lngContractProcVoList = lngContractProcMapper.selectByContractId(lngContract.getId());
|
||||
vo.setLngContractProcList(lngContractProcVoList);
|
||||
List<LngPriceProc> lngPriceProcList = lngPriceProcMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceProc>()
|
||||
.eq(LngPriceProc::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngPriceProcList)) {
|
||||
vo.setLngPriceProcList(BeanUtil.copyToList(lngPriceProcList,
|
||||
LngPriceProcVo.class));
|
||||
List<LngPriceProcVo> lngPriceProcVoList = BeanUtil.copyToList(lngPriceProcList, LngPriceProcVo.class);
|
||||
vo.setLngPriceProcList(lngPriceProcVoList);
|
||||
lngPriceProcVoList.forEach(x -> {
|
||||
List<LngPriceProcDtl> lngPriceProcDtlList = lngPriceProcDtlMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceProcDtl>().eq(LngPriceProcDtl::getPpId, x.getId()));
|
||||
x.setLngPriceProcDtlList(BeanUtil.copyToList(lngPriceProcDtlList, LngPriceProcDtlVo.class));
|
||||
});
|
||||
}
|
||||
List<LngContractFactRel> lngContractFactRelList = lngContractFactRelMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractFactRel>()
|
||||
|
||||
@ -31,6 +31,7 @@ public class ContractTransPngServiceImpl extends MPJBaseServiceImpl<LngContractM
|
||||
|
||||
private final LngContractTransPngMapper lngContractTransPngMapper;
|
||||
private final LngPriceTransPngMapper lngPriceTransPngMapper;
|
||||
private final LngPriceTransPngDtlMapper lngPriceTransPngDtlMapper;
|
||||
private final LngContractFactMapper lngContractFactMapper;
|
||||
private final LngContractFactRelMapper lngContractFactRelMapper;
|
||||
private final LngContractApproRelMapper lngContractApproRelMapper;
|
||||
@ -43,20 +44,31 @@ public class ContractTransPngServiceImpl extends MPJBaseServiceImpl<LngContractM
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
LngContractTPVo vo = BeanUtil.toBean(lngContract, LngContractTPVo.class);
|
||||
List<LngContractTransPng> lngContractTransPngList = lngContractTransPngMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractTransPng>()
|
||||
.eq(LngContractTransPng::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractTransPngList)) {
|
||||
vo.setLngContractTransPngList(BeanUtil.copyToList(lngContractTransPngList,
|
||||
LngContractTransPngVo.class));
|
||||
}
|
||||
List<LngPriceTransPng> lngPriceTransPngList = lngPriceTransPngMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceTransPng>()
|
||||
.eq(LngPriceTransPng::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngPriceTransPngList)) {
|
||||
vo.setLngPriceTransPngList(BeanUtil.copyToList(lngPriceTransPngList,
|
||||
LngPriceTransPngVo.class));
|
||||
List<LngContractTransPngVo> lngContractTransPngVoList = lngContractTransPngMapper
|
||||
.selectByContractId(lngContract.getId());
|
||||
vo.setLngContractTransPngList(lngContractTransPngVoList);
|
||||
if (CollectionUtils.isNotEmpty(lngContractTransPngVoList)) {
|
||||
lngContractTransPngVoList.forEach(x -> {
|
||||
List<LngPriceTransPng> lngPriceTransPngList = lngPriceTransPngMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceTransPng>()
|
||||
.eq(LngPriceTransPng::getKtpId, x.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngPriceTransPngList)) {
|
||||
List<LngPriceTransPngVo> lngPriceTransPngVoList = BeanUtil.copyToList(lngPriceTransPngList,
|
||||
LngPriceTransPngVo.class);
|
||||
x.setLngPriceTransPngList(lngPriceTransPngVoList);
|
||||
lngPriceTransPngVoList.forEach(y -> {
|
||||
List<LngPriceTransPngDtl> lngPriceTransPngDtlList = lngPriceTransPngDtlMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceTransPngDtl>().eq(LngPriceTransPngDtl::getPpId,
|
||||
y.getId()));
|
||||
y.setLngPriceTransPngDtlList(BeanUtil.copyToList(lngPriceTransPngDtlList,
|
||||
LngPriceTransPngDtlVo.class));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<LngContractFactRel> lngContractFactRelList = lngContractFactRelMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractFactRel>()
|
||||
.eq(LngContractFactRel::getKId, lngContract.getId()));
|
||||
|
||||
@ -16,6 +16,7 @@ import com.pictc.enums.ExceptionCommonCode;
|
||||
import com.pictc.enums.ValidEnum;
|
||||
import com.pictc.utils.DataLogTools;
|
||||
import com.xjrsoft.common.advice.tran.CurrencyDataProvider;
|
||||
import com.xjrsoft.common.advice.tran.TranDataManager;
|
||||
import com.xjrsoft.common.enums.YesOrNoEnum;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.common.db.service.CommonCallService;
|
||||
@ -39,8 +40,8 @@ public class CurrencyServiceImpl extends ServiceImpl<LngBCurrencyMapper, LngBCur
|
||||
|
||||
private final CommonCallService commonCallService;
|
||||
|
||||
|
||||
private final CurrencyDataProvider tranProvider;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@ -149,10 +149,10 @@ public class CustomerController {
|
||||
@Override
|
||||
public UpdateLngCustomerDto after(DataOperationContent<UpdateLngCustomerDto> content) {
|
||||
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
UpdateLngCustomerDto obj =content.getObj();
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
UpdateLngCustomerDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getCuCode(), obj);
|
||||
return obj;
|
||||
}
|
||||
@ -172,6 +172,8 @@ public class CustomerController {
|
||||
|
||||
@Override
|
||||
public UpdateLngCustomerDto after(DataOperationContent<UpdateLngCustomerDto> content) {
|
||||
UpdateLngCustomerDto obj =content.getObj();
|
||||
tranProvider.removeCacheData(obj.getCuCode());
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
@ -194,6 +196,8 @@ public class CustomerController {
|
||||
|
||||
@Override
|
||||
public UpdateLngCustomerDto after(DataOperationContent<UpdateLngCustomerDto> content) {
|
||||
UpdateLngCustomerDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getCuCode(), obj);
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
@ -216,6 +220,8 @@ public class CustomerController {
|
||||
|
||||
@Override
|
||||
public UpdateLngCustomerDto after(DataOperationContent<UpdateLngCustomerDto> content) {
|
||||
UpdateLngCustomerDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getCuCode(), obj);
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
|
||||
@ -123,7 +123,7 @@ public class GradeSystemController {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
codeRuleClient.useEncode(GS_CODE);
|
||||
UpdateLngGradeSystemDto obj =content.getObj();
|
||||
UpdateLngGradeSystemDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getId().toString(), obj);
|
||||
return obj;
|
||||
}
|
||||
@ -178,6 +178,8 @@ public class GradeSystemController {
|
||||
|
||||
@Override
|
||||
public UpdateLngGradeSystemDto after(DataOperationContent<UpdateLngGradeSystemDto> content) {
|
||||
UpdateLngGradeSystemDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getId().toString(), obj);
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
@ -196,6 +198,8 @@ public class GradeSystemController {
|
||||
|
||||
@Override
|
||||
public UpdateLngGradeSystemDto after(DataOperationContent<UpdateLngGradeSystemDto> content) {
|
||||
UpdateLngGradeSystemDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getId().toString(), obj);
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
|
||||
@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.pictc.enums.ApproveCodeEnum;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.xjrsoft.common.advice.tran.CustomerDataProvider;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.mdm.client.ILngBankClient;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
|
||||
@ -47,16 +48,40 @@ import lombok.AllArgsConstructor;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, LngCustomer> implements ICustomerService {
|
||||
|
||||
private final LngCustomerMapper lngCustomerMapper;
|
||||
|
||||
private final LngCustomerMapper lngCustomerMapper;
|
||||
|
||||
private final LngCustomerAttrPowerMapper lngCustomerAttrPowerMapper;
|
||||
private final LngCustomerBankMapper lngCustomerBankMapper;
|
||||
private final LngCustomerDocMapper lngCustomerDocMapper;
|
||||
private final LngCustomerContactMapper lngCustomerContactMapper;
|
||||
|
||||
private final IFileClient fileClient;
|
||||
|
||||
private final ILngBankClient bankClient;
|
||||
|
||||
private final CustomerDataProvider tranProvider;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(List<Long> ids) {
|
||||
List<LngCustomer> customerList = lngCustomerMapper.selectList(Wrappers.lambdaQuery(LngCustomer.class).in(LngCustomer::getId, ids));
|
||||
for(LngCustomer customer: customerList) {
|
||||
tranProvider.removeCacheData(customer.getCuCode());
|
||||
}
|
||||
List<String> cuCodeList = customerList.stream().map(LngCustomer::getCuCode).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
lngCustomerMapper.deleteBatchIds(ids);
|
||||
if(CollectionUtil.isNotEmpty(cuCodeList)) {
|
||||
lngCustomerAttrPowerMapper.delete(Wrappers.lambdaQuery(LngCustomerAttrPower.class).in(LngCustomerAttrPower::getCuCode, cuCodeList));
|
||||
lngCustomerBankMapper.delete(Wrappers.lambdaQuery(LngCustomerBank.class).in(LngCustomerBank::getCuCode, cuCodeList));
|
||||
lngCustomerDocMapper.delete(Wrappers.lambdaQuery(LngCustomerDoc.class).in(LngCustomerDoc::getCuCode, cuCodeList));
|
||||
lngCustomerContactMapper.delete(Wrappers.lambdaQuery(LngCustomerContact.class).in(LngCustomerContact::getCuCode, cuCodeList));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LngCustomerVo getCustomerById(Long id) {
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ public class SupplierController {
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
UpdateLngSupplierDto obj =content.getObj();
|
||||
UpdateLngSupplierDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getSuCode(), obj);
|
||||
return obj;
|
||||
}
|
||||
@ -168,6 +168,8 @@ public class SupplierController {
|
||||
|
||||
@Override
|
||||
public UpdateLngSupplierDto after(DataOperationContent<UpdateLngSupplierDto> content) {
|
||||
UpdateLngSupplierDto obj =content.getObj();
|
||||
tranProvider.removeCacheData(obj.getSuCode());
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
@ -190,6 +192,8 @@ public class SupplierController {
|
||||
|
||||
@Override
|
||||
public UpdateLngSupplierDto after(DataOperationContent<UpdateLngSupplierDto> content) {
|
||||
UpdateLngSupplierDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getSuCode(), obj);
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
@ -212,6 +216,8 @@ public class SupplierController {
|
||||
|
||||
@Override
|
||||
public UpdateLngSupplierDto after(DataOperationContent<UpdateLngSupplierDto> content) {
|
||||
UpdateLngSupplierDto obj =content.getObj();
|
||||
tranProvider.saveData(obj.getSuCode(), obj);
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user