合同资金拆分实现
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 结算金额拆分分页 Request VO")
|
||||
@Data
|
||||
public class AmountDismantlePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "物料名称", example = "赵六")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Schema(description = "元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "元素名称", example = "张三")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "元素编码")
|
||||
private String elementCode;
|
||||
|
||||
@Schema(description = "占比")
|
||||
private BigDecimal ratio;
|
||||
|
||||
@Schema(description = "合同id", example = "3781")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 结算金额拆分 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AmountDismantleRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17357")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料名称", example = "赵六")
|
||||
@ExcelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Schema(description = "元素缩写")
|
||||
@ExcelProperty("元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "元素名称", example = "张三")
|
||||
@ExcelProperty("元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "元素编码")
|
||||
@ExcelProperty("元素编码")
|
||||
private String elementCode;
|
||||
|
||||
@Schema(description = "占比")
|
||||
@ExcelProperty("占比")
|
||||
private BigDecimal ratio;
|
||||
|
||||
@Schema(description = "合同id", example = "3781")
|
||||
@ExcelProperty("合同id")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 结算金额拆分新增/修改 Request VO")
|
||||
@Data
|
||||
public class AmountDismantleSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17357")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料名称", example = "赵六")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Schema(description = "元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "元素名称", example = "张三")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "元素编码")
|
||||
private String elementCode;
|
||||
|
||||
@Schema(description = "占比")
|
||||
private BigDecimal ratio;
|
||||
|
||||
@Schema(description = "合同id", example = "3781")
|
||||
private Long contractId;
|
||||
|
||||
}
|
||||
@@ -244,6 +244,8 @@ public class ContractSaveReqVO {
|
||||
private String salesTaxNumber;
|
||||
@Schema(description = "是否信用", example = "1")
|
||||
private String hasCredit;
|
||||
//资金拆分表
|
||||
private List<AmountDismantleSaveReqVO> amountSplit;
|
||||
// 收发货规则
|
||||
private List<ContractReceiveSendSaveReqVO> contractReceiveSends;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode CONTRACT_PARTNER_NOT_EXISTS = new ErrorCode(1_027_000_017, "客商信息不存在");
|
||||
ErrorCode CONTRACT_PUSH_FAIL = new ErrorCode(1_027_000_019, "推送合同失败:{}");
|
||||
ErrorCode CONTRACT_STATUS_NOT_CANCEL = new ErrorCode(1_027_000_020, "{}状态合同不允许作废");
|
||||
|
||||
ErrorCode AMOUNT_DISMANTLE_NOT_EXISTS = new ErrorCode(1_027_000_022, "资金拆分不存在");
|
||||
ErrorCode CONTRACT_RECEIVE_SEND_NOT_EXISTS = new ErrorCode(1_027_000_021, "收发货规则不存在");
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,71 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.amountdismantle;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 结算金额拆分 DO
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@TableName("bse_amt_dsmt")
|
||||
@KeySequence("bse_amt_dsmt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class AmountDismantleDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("MTRL_CD")
|
||||
private String materialCode;
|
||||
/**
|
||||
* 元素缩写
|
||||
*/
|
||||
@TableField("ELEM_ABBR")
|
||||
private String elementAbbreviation;
|
||||
/**
|
||||
* 元素名称
|
||||
*/
|
||||
@TableField("ELEM_NAME")
|
||||
private String elementName;
|
||||
/**
|
||||
* 元素编码
|
||||
*/
|
||||
@TableField("ELEM_CD")
|
||||
private String elementCode;
|
||||
/**
|
||||
* 占比
|
||||
*/
|
||||
@TableField("RTIO")
|
||||
private BigDecimal ratio;
|
||||
/**
|
||||
* 合同id
|
||||
*/
|
||||
@TableField("CTRT_ID")
|
||||
private Long contractId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.amountdismantle;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.AmountDismantlePageReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.amountdismantle.AmountDismantleDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 结算金额拆分 Mapper
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@Mapper
|
||||
public interface AmountDismantleMapper extends BaseMapperX<AmountDismantleDO> {
|
||||
|
||||
default PageResult<AmountDismantleDO> selectPage(AmountDismantlePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AmountDismantleDO>()
|
||||
.likeIfPresent(AmountDismantleDO::getMaterialName, reqVO.getMaterialName())
|
||||
.eqIfPresent(AmountDismantleDO::getMaterialCode, reqVO.getMaterialCode())
|
||||
.eqIfPresent(AmountDismantleDO::getElementAbbreviation, reqVO.getElementAbbreviation())
|
||||
.likeIfPresent(AmountDismantleDO::getElementName, reqVO.getElementName())
|
||||
.eqIfPresent(AmountDismantleDO::getElementCode, reqVO.getElementCode())
|
||||
.eqIfPresent(AmountDismantleDO::getRatio, reqVO.getRatio())
|
||||
.eqIfPresent(AmountDismantleDO::getContractId, reqVO.getContractId())
|
||||
.betweenIfPresent(AmountDismantleDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AmountDismantleDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.zt.plat.module.contractorder.service.amountdismantle;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.AmountDismantlePageReqVO;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.AmountDismantleRespVO;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.AmountDismantleSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.amountdismantle.AmountDismantleDO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 结算金额拆分 Service 接口
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
public interface AmountDismantleService {
|
||||
|
||||
/**
|
||||
* 创建结算金额拆分
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
AmountDismantleRespVO createAmountDismantle(@Valid AmountDismantleSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新结算金额拆分
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAmountDismantle(@Valid AmountDismantleSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除结算金额拆分
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAmountDismantle(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除结算金额拆分
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteAmountDismantleListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得结算金额拆分
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 结算金额拆分
|
||||
*/
|
||||
AmountDismantleDO getAmountDismantle(Long id);
|
||||
|
||||
/**
|
||||
* 获得结算金额拆分分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 结算金额拆分分页
|
||||
*/
|
||||
PageResult<AmountDismantleDO> getAmountDismantlePage(AmountDismantlePageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 通过合同id查询结算金额拆分
|
||||
*
|
||||
* @param contractId 合同id
|
||||
* @return 结算金额拆分列表
|
||||
*/
|
||||
List<AmountDismantleDO> getAmountDismantleListByContractId(Long contractId);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user