Commit 24a454d476111979994b7c21df939e9fa1779b70

Authored by 杨鸣坤
1 parent 48936b95

楚江ERP:物料行增加加工费

... ... @@ -154,11 +154,13 @@ create table if not exists `tbl_contract_distributor_line`
154 154 `length_tol_neg` DECIMAL(10, 4) COMMENT '长度公差负',
155 155 `status` VARCHAR(50) COMMENT '状态',
156 156 `quantity` DECIMAL(15, 4) COMMENT '数量',
  157 + `processing_fee` DECIMAL(15, 4) COMMENT '加工费',
157 158 `unit_price` DECIMAL(15, 4) COMMENT '单价',
158 159 `amount_excluding_tax` DECIMAL(15, 2) COMMENT '不含税金额',
159 160 `total_amount` DECIMAL(15, 2) COMMENT '总金额',
160 161 `delivery_date` DATE COMMENT '发货日期',
161 162 `show_order` INT DEFAULT 0 COMMENT '排序',
  163 + `item_id` varchar(50) COMMENT '前端用ID',
162 164 `create_by_id` varchar(32) not null comment '创建人ID',
163 165 `create_by` varchar(20) not null comment '创建人',
164 166 `update_by_id` varchar(32) not null comment '更新人ID',
... ...
... ... @@ -3,6 +3,8 @@ package com.lframework.xingyun.sc.bo.contract;
3 3 import com.fasterxml.jackson.annotation.JsonFormat;
4 4 import com.lframework.starter.common.constants.StringPool;
5 5 import com.lframework.starter.web.core.bo.BaseBo;
  6 +import com.lframework.starter.web.core.components.validation.IsNumberPrecision;
  7 +import com.lframework.starter.web.core.components.validation.TypeMismatch;
6 8 import com.lframework.xingyun.sc.entity.ContractDistributorLine;
7 9 import io.swagger.annotations.ApiModelProperty;
8 10 import lombok.Data;
... ... @@ -79,6 +81,12 @@ public class GetContractDistributorLineBo extends BaseBo<ContractDistributorLine
79 81 private BigDecimal quantity;
80 82
81 83 /**
  84 + * 加工费
  85 + */
  86 + @ApiModelProperty(value = "加工费")
  87 + private BigDecimal processingFee;
  88 +
  89 + /**
82 90 * 单价
83 91 */
84 92 @ApiModelProperty("单价")
... ... @@ -157,6 +165,12 @@ public class GetContractDistributorLineBo extends BaseBo<ContractDistributorLine
157 165 @ApiModelProperty("长度公差负")
158 166 private BigDecimal lengthTolNeg;
159 167
  168 + /**
  169 + * 前端用ID
  170 + */
  171 + @ApiModelProperty(value = "前端用ID")
  172 + private String itemId;
  173 +
160 174 public GetContractDistributorLineBo() {
161 175
162 176 }
... ...
... ... @@ -454,7 +454,6 @@ public class ContractDistributorStandardController extends DefaultBaseController
454 454 throw new DefaultClientException("参数错误!");
455 455 }
456 456
457   - // todo ymk 锁规接口待完善
458 457 contractDistributorStandardService.specificationLock(vo);
459 458
460 459 contractDistributorStandardService.cleanCacheByKey(vo.getId());
... ...
... ... @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
5 5 import com.baomidou.mybatisplus.annotation.TableName;
6 6 import com.lframework.starter.web.core.dto.BaseDto;
7 7 import com.lframework.starter.web.core.entity.BaseEntity;
  8 +import io.swagger.annotations.ApiModelProperty;
8 9 import lombok.Data;
9 10
10 11 import java.math.BigDecimal;
... ... @@ -75,6 +76,11 @@ public class ContractDistributorLine extends BaseEntity implements BaseDto {
75 76 private BigDecimal quantity;
76 77
77 78 /**
  79 + * 加工费
  80 + */
  81 + private BigDecimal processingFee;
  82 +
  83 + /**
78 84 * 单价
79 85 */
80 86 private BigDecimal unitPrice;
... ... @@ -100,6 +106,11 @@ public class ContractDistributorLine extends BaseEntity implements BaseDto {
100 106 private Integer showOrder;
101 107
102 108 /**
  109 + * 前端用ID
  110 + */
  111 + private String itemId;
  112 +
  113 + /**
103 114 * 创建人ID
104 115 */
105 116 @TableField(fill = FieldFill.INSERT)
... ...
... ... @@ -73,6 +73,7 @@ public class ContractDistributorLineServiceImpl extends BaseMpServiceImpl<Contra
73 73 data.setLength(vo.getLength());
74 74 data.setStatus(vo.getStatus());
75 75 data.setQuantity(vo.getQuantity());
  76 + data.setProcessingFee(vo.getProcessingFee());
76 77 data.setUnitPrice(vo.getUnitPrice());
77 78 data.setAmountExcludingTax(vo.getAmountExcludingTax());
78 79 data.setTotalAmount(vo.getTotalAmount());
... ... @@ -85,6 +86,7 @@ public class ContractDistributorLineServiceImpl extends BaseMpServiceImpl<Contra
85 86 data.setWidthTolNeg(vo.getWidthTolNeg());
86 87 data.setLengthTolPos(vo.getLengthTolPos());
87 88 data.setLengthTolNeg(vo.getLengthTolNeg());
  89 + data.setItemId(vo.getItemId());
88 90
89 91 getBaseMapper().insert(data);
90 92
... ... @@ -114,6 +116,7 @@ public class ContractDistributorLineServiceImpl extends BaseMpServiceImpl<Contra
114 116 .set(ContractDistributorLine::getLength, vo.getLength())
115 117 .set(ContractDistributorLine::getStatus, vo.getStatus())
116 118 .set(ContractDistributorLine::getQuantity, vo.getQuantity())
  119 + .set(ContractDistributorLine::getProcessingFee, vo.getProcessingFee())
117 120 .set(ContractDistributorLine::getUnitPrice, vo.getUnitPrice())
118 121 .set(ContractDistributorLine::getAmountExcludingTax, vo.getAmountExcludingTax())
119 122 .set(ContractDistributorLine::getTotalAmount, vo.getTotalAmount())
... ... @@ -126,6 +129,7 @@ public class ContractDistributorLineServiceImpl extends BaseMpServiceImpl<Contra
126 129 .set(ContractDistributorLine::getWidthTolNeg, vo.getWidthTolNeg())
127 130 .set(ContractDistributorLine::getLengthTolPos, vo.getLengthTolPos())
128 131 .set(ContractDistributorLine::getLengthTolNeg, vo.getLengthTolNeg())
  132 + .set(ContractDistributorLine::getItemId, vo.getItemId())
129 133 .eq(ContractDistributorLine::getId, vo.getId());
130 134
131 135 getBaseMapper().update(updateWrapper);
... ...
... ... @@ -92,6 +92,14 @@ public class CreateContractDistributorLineVo implements BaseVo, Serializable {
92 92 private BigDecimal quantity;
93 93
94 94 /**
  95 + * 加工费
  96 + */
  97 + @ApiModelProperty(value = "加工费")
  98 + @TypeMismatch(message = "加工费格式有误!")
  99 + @IsNumberPrecision(message = "加工费最多允许4位小数!", value = 4)
  100 + private BigDecimal processingFee;
  101 +
  102 + /**
95 103 * 单价
96 104 */
97 105 @ApiModelProperty(value = "单价")
... ... @@ -178,4 +186,9 @@ public class CreateContractDistributorLineVo implements BaseVo, Serializable {
178 186 @TypeMismatch(message = "长度公差负格式有误!")
179 187 private BigDecimal lengthTolNeg;
180 188
  189 + /**
  190 + * 前端用ID
  191 + */
  192 + @ApiModelProperty(value = "前端用ID")
  193 + private String itemId;
181 194 }
... ...
... ... @@ -96,6 +96,14 @@ public class UpdateContractDistributorLineVo implements BaseVo, Serializable {
96 96 private BigDecimal quantity;
97 97
98 98 /**
  99 + * 加工费
  100 + */
  101 + @ApiModelProperty(value = "加工费")
  102 + @TypeMismatch(message = "加工费格式有误!")
  103 + @IsNumberPrecision(message = "加工费最多允许4位小数!", value = 4)
  104 + private BigDecimal processingFee;
  105 +
  106 + /**
99 107 * 单价
100 108 */
101 109 @ApiModelProperty(value = "单价")
... ... @@ -181,5 +189,10 @@ public class UpdateContractDistributorLineVo implements BaseVo, Serializable {
181 189 @TypeMismatch(message = "长度公差负格式有误!")
182 190 private BigDecimal lengthTolNeg;
183 191
  192 + /**
  193 + * 前端用ID
  194 + */
  195 + @ApiModelProperty(value = "前端用ID")
  196 + private String itemId;
184 197 }
185 198
... ...
... ... @@ -13,6 +13,7 @@
13 13 <result column="length" property="length"/>
14 14 <result column="status" property="status"/>
15 15 <result column="quantity" property="quantity"/>
  16 + <result column="processing_fee" property="processingFee"/>
16 17 <result column="unit_price" property="unitPrice"/>
17 18 <result column="amount_excluding_tax" property="amountExcludingTax"/>
18 19 <result column="total_amount" property="totalAmount"/>
... ... @@ -31,6 +32,7 @@
31 32 <result column="width_tol_neg" property="widthTolNeg"/>
32 33 <result column="length_tol_pos" property="lengthTolPos"/>
33 34 <result column="length_tol_neg" property="lengthTolNeg"/>
  35 + <result column="item_id" property="itemId"/>
34 36 </resultMap>
35 37
36 38 <sql id="ContractDistributorLine_sql">
... ... @@ -44,6 +46,7 @@
44 46 tb.length,
45 47 tb.status,
46 48 tb.quantity,
  49 + tb.processing_fee,
47 50 tb.unit_price,
48 51 tb.amount_excluding_tax,
49 52 tb.total_amount,
... ... @@ -61,7 +64,8 @@
61 64 tb.width_tol_pos,
62 65 tb.width_tol_neg,
63 66 tb.length_tol_pos,
64   - tb.length_tol_neg
  67 + tb.length_tol_neg,
  68 + tb.item_id
65 69 FROM tbl_contract_distributor_line AS tb
66 70 </sql>
67 71
... ...