feat: 新增小数位数字段
This commit is contained in:
@@ -127,6 +127,14 @@ public class Material extends Model<Material> {
|
||||
@TableField("SORT")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("保留小数位数")
|
||||
@TableField("ROUND_BIT")
|
||||
private Integer roundBit;
|
||||
|
||||
@ApiModelProperty("保留小数具体方法")
|
||||
@TableField("ROUND_METHOD")
|
||||
private String roundMethod;
|
||||
|
||||
@ApiModelProperty("材料编码")
|
||||
@TableField("CODE")
|
||||
private String code;
|
||||
@@ -172,6 +180,8 @@ public class Material extends Model<Material> {
|
||||
this.tax = params.getTax();
|
||||
this.type = params.getType();
|
||||
this.sort = params.getSort();
|
||||
this.roundBit = params.getRoundBit();
|
||||
this.roundMethod = params.getRoundMethod();
|
||||
this.code = buildCode(category1, category2, category3, category4);
|
||||
this.updateTime = LocalDateTime.now();
|
||||
this.createTime = LocalDateTime.now();
|
||||
@@ -190,6 +200,8 @@ public class Material extends Model<Material> {
|
||||
this.tax = params.getTax();
|
||||
this.type = params.getType();
|
||||
this.sort = params.getSort();
|
||||
this.roundBit = params.getRoundBit();
|
||||
this.roundMethod = params.getRoundMethod();
|
||||
this.code = buildCode(category1, category2, category3, category4);
|
||||
this.updateTime = LocalDateTime.now();
|
||||
this.updateUserName = user.getName();
|
||||
|
||||
@@ -39,6 +39,12 @@ public class MaterialCreateRequest {
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("保留小数位数")
|
||||
private Integer roundBit;
|
||||
|
||||
@ApiModelProperty("保留小数具体方法")
|
||||
private String roundMethod;
|
||||
|
||||
public void check() throws Exception {
|
||||
if (ObjectUtil.isEmpty(category1) || category1.chars().count() != 2) {
|
||||
throw new NcHttpException(HttpErrorResponseEnum.MATERIAL_CATEGORY_INVALID);
|
||||
|
||||
@@ -36,6 +36,12 @@ public class MaterialEditRequest {
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("保留小数位数")
|
||||
private Integer roundBit;
|
||||
|
||||
@ApiModelProperty("保留小数具体方法")
|
||||
private String roundMethod;
|
||||
|
||||
public void check() throws Exception{
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user