Commit 4c41c34004abd54d7c7ca5047878f5dd420e8959

Authored by 房远帅
1 parent 14fccbb6

采购计划:建立计划和报价的关联

... ... @@ -1928,6 +1928,7 @@ CREATE TABLE `procurement_plan`
1928 1928 `frozen` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否冻结 0否 1是',
1929 1929 `plan_type` varchar(50) DEFAULT NULL COMMENT '计划类型: 补、变、补 变',
1930 1930 `workshop_id` varchar(50) DEFAULT NULL COMMENT '分厂ID',
  1931 + `salesman_quotation_id` varchar(32) DEFAULT NULL COMMENT '关联业务员报价单ID',
1931 1932 `attachment_file_ids` text DEFAULT NULL COMMENT '附件文件ID集合',
1932 1933 `attachment_file_names` text DEFAULT NULL COMMENT '附件文件名称集合',
1933 1934 `create_by_id` varchar(32) DEFAULT NULL COMMENT '创建人ID',
... ... @@ -1945,7 +1946,8 @@ CREATE TABLE `procurement_plan`
1945 1946 KEY `idx_pp_create_time` (`create_time`),
1946 1947 KEY `idx_pp_process_status` (`process_status`),
1947 1948 KEY `idx_pp_process_node` (`process_node`),
1948   - KEY `idx_pp_workshop_id` (`workshop_id`)
  1949 + KEY `idx_pp_workshop_id` (`workshop_id`),
  1950 + KEY `idx_pp_salesman_quotation_id` (`salesman_quotation_id`)
1949 1951 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='采购计划主表';
1950 1952
1951 1953 CREATE TABLE `procurement_plan_line`
... ... @@ -1961,6 +1963,7 @@ CREATE TABLE `procurement_plan_line`
1961 1963 `coordination_range` decimal(18, 10) DEFAULT NULL COMMENT '协调幅度',
1962 1964 `estimated_loss` decimal(18, 10) DEFAULT NULL COMMENT '买断料预计损耗',
1963 1965 `application_attrition` decimal(18, 10) DEFAULT NULL COMMENT '申请损耗(%)',
  1966 + `paint_damage_ratio` decimal(18, 10) DEFAULT NULL COMMENT '漆损率(%)',
1964 1967 `workshop_id` varchar(50) DEFAULT NULL COMMENT '分厂',
1965 1968 `item_id` varchar(32) NOT NULL COMMENT '前端行标识',
1966 1969 `create_by_id` varchar(32) DEFAULT NULL COMMENT '创建人ID',
... ...
... ... @@ -345,6 +345,12 @@ public class GetProcurementPlanBo extends BaseBo<ProcurementPlan> {
345 345 private String workshopId;
346 346
347 347 /**
  348 + * 关联业务员报价单ID
  349 + */
  350 + @ApiModelProperty("关联业务员报价单ID")
  351 + private String salesmanQuotationId;
  352 +
  353 + /**
348 354 * 附件文件ID集合
349 355 */
350 356 @ApiModelProperty("附件文件ID集合")
... ... @@ -495,6 +501,12 @@ public class GetProcurementPlanBo extends BaseBo<ProcurementPlan> {
495 501 private BigDecimal applicationAttrition;
496 502
497 503 /**
  504 + * 漆损率(%)
  505 + */
  506 + @ApiModelProperty("漆损率(%)")
  507 + private BigDecimal paintDamageRatio;
  508 +
  509 + /**
498 510 * 分厂
499 511 */
500 512 @ApiModelProperty("分厂")
... ...
... ... @@ -288,6 +288,11 @@ public class ProcurementPlan extends BaseEntity implements BaseDto {
288 288 private String workshopId;
289 289
290 290 /**
  291 + * 关联业务员报价单ID
  292 + */
  293 + private String salesmanQuotationId;
  294 +
  295 + /**
291 296 * 附件文件ID集合
292 297 */
293 298 private String attachmentFileIds;
... ...
... ... @@ -72,6 +72,11 @@ public class ProcurementPlanLine extends BaseEntity implements BaseDto {
72 72 private BigDecimal applicationAttrition;
73 73
74 74 /**
  75 + * 漆损率(%)
  76 + */
  77 + private BigDecimal paintDamageRatio;
  78 +
  79 + /**
75 80 * 分厂
76 81 */
77 82 private String workshopId;
... ...
... ... @@ -771,6 +771,8 @@ public class SalesmanQuotationServiceImpl
771 771 vo.setMaterialConditionPhosphorCopper(normalizeMaterialText(enabled, salesmanQuotation.getMaterialConditionPhosphorCopper()));
772 772 vo.setProcessStatus("TO_SUPPLEMENT");
773 773 vo.setProcessNode("GYGLKJHGLY");
  774 + // 关联业务员报价单ID(生成计划时关联回写,可反向溯源)
  775 + vo.setSalesmanQuotationId(id);
774 776
775 777 // 明细行:按报价明细逐行带入
776 778 List<ProcurementPlanLineVo> lineVoList = new ArrayList<>();
... ... @@ -808,6 +810,8 @@ public class SalesmanQuotationServiceImpl
808 810 }
809 811 lineVo.setCoordinationRange(coordinationRange);
810 812 lineVo.setApplicationAttrition(line.getApplicationAttrition());
  813 + // 漆损率:从报价明细带过来
  814 + lineVo.setPaintDamageRatio(line.getPaintDamageRatio());
811 815 lineVo.setItemId(line.getItemId());
812 816 lineVoList.add(lineVo);
813 817 }
... ...
... ... @@ -328,6 +328,12 @@ public class CreateProcurementPlanVo implements BaseVo, Serializable {
328 328 private String workshopId;
329 329
330 330 /**
  331 + * 关联业务员报价单ID
  332 + */
  333 + @ApiModelProperty("关联业务员报价单ID")
  334 + private String salesmanQuotationId;
  335 +
  336 + /**
331 337 * 明细信息
332 338 */
333 339 @ApiModelProperty(value = "明细信息", required = true)
... ...
... ... @@ -90,6 +90,13 @@ public class ProcurementPlanLineVo implements BaseVo, Serializable {
90 90 private BigDecimal applicationAttrition;
91 91
92 92 /**
  93 + * 漆损率(%)
  94 + */
  95 + @ApiModelProperty("漆损率(%)")
  96 + @Digits(integer = 8, fraction = 10, message = "漆损率最多支持8位整数和10位小数!")
  97 + private BigDecimal paintDamageRatio;
  98 +
  99 + /**
93 100 * 分厂
94 101 */
95 102 @ApiModelProperty("分厂")
... ...
... ... @@ -14,6 +14,7 @@
14 14 <result column="coordination_range" property="coordinationRange"/>
15 15 <result column="estimated_loss" property="estimatedLoss"/>
16 16 <result column="application_attrition" property="applicationAttrition"/>
  17 + <result column="paint_damage_ratio" property="paintDamageRatio"/>
17 18 <result column="workshop_id" property="workshopId"/>
18 19 <result column="item_id" property="itemId"/>
19 20 <result column="create_by_id" property="createById"/>
... ... @@ -37,6 +38,7 @@
37 38 ppl.coordination_range,
38 39 ppl.estimated_loss,
39 40 ppl.application_attrition,
  41 + ppl.paint_damage_ratio,
40 42 ppl.workshop_id,
41 43 ppl.item_id,
42 44 ppl.create_by_id,
... ...
... ... @@ -56,6 +56,7 @@
56 56 <result column="frozen" property="frozen"/>
57 57 <result column="plan_type" property="planType"/>
58 58 <result column="workshop_id" property="workshopId"/>
  59 + <result column="salesman_quotation_id" property="salesmanQuotationId"/>
59 60 <result column="attachment_file_ids" property="attachmentFileIds"/>
60 61 <result column="attachment_file_names" property="attachmentFileNames"/>
61 62 <result column="create_by_id" property="createById"/>
... ... @@ -121,6 +122,7 @@
121 122 pp.frozen,
122 123 pp.plan_type,
123 124 pp.workshop_id,
  125 + pp.salesman_quotation_id,
124 126 pp.attachment_file_ids,
125 127 pp.attachment_file_names,
126 128 pp.create_by_id,
... ...