Commit d59b52b59909fb125d229458f82c204d30d2efa2

Authored by 房远帅
1 parent 858f59fa

业务员报价:新增 是否暂定价 报价明细新增 漆损率%

@@ -1699,6 +1699,7 @@ CREATE TABLE `procurement_salesman_quotation` @@ -1699,6 +1699,7 @@ CREATE TABLE `procurement_salesman_quotation`
1699 `terminal_customer` bool NOT NULL COMMENT '是否终端客户', 1699 `terminal_customer` bool NOT NULL COMMENT '是否终端客户',
1700 `priced` bool NOT NULL COMMENT '是否为点价', 1700 `priced` bool NOT NULL COMMENT '是否为点价',
1701 `pricing_deadline` date DEFAULT NULL COMMENT '点价截止日期', 1701 `pricing_deadline` date DEFAULT NULL COMMENT '点价截止日期',
  1702 + `temporary_price` bool DEFAULT NULL COMMENT '是否暂定价',
1702 `other_expense_settlement` bool NOT NULL COMMENT '其他费用凭票到厂另行结算', 1703 `other_expense_settlement` bool NOT NULL COMMENT '其他费用凭票到厂另行结算',
1703 `delivery_mode` varchar(50) NOT NULL COMMENT '交提货方式', 1704 `delivery_mode` varchar(50) NOT NULL COMMENT '交提货方式',
1704 `commodity_buyout` bool NOT NULL COMMENT '是否通货买断', 1705 `commodity_buyout` bool NOT NULL COMMENT '是否通货买断',
@@ -1748,7 +1749,8 @@ CREATE TABLE `procurement_salesman_quotation_line` @@ -1748,7 +1749,8 @@ CREATE TABLE `procurement_salesman_quotation_line`
1748 `quantity` decimal(18, 5) NOT NULL COMMENT '数量', 1749 `quantity` decimal(18, 5) NOT NULL COMMENT '数量',
1749 `purchase_price` decimal(18, 10) DEFAULT NULL COMMENT '采购价', 1750 `purchase_price` decimal(18, 10) DEFAULT NULL COMMENT '采购价',
1750 `estimated_loss` decimal(18, 10) DEFAULT NULL COMMENT '买断料预计损耗', 1751 `estimated_loss` decimal(18, 10) DEFAULT NULL COMMENT '买断料预计损耗',
1751 - `application_attrition` decimal(18, 10) DEFAULT NULL COMMENT '申请损耗', 1752 + `application_attrition` decimal(18, 10) DEFAULT NULL COMMENT '申请损耗(%)',
  1753 + `paint_damage_ratio` decimal(18, 10) DEFAULT NULL COMMENT '漆损率(%)',
1752 `item_id` varchar(32) NOT NULL COMMENT '前端行标识', 1754 `item_id` varchar(32) NOT NULL COMMENT '前端行标识',
1753 `create_by_id` varchar(32) DEFAULT NULL COMMENT '创建人ID', 1755 `create_by_id` varchar(32) DEFAULT NULL COMMENT '创建人ID',
1754 `create_by` varchar(64) DEFAULT NULL COMMENT '创建人', 1756 `create_by` varchar(64) DEFAULT NULL COMMENT '创建人',
@@ -112,6 +112,11 @@ public class SalesmanQuotation extends BaseEntity implements BaseDto { @@ -112,6 +112,11 @@ public class SalesmanQuotation extends BaseEntity implements BaseDto {
112 private LocalDate pricingDeadline; 112 private LocalDate pricingDeadline;
113 113
114 /** 114 /**
  115 + * 是否暂定价
  116 + */
  117 + private Boolean temporaryPrice;
  118 +
  119 + /**
115 * 其他费用凭票到厂另行结算 120 * 其他费用凭票到厂另行结算
116 */ 121 */
117 private Boolean otherExpenseSettlement; 122 private Boolean otherExpenseSettlement;
@@ -85,6 +85,11 @@ public class SalesmanQuotationLine extends BaseEntity implements BaseDto { @@ -85,6 +85,11 @@ public class SalesmanQuotationLine extends BaseEntity implements BaseDto {
85 private BigDecimal applicationAttrition; 85 private BigDecimal applicationAttrition;
86 86
87 /** 87 /**
  88 + * 漆损率%
  89 + */
  90 + private BigDecimal paintDamageRatio;
  91 +
  92 + /**
88 * 前端行标识 93 * 前端行标识
89 */ 94 */
90 private String itemId; 95 private String itemId;
@@ -106,6 +106,7 @@ public class SalesmanQuotationLineServiceImpl @@ -106,6 +106,7 @@ public class SalesmanQuotationLineServiceImpl
106 data.setPurchasePrice(vo.getPurchasePrice()); 106 data.setPurchasePrice(vo.getPurchasePrice());
107 data.setApplicationAttrition(vo.getApplicationAttrition()); 107 data.setApplicationAttrition(vo.getApplicationAttrition());
108 data.setEstimatedLoss(vo.getEstimatedLoss()); 108 data.setEstimatedLoss(vo.getEstimatedLoss());
  109 + data.setPaintDamageRatio(vo.getPaintDamageRatio());
109 data.setItemId(vo.getItemId()); 110 data.setItemId(vo.getItemId());
110 111
111 getBaseMapper().insert(data); 112 getBaseMapper().insert(data);
@@ -137,6 +138,7 @@ public class SalesmanQuotationLineServiceImpl @@ -137,6 +138,7 @@ public class SalesmanQuotationLineServiceImpl
137 .set(SalesmanQuotationLine::getPurchasePrice, vo.getPurchasePrice()) 138 .set(SalesmanQuotationLine::getPurchasePrice, vo.getPurchasePrice())
138 .set(SalesmanQuotationLine::getApplicationAttrition, vo.getApplicationAttrition()) 139 .set(SalesmanQuotationLine::getApplicationAttrition, vo.getApplicationAttrition())
139 .set(SalesmanQuotationLine::getEstimatedLoss, vo.getEstimatedLoss()) 140 .set(SalesmanQuotationLine::getEstimatedLoss, vo.getEstimatedLoss())
  141 + .set(SalesmanQuotationLine::getPaintDamageRatio, vo.getPaintDamageRatio())
140 .set(SalesmanQuotationLine::getItemId, StringUtils.defaultIfBlank(vo.getItemId(), data.getItemId())) 142 .set(SalesmanQuotationLine::getItemId, StringUtils.defaultIfBlank(vo.getItemId(), data.getItemId()))
141 .eq(SalesmanQuotationLine::getId, vo.getId()); 143 .eq(SalesmanQuotationLine::getId, vo.getId());
142 144
@@ -375,6 +375,7 @@ public class SalesmanQuotationServiceImpl @@ -375,6 +375,7 @@ public class SalesmanQuotationServiceImpl
375 data.setTerminalCustomer(vo.getTerminalCustomer()); 375 data.setTerminalCustomer(vo.getTerminalCustomer());
376 data.setPriced(vo.getPriced()); 376 data.setPriced(vo.getPriced());
377 data.setPricingDeadline(vo.getPricingDeadline()); 377 data.setPricingDeadline(vo.getPricingDeadline());
  378 + data.setTemporaryPrice(vo.getTemporaryPrice());
378 data.setOtherExpenseSettlement(vo.getOtherExpenseSettlement()); 379 data.setOtherExpenseSettlement(vo.getOtherExpenseSettlement());
379 data.setDeliveryMode(vo.getDeliveryMode()); 380 data.setDeliveryMode(vo.getDeliveryMode());
380 data.setCommodityBuyout(vo.getCommodityBuyout()); 381 data.setCommodityBuyout(vo.getCommodityBuyout());
@@ -419,6 +420,7 @@ public class SalesmanQuotationServiceImpl @@ -419,6 +420,7 @@ public class SalesmanQuotationServiceImpl
419 data.setTerminalCustomer(vo.getTerminalCustomer()); 420 data.setTerminalCustomer(vo.getTerminalCustomer());
420 data.setPriced(vo.getPriced()); 421 data.setPriced(vo.getPriced());
421 data.setPricingDeadline(vo.getPricingDeadline()); 422 data.setPricingDeadline(vo.getPricingDeadline());
  423 + data.setTemporaryPrice(vo.getTemporaryPrice());
422 data.setOtherExpenseSettlement(vo.getOtherExpenseSettlement()); 424 data.setOtherExpenseSettlement(vo.getOtherExpenseSettlement());
423 data.setDeliveryMode(vo.getDeliveryMode()); 425 data.setDeliveryMode(vo.getDeliveryMode());
424 data.setCommodityBuyout(vo.getCommodityBuyout()); 426 data.setCommodityBuyout(vo.getCommodityBuyout());
@@ -518,6 +520,7 @@ public class SalesmanQuotationServiceImpl @@ -518,6 +520,7 @@ public class SalesmanQuotationServiceImpl
518 createLineVo.setPurchasePrice(lineVo.getPurchasePrice()); 520 createLineVo.setPurchasePrice(lineVo.getPurchasePrice());
519 createLineVo.setApplicationAttrition(lineVo.getApplicationAttrition()); 521 createLineVo.setApplicationAttrition(lineVo.getApplicationAttrition());
520 createLineVo.setEstimatedLoss(lineVo.getEstimatedLoss()); 522 createLineVo.setEstimatedLoss(lineVo.getEstimatedLoss());
  523 + createLineVo.setPaintDamageRatio(lineVo.getPaintDamageRatio());
521 createLineVo.setItemId(lineVo.getItemId()); 524 createLineVo.setItemId(lineVo.getItemId());
522 525
523 salesmanQuotationLineService.create(createLineVo); 526 salesmanQuotationLineService.create(createLineVo);
@@ -565,6 +568,7 @@ public class SalesmanQuotationServiceImpl @@ -565,6 +568,7 @@ public class SalesmanQuotationServiceImpl
565 createLineVo.setApplicationAttrition(lineVo.getApplicationAttrition()); 568 createLineVo.setApplicationAttrition(lineVo.getApplicationAttrition());
566 createLineVo.setEstimatedLoss(lineVo.getEstimatedLoss()); 569 createLineVo.setEstimatedLoss(lineVo.getEstimatedLoss());
567 createLineVo.setItemId(lineVo.getItemId()); 570 createLineVo.setItemId(lineVo.getItemId());
  571 + createLineVo.setPaintDamageRatio(lineVo.getPaintDamageRatio());
568 String lineId = salesmanQuotationLineService.create(createLineVo); 572 String lineId = salesmanQuotationLineService.create(createLineVo);
569 573
570 existIdList.add(lineId); 574 existIdList.add(lineId);
@@ -67,6 +67,10 @@ public class CreateSalesmanQuotationLineVo implements BaseVo, Serializable { @@ -67,6 +67,10 @@ public class CreateSalesmanQuotationLineVo implements BaseVo, Serializable {
67 @Digits(integer = 8, fraction = 10, message = "买断料预计损耗最多支持8位整数和10位小数!") 67 @Digits(integer = 8, fraction = 10, message = "买断料预计损耗最多支持8位整数和10位小数!")
68 private BigDecimal estimatedLoss; 68 private BigDecimal estimatedLoss;
69 69
  70 + @ApiModelProperty("漆损率%")
  71 + @Digits(integer = 8, fraction = 10, message = "漆损率最多支持8位整数和10位小数!")
  72 + private BigDecimal paintDamageRatio;
  73 +
70 /** 74 /**
71 * 前端行标识 75 * 前端行标识
72 */ 76 */
@@ -62,8 +62,8 @@ public class CreateSalesmanQuotationVo implements BaseVo, Serializable { @@ -62,8 +62,8 @@ public class CreateSalesmanQuotationVo implements BaseVo, Serializable {
62 /** 62 /**
63 * 是否为点价 63 * 是否为点价
64 */ 64 */
65 - @ApiModelProperty(value = "是否为点价", required = true)  
66 - @NotNull(message = "是否为点价不能为空!") 65 + @ApiModelProperty(value = "是否为未点价", required = true)
  66 + @NotNull(message = "是否为未点价不能为空!")
67 private Boolean priced; 67 private Boolean priced;
68 68
69 /** 69 /**
@@ -73,6 +73,12 @@ public class CreateSalesmanQuotationVo implements BaseVo, Serializable { @@ -73,6 +73,12 @@ public class CreateSalesmanQuotationVo implements BaseVo, Serializable {
73 private LocalDate pricingDeadline; 73 private LocalDate pricingDeadline;
74 74
75 /** 75 /**
  76 + * 是否暂定价
  77 + */
  78 + @ApiModelProperty(value = "是否暂定价")
  79 + private Boolean temporaryPrice;
  80 +
  81 + /**
76 * 其他费用凭票到厂另行结算 82 * 其他费用凭票到厂另行结算
77 */ 83 */
78 @ApiModelProperty(value = "其他费用凭票到厂另行结算", required = true) 84 @ApiModelProperty(value = "其他费用凭票到厂另行结算", required = true)
@@ -54,6 +54,12 @@ public class QuerySalesmanQuotationVo extends PageVo implements BaseVo, Serializ @@ -54,6 +54,12 @@ public class QuerySalesmanQuotationVo extends PageVo implements BaseVo, Serializ
54 private Boolean priced; 54 private Boolean priced;
55 55
56 /** 56 /**
  57 + * 是否暂定价
  58 + */
  59 + @ApiModelProperty(value = "是否暂定价")
  60 + private Boolean temporaryPrice;
  61 +
  62 + /**
57 * 报价时间开始 63 * 报价时间开始
58 */ 64 */
59 @ApiModelProperty("报价时间开始") 65 @ApiModelProperty("报价时间开始")
@@ -72,6 +72,12 @@ public class UpdateSalesmanQuotationVo implements BaseVo, Serializable { @@ -72,6 +72,12 @@ public class UpdateSalesmanQuotationVo implements BaseVo, Serializable {
72 private LocalDate pricingDeadline; 72 private LocalDate pricingDeadline;
73 73
74 /** 74 /**
  75 + * 是否暂定价
  76 + */
  77 + @ApiModelProperty(value = "是否暂定价")
  78 + private Boolean temporaryPrice;
  79 +
  80 + /**
75 * 其他费用凭票到厂另行结算 81 * 其他费用凭票到厂另行结算
76 */ 82 */
77 @ApiModelProperty(value = "其他费用凭票到厂另行结算", required = true) 83 @ApiModelProperty(value = "其他费用凭票到厂另行结算", required = true)
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
15 <result column="purchase_price" property="purchasePrice"/> 15 <result column="purchase_price" property="purchasePrice"/>
16 <result column="estimated_loss" property="estimatedLoss"/> 16 <result column="estimated_loss" property="estimatedLoss"/>
17 <result column="application_attrition" property="applicationAttrition"/> 17 <result column="application_attrition" property="applicationAttrition"/>
  18 + <result column="paint_damage_ratio" property="paintDamageRatio"/>
18 <result column="item_id" property="itemId"/> 19 <result column="item_id" property="itemId"/>
19 <result column="quote_time" property="quoteTime"/> 20 <result column="quote_time" property="quoteTime"/>
20 <result column="quoter_name" property="quoterName"/> 21 <result column="quoter_name" property="quoterName"/>
@@ -41,6 +42,7 @@ @@ -41,6 +42,7 @@
41 tb.purchase_price, 42 tb.purchase_price,
42 tb.estimated_loss, 43 tb.estimated_loss,
43 tb.application_attrition, 44 tb.application_attrition,
  45 + tb.paint_damage_ratio,
44 tb.item_id, 46 tb.item_id,
45 tb.create_by_id, 47 tb.create_by_id,
46 tb.create_by, 48 tb.create_by,
@@ -72,6 +74,7 @@ @@ -72,6 +74,7 @@
72 br.product_name, 74 br.product_name,
73 tb.quantity, 75 tb.quantity,
74 tb.purchase_price, 76 tb.purchase_price,
  77 + tb.paint_damage_ratio,
75 tb.create_by_id, 78 tb.create_by_id,
76 tb.create_by, 79 tb.create_by,
77 tb.update_by_id, 80 tb.update_by_id,
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
20 <result column="terminal_customer" property="terminalCustomer"/> 20 <result column="terminal_customer" property="terminalCustomer"/>
21 <result column="priced" property="priced"/> 21 <result column="priced" property="priced"/>
22 <result column="pricing_deadline" property="pricingDeadline"/> 22 <result column="pricing_deadline" property="pricingDeadline"/>
  23 + <result column="temporary_price" property="temporaryPrice"/>
23 <result column="other_expense_settlement" property="otherExpenseSettlement"/> 24 <result column="other_expense_settlement" property="otherExpenseSettlement"/>
24 <result column="delivery_mode" property="deliveryMode"/> 25 <result column="delivery_mode" property="deliveryMode"/>
25 <result column="commodity_buyout" property="commodityBuyout"/> 26 <result column="commodity_buyout" property="commodityBuyout"/>
@@ -73,6 +74,7 @@ @@ -73,6 +74,7 @@
73 tb.terminal_customer, 74 tb.terminal_customer,
74 tb.priced, 75 tb.priced,
75 tb.pricing_deadline, 76 tb.pricing_deadline,
  77 + tb.temporary_price,
76 tb.other_expense_settlement, 78 tb.other_expense_settlement,
77 tb.delivery_mode, 79 tb.delivery_mode,
78 tb.commodity_buyout, 80 tb.commodity_buyout,
@@ -132,6 +134,9 @@ @@ -132,6 +134,9 @@
132 <if test="vo.priced != null"> 134 <if test="vo.priced != null">
133 AND tb.priced = #{vo.priced} 135 AND tb.priced = #{vo.priced}
134 </if> 136 </if>
  137 + <if test="vo.temporaryPrice != null">
  138 + AND tb.temporary_price = #{vo.temporaryPrice}
  139 + </if>
135 <if test="vo.quoteDateStart != null"> 140 <if test="vo.quoteDateStart != null">
136 AND DATE(tb.quote_time) <![CDATA[ >= ]]> #{vo.quoteDateStart} 141 AND DATE(tb.quote_time) <![CDATA[ >= ]]> #{vo.quoteDateStart}
137 </if> 142 </if>