修改合同接口

This commit is contained in:
guojunyun
2025-09-25 15:27:50 +08:00
parent 327fd9bdcb
commit ff18060b06
14 changed files with 320 additions and 28 deletions

View File

@@ -57,12 +57,11 @@ public class ContractController implements BusinessControllerMarker {
return success(contractViewRespVO);
}
// TODO
@PutMapping("update")
@Operation(summary = "修改合同")
@PreAuthorize("@ss.hasPermission('system:contract:update')")
public CommonResult<Boolean> update(@Valid @RequestBody ContractSaveReqVO reqVO) {
return success(true);
return success(contractService.update(reqVO));
}
// TODO

View File

@@ -33,7 +33,7 @@ public class ContractFormulaSaveReqVO {
private String materialNumber;
@Schema(description = "计算小数位")
private Long decimalBit;
private Long decimalPoint;
@Schema(description = "金属元素编码")
private String elementNumber;
@@ -44,6 +44,9 @@ public class ContractFormulaSaveReqVO {
@Schema(description = "金属元素名称", example = "金属元素名称")
private String elementName;
@Schema(description = "结算类型多条使用逗号分隔字典PRCH_STLM_TP", example = "LST")
private String settlementType;
// 基础系数配置
private List<ContractCoefficientSaveReqVO> coefficients;
// 品位等级价配置

View File

@@ -49,5 +49,5 @@ public class ContractPriceSaveReqVO {
private String averageType;
@Schema(description = "网价小数位")
private BigDecimal decimalBit;
private BigDecimal decimalPoint;
}

View File

@@ -15,7 +15,7 @@ import java.util.List;
@Data
public class ContractSaveReqVO {
@Schema(description = "主键")
@Schema(description = "主键,新增时为空,修改时需要有值")
@ExcelProperty("主键")
private Long id;

View File

@@ -30,7 +30,7 @@ public class ContractViewFormulaRespVO {
private String materialNumber;
@Schema(description = "计算小数位")
private Long decimalBit;
private Long decimalPoint;
@Schema(description = "金属元素编码")
private String elementNumber;

View File

@@ -49,5 +49,5 @@ public class ContractViewPriceRespVO {
private String averageType;
@Schema(description = "网价小数位")
private BigDecimal decimalBit;
private BigDecimal decimalPoint;
}

View File

@@ -60,8 +60,8 @@ public class ContractFormulaDO extends BusinessBaseDO {
/**
* 计算小数位
*/
@TableField("DEC")
private Long decimalBit;
@TableField("DEC_PNT")
private Long decimalPoint;
/**
* 金属元素编码
*/
@@ -77,4 +77,9 @@ public class ContractFormulaDO extends BusinessBaseDO {
*/
@TableField("ELEM_NAME")
private String elementName;
/**
* 结算类型多条使用逗号分隔字典PRCH_STLM_TP
*/
@TableField("STLM_TP")
private String settlementType;
}

View File

@@ -93,6 +93,6 @@ public class ContractPriceDO extends BusinessBaseDO {
/**
* 网价小数位
*/
@TableField("DEC")
private BigDecimal decimalBit;
@TableField("DEC_PNT")
private BigDecimal decimalPoint;
}

View File

@@ -25,7 +25,7 @@ public interface ContractService {
/**
* 新增合同
*
* @param reqVO 用户信息
* @param reqVO 合同信息
* @return 合同ID
*/
Long createContract(@Valid ContractSaveReqVO reqVO);
@@ -37,4 +37,12 @@ public interface ContractService {
* @return 合同信息
*/
ContractViewRespVO get(Long id);
/**
* 修改合同
*
* @param reqVO 合同信息
* @return 修改结果
*/
Boolean update(@Valid ContractSaveReqVO reqVO);
}