Commit 483f4ec255c00c7843badb73959452920a6d4f90

Authored by 房远帅
1 parent f9113aae

试样订单:产品试样确认单基础方法

Showing 22 changed files with 2722 additions and 2 deletions
@@ -1231,6 +1231,81 @@ ALTER TABLE purchase_order_info @@ -1231,6 +1231,81 @@ ALTER TABLE purchase_order_info
1231 ALTER TABLE tbl_purchase_order_line 1231 ALTER TABLE tbl_purchase_order_line
1232 ADD COLUMN sample_order boolean DEFAULT FALSE COMMENT '是否为试样订单'; 1232 ADD COLUMN sample_order boolean DEFAULT FALSE COMMENT '是否为试样订单';
1233 1233
1234 -  
1235 -  
1236 alter table tbl_purchase_order_line add column contract_distributor_line_id varchar(32) DEFAULT NULL comment '合同物料行ID'; 1234 alter table tbl_purchase_order_line add column contract_distributor_line_id varchar(32) DEFAULT NULL comment '合同物料行ID';
  1235 +
  1236 +CREATE TABLE `product_sample_confirmation_slip` (
  1237 + `id` varchar(32) NOT NULL COMMENT 'ID',
  1238 + `ordering_unit` varchar(32) DEFAULT NULL COMMENT '订货单位ID',
  1239 + `sample_type` varchar(50) DEFAULT NULL COMMENT '试样种类',
  1240 + `customer_type` varchar(50) DEFAULT NULL comment '客户类型',
  1241 + `workshop_id` varchar(32) DEFAULT NULL COMMENT '所属厂别',
  1242 + `belonging_breed` varchar(500) DEFAULT NULL comment '所属品种',
  1243 + `original_supplier_peer` varchar(500) DEFAULT NULL comment '原供货同行',
  1244 + `total_quantity` DECIMAL(15, 4) COMMENT '合计数量',
  1245 + `sample_quantity_regulation` boolean DEFAULT FALSE COMMENT '本次试样数量是否超规定',
  1246 + `specification_quantity_regulation` boolean DEFAULT FALSE COMMENT '试样规格个数是否超规定',
  1247 + `sample_frequency` text COMMENT '试样次数',
  1248 + `early_nonconformity_description` text COMMENT '前期不合格描述',
  1249 + `prepared_by` varchar(32) DEFAULT NULL COMMENT '制单人',
  1250 + `status` varchar(50) comment '审核状态',
  1251 + `office_clerk` varchar(32) DEFAULT NULL COMMENT '办事处内勤ID',
  1252 + `office_clerk_review` varchar(20) DEFAULT NULL COMMENT '办事处内勤审核',
  1253 + `office_supervisor` varchar(32) DEFAULT NULL COMMENT '办事处主管ID',
  1254 + `office_supervisor_review` varchar(20) DEFAULT NULL COMMENT '办事处主管审核',
  1255 + `office_supervisor_opinion` text DEFAULT NULL COMMENT '办事处主管审核意见',
  1256 + `marketing_deputy_director` varchar(32) DEFAULT NULL COMMENT '营销部分管ID',
  1257 + `marketing_deputy_director_review` varchar(20) DEFAULT NULL COMMENT '营销部分管审核',
  1258 + `marketing_deputy_director_opinion` text DEFAULT NULL COMMENT '营销部分管审核意见',
  1259 + `office_management_supervisor` varchar(32) DEFAULT NULL COMMENT '经营办主管ID',
  1260 + `office_management_supervisor_review` varchar(20) DEFAULT NULL COMMENT '经营办主管审核',
  1261 + `office_management_supervisor_opinion` text DEFAULT NULL COMMENT '经营办主管审核意见',
  1262 + `quality_manager` varchar(32) DEFAULT NULL COMMENT '品质经理ID',
  1263 + `quality_manager_review` varchar(20) DEFAULT NULL COMMENT '品质经理审核',
  1264 + `quality_manager_opinion` text DEFAULT NULL COMMENT '品质经理审核意见',
  1265 + `branch_factory_supervisor` varchar(32) DEFAULT NULL COMMENT '分厂主管ID',
  1266 + `branch_factory_supervisor_review` varchar(20) DEFAULT NULL COMMENT '分厂主管审核',
  1267 + `branch_factory_supervisor_opinion` text DEFAULT NULL COMMENT '分厂主管审核意见',
  1268 + `marketing_department_manager` varchar(32) DEFAULT NULL COMMENT '营销部主管ID',
  1269 + `marketing_department_manager_review` varchar(20) DEFAULT NULL COMMENT '营销部主管审核',
  1270 + `marketing_department_manager_opinion` text DEFAULT NULL COMMENT '营销部主管审核意见',
  1271 + `marketing_center_supervisor` varchar(32) DEFAULT NULL COMMENT '营销中心主管ID',
  1272 + `marketing_center_supervisor_review` varchar(20) DEFAULT NULL COMMENT '营销中心主管审核',
  1273 + `marketing_center_supervisor_opinion` text DEFAULT NULL COMMENT '营销中心主管审核意见',
  1274 + `general_manager` varchar(32) DEFAULT NULL COMMENT '总经理ID',
  1275 + `general_manager_review` varchar(32) DEFAULT NULL COMMENT '总经理审核',
  1276 + `general_manager_opinion` text DEFAULT NULL COMMENT '总经理审核意见',
  1277 + `create_by_id` varchar(32) NOT NULL COMMENT '创建人ID',
  1278 + `create_by` varchar(20) NOT NULL COMMENT '创建人',
  1279 + `update_by_id` varchar(32) NOT NULL COMMENT '更新人ID',
  1280 + `update_by` varchar(20) NOT NULL COMMENT '更新人',
  1281 + `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1282 + `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  1283 + PRIMARY KEY (`id`)
  1284 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='产品试样确认单'
  1285 +
  1286 +CREATE TABLE `product_sample_confirmation_slip_detail` (
  1287 + `id` varchar(32) NOT NULL COMMENT 'ID',
  1288 + `confirmation_slip_id` varchar(32) DEFAULT NULL COMMENT '产品试样确认单主键',
  1289 + `purchase_order_line_id` varchar(32) DEFAULT NULL COMMENT '订货单物料行ID',
  1290 + `brand` varchar(100) comment '牌号',
  1291 + `thickness` decimal(10, 4) default null comment '厚度',
  1292 + `thickness_tol_pos` decimal(10, 4) default null comment '厚度公差正',
  1293 + `thickness_tol_neg` decimal(10, 4) default null comment '厚度公差负',
  1294 + `width` decimal(10, 4) default null comment '宽度',
  1295 + `width_tol_pos` decimal(10, 4) default null comment '宽度公差正',
  1296 + `width_tol_neg` decimal(10, 4) default null comment '宽度公差负',
  1297 + `length` decimal(10, 4) default null comment '长度',
  1298 + `length_tol_pos` decimal(10, 4) default null comment '长度公差正',
  1299 + `length_tol_neg` decimal(10, 4) default null comment '长度公差负',
  1300 + `status` varchar(50) comment '状态',
  1301 + `quantity` decimal(15, 4) COMMENT '数量',
  1302 + `provide_samples` varchar(50) comment '是否提供样品',
  1303 + `clear_parameters` varchar(50) comment '是否提供明确参数',
  1304 + `create_by_id` varchar(32) NOT NULL COMMENT '创建人ID',
  1305 + `create_by` varchar(20) NOT NULL COMMENT '创建人',
  1306 + `update_by_id` varchar(32) NOT NULL COMMENT '更新人ID',
  1307 + `update_by` varchar(20) NOT NULL COMMENT '更新人',
  1308 + `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1309 + `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  1310 + PRIMARY KEY (`id`)
  1311 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='产品试样确认单明细'
  1 +package com.lframework.xingyun.sc.bo.sample.confirm;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonFormat;
  4 +import java.math.BigDecimal;
  5 +import com.lframework.starter.common.constants.StringPool;
  6 +import com.lframework.starter.web.core.bo.BaseBo;
  7 +import java.time.LocalDateTime;
  8 +import java.util.List;
  9 +
  10 +import com.lframework.starter.web.core.utils.ApplicationUtil;
  11 +import com.lframework.starter.web.inner.entity.SysDataDicItem;
  12 +import com.lframework.starter.web.inner.service.system.SysDataDicItemService;
  13 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip;
  14 +import io.swagger.annotations.ApiModelProperty;
  15 +
  16 +import lombok.Data;
  17 +
  18 +/**
  19 + * <p>
  20 + * 产品试样确认单 GetBo
  21 + * </p>
  22 + *
  23 + */
  24 +@Data
  25 +public class GetProductSampleConfirmationSlipBo extends BaseBo<ProductSampleConfirmationSlip> {
  26 +
  27 + /**
  28 + * ID
  29 + */
  30 + @ApiModelProperty("ID")
  31 + private String id;
  32 +
  33 + /**
  34 + * 订货单位ID
  35 + */
  36 + @ApiModelProperty("订货单位ID")
  37 + private String orderingUnit;
  38 +
  39 + /**
  40 + * 订货单位名称
  41 + */
  42 + @ApiModelProperty("订货单位名称")
  43 + private String orderingUnitName;
  44 +
  45 + /**
  46 + * 试样种类
  47 + */
  48 + @ApiModelProperty("试样种类")
  49 + private String sampleType;
  50 +
  51 + /**
  52 + * 试样种类名称
  53 + */
  54 + @ApiModelProperty("试样种类名称")
  55 + private String sampleTypeName;
  56 +
  57 + /**
  58 + * 客户类型
  59 + */
  60 + @ApiModelProperty("客户类型")
  61 + private String customerType;
  62 +
  63 + /**
  64 + * 客户类型名称
  65 + */
  66 + @ApiModelProperty("客户类型名称")
  67 + private String customerTypeName;
  68 +
  69 + /**
  70 + * 所属厂别
  71 + */
  72 + @ApiModelProperty("所属厂别")
  73 + private String workshopId;
  74 +
  75 + /**
  76 + * 所属厂别名称
  77 + */
  78 + @ApiModelProperty("所属厂别名称")
  79 + private String workshopName;
  80 +
  81 + /**
  82 + * 所属品种
  83 + */
  84 + @ApiModelProperty("所属品种")
  85 + private String belongingBreed;
  86 +
  87 + /**
  88 + * 原供货同行
  89 + */
  90 + @ApiModelProperty("原供货同行")
  91 + private String originalSupplierPeer;
  92 +
  93 + /**
  94 + * 合计数量
  95 + */
  96 + @ApiModelProperty("合计数量")
  97 + private BigDecimal totalQuantity;
  98 +
  99 + /**
  100 + * 本次试样数量是否超规定
  101 + */
  102 + @ApiModelProperty("本次试样数量是否超规定")
  103 + private boolean sampleQuantityRegulation;
  104 +
  105 + /**
  106 + * 试样规格个数是否超规定
  107 + */
  108 + @ApiModelProperty("试样规格个数是否超规定")
  109 + private boolean specificationQuantityRegulation;
  110 +
  111 + /**
  112 + * 试样次数
  113 + */
  114 + @ApiModelProperty("试样次数")
  115 + private String sampleFrequency;
  116 +
  117 + /**
  118 + * 前期不合格描述
  119 + */
  120 + @ApiModelProperty("前期不合格描述")
  121 + private String earlyNonconformityDescription;
  122 +
  123 + /**
  124 + * 制单人
  125 + */
  126 + @ApiModelProperty("制单人")
  127 + private String preparedBy;
  128 +
  129 + /**
  130 + * 制单人姓名
  131 + */
  132 + @ApiModelProperty("制单人姓名")
  133 + private String preparedByName;
  134 +
  135 + /**
  136 + * 审核状态
  137 + */
  138 + @ApiModelProperty("审核状态")
  139 + private String status;
  140 +
  141 + /**
  142 + * 是否展示编辑按钮
  143 + */
  144 + @ApiModelProperty("是否展示编辑按钮")
  145 + private String showAudit;
  146 +
  147 + /**
  148 + * 产品试样确认单详情
  149 + */
  150 + @ApiModelProperty("产品试样确认单详情")
  151 + List<QueryProductSampleConfirmationSlipDetailBo> productSampleConfirmationSlipDetailList;
  152 +
  153 + /**
  154 + * 办事处内勤ID
  155 + */
  156 + @ApiModelProperty("办事处内勤ID")
  157 + private String officeClerk;
  158 +
  159 + /**
  160 + * 办事处内勤审核
  161 + */
  162 + @ApiModelProperty("办事处内勤审核")
  163 + private String officeClerkReview;
  164 +
  165 + /**
  166 + * 办事处内勤姓名
  167 + */
  168 + @ApiModelProperty("办事处内勤姓名")
  169 + private String officeClerkName;
  170 +
  171 + /**
  172 + * 办事处主管ID
  173 + */
  174 + @ApiModelProperty("办事处主管ID")
  175 + private String officeSupervisor;
  176 +
  177 + /**
  178 + * 办事处主管审核
  179 + */
  180 + @ApiModelProperty("办事处主管审核")
  181 + private String officeSupervisorReview;
  182 +
  183 + /**
  184 + * 办事处主管姓名
  185 + */
  186 + @ApiModelProperty("办事处主管姓名")
  187 + private String officeSupervisorName;
  188 +
  189 + /**
  190 + * 办事处主管审核意见
  191 + */
  192 + @ApiModelProperty("办事处主管审核意见")
  193 + private String officeSupervisorOpinion;
  194 +
  195 + /**
  196 + * 营销部分管ID
  197 + */
  198 + @ApiModelProperty("营销部分管ID")
  199 + private String marketingDeputyDirector;
  200 +
  201 + /**
  202 + * 营销部分管审核
  203 + */
  204 + @ApiModelProperty("营销部分管审核")
  205 + private String marketingDeputyDirectorReview;
  206 +
  207 + /**
  208 + * 营销部分管姓名
  209 + */
  210 + @ApiModelProperty("营销部分管姓名")
  211 + private String marketingDeputyDirectorName;
  212 +
  213 + /**
  214 + * 营销部分管审核意见
  215 + */
  216 + @ApiModelProperty("营销部分管审核意见")
  217 + private String marketingDeputyDirectorOpinion;
  218 +
  219 + /**
  220 + * 经营办主管ID
  221 + */
  222 + @ApiModelProperty("经营办主管ID")
  223 + private String officeManagementSupervisor;
  224 +
  225 + /**
  226 + * 经营办主管审核
  227 + */
  228 + @ApiModelProperty("经营办主管审核")
  229 + private String officeManagementSupervisorReview;
  230 +
  231 + /**
  232 + * 经营办主管姓名
  233 + */
  234 + @ApiModelProperty("经营办主管姓名")
  235 + private String officeManagementSupervisorName;
  236 +
  237 + /**
  238 + * 经营办主管审核意见
  239 + */
  240 + @ApiModelProperty("经营办主管审核意见")
  241 + private String officeManagementSupervisorOpinion;
  242 +
  243 + /**
  244 + * 品质经理ID
  245 + */
  246 + @ApiModelProperty("品质经理ID")
  247 + private String qualityManager;
  248 +
  249 + /**
  250 + * 品质经理审核
  251 + */
  252 + @ApiModelProperty("品质经理审核")
  253 + private String qualityManagerReview;
  254 +
  255 + /**
  256 + * 品质经理姓名
  257 + */
  258 + @ApiModelProperty("品质经理姓名")
  259 + private String qualityManagerName;
  260 +
  261 + /**
  262 + * 品质经理审核意见
  263 + */
  264 + @ApiModelProperty("品质经理审核意见")
  265 + private String qualityManagerOpinion;
  266 +
  267 + /**
  268 + * 分厂主管ID
  269 + */
  270 + @ApiModelProperty("分厂主管ID")
  271 + private String branchFactorySupervisor;
  272 +
  273 + /**
  274 + * 分厂主管审核
  275 + */
  276 + @ApiModelProperty("分厂主管审核")
  277 + private String branchFactorySupervisorReview;
  278 +
  279 + /**
  280 + * 分厂主管姓名
  281 + */
  282 + @ApiModelProperty("分厂主管姓名")
  283 + private String branchFactorySupervisorName;
  284 +
  285 + /**
  286 + * 分厂主管审核意见
  287 + */
  288 + @ApiModelProperty("分厂主管审核意见")
  289 + private String branchFactorySupervisorOpinion;
  290 +
  291 + /**
  292 + * 营销部主管ID
  293 + */
  294 + @ApiModelProperty("营销部主管ID")
  295 + private String marketingDepartmentManager;
  296 +
  297 + /**
  298 + * 营销部主管审核
  299 + */
  300 + @ApiModelProperty("营销部主管审核")
  301 + private String marketingDepartmentManagerReview;
  302 +
  303 + /**
  304 + * 营销部主管姓名
  305 + */
  306 + @ApiModelProperty("营销部主管姓名")
  307 + private String marketingDepartmentManagerName;
  308 +
  309 + /**
  310 + * 营销部主管审核意见
  311 + */
  312 + @ApiModelProperty("营销部主管审核意见")
  313 + private String marketingDepartmentManagerOpinion;
  314 +
  315 + /**
  316 + * 营销中心主管ID
  317 + */
  318 + @ApiModelProperty("营销中心主管ID")
  319 + private String marketingCenterSupervisor;
  320 +
  321 + /**
  322 + * 营销中心主管审核
  323 + */
  324 + @ApiModelProperty("营销中心主管审核")
  325 + private String marketingCenterSupervisorReview;
  326 +
  327 + /**
  328 + * 营销中心主管姓名
  329 + */
  330 + @ApiModelProperty("营销中心主管姓名")
  331 + private String marketingCenterSupervisorName;
  332 +
  333 + /**
  334 + * 营销中心主管审核意见
  335 + */
  336 + @ApiModelProperty("营销中心主管审核意见")
  337 + private String marketingCenterSupervisorOpinion;
  338 +
  339 + /**
  340 + * 总经理ID
  341 + */
  342 + @ApiModelProperty("总经理ID")
  343 + private String generalManager;
  344 +
  345 + /**
  346 + * 总经理审核
  347 + */
  348 + @ApiModelProperty("总经理审核")
  349 + private String generalManagerReview;
  350 +
  351 + /**
  352 + * 总经理姓名
  353 + */
  354 + @ApiModelProperty("总经理姓名")
  355 + private String generalManagerName;
  356 +
  357 + /**
  358 + * 总经理审核意见
  359 + */
  360 + @ApiModelProperty("总经理审核意见")
  361 + private String generalManagerOpinion;
  362 +
  363 + /**
  364 + * 创建人ID
  365 + */
  366 + @ApiModelProperty("创建人ID")
  367 + private String createById;
  368 +
  369 + /**
  370 + * 创建人
  371 + */
  372 + @ApiModelProperty("创建人")
  373 + private String createBy;
  374 +
  375 + /**
  376 + * 更新人ID
  377 + */
  378 + @ApiModelProperty("更新人ID")
  379 + private String updateById;
  380 +
  381 + /**
  382 + * 更新人
  383 + */
  384 + @ApiModelProperty("更新人")
  385 + private String updateBy;
  386 +
  387 + /**
  388 + * 创建时间
  389 + */
  390 + @ApiModelProperty("创建时间")
  391 + @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN)
  392 + private LocalDateTime createTime;
  393 +
  394 + /**
  395 + * 更新时间
  396 + */
  397 + @ApiModelProperty("更新时间")
  398 + @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN)
  399 + private LocalDateTime updateTime;
  400 +
  401 + public GetProductSampleConfirmationSlipBo() {
  402 +
  403 + }
  404 +
  405 + public GetProductSampleConfirmationSlipBo(ProductSampleConfirmationSlip dto) {
  406 +
  407 + super(dto);
  408 + }
  409 +
  410 + @Override
  411 + public BaseBo<ProductSampleConfirmationSlip> convert(ProductSampleConfirmationSlip dto) {
  412 + return super.convert(dto);
  413 + }
  414 +
  415 + @Override
  416 + protected void afterInit(ProductSampleConfirmationSlip dto) {
  417 + SysDataDicItemService sysDataDicItemService = ApplicationUtil.getBean(SysDataDicItemService.class);
  418 + SysDataDicItem dataDicItem = sysDataDicItemService.findByCode("SAMPLE_TYPE", dto.getSampleType());
  419 + this.sampleTypeName = dataDicItem == null ? "" : dataDicItem.getName();
  420 + SysDataDicItem dataDicItem1 = sysDataDicItemService.findByCode("ENTERPRISE_TYPE", dto.getCustomerType());
  421 + this.customerTypeName = dataDicItem1 == null ? "" : dataDicItem1.getName();
  422 + }
  423 +}
  1 +package com.lframework.xingyun.sc.bo.sample.confirm;
  2 +
  3 +import java.math.BigDecimal;
  4 +import com.lframework.starter.web.core.bo.BaseBo;
  5 +import com.lframework.starter.web.core.utils.ApplicationUtil;
  6 +import com.lframework.starter.web.inner.entity.SysDataDicItem;
  7 +import com.lframework.starter.web.inner.service.system.SysDataDicItemService;
  8 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlipDetail;
  9 +import io.swagger.annotations.ApiModelProperty;
  10 +
  11 +import lombok.Data;
  12 +
  13 +/**
  14 + * <p>
  15 + * 产品试样确认单明细 GetBo
  16 + * </p>
  17 + *
  18 + */
  19 +@Data
  20 +public class GetProductSampleConfirmationSlipDetailBo extends BaseBo<ProductSampleConfirmationSlipDetail> {
  21 +
  22 + /**
  23 + * ID
  24 + */
  25 + @ApiModelProperty("ID")
  26 + private String id;
  27 +
  28 + /**
  29 + * 产品试样确认单主键
  30 + */
  31 + @ApiModelProperty("产品试样确认单主键")
  32 + private String confirmationSlipId;
  33 +
  34 + /**
  35 + * 订货单物料行ID
  36 + */
  37 + @ApiModelProperty("订货单物料行ID")
  38 + private String purchaseOrderLineId;
  39 +
  40 + /**
  41 + * 牌号
  42 + */
  43 + @ApiModelProperty("牌号")
  44 + private String brand;
  45 +
  46 + /**
  47 + * 厚度
  48 + */
  49 + @ApiModelProperty("厚度")
  50 + private BigDecimal thickness;
  51 +
  52 + /**
  53 + * 厚度公差正
  54 + */
  55 + @ApiModelProperty("厚度公差正")
  56 + private BigDecimal thicknessTolPos;
  57 +
  58 + /**
  59 + * 厚度公差负
  60 + */
  61 + @ApiModelProperty("厚度公差负")
  62 + private BigDecimal thicknessTolNeg;
  63 +
  64 + /**
  65 + * 宽度
  66 + */
  67 + @ApiModelProperty("宽度")
  68 + private BigDecimal width;
  69 +
  70 + /**
  71 + * 宽度公差正
  72 + */
  73 + @ApiModelProperty("宽度公差正")
  74 + private BigDecimal widthTolPos;
  75 +
  76 + /**
  77 + * 宽度公差负
  78 + */
  79 + @ApiModelProperty("宽度公差负")
  80 + private BigDecimal widthTolNeg;
  81 +
  82 + /**
  83 + * 长度
  84 + */
  85 + @ApiModelProperty("长度")
  86 + private BigDecimal length;
  87 +
  88 + /**
  89 + * 长度公差正
  90 + */
  91 + @ApiModelProperty("长度公差正")
  92 + private BigDecimal lengthTolPos;
  93 +
  94 + /**
  95 + * 长度公差负
  96 + */
  97 + @ApiModelProperty("长度公差负")
  98 + private BigDecimal lengthTolNeg;
  99 +
  100 + /**
  101 + * 状态
  102 + */
  103 + @ApiModelProperty("状态")
  104 + private String status;
  105 +
  106 + /**
  107 + * 数量
  108 + */
  109 + @ApiModelProperty("数量")
  110 + private BigDecimal quantity;
  111 +
  112 + /**
  113 + * 是否提供样品
  114 + */
  115 + @ApiModelProperty("是否提供样品")
  116 + private String provideSamples;
  117 +
  118 + /**
  119 + * 是否提供样品名称
  120 + */
  121 + @ApiModelProperty("是否提供样品名称")
  122 + private String provideSamplesName;
  123 +
  124 + /**
  125 + * 是否提供明确参数
  126 + */
  127 + @ApiModelProperty("是否提供明确参数")
  128 + private String clearParameters;
  129 +
  130 + /**
  131 + * 是否提供明确参数名称
  132 + */
  133 + @ApiModelProperty("是否提供明确参数名称")
  134 + private String clearParametersName;
  135 +
  136 + public GetProductSampleConfirmationSlipDetailBo() {
  137 +
  138 + }
  139 +
  140 + public GetProductSampleConfirmationSlipDetailBo(ProductSampleConfirmationSlipDetail dto) {
  141 +
  142 + super(dto);
  143 + }
  144 +
  145 + @Override
  146 + public BaseBo<ProductSampleConfirmationSlipDetail> convert(ProductSampleConfirmationSlipDetail dto) {
  147 + return super.convert(dto);
  148 + }
  149 +
  150 + @Override
  151 + protected void afterInit(ProductSampleConfirmationSlipDetail dto) {
  152 + SysDataDicItemService sysDataDicItemService = ApplicationUtil.getBean(SysDataDicItemService.class);
  153 + SysDataDicItem dataDicItem = sysDataDicItemService.findByCode("PROVIDE_SAMPLES", dto.getProvideSamples());
  154 + this.provideSamplesName = dataDicItem == null ? "" : dataDicItem.getName();
  155 + SysDataDicItem dataDicItem1 = sysDataDicItemService.findByCode("CLEAR_PARAMETERS", dto.getClearParameters());
  156 + this.clearParameters = dataDicItem1 == null ? "" : dataDicItem1.getName();
  157 + }
  158 +}
  1 +package com.lframework.xingyun.sc.bo.sample.confirm;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonFormat;
  4 +import java.math.BigDecimal;
  5 +import com.lframework.starter.common.constants.StringPool;
  6 +import com.lframework.starter.web.core.bo.BaseBo;
  7 +import java.time.LocalDateTime;
  8 +
  9 +import com.lframework.starter.web.core.utils.ApplicationUtil;
  10 +import com.lframework.starter.web.inner.entity.SysDataDicItem;
  11 +import com.lframework.starter.web.inner.service.system.SysDataDicItemService;
  12 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip;
  13 +import io.swagger.annotations.ApiModelProperty;
  14 +
  15 +import lombok.Data;
  16 +
  17 +/**
  18 + * <p>
  19 + * 产品试样确认单 QueryBo
  20 + * </p>
  21 + *
  22 + */
  23 +@Data
  24 +public class QueryProductSampleConfirmationSlipBo extends BaseBo<ProductSampleConfirmationSlip> {
  25 +
  26 + /**
  27 + * ID
  28 + */
  29 + @ApiModelProperty("ID")
  30 + private String id;
  31 +
  32 + /**
  33 + * 订货单位ID
  34 + */
  35 + @ApiModelProperty("订货单位ID")
  36 + private String orderingUnit;
  37 +
  38 + /**
  39 + * 试样种类
  40 + */
  41 + @ApiModelProperty("试样种类")
  42 + private String sampleType;
  43 +
  44 + /**
  45 + * 试样种类名称
  46 + */
  47 + @ApiModelProperty("试样种类名称")
  48 + private String sampleTypeName;
  49 +
  50 +
  51 + /**
  52 + * 客户类型
  53 + */
  54 + @ApiModelProperty("客户类型")
  55 + private String customerType;
  56 +
  57 + /**
  58 + * 客户类型名称
  59 + */
  60 + @ApiModelProperty("客户类型名称")
  61 + private String customerTypeName;
  62 +
  63 + /**
  64 + * 所属厂别
  65 + */
  66 + @ApiModelProperty("所属厂别")
  67 + private String workshopId;
  68 +
  69 + /**
  70 + * 所属品种
  71 + */
  72 + @ApiModelProperty("所属品种")
  73 + private String belongingBreed;
  74 +
  75 + /**
  76 + * 原供货同行
  77 + */
  78 + @ApiModelProperty("原供货同行")
  79 + private String originalSupplierPeer;
  80 +
  81 + /**
  82 + * 合计数量
  83 + */
  84 + @ApiModelProperty("合计数量")
  85 + private BigDecimal totalQuantity;
  86 +
  87 + /**
  88 + * 本次试样数量是否超规定
  89 + */
  90 + @ApiModelProperty("本次试样数量是否超规定")
  91 + private Integer sampleQuantityRegulation;
  92 +
  93 + /**
  94 + * 试样规格个数是否超规定
  95 + */
  96 + @ApiModelProperty("试样规格个数是否超规定")
  97 + private Integer specificationQuantityRegulation;
  98 +
  99 + /**
  100 + * 试样次数
  101 + */
  102 + @ApiModelProperty("试样次数")
  103 + private String sampleFrequency;
  104 +
  105 + /**
  106 + * 前期不合格描述
  107 + */
  108 + @ApiModelProperty("前期不合格描述")
  109 + private String earlyNonconformityDescription;
  110 +
  111 + /**
  112 + * 制单人
  113 + */
  114 + @ApiModelProperty("制单人")
  115 + private String preparedBy;
  116 +
  117 + /**
  118 + * 审核状态
  119 + */
  120 + @ApiModelProperty("审核状态")
  121 + private String status;
  122 +
  123 + /**
  124 + * 是否展示编辑按钮
  125 + */
  126 + @ApiModelProperty("是否展示编辑按钮")
  127 + private String showAudit;
  128 +
  129 + /**
  130 + * 创建人ID
  131 + */
  132 + @ApiModelProperty("创建人ID")
  133 + private String createById;
  134 +
  135 + /**
  136 + * 创建人
  137 + */
  138 + @ApiModelProperty("创建人")
  139 + private String createBy;
  140 +
  141 + /**
  142 + * 更新人ID
  143 + */
  144 + @ApiModelProperty("更新人ID")
  145 + private String updateById;
  146 +
  147 + /**
  148 + * 更新人
  149 + */
  150 + @ApiModelProperty("更新人")
  151 + private String updateBy;
  152 +
  153 + /**
  154 + * 创建时间
  155 + */
  156 + @ApiModelProperty("创建时间")
  157 + @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN)
  158 + private LocalDateTime createTime;
  159 +
  160 + /**
  161 + * 更新时间
  162 + */
  163 + @ApiModelProperty("更新时间")
  164 + @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN)
  165 + private LocalDateTime updateTime;
  166 +
  167 + public QueryProductSampleConfirmationSlipBo() {
  168 +
  169 + }
  170 +
  171 + public QueryProductSampleConfirmationSlipBo(ProductSampleConfirmationSlip dto) {
  172 +
  173 + super(dto);
  174 + }
  175 +
  176 + @Override
  177 + public BaseBo<ProductSampleConfirmationSlip> convert(ProductSampleConfirmationSlip dto) {
  178 + return super.convert(dto);
  179 + }
  180 +
  181 + @Override
  182 + protected void afterInit(ProductSampleConfirmationSlip dto) {
  183 + SysDataDicItemService sysDataDicItemService = ApplicationUtil.getBean(SysDataDicItemService.class);
  184 + SysDataDicItem dataDicItem = sysDataDicItemService.findByCode("SAMPLE_TYPE", dto.getSampleType());
  185 + this.sampleTypeName = dataDicItem == null ? "" : dataDicItem.getName();
  186 + SysDataDicItem dataDicItem1 = sysDataDicItemService.findByCode("ENTERPRISE_TYPE", dto.getCustomerType());
  187 + this.customerTypeName = dataDicItem1 == null ? "" : dataDicItem1.getName();
  188 + }
  189 +}
  1 +package com.lframework.xingyun.sc.bo.sample.confirm;
  2 +
  3 +import java.math.BigDecimal;
  4 +import com.lframework.starter.web.core.bo.BaseBo;
  5 +import com.lframework.starter.web.core.utils.ApplicationUtil;
  6 +import com.lframework.starter.web.inner.entity.SysDataDicItem;
  7 +import com.lframework.starter.web.inner.service.system.SysDataDicItemService;
  8 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlipDetail;
  9 +import io.swagger.annotations.ApiModelProperty;
  10 +
  11 +import lombok.Data;
  12 +
  13 +/**
  14 + * <p>
  15 + * 产品试样确认单明细 QueryBo
  16 + * </p>
  17 + *
  18 + */
  19 +@Data
  20 +public class QueryProductSampleConfirmationSlipDetailBo extends BaseBo<ProductSampleConfirmationSlipDetail> {
  21 +
  22 + /**
  23 + * ID
  24 + */
  25 + @ApiModelProperty("ID")
  26 + private String id;
  27 +
  28 + /**
  29 + * 产品试样确认单主键
  30 + */
  31 + @ApiModelProperty("产品试样确认单主键")
  32 + private String confirmationSlipId;
  33 +
  34 + /**
  35 + * 订货单物料行ID
  36 + */
  37 + @ApiModelProperty("订货单物料行ID")
  38 + private String purchaseOrderLineId;
  39 +
  40 + /**
  41 + * 牌号
  42 + */
  43 + @ApiModelProperty("牌号")
  44 + private String brand;
  45 +
  46 + /**
  47 + * 厚度
  48 + */
  49 + @ApiModelProperty("厚度")
  50 + private BigDecimal thickness;
  51 +
  52 + /**
  53 + * 厚度公差正
  54 + */
  55 + @ApiModelProperty("厚度公差正")
  56 + private BigDecimal thicknessTolPos;
  57 +
  58 + /**
  59 + * 厚度公差负
  60 + */
  61 + @ApiModelProperty("厚度公差负")
  62 + private BigDecimal thicknessTolNeg;
  63 +
  64 + /**
  65 + * 宽度
  66 + */
  67 + @ApiModelProperty("宽度")
  68 + private BigDecimal width;
  69 +
  70 + /**
  71 + * 宽度公差正
  72 + */
  73 + @ApiModelProperty("宽度公差正")
  74 + private BigDecimal widthTolPos;
  75 +
  76 + /**
  77 + * 宽度公差负
  78 + */
  79 + @ApiModelProperty("宽度公差负")
  80 + private BigDecimal widthTolNeg;
  81 +
  82 + /**
  83 + * 长度
  84 + */
  85 + @ApiModelProperty("长度")
  86 + private BigDecimal length;
  87 +
  88 + /**
  89 + * 长度公差正
  90 + */
  91 + @ApiModelProperty("长度公差正")
  92 + private BigDecimal lengthTolPos;
  93 +
  94 + /**
  95 + * 长度公差负
  96 + */
  97 + @ApiModelProperty("长度公差负")
  98 + private BigDecimal lengthTolNeg;
  99 +
  100 + /**
  101 + * 状态
  102 + */
  103 + @ApiModelProperty("状态")
  104 + private String status;
  105 +
  106 + /**
  107 + * 数量
  108 + */
  109 + @ApiModelProperty("数量")
  110 + private BigDecimal quantity;
  111 +
  112 + /**
  113 + * 是否提供样品
  114 + */
  115 + @ApiModelProperty("是否提供样品")
  116 + private String provideSamples;
  117 +
  118 + /**
  119 + * 是否提供样品名称
  120 + */
  121 + @ApiModelProperty("是否提供样品名称")
  122 + private String provideSamplesName;
  123 +
  124 + /**
  125 + * 是否提供明确参数
  126 + */
  127 + @ApiModelProperty("是否提供明确参数")
  128 + private String clearParameters;
  129 +
  130 + /**
  131 + * 是否提供明确参数名称
  132 + */
  133 + @ApiModelProperty("是否提供明确参数名称")
  134 + private String clearParametersName;
  135 +
  136 + public QueryProductSampleConfirmationSlipDetailBo() {
  137 +
  138 + }
  139 +
  140 + public QueryProductSampleConfirmationSlipDetailBo(ProductSampleConfirmationSlipDetail dto) {
  141 +
  142 + super(dto);
  143 + }
  144 +
  145 + @Override
  146 + public BaseBo<ProductSampleConfirmationSlipDetail> convert(ProductSampleConfirmationSlipDetail dto) {
  147 + return super.convert(dto);
  148 + }
  149 +
  150 + @Override
  151 + protected void afterInit(ProductSampleConfirmationSlipDetail dto) {
  152 + SysDataDicItemService sysDataDicItemService = ApplicationUtil.getBean(SysDataDicItemService.class);
  153 + SysDataDicItem dataDicItem = sysDataDicItemService.findByCode("PROVIDE_SAMPLES", dto.getProvideSamples());
  154 + this.provideSamplesName = dataDicItem == null ? "" : dataDicItem.getName();
  155 + SysDataDicItem dataDicItem1 = sysDataDicItemService.findByCode("CLEAR_PARAMETERS", dto.getClearParameters());
  156 + this.clearParameters = dataDicItem1 == null ? "" : dataDicItem1.getName();
  157 + }
  158 +}
  1 +package com.lframework.xingyun.sc.controller.sample;
  2 +
  3 +import com.lframework.starter.web.core.annotations.security.HasPermission;
  4 +import com.lframework.starter.web.core.controller.DefaultBaseController;
  5 +import com.lframework.starter.web.core.utils.PageResultUtil;
  6 +import com.lframework.starter.web.core.components.resp.PageResult;
  7 +import com.lframework.starter.web.core.components.resp.InvokeResult;
  8 +
  9 +import javax.annotation.Resource;
  10 +import javax.validation.constraints.NotBlank;
  11 +import com.lframework.xingyun.sc.bo.sample.confirm.GetProductSampleConfirmationSlipBo;
  12 +import com.lframework.xingyun.sc.bo.sample.confirm.QueryProductSampleConfirmationSlipBo;
  13 +import com.lframework.xingyun.sc.bo.sample.confirm.QueryProductSampleConfirmationSlipDetailBo;
  14 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip;
  15 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlipDetail;
  16 +import com.lframework.xingyun.sc.service.sample.ProductSampleConfirmationSlipDetailService;
  17 +import com.lframework.xingyun.sc.service.sample.ProductSampleConfirmationSlipService;
  18 +import com.lframework.xingyun.sc.vo.sample.confirm.CreateProductSampleConfirmationSlipVo;
  19 +import com.lframework.xingyun.sc.vo.sample.confirm.QueryProductSampleConfirmationSlipDetailVo;
  20 +import com.lframework.xingyun.sc.vo.sample.confirm.QueryProductSampleConfirmationSlipVo;
  21 +import com.lframework.xingyun.sc.vo.sample.confirm.UpdateProductSampleConfirmationSlipVo;
  22 +import io.swagger.annotations.ApiImplicitParam;
  23 +import com.lframework.starter.web.core.components.resp.InvokeResultBuilder;
  24 +import com.lframework.starter.common.exceptions.impl.DefaultClientException;
  25 +import io.swagger.annotations.ApiOperation;
  26 +import com.lframework.starter.common.utils.CollectionUtil;
  27 +import io.swagger.annotations.Api;
  28 +import org.springframework.web.bind.annotation.DeleteMapping;
  29 +import org.springframework.beans.factory.annotation.Autowired;
  30 +import org.springframework.validation.annotation.Validated;
  31 +import org.springframework.web.bind.annotation.*;
  32 +import javax.validation.Valid;
  33 +import java.util.List;
  34 +import java.util.stream.Collectors;
  35 +
  36 +/**
  37 + * 产品试样确认单 Controller
  38 + *
  39 + */
  40 +@Api(tags = "产品试样确认单")
  41 +@Validated
  42 +@RestController
  43 +@RequestMapping("/confirmationSlip")
  44 +public class ProductSampleConfirmationSlipController extends DefaultBaseController {
  45 +
  46 + @Resource
  47 + private ProductSampleConfirmationSlipService productSampleConfirmationSlipService;
  48 + @Resource
  49 + private ProductSampleConfirmationSlipDetailService productSampleConfirmationSlipDetailService;
  50 +
  51 + /**
  52 + * 查询列表
  53 + */
  54 + @ApiOperation("查询列表")
  55 + @HasPermission({"sample-order:confirmation-form:query"})
  56 + @GetMapping("/query")
  57 + public InvokeResult<PageResult<QueryProductSampleConfirmationSlipBo>> query(@Valid QueryProductSampleConfirmationSlipVo vo) {
  58 +
  59 + PageResult<ProductSampleConfirmationSlip> pageResult = productSampleConfirmationSlipService.query(getPageIndex(vo), getPageSize(vo), vo);
  60 +
  61 + List<ProductSampleConfirmationSlip> datas = pageResult.getDatas();
  62 + List<QueryProductSampleConfirmationSlipBo> results = null;
  63 +
  64 + if (!CollectionUtil.isEmpty(datas)) {
  65 + results = datas.stream().map(QueryProductSampleConfirmationSlipBo::new).collect(Collectors.toList());
  66 + }
  67 +
  68 + return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results));
  69 + }
  70 +
  71 + /**
  72 + * 根据ID查询
  73 + */
  74 + @ApiOperation("根据ID查询")
  75 + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true)
  76 + @HasPermission({"sample-order:confirmation-form:query", "sample-order:confirmation-form:review"})
  77 + @GetMapping
  78 + public InvokeResult<GetProductSampleConfirmationSlipBo> get(@NotBlank(message = "id不能为空!") String id) {
  79 +
  80 + ProductSampleConfirmationSlip data = productSampleConfirmationSlipService.findById(id);
  81 + if (data == null) {
  82 + throw new DefaultClientException("产品试样确认单不存在!");
  83 + }
  84 +
  85 + GetProductSampleConfirmationSlipBo result = new GetProductSampleConfirmationSlipBo(data);
  86 + QueryProductSampleConfirmationSlipDetailVo vo = new QueryProductSampleConfirmationSlipDetailVo();
  87 + vo.setConfirmationSlipId(id);
  88 + List<ProductSampleConfirmationSlipDetail> detailList = productSampleConfirmationSlipDetailService.query(vo);
  89 + if (CollectionUtil.isNotEmpty(detailList)) {
  90 + List<QueryProductSampleConfirmationSlipDetailBo> detailBoList = null;
  91 + detailBoList = detailList.stream().map(QueryProductSampleConfirmationSlipDetailBo::new).collect(Collectors.toList());
  92 + result.setProductSampleConfirmationSlipDetailList(detailBoList);
  93 + }
  94 +
  95 + return InvokeResultBuilder.success(result);
  96 + }
  97 +
  98 + /**
  99 + * 新增
  100 + */
  101 + @ApiOperation("新增")
  102 + @HasPermission({"sample-order:confirmation-form:add"})
  103 + @PostMapping
  104 + public InvokeResult<Void> create(@Valid CreateProductSampleConfirmationSlipVo vo) {
  105 +
  106 + productSampleConfirmationSlipService.create(vo);
  107 +
  108 + return InvokeResultBuilder.success();
  109 + }
  110 +
  111 + /**
  112 + * 修改
  113 + */
  114 + @ApiOperation("修改")
  115 + @HasPermission({"sample-order:confirmation-form:modify", "sample-order:confirmation-form:approve"})
  116 + @PutMapping
  117 + public InvokeResult<Void> update(@Valid UpdateProductSampleConfirmationSlipVo vo) {
  118 +
  119 + productSampleConfirmationSlipService.update(vo);
  120 +
  121 + return InvokeResultBuilder.success();
  122 + }
  123 +
  124 + /**
  125 + * 根据ID删除
  126 + */
  127 + @ApiOperation("根据ID删除")
  128 + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true)
  129 + @HasPermission({"sample-order:confirmation-form:delete"})
  130 + @DeleteMapping
  131 + public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) {
  132 +
  133 + productSampleConfirmationSlipService.deleteById(id);
  134 +
  135 + return InvokeResultBuilder.success();
  136 + }
  137 +}
  1 +package com.lframework.xingyun.sc.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.TableName;
  4 +import java.math.BigDecimal;
  5 +import com.lframework.starter.web.core.dto.BaseDto;
  6 +import java.time.LocalDateTime;
  7 +import com.baomidou.mybatisplus.annotation.FieldFill;
  8 +import com.lframework.starter.web.core.entity.BaseEntity;
  9 +import com.baomidou.mybatisplus.annotation.TableField;
  10 +import lombok.Data;
  11 +
  12 +/**
  13 + * <p>
  14 + * 产品试样确认单
  15 + * </p>
  16 + *
  17 + */
  18 +@Data
  19 +@TableName("product_sample_confirmation_slip")
  20 +public class ProductSampleConfirmationSlip extends BaseEntity implements BaseDto {
  21 +
  22 + private static final long serialVersionUID = 1L;
  23 +
  24 + public static final String CACHE_NAME = "ProductSampleConfirmationSlip";
  25 +
  26 + /**
  27 + * ID
  28 + */
  29 + private String id;
  30 +
  31 + /**
  32 + * 订货单位ID
  33 + */
  34 + private String orderingUnit;
  35 +
  36 + /**
  37 + * 订货单位名称
  38 + */
  39 + @TableField(exist = false)
  40 + private String orderingUnitName;
  41 +
  42 + /**
  43 + * 试样种类
  44 + */
  45 + private String sampleType;
  46 +
  47 + /**
  48 + * 客户类型
  49 + */
  50 + private String customerType;
  51 +
  52 + /**
  53 + * 所属厂别
  54 + */
  55 + private String workshopId;
  56 +
  57 + /**
  58 + * 分厂名称
  59 + */
  60 + @TableField(exist = false)
  61 + private String workshopName;
  62 +
  63 + /**
  64 + * 所属品种
  65 + */
  66 + private String belongingBreed;
  67 +
  68 + /**
  69 + * 原供货同行
  70 + */
  71 + private String originalSupplierPeer;
  72 +
  73 + /**
  74 + * 合计数量
  75 + */
  76 + private BigDecimal totalQuantity;
  77 +
  78 + /**
  79 + * 本次试样数量是否超规定
  80 + */
  81 + private boolean sampleQuantityRegulation;
  82 +
  83 + /**
  84 + * 试样规格个数是否超规定
  85 + */
  86 + private boolean specificationQuantityRegulation;
  87 +
  88 + /**
  89 + * 试样次数
  90 + */
  91 + private String sampleFrequency;
  92 +
  93 + /**
  94 + * 前期不合格描述
  95 + */
  96 + private String earlyNonconformityDescription;
  97 +
  98 + /**
  99 + * 制单人
  100 + */
  101 + private String preparedBy;
  102 +
  103 + /**
  104 + * 审核状态
  105 + */
  106 + private String status;
  107 +
  108 + /**
  109 + * 办事处内勤ID
  110 + */
  111 + private String officeClerk;
  112 +
  113 + /**
  114 + * 办事处内勤审核
  115 + */
  116 + private String officeClerkReview;
  117 +
  118 + /**
  119 + * 办事处主管ID
  120 + */
  121 + private String officeSupervisor;
  122 +
  123 + /**
  124 + * 办事处主管审核
  125 + */
  126 + private String officeSupervisorReview;
  127 +
  128 + /**
  129 + * 办事处主管审核意见
  130 + */
  131 + private String officeSupervisorOpinion;
  132 +
  133 + /**
  134 + * 营销部分管ID
  135 + */
  136 + private String marketingDeputyDirector;
  137 +
  138 + /**
  139 + * 营销部分管审核
  140 + */
  141 + private String marketingDeputyDirectorReview;
  142 +
  143 + /**
  144 + * 营销部分管审核意见
  145 + */
  146 + private String marketingDeputyDirectorOpinion;
  147 +
  148 + /**
  149 + * 经营办主管ID
  150 + */
  151 + private String officeManagementSupervisor;
  152 +
  153 + /**
  154 + * 经营办主管审核
  155 + */
  156 + private String officeManagementSupervisorReview;
  157 +
  158 + /**
  159 + * 经营办主管审核意见
  160 + */
  161 + private String officeManagementSupervisorOpinion;
  162 +
  163 + /**
  164 + * 品质经理ID
  165 + */
  166 + private String qualityManager;
  167 +
  168 + /**
  169 + * 品质经理审核
  170 + */
  171 + private String qualityManagerReview;
  172 +
  173 + /**
  174 + * 品质经理审核意见
  175 + */
  176 + private String qualityManagerOpinion;
  177 +
  178 + /**
  179 + * 分厂主管ID
  180 + */
  181 + private String branchFactorySupervisor;
  182 +
  183 + /**
  184 + * 分厂主管审核
  185 + */
  186 + private String branchFactorySupervisorReview;
  187 +
  188 + /**
  189 + * 分厂主管审核意见
  190 + */
  191 + private String branchFactorySupervisorOpinion;
  192 +
  193 + /**
  194 + * 营销部主管ID
  195 + */
  196 + private String marketingDepartmentManager;
  197 +
  198 + /**
  199 + * 营销部主管审核
  200 + */
  201 + private String marketingDepartmentManagerReview;
  202 +
  203 + /**
  204 + * 营销部主管审核意见
  205 + */
  206 + private String marketingDepartmentManagerOpinion;
  207 +
  208 + /**
  209 + * 营销中心主管ID
  210 + */
  211 + private String marketingCenterSupervisor;
  212 +
  213 + /**
  214 + * 营销中心主管审核
  215 + */
  216 + private String marketingCenterSupervisorReview;
  217 +
  218 +
  219 + /**
  220 + * 营销中心主管审核意见
  221 + */
  222 + private String marketingCenterSupervisorOpinion;
  223 +
  224 + /**
  225 + * 总经理ID
  226 + */
  227 + private String generalManager;
  228 +
  229 + /**
  230 + * 总经理审核
  231 + */
  232 + private String generalManagerReview;
  233 +
  234 + /**
  235 + * 总经理审核意见
  236 + */
  237 + private String generalManagerOpinion;
  238 +
  239 + /**
  240 + * 创建人ID
  241 + */
  242 + @TableField(fill = FieldFill.INSERT)
  243 + private String createById;
  244 +
  245 + /**
  246 + * 创建人
  247 + */
  248 + @TableField(fill = FieldFill.INSERT)
  249 + private String createBy;
  250 +
  251 + /**
  252 + * 更新人ID
  253 + */
  254 + @TableField(fill = FieldFill.INSERT_UPDATE)
  255 + private String updateById;
  256 +
  257 + /**
  258 + * 更新人
  259 + */
  260 + @TableField(fill = FieldFill.INSERT_UPDATE)
  261 + private String updateBy;
  262 +
  263 + /**
  264 + * 创建时间
  265 + */
  266 + @TableField(fill = FieldFill.INSERT)
  267 + private LocalDateTime createTime;
  268 +
  269 + /**
  270 + * 更新时间
  271 + */
  272 + @TableField(fill = FieldFill.INSERT_UPDATE)
  273 + private LocalDateTime updateTime;
  274 +
  275 +}
  1 +package com.lframework.xingyun.sc.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.TableName;
  4 +import java.math.BigDecimal;
  5 +import com.lframework.starter.web.core.dto.BaseDto;
  6 +import java.time.LocalDateTime;
  7 +import com.baomidou.mybatisplus.annotation.FieldFill;
  8 +import com.lframework.starter.web.core.entity.BaseEntity;
  9 +import com.baomidou.mybatisplus.annotation.TableField;
  10 +import lombok.Data;
  11 +
  12 +/**
  13 + * <p>
  14 + * 产品试样确认单明细
  15 + * </p>
  16 + *
  17 + */
  18 +@Data
  19 +@TableName("product_sample_confirmation_slip_detail")
  20 +public class ProductSampleConfirmationSlipDetail extends BaseEntity implements BaseDto {
  21 +
  22 + private static final long serialVersionUID = 1L;
  23 +
  24 + public static final String CACHE_NAME = "ProductSampleConfirmationSlipDetail";
  25 +
  26 + /**
  27 + * ID
  28 + */
  29 + private String id;
  30 +
  31 + /**
  32 + * 产品试样确认单主键
  33 + */
  34 + private String confirmationSlipId;
  35 +
  36 + /**
  37 + * 订货单物料行ID
  38 + */
  39 + private String purchaseOrderLineId;
  40 +
  41 + /**
  42 + * 牌号
  43 + */
  44 + private String brand;
  45 +
  46 + /**
  47 + * 厚度
  48 + */
  49 + private BigDecimal thickness;
  50 +
  51 + /**
  52 + * 厚度公差正
  53 + */
  54 + private BigDecimal thicknessTolPos;
  55 +
  56 + /**
  57 + * 厚度公差负
  58 + */
  59 + private BigDecimal thicknessTolNeg;
  60 +
  61 + /**
  62 + * 宽度
  63 + */
  64 + private BigDecimal width;
  65 +
  66 + /**
  67 + * 宽度公差正
  68 + */
  69 + private BigDecimal widthTolPos;
  70 +
  71 + /**
  72 + * 宽度公差负
  73 + */
  74 + private BigDecimal widthTolNeg;
  75 +
  76 + /**
  77 + * 长度
  78 + */
  79 + private BigDecimal length;
  80 +
  81 + /**
  82 + * 长度公差正
  83 + */
  84 + private BigDecimal lengthTolPos;
  85 +
  86 + /**
  87 + * 长度公差负
  88 + */
  89 + private BigDecimal lengthTolNeg;
  90 +
  91 + /**
  92 + * 状态
  93 + */
  94 + private String status;
  95 +
  96 + /**
  97 + * 数量
  98 + */
  99 + private BigDecimal quantity;
  100 +
  101 + /**
  102 + * 是否提供样品
  103 + */
  104 + private String provideSamples;
  105 +
  106 + /**
  107 + * 是否提供明确参数
  108 + */
  109 + private String clearParameters;
  110 +
  111 + /**
  112 + * 创建人ID
  113 + */
  114 + @TableField(fill = FieldFill.INSERT)
  115 + private String createById;
  116 +
  117 + /**
  118 + * 创建人
  119 + */
  120 + @TableField(fill = FieldFill.INSERT)
  121 + private String createBy;
  122 +
  123 + /**
  124 + * 更新人ID
  125 + */
  126 + @TableField(fill = FieldFill.INSERT_UPDATE)
  127 + private String updateById;
  128 +
  129 + /**
  130 + * 更新人
  131 + */
  132 + @TableField(fill = FieldFill.INSERT_UPDATE)
  133 + private String updateBy;
  134 +
  135 + /**
  136 + * 创建时间
  137 + */
  138 + @TableField(fill = FieldFill.INSERT)
  139 + private LocalDateTime createTime;
  140 +
  141 + /**
  142 + * 更新时间
  143 + */
  144 + @TableField(fill = FieldFill.INSERT_UPDATE)
  145 + private LocalDateTime updateTime;
  146 +
  147 +}
  1 +package com.lframework.xingyun.sc.impl.sample;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.github.pagehelper.PageInfo;
  6 +import com.lframework.starter.web.core.impl.BaseMpServiceImpl;
  7 +import com.lframework.starter.web.core.utils.PageResultUtil;
  8 +import com.lframework.starter.web.core.utils.OpLogUtil;
  9 +import java.io.Serializable;
  10 +import com.lframework.starter.common.exceptions.impl.DefaultClientException;
  11 +import com.lframework.starter.web.core.utils.IdUtil;
  12 +import com.lframework.starter.web.core.annotations.oplog.OpLog;
  13 +import com.lframework.starter.web.core.utils.PageHelperUtil;
  14 +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType;
  15 +import com.lframework.starter.web.core.components.resp.PageResult;
  16 +import com.lframework.starter.common.utils.StringUtil;
  17 +import com.lframework.starter.common.utils.ObjectUtil;
  18 +import com.lframework.starter.common.utils.Assert;
  19 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlipDetail;
  20 +import com.lframework.xingyun.sc.mappers.ProductSampleConfirmationSlipDetailMapper;
  21 +import com.lframework.xingyun.sc.service.sample.ProductSampleConfirmationSlipDetailService;
  22 +import com.lframework.xingyun.sc.vo.sample.confirm.CreateProductSampleConfirmationSlipDetailVo;
  23 +import com.lframework.xingyun.sc.vo.sample.confirm.QueryProductSampleConfirmationSlipDetailVo;
  24 +import com.lframework.xingyun.sc.vo.sample.confirm.UpdateProductSampleConfirmationSlipDetailVo;
  25 +import org.springframework.transaction.annotation.Transactional;
  26 +import org.springframework.stereotype.Service;
  27 +import java.util.List;
  28 +
  29 +@Service
  30 +public class ProductSampleConfirmationSlipDetailServiceImpl extends BaseMpServiceImpl<ProductSampleConfirmationSlipDetailMapper, ProductSampleConfirmationSlipDetail> implements ProductSampleConfirmationSlipDetailService {
  31 +
  32 + @Override
  33 + public PageResult<ProductSampleConfirmationSlipDetail> query(Integer pageIndex, Integer pageSize, QueryProductSampleConfirmationSlipDetailVo vo) {
  34 +
  35 + Assert.greaterThanZero(pageIndex);
  36 + Assert.greaterThanZero(pageSize);
  37 +
  38 + PageHelperUtil.startPage(pageIndex, pageSize);
  39 + List<ProductSampleConfirmationSlipDetail> datas = this.query(vo);
  40 +
  41 + return PageResultUtil.convert(new PageInfo<>(datas));
  42 + }
  43 +
  44 + @Override
  45 + public List<ProductSampleConfirmationSlipDetail> query(QueryProductSampleConfirmationSlipDetailVo vo) {
  46 +
  47 + return getBaseMapper().query(vo);
  48 + }
  49 +
  50 + @Override
  51 + public ProductSampleConfirmationSlipDetail findById(String id) {
  52 +
  53 + return getBaseMapper().findById(id);
  54 + }
  55 +
  56 + @OpLog(type = OtherOpLogType.class, name = "新增产品试样确认单明细,ID:{}", params = {"#id"})
  57 + @Transactional(rollbackFor = Exception.class)
  58 + @Override
  59 + public String create(CreateProductSampleConfirmationSlipDetailVo vo) {
  60 +
  61 + ProductSampleConfirmationSlipDetail data = new ProductSampleConfirmationSlipDetail();
  62 + data.setId(IdUtil.getId());
  63 + data.setConfirmationSlipId(vo.getConfirmationSlipId());
  64 + data.setPurchaseOrderLineId(vo.getPurchaseOrderLineId());
  65 + if (!StringUtil.isBlank(vo.getBrand())) {
  66 + data.setBrand(vo.getBrand());
  67 + }
  68 + if (vo.getThickness() != null) {
  69 + data.setThickness(vo.getThickness());
  70 + }
  71 + if (vo.getThicknessTolPos() != null) {
  72 + data.setThicknessTolPos(vo.getThicknessTolPos());
  73 + }
  74 + if (vo.getThicknessTolNeg() != null) {
  75 + data.setThicknessTolNeg(vo.getThicknessTolNeg());
  76 + }
  77 + if (vo.getWidth() != null) {
  78 + data.setWidth(vo.getWidth());
  79 + }
  80 + if (vo.getWidthTolPos() != null) {
  81 + data.setWidthTolPos(vo.getWidthTolPos());
  82 + }
  83 + if (vo.getWidthTolNeg() != null) {
  84 + data.setWidthTolNeg(vo.getWidthTolNeg());
  85 + }
  86 + if (vo.getLength() != null) {
  87 + data.setLength(vo.getLength());
  88 + }
  89 + if (vo.getLengthTolPos() != null) {
  90 + data.setLengthTolPos(vo.getLengthTolPos());
  91 + }
  92 + if (vo.getLengthTolNeg() != null) {
  93 + data.setLengthTolNeg(vo.getLengthTolNeg());
  94 + }
  95 + if (!StringUtil.isBlank(vo.getStatus())) {
  96 + data.setStatus(vo.getStatus());
  97 + }
  98 + if (vo.getQuantity() != null) {
  99 + data.setQuantity(vo.getQuantity());
  100 + }
  101 +
  102 + getBaseMapper().insert(data);
  103 +
  104 + OpLogUtil.setVariable("id", data.getId());
  105 + OpLogUtil.setExtra(vo);
  106 +
  107 + return data.getId();
  108 + }
  109 +
  110 + @OpLog(type = OtherOpLogType.class, name = "修改产品试样确认单明细,ID:{}", params = {"#id"})
  111 + @Transactional(rollbackFor = Exception.class)
  112 + @Override
  113 + public void update(UpdateProductSampleConfirmationSlipDetailVo vo) {
  114 +
  115 + ProductSampleConfirmationSlipDetail data = getBaseMapper().selectById(vo.getId());
  116 + if (ObjectUtil.isNull(data)) {
  117 + throw new DefaultClientException("产品试样确认单明细不存在!");
  118 + }
  119 +
  120 + LambdaUpdateWrapper<ProductSampleConfirmationSlipDetail> updateWrapper = Wrappers.lambdaUpdate(ProductSampleConfirmationSlipDetail.class)
  121 + .set(ProductSampleConfirmationSlipDetail::getProvideSamples, StringUtil.isBlank(vo.getProvideSamples()) ? null : vo.getProvideSamples())
  122 + .set(ProductSampleConfirmationSlipDetail::getClearParameters, StringUtil.isBlank(vo.getClearParameters()) ? null : vo.getClearParameters())
  123 + .eq(ProductSampleConfirmationSlipDetail::getId, vo.getId());
  124 +
  125 + getBaseMapper().update(updateWrapper);
  126 +
  127 + OpLogUtil.setVariable("id", data.getId());
  128 + OpLogUtil.setExtra(vo);
  129 + }
  130 +
  131 + @OpLog(type = OtherOpLogType.class, name = "删除产品试样确认单明细,ID:{}", params = {"#id"})
  132 + @Transactional(rollbackFor = Exception.class)
  133 + @Override
  134 + public void deleteById(String id) {
  135 +
  136 + getBaseMapper().deleteById(id);
  137 + }
  138 +
  139 + @Override
  140 + public void cleanCacheByKey(Serializable key) {
  141 +
  142 + }
  143 +}
  1 +package com.lframework.xingyun.sc.impl.sample;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.github.pagehelper.PageInfo;
  6 +import com.lframework.starter.web.core.impl.BaseMpServiceImpl;
  7 +import com.lframework.starter.web.core.utils.PageResultUtil;
  8 +import com.lframework.starter.web.core.utils.OpLogUtil;
  9 +import java.io.Serializable;
  10 +import com.lframework.starter.common.exceptions.impl.DefaultClientException;
  11 +import com.lframework.starter.web.core.utils.IdUtil;
  12 +import com.lframework.starter.web.core.annotations.oplog.OpLog;
  13 +import com.lframework.starter.web.core.utils.PageHelperUtil;
  14 +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType;
  15 +import com.lframework.starter.web.core.components.resp.PageResult;
  16 +import com.lframework.starter.common.utils.StringUtil;
  17 +import com.lframework.starter.common.utils.ObjectUtil;
  18 +import com.lframework.starter.common.utils.Assert;
  19 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip;
  20 +import com.lframework.xingyun.sc.mappers.ProductSampleConfirmationSlipMapper;
  21 +import com.lframework.xingyun.sc.service.sample.ProductSampleConfirmationSlipDetailService;
  22 +import com.lframework.xingyun.sc.service.sample.ProductSampleConfirmationSlipService;
  23 +import com.lframework.xingyun.sc.vo.sample.confirm.*;
  24 +import org.apache.commons.collections.CollectionUtils;
  25 +import org.springframework.transaction.annotation.Transactional;
  26 +import org.springframework.stereotype.Service;
  27 +import javax.annotation.Resource;
  28 +import java.util.List;
  29 +
  30 +@Service
  31 +public class ProductSampleConfirmationSlipServiceImpl extends BaseMpServiceImpl<ProductSampleConfirmationSlipMapper, ProductSampleConfirmationSlip> implements ProductSampleConfirmationSlipService {
  32 + @Resource
  33 + private ProductSampleConfirmationSlipDetailService productSampleConfirmationSlipDetailService;
  34 +
  35 + @Override
  36 + public PageResult<ProductSampleConfirmationSlip> query(Integer pageIndex, Integer pageSize, QueryProductSampleConfirmationSlipVo vo) {
  37 +
  38 + Assert.greaterThanZero(pageIndex);
  39 + Assert.greaterThanZero(pageSize);
  40 +
  41 + PageHelperUtil.startPage(pageIndex, pageSize);
  42 + List<ProductSampleConfirmationSlip> datas = this.query(vo);
  43 +
  44 + return PageResultUtil.convert(new PageInfo<>(datas));
  45 + }
  46 +
  47 + @Override
  48 + public List<ProductSampleConfirmationSlip> query(QueryProductSampleConfirmationSlipVo vo) {
  49 +
  50 + return getBaseMapper().query(vo);
  51 + }
  52 +
  53 + @Override
  54 + public ProductSampleConfirmationSlip findById(String id) {
  55 +
  56 + return getBaseMapper().findById(id);
  57 + }
  58 +
  59 + @OpLog(type = OtherOpLogType.class, name = "新增产品试样确认单,ID:{}", params = {"#id"})
  60 + @Transactional(rollbackFor = Exception.class)
  61 + @Override
  62 + public String create(CreateProductSampleConfirmationSlipVo vo) {
  63 +
  64 + ProductSampleConfirmationSlip data = new ProductSampleConfirmationSlip();
  65 + data.setId(IdUtil.getId());
  66 + data.setOrderingUnit(vo.getOrderingUnit());
  67 + if (!StringUtil.isBlank(vo.getWorkshopId())) {
  68 + data.setWorkshopId(vo.getWorkshopId());
  69 + }
  70 + if (!StringUtil.isBlank(vo.getBelongingBreed())) {
  71 + data.setBelongingBreed(vo.getBelongingBreed());
  72 + }
  73 + if (vo.getTotalQuantity() != null) {
  74 + data.setTotalQuantity(vo.getTotalQuantity());
  75 + }
  76 +
  77 + getBaseMapper().insert(data);
  78 +
  79 + OpLogUtil.setVariable("id", data.getId());
  80 + OpLogUtil.setExtra(vo);
  81 + //明细数据
  82 + List<CreateProductSampleConfirmationSlipDetailVo> detailList = vo.getProductSampleConfirmationSlipDetailList();
  83 + if (CollectionUtils.isNotEmpty(detailList)) {
  84 + for (CreateProductSampleConfirmationSlipDetailVo vo1 : detailList) {
  85 + vo1.setConfirmationSlipId(data.getId());
  86 + productSampleConfirmationSlipDetailService.create(vo1);
  87 + }
  88 + }
  89 +
  90 + return data.getId();
  91 + }
  92 +
  93 + @OpLog(type = OtherOpLogType.class, name = "修改产品试样确认单,ID:{}", params = {"#id"})
  94 + @Transactional(rollbackFor = Exception.class)
  95 + @Override
  96 + public void update(UpdateProductSampleConfirmationSlipVo vo) {
  97 +
  98 + ProductSampleConfirmationSlip data = getBaseMapper().selectById(vo.getId());
  99 + if (ObjectUtil.isNull(data)) {
  100 + throw new DefaultClientException("产品试样确认单不存在!");
  101 + }
  102 +
  103 + LambdaUpdateWrapper<ProductSampleConfirmationSlip> updateWrapper = Wrappers.lambdaUpdate(ProductSampleConfirmationSlip.class)
  104 + .set(ProductSampleConfirmationSlip::getSampleType, StringUtil.isBlank(vo.getSampleType()) ? null : vo.getSampleType())
  105 + .set(ProductSampleConfirmationSlip::getCustomerType, StringUtil.isBlank(vo.getCustomerType()) ? null : vo.getCustomerType())
  106 + .set(ProductSampleConfirmationSlip::getOriginalSupplierPeer, StringUtil.isBlank(vo.getOriginalSupplierPeer()) ? null : vo.getOriginalSupplierPeer())
  107 + .set(ProductSampleConfirmationSlip::isSampleQuantityRegulation, vo.isSampleQuantityRegulation())
  108 + .set(ProductSampleConfirmationSlip::isSpecificationQuantityRegulation, vo.isSpecificationQuantityRegulation())
  109 + .set(ProductSampleConfirmationSlip::getSampleFrequency, StringUtil.isBlank(vo.getSampleFrequency()) ? null : vo.getSampleFrequency())
  110 + .set(ProductSampleConfirmationSlip::getEarlyNonconformityDescription, StringUtil.isBlank(vo.getEarlyNonconformityDescription()) ? null : vo.getEarlyNonconformityDescription())
  111 + .set(ProductSampleConfirmationSlip::getPreparedBy, StringUtil.isBlank(vo.getPreparedBy()) ? null : vo.getPreparedBy())
  112 + .set(ProductSampleConfirmationSlip::getStatus, StringUtil.isBlank(vo.getStatus()) ? null : vo.getStatus())
  113 + .eq(ProductSampleConfirmationSlip::getId, vo.getId());
  114 +
  115 + getBaseMapper().update(updateWrapper);
  116 +
  117 + OpLogUtil.setVariable("id", data.getId());
  118 + OpLogUtil.setExtra(vo);
  119 + //明细数据
  120 + List<UpdateProductSampleConfirmationSlipDetailVo> detailList = vo.getProductSampleConfirmationSlipDetailList();
  121 + if (CollectionUtils.isNotEmpty(detailList)) {
  122 + for (UpdateProductSampleConfirmationSlipDetailVo vo1 : detailList) {
  123 + productSampleConfirmationSlipDetailService.update(vo1);
  124 + }
  125 + }
  126 + }
  127 +
  128 + @OpLog(type = OtherOpLogType.class, name = "删除产品试样确认单,ID:{}", params = {"#id"})
  129 + @Transactional(rollbackFor = Exception.class)
  130 + @Override
  131 + public void deleteById(String id) {
  132 +
  133 + getBaseMapper().deleteById(id);
  134 + }
  135 +
  136 + @Override
  137 + public void cleanCacheByKey(Serializable key) {
  138 +
  139 + }
  140 +}
  1 +package com.lframework.xingyun.sc.mappers;
  2 +
  3 +import com.lframework.starter.web.core.mapper.BaseMapper;
  4 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlipDetail;
  5 +import com.lframework.xingyun.sc.vo.sample.confirm.QueryProductSampleConfirmationSlipDetailVo;
  6 +import org.apache.ibatis.annotations.Param;
  7 +
  8 +import java.util.List;
  9 +
  10 +/**
  11 + * <p>
  12 + * 产品试样确认单明细 Mapper 接口
  13 + * </p>
  14 + *
  15 + */
  16 +public interface ProductSampleConfirmationSlipDetailMapper extends BaseMapper<ProductSampleConfirmationSlipDetail> {
  17 +
  18 + /**
  19 + * 查询列表
  20 + * @param vo
  21 + * @return
  22 + */
  23 + List<ProductSampleConfirmationSlipDetail> query(@Param("vo") QueryProductSampleConfirmationSlipDetailVo vo);
  24 +
  25 + /**
  26 + * 查询
  27 + *
  28 + * @param id
  29 + * @return
  30 + */
  31 + ProductSampleConfirmationSlipDetail findById(@Param("id") String id);
  32 +}
  1 +package com.lframework.xingyun.sc.mappers;
  2 +
  3 +import com.lframework.starter.web.core.mapper.BaseMapper;
  4 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip;
  5 +import com.lframework.xingyun.sc.vo.sample.confirm.QueryProductSampleConfirmationSlipVo;
  6 +import org.apache.ibatis.annotations.Param;
  7 +
  8 +import java.util.List;
  9 +
  10 +/**
  11 + * <p>
  12 + * 产品试样确认单 Mapper 接口
  13 + * </p>
  14 + *
  15 + */
  16 +public interface ProductSampleConfirmationSlipMapper extends BaseMapper<ProductSampleConfirmationSlip> {
  17 +
  18 + /**
  19 + * 查询列表
  20 + * @param vo
  21 + * @return
  22 + */
  23 + List<ProductSampleConfirmationSlip> query(@Param("vo") QueryProductSampleConfirmationSlipVo vo);
  24 +
  25 + /**
  26 + * 查询
  27 + *
  28 + * @param id
  29 + * @return
  30 + */
  31 + ProductSampleConfirmationSlip findById(@Param("id") String id);
  32 +}
  1 +package com.lframework.xingyun.sc.service.sample;
  2 +
  3 +import com.lframework.starter.web.core.service.BaseMpService;
  4 +import com.lframework.starter.web.core.components.resp.PageResult;
  5 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlipDetail;
  6 +import com.lframework.xingyun.sc.vo.sample.confirm.CreateProductSampleConfirmationSlipDetailVo;
  7 +import com.lframework.xingyun.sc.vo.sample.confirm.QueryProductSampleConfirmationSlipDetailVo;
  8 +import com.lframework.xingyun.sc.vo.sample.confirm.UpdateProductSampleConfirmationSlipDetailVo;
  9 +import java.util.List;
  10 +
  11 +/**
  12 + * 产品试样确认单明细 Service
  13 + */
  14 +public interface ProductSampleConfirmationSlipDetailService extends BaseMpService<ProductSampleConfirmationSlipDetail> {
  15 +
  16 + /**
  17 + * 查询列表
  18 + * @return
  19 + */
  20 + PageResult<ProductSampleConfirmationSlipDetail> query(Integer pageIndex, Integer pageSize, QueryProductSampleConfirmationSlipDetailVo vo);
  21 +
  22 + /**
  23 + * 查询列表
  24 + * @param vo
  25 + * @return
  26 + */
  27 + List<ProductSampleConfirmationSlipDetail> query(QueryProductSampleConfirmationSlipDetailVo vo);
  28 +
  29 + /**
  30 + * 根据ID查询
  31 + * @param id
  32 + * @return
  33 + */
  34 + ProductSampleConfirmationSlipDetail findById(String id);
  35 +
  36 + /**
  37 + * 创建
  38 + * @param vo
  39 + * @return
  40 + */
  41 + String create(CreateProductSampleConfirmationSlipDetailVo vo);
  42 +
  43 + /**
  44 + * 修改
  45 + * @param vo
  46 + */
  47 + void update(UpdateProductSampleConfirmationSlipDetailVo vo);
  48 +
  49 + /**
  50 + * 根据ID删除
  51 + * @param id
  52 + * @return
  53 + */
  54 + void deleteById(String id);
  55 +}
  1 +package com.lframework.xingyun.sc.service.sample;
  2 +
  3 +import com.lframework.starter.web.core.service.BaseMpService;
  4 +import com.lframework.starter.web.core.components.resp.PageResult;
  5 +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip;
  6 +import com.lframework.xingyun.sc.vo.sample.confirm.CreateProductSampleConfirmationSlipVo;
  7 +import com.lframework.xingyun.sc.vo.sample.confirm.QueryProductSampleConfirmationSlipVo;
  8 +import com.lframework.xingyun.sc.vo.sample.confirm.UpdateProductSampleConfirmationSlipVo;
  9 +import java.util.List;
  10 +
  11 +/**
  12 + * 产品试样确认单 Service
  13 + */
  14 +public interface ProductSampleConfirmationSlipService extends BaseMpService<ProductSampleConfirmationSlip> {
  15 +
  16 + /**
  17 + * 查询列表
  18 + * @return
  19 + */
  20 + PageResult<ProductSampleConfirmationSlip> query(Integer pageIndex, Integer pageSize, QueryProductSampleConfirmationSlipVo vo);
  21 +
  22 + /**
  23 + * 查询列表
  24 + * @param vo
  25 + * @return
  26 + */
  27 + List<ProductSampleConfirmationSlip> query(QueryProductSampleConfirmationSlipVo vo);
  28 +
  29 + /**
  30 + * 根据ID查询
  31 + * @param id
  32 + * @return
  33 + */
  34 + ProductSampleConfirmationSlip findById(String id);
  35 +
  36 + /**
  37 + * 创建
  38 + * @param vo
  39 + * @return
  40 + */
  41 + String create(CreateProductSampleConfirmationSlipVo vo);
  42 +
  43 + /**
  44 + * 修改
  45 + * @param vo
  46 + */
  47 + void update(UpdateProductSampleConfirmationSlipVo vo);
  48 +
  49 + /**
  50 + * 根据ID删除
  51 + * @param id
  52 + * @return
  53 + */
  54 + void deleteById(String id);
  55 +}
  1 +package com.lframework.xingyun.sc.vo.sample.confirm;
  2 +
  3 +import com.lframework.starter.web.core.components.validation.IsNumberPrecision;
  4 +import java.math.BigDecimal;
  5 +import javax.validation.constraints.NotBlank;
  6 +import com.lframework.starter.web.core.utils.IdUtil;
  7 +import java.time.LocalDateTime;
  8 +import com.lframework.starter.web.core.vo.BaseVo;
  9 +import javax.validation.constraints.NotNull;
  10 +import io.swagger.annotations.ApiModelProperty;
  11 +import com.lframework.starter.web.core.components.validation.TypeMismatch;
  12 +import org.hibernate.validator.constraints.Length;
  13 +import java.io.Serializable;
  14 +import lombok.Data;
  15 +
  16 +@Data
  17 +public class CreateProductSampleConfirmationSlipDetailVo implements BaseVo, Serializable {
  18 +
  19 + private static final long serialVersionUID = 1L;
  20 +
  21 + /**
  22 + * 产品试样确认单主键
  23 + */
  24 + @ApiModelProperty(value = "产品试样确认单主键", required = true)
  25 + @NotBlank(message = "请输入产品试样确认单主键!")
  26 + @Length(message = "产品试样确认单主键最多允许32个字符!")
  27 + private String confirmationSlipId;
  28 +
  29 + /**
  30 + * 订货单物料行ID
  31 + */
  32 + @ApiModelProperty(value = "订货单物料行ID", required = true)
  33 + @NotBlank(message = "请输入订货单物料行ID!")
  34 + @Length(message = "订货单物料行ID最多允许32个字符!")
  35 + private String purchaseOrderLineId;
  36 +
  37 + /**
  38 + * 牌号
  39 + */
  40 + @ApiModelProperty("牌号")
  41 + @Length(message = "牌号最多允许100个字符!")
  42 + private String brand;
  43 +
  44 + /**
  45 + * 厚度
  46 + */
  47 + @ApiModelProperty("厚度")
  48 + @TypeMismatch(message = "厚度格式有误!")
  49 + @IsNumberPrecision(message = "厚度最多允许4位小数!", value = 4)
  50 + private BigDecimal thickness;
  51 +
  52 + /**
  53 + * 厚度公差正
  54 + */
  55 + @ApiModelProperty("厚度公差正")
  56 + @TypeMismatch(message = "厚度公差正格式有误!")
  57 + @IsNumberPrecision(message = "厚度公差正最多允许4位小数!", value = 4)
  58 + private BigDecimal thicknessTolPos;
  59 +
  60 + /**
  61 + * 厚度公差负
  62 + */
  63 + @ApiModelProperty("厚度公差负")
  64 + @TypeMismatch(message = "厚度公差负格式有误!")
  65 + @IsNumberPrecision(message = "厚度公差负最多允许4位小数!", value = 4)
  66 + private BigDecimal thicknessTolNeg;
  67 +
  68 + /**
  69 + * 宽度
  70 + */
  71 + @ApiModelProperty("宽度")
  72 + @TypeMismatch(message = "宽度格式有误!")
  73 + @IsNumberPrecision(message = "宽度最多允许4位小数!", value = 4)
  74 + private BigDecimal width;
  75 +
  76 + /**
  77 + * 宽度公差正
  78 + */
  79 + @ApiModelProperty("宽度公差正")
  80 + @TypeMismatch(message = "宽度公差正格式有误!")
  81 + @IsNumberPrecision(message = "宽度公差正最多允许4位小数!", value = 4)
  82 + private BigDecimal widthTolPos;
  83 +
  84 + /**
  85 + * 宽度公差负
  86 + */
  87 + @ApiModelProperty("宽度公差负")
  88 + @TypeMismatch(message = "宽度公差负格式有误!")
  89 + @IsNumberPrecision(message = "宽度公差负最多允许4位小数!", value = 4)
  90 + private BigDecimal widthTolNeg;
  91 +
  92 + /**
  93 + * 长度
  94 + */
  95 + @ApiModelProperty("长度")
  96 + @TypeMismatch(message = "长度格式有误!")
  97 + @IsNumberPrecision(message = "长度最多允许4位小数!", value = 4)
  98 + private BigDecimal length;
  99 +
  100 + /**
  101 + * 长度公差正
  102 + */
  103 + @ApiModelProperty("长度公差正")
  104 + @TypeMismatch(message = "长度公差正格式有误!")
  105 + @IsNumberPrecision(message = "长度公差正最多允许4位小数!", value = 4)
  106 + private BigDecimal lengthTolPos;
  107 +
  108 + /**
  109 + * 长度公差负
  110 + */
  111 + @ApiModelProperty("长度公差负")
  112 + @TypeMismatch(message = "长度公差负格式有误!")
  113 + @IsNumberPrecision(message = "长度公差负最多允许4位小数!", value = 4)
  114 + private BigDecimal lengthTolNeg;
  115 +
  116 + /**
  117 + * 状态
  118 + */
  119 + @ApiModelProperty("状态")
  120 + @Length(message = "状态最多允许50个字符!")
  121 + private String status;
  122 +
  123 + /**
  124 + * 数量
  125 + */
  126 + @ApiModelProperty("数量")
  127 + @TypeMismatch(message = "数量格式有误!")
  128 + @IsNumberPrecision(message = "数量最多允许4位小数!", value = 4)
  129 + private BigDecimal quantity;
  130 +
  131 + /**
  132 + * 创建人ID
  133 + */
  134 + @ApiModelProperty(value = "创建人ID", required = true)
  135 + @NotBlank(message = "请输入创建人ID!")
  136 + @Length(message = "创建人ID最多允许32个字符!")
  137 + private String createById;
  138 +
  139 + /**
  140 + * 创建人
  141 + */
  142 + @ApiModelProperty(value = "创建人", required = true)
  143 + @NotBlank(message = "请输入创建人!")
  144 + @Length(message = "创建人最多允许20个字符!")
  145 + private String createBy;
  146 +
  147 + /**
  148 + * 更新人ID
  149 + */
  150 + @ApiModelProperty(value = "更新人ID", required = true)
  151 + @NotBlank(message = "请输入更新人ID!")
  152 + @Length(message = "更新人ID最多允许32个字符!")
  153 + private String updateById;
  154 +
  155 + /**
  156 + * 更新人
  157 + */
  158 + @ApiModelProperty(value = "更新人", required = true)
  159 + @NotBlank(message = "请输入更新人!")
  160 + @Length(message = "更新人最多允许20个字符!")
  161 + private String updateBy;
  162 +
  163 + /**
  164 + * 创建时间
  165 + */
  166 + @ApiModelProperty(value = "创建时间", required = true)
  167 + @NotNull(message = "请输入创建时间!")
  168 + @TypeMismatch(message = "创建时间格式有误!")
  169 + private LocalDateTime createTime;
  170 +
  171 + /**
  172 + * 更新时间
  173 + */
  174 + @ApiModelProperty(value = "更新时间", required = true)
  175 + @NotNull(message = "请输入更新时间!")
  176 + @TypeMismatch(message = "更新时间格式有误!")
  177 + private LocalDateTime updateTime;
  178 +
  179 +}
  1 +package com.lframework.xingyun.sc.vo.sample.confirm;
  2 +
  3 +import com.lframework.starter.web.core.components.validation.IsNumberPrecision;
  4 +import java.math.BigDecimal;
  5 +import javax.validation.constraints.NotBlank;
  6 +import java.time.LocalDateTime;
  7 +import com.lframework.starter.web.core.vo.BaseVo;
  8 +import javax.validation.constraints.NotNull;
  9 +
  10 +import com.lframework.xingyun.sc.bo.sample.confirm.QueryProductSampleConfirmationSlipDetailBo;
  11 +import io.swagger.annotations.ApiModelProperty;
  12 +import com.lframework.starter.web.core.components.validation.TypeMismatch;
  13 +import org.hibernate.validator.constraints.Length;
  14 +import java.io.Serializable;
  15 +import java.util.List;
  16 +
  17 +import lombok.Data;
  18 +
  19 +@Data
  20 +public class CreateProductSampleConfirmationSlipVo implements BaseVo, Serializable {
  21 +
  22 + private static final long serialVersionUID = 1L;
  23 +
  24 + /**
  25 + * 订货单位ID
  26 + */
  27 + @ApiModelProperty(value = "订货单位ID", required = true)
  28 + @NotBlank(message = "请输入订货单位ID!")
  29 + @Length(message = "订货单位ID最多允许32个字符!")
  30 + private String orderingUnit;
  31 +
  32 + /**
  33 + * 所属厂别
  34 + */
  35 + @ApiModelProperty("所属厂别")
  36 + @Length(message = "所属厂别最多允许32个字符!")
  37 + private String workshopId;
  38 +
  39 + /**
  40 + * 所属品种
  41 + */
  42 + @ApiModelProperty("所属品种")
  43 + @Length(message = "所属品种最多允许500个字符!")
  44 + private String belongingBreed;
  45 +
  46 + /**
  47 + * 合计数量
  48 + */
  49 + @ApiModelProperty("合计数量")
  50 + @TypeMismatch(message = "合计数量格式有误!")
  51 + @IsNumberPrecision(message = "合计数量最多允许4位小数!", value = 4)
  52 + private BigDecimal totalQuantity;
  53 +
  54 + /**
  55 + * 产品试样确认单详情
  56 + */
  57 + @ApiModelProperty("产品试样确认单详情")
  58 + List<CreateProductSampleConfirmationSlipDetailVo> productSampleConfirmationSlipDetailList;
  59 +
  60 + /**
  61 + * 创建人ID
  62 + */
  63 + @ApiModelProperty(value = "创建人ID", required = true)
  64 + @NotBlank(message = "请输入创建人ID!")
  65 + @Length(message = "创建人ID最多允许32个字符!")
  66 + private String createById;
  67 +
  68 + /**
  69 + * 创建人
  70 + */
  71 + @ApiModelProperty(value = "创建人", required = true)
  72 + @NotBlank(message = "请输入创建人!")
  73 + @Length(message = "创建人最多允许20个字符!")
  74 + private String createBy;
  75 +
  76 + /**
  77 + * 更新人ID
  78 + */
  79 + @ApiModelProperty(value = "更新人ID", required = true)
  80 + @NotBlank(message = "请输入更新人ID!")
  81 + @Length(message = "更新人ID最多允许32个字符!")
  82 + private String updateById;
  83 +
  84 + /**
  85 + * 更新人
  86 + */
  87 + @ApiModelProperty(value = "更新人", required = true)
  88 + @NotBlank(message = "请输入更新人!")
  89 + @Length(message = "更新人最多允许20个字符!")
  90 + private String updateBy;
  91 +
  92 + /**
  93 + * 创建时间
  94 + */
  95 + @ApiModelProperty(value = "创建时间", required = true)
  96 + @NotNull(message = "请输入创建时间!")
  97 + @TypeMismatch(message = "创建时间格式有误!")
  98 + private LocalDateTime createTime;
  99 +
  100 + /**
  101 + * 更新时间
  102 + */
  103 + @ApiModelProperty(value = "更新时间", required = true)
  104 + @NotNull(message = "请输入更新时间!")
  105 + @TypeMismatch(message = "更新时间格式有误!")
  106 + private LocalDateTime updateTime;
  107 +
  108 +}
  1 +package com.lframework.xingyun.sc.vo.sample.confirm;
  2 +
  3 +import lombok.Data;
  4 +import com.lframework.starter.web.core.vo.PageVo;
  5 +import com.lframework.starter.web.core.vo.BaseVo;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +import java.io.Serializable;
  8 +
  9 +@Data
  10 +public class QueryProductSampleConfirmationSlipDetailVo extends PageVo implements BaseVo, Serializable {
  11 +
  12 + private static final long serialVersionUID = 1L;
  13 +
  14 + /**
  15 + * 产品试样确认单主键
  16 + */
  17 + @ApiModelProperty("产品试样确认单主键")
  18 + private String confirmationSlipId;
  19 +
  20 + /**
  21 + * 订货单物料行ID
  22 + */
  23 + @ApiModelProperty("订货单物料行ID")
  24 + private String purchaseOrderLineId;
  25 +
  26 +}
  1 +package com.lframework.xingyun.sc.vo.sample.confirm;
  2 +
  3 +import lombok.Data;
  4 +import com.lframework.starter.web.core.vo.PageVo;
  5 +import com.lframework.starter.web.core.vo.BaseVo;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +import java.io.Serializable;
  8 +
  9 +@Data
  10 +public class QueryProductSampleConfirmationSlipVo extends PageVo implements BaseVo, Serializable {
  11 +
  12 + private static final long serialVersionUID = 1L;
  13 +
  14 + /**
  15 + * 订货单位
  16 + */
  17 + @ApiModelProperty("订货单位")
  18 + private String orderingUnitName;
  19 +
  20 + /**
  21 + * 试样种类
  22 + */
  23 + @ApiModelProperty("试样种类")
  24 + private String sampleType;
  25 +
  26 + /**
  27 + * 客户类型
  28 + */
  29 + @ApiModelProperty("客户类型")
  30 + private String customerType;
  31 +
  32 + /**
  33 + * 所属厂别
  34 + */
  35 + @ApiModelProperty("所属厂别")
  36 + private String workshopId;
  37 +
  38 +}
  1 +package com.lframework.xingyun.sc.vo.sample.confirm;
  2 +
  3 +import lombok.Data;
  4 +import javax.validation.constraints.NotBlank;
  5 +import com.lframework.starter.web.core.vo.BaseVo;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +import org.hibernate.validator.constraints.Length;
  8 +import java.io.Serializable;
  9 +
  10 +@Data
  11 +public class UpdateProductSampleConfirmationSlipDetailVo implements BaseVo, Serializable {
  12 +
  13 + private static final long serialVersionUID = 1L;
  14 +
  15 + /**
  16 + * ID
  17 + */
  18 + @ApiModelProperty(value = "ID", required = true)
  19 + @NotBlank(message = "id不能为空!")
  20 + private String id;
  21 +
  22 + /**
  23 + * 是否提供样品
  24 + */
  25 + @ApiModelProperty("是否提供样品")
  26 + @Length(message = "是否提供样品最多允许50个字符!")
  27 + private String provideSamples;
  28 +
  29 + /**
  30 + * 是否提供明确参数
  31 + */
  32 + @ApiModelProperty("是否提供明确参数")
  33 + @Length(message = "是否提供明确参数最多允许50个字符!")
  34 + private String clearParameters;
  35 +
  36 +}
  1 +package com.lframework.xingyun.sc.vo.sample.confirm;
  2 +
  3 +import lombok.Data;
  4 +import javax.validation.constraints.NotBlank;
  5 +import com.lframework.starter.web.core.vo.BaseVo;
  6 +import javax.validation.constraints.NotNull;
  7 +import com.lframework.starter.web.core.components.validation.TypeMismatch;
  8 +import io.swagger.annotations.ApiModelProperty;
  9 +import org.hibernate.validator.constraints.Length;
  10 +import java.io.Serializable;
  11 +import java.util.List;
  12 +
  13 +@Data
  14 +public class UpdateProductSampleConfirmationSlipVo implements BaseVo, Serializable {
  15 +
  16 + private static final long serialVersionUID = 1L;
  17 +
  18 + /**
  19 + * ID
  20 + */
  21 + @ApiModelProperty(value = "ID", required = true)
  22 + @NotBlank(message = "id不能为空!")
  23 + private String id;
  24 +
  25 + /**
  26 + * 试样种类
  27 + */
  28 + @ApiModelProperty("试样种类")
  29 + @Length(message = "试样种类最多允许50个字符!")
  30 + private String sampleType;
  31 +
  32 + /**
  33 + * 客户类型
  34 + */
  35 + @ApiModelProperty("客户类型")
  36 + @Length(message = "客户类型最多允许50个字符!")
  37 + private String customerType;
  38 +
  39 + /**
  40 + * 原供货同行
  41 + */
  42 + @ApiModelProperty("原供货同行")
  43 + @Length(message = "原供货同行最多允许500个字符!")
  44 + private String originalSupplierPeer;
  45 +
  46 + /**
  47 + * 本次试样数量是否超规定
  48 + */
  49 + @ApiModelProperty(value = "本次试样数量是否超规定", required = true)
  50 + @TypeMismatch(message = "本次试样数量是否超规定格式有误!")
  51 + @NotNull(message = "请输入本次试样数量是否超规定!")
  52 + private boolean sampleQuantityRegulation;
  53 +
  54 + /**
  55 + * 试样规格个数是否超规定
  56 + */
  57 + @ApiModelProperty(value = "试样规格个数是否超规定", required = true)
  58 + @TypeMismatch(message = "试样规格个数是否超规定格式有误!")
  59 + @NotNull(message = "请输入试样规格个数是否超规定!")
  60 + private boolean specificationQuantityRegulation;
  61 +
  62 + /**
  63 + * 试样次数
  64 + */
  65 + @ApiModelProperty("试样次数")
  66 + @Length(message = "试样次数最多允许65,535个字符!")
  67 + private String sampleFrequency;
  68 +
  69 + /**
  70 + * 前期不合格描述
  71 + */
  72 + @ApiModelProperty("前期不合格描述")
  73 + @Length(message = "前期不合格描述最多允许65,535个字符!")
  74 + private String earlyNonconformityDescription;
  75 +
  76 + /**
  77 + * 制单人
  78 + */
  79 + @ApiModelProperty("制单人")
  80 + @Length(message = "制单人最多允许32个字符!")
  81 + private String preparedBy;
  82 +
  83 + /**
  84 + * 审核状态
  85 + */
  86 + @ApiModelProperty("审核状态")
  87 + @Length(message = "审核状态最多允许50个字符!")
  88 + private String status;
  89 +
  90 + /**
  91 + * 产品试样确认单详情
  92 + */
  93 + @ApiModelProperty("产品试样确认单详情")
  94 + List<UpdateProductSampleConfirmationSlipDetailVo> productSampleConfirmationSlipDetailList;
  95 +
  96 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.lframework.xingyun.sc.mappers.ProductSampleConfirmationSlipDetailMapper">
  4 +
  5 + <resultMap id="ProductSampleConfirmationSlipDetail" type="com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlipDetail">
  6 + <id column="id" property="id"/>
  7 + <result column="confirmation_slip_id" property="confirmationSlipId"/>
  8 + <result column="purchase_order_line_id" property="purchaseOrderLineId"/>
  9 + <result column="brand" property="brand"/>
  10 + <result column="thickness" property="thickness"/>
  11 + <result column="thickness_tol_pos" property="thicknessTolPos"/>
  12 + <result column="thickness_tol_neg" property="thicknessTolNeg"/>
  13 + <result column="width" property="width"/>
  14 + <result column="width_tol_pos" property="widthTolPos"/>
  15 + <result column="width_tol_neg" property="widthTolNeg"/>
  16 + <result column="length" property="length"/>
  17 + <result column="length_tol_pos" property="lengthTolPos"/>
  18 + <result column="length_tol_neg" property="lengthTolNeg"/>
  19 + <result column="status" property="status"/>
  20 + <result column="quantity" property="quantity"/>
  21 + <result column="provide_samples" property="provideSamples"/>
  22 + <result column="clear_parameters" property="clearParameters"/>
  23 + <result column="create_by_id" property="createById"/>
  24 + <result column="create_by" property="createBy"/>
  25 + <result column="update_by_id" property="updateById"/>
  26 + <result column="update_by" property="updateBy"/>
  27 + <result column="create_time" property="createTime"/>
  28 + <result column="update_time" property="updateTime"/>
  29 + </resultMap>
  30 +
  31 + <sql id="ProductSampleConfirmationSlipDetail_sql">
  32 + SELECT
  33 + tb.id,
  34 + tb.confirmation_slip_id,
  35 + tb.purchase_order_line_id,
  36 + tb.brand,
  37 + tb.thickness,
  38 + tb.thickness_tol_pos,
  39 + tb.thickness_tol_neg,
  40 + tb.width,
  41 + tb.width_tol_pos,
  42 + tb.width_tol_neg,
  43 + tb.length,
  44 + tb.length_tol_pos,
  45 + tb.length_tol_neg,
  46 + tb.status,
  47 + tb.quantity,
  48 + tb.provide_samples,
  49 + tb.clear_parameters,
  50 + tb.create_by_id,
  51 + tb.create_by,
  52 + tb.update_by_id,
  53 + tb.update_by,
  54 + tb.create_time,
  55 + tb.update_time
  56 + FROM product_sample_confirmation_slip_detail AS tb
  57 + </sql>
  58 +
  59 + <select id="query" resultMap="ProductSampleConfirmationSlipDetail">
  60 + <include refid="ProductSampleConfirmationSlipDetail_sql"/>
  61 + <where>
  62 + <if test="vo.confirmationSlipId != null and vo.confirmationSlipId != ''">
  63 + AND tb.confirmation_slip_id = #{vo.confirmationSlipId}
  64 + </if>
  65 + <if test="vo.purchaseOrderLineId != null and vo.purchaseOrderLineId != ''">
  66 + AND tb.purchase_order_line_id = #{vo.purchaseOrderLineId}
  67 + </if>
  68 + </where>
  69 + ORDER BY tb.create_time DESC
  70 + </select>
  71 +
  72 + <select id="findById" resultType="com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlipDetail">
  73 + <include refid="ProductSampleConfirmationSlipDetail_sql"/>
  74 + <where>
  75 + <if test="id != null and id != ''">
  76 + AND tb.id = #{id}
  77 + </if>
  78 + </where>
  79 + </select>
  80 +</mapper>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.lframework.xingyun.sc.mappers.ProductSampleConfirmationSlipMapper">
  4 +
  5 + <resultMap id="ProductSampleConfirmationSlip" type="com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip">
  6 + <id column="id" property="id"/>
  7 + <result column="ordering_unit" property="orderingUnit"/>
  8 + <result column="ordering_unit_name" property="orderingUnitName"/>
  9 + <result column="sample_type" property="sampleType"/>
  10 + <result column="customer_type" property="customerType"/>
  11 + <result column="workshop_id" property="workshopId"/>
  12 + <result column="workshop_name" property="workshopName"/>
  13 + <result column="belonging_breed" property="belongingBreed"/>
  14 + <result column="original_supplier_peer" property="originalSupplierPeer"/>
  15 + <result column="total_quantity" property="totalQuantity"/>
  16 + <result column="sample_quantity_regulation" property="sampleQuantityRegulation"/>
  17 + <result column="specification_quantity_regulation" property="specificationQuantityRegulation"/>
  18 + <result column="sample_frequency" property="sampleFrequency"/>
  19 + <result column="early_nonconformity_description" property="earlyNonconformityDescription"/>
  20 + <result column="prepared_by" property="preparedBy"/>
  21 + <result column="status" property="status"/>
  22 + <result column="office_clerk" property="officeClerk"/>
  23 + <result column="office_clerk_review" property="officeClerkReview"/>
  24 + <result column="office_supervisor" property="officeSupervisor"/>
  25 + <result column="office_supervisor_review" property="officeSupervisorReview"/>
  26 + <result column="office_supervisor_opinion" property="officeSupervisorOpinion"/>
  27 + <result column="marketing_deputy_director" property="marketingDeputyDirector"/>
  28 + <result column="marketing_deputy_director_review" property="marketingDeputyDirectorReview"/>
  29 + <result column="marketing_deputy_director_opinion" property="marketingDeputyDirectorOpinion"/>
  30 + <result column="office_management_supervisor" property="officeManagementSupervisor"/>
  31 + <result column="office_management_supervisor_review" property="officeManagementSupervisorReview"/>
  32 + <result column="office_management_supervisor_opinion" property="officeManagementSupervisorOpinion"/>
  33 + <result column="quality_manager" property="qualityManager"/>
  34 + <result column="quality_manager_review" property="qualityManagerReview"/>
  35 + <result column="quality_manager_opinion" property="qualityManagerOpinion"/>
  36 + <result column="branch_factory_supervisor" property="branchFactorySupervisor"/>
  37 + <result column="branch_factory_supervisor_review" property="branchFactorySupervisorReview"/>
  38 + <result column="branch_factory_supervisor_opinion" property="branchFactorySupervisorOpinion"/>
  39 + <result column="marketing_department_manager" property="marketingDepartmentManager"/>
  40 + <result column="marketing_department_manager_review" property="marketingDepartmentManagerReview"/>
  41 + <result column="marketing_department_manager_opinion" property="marketingDepartmentManagerOpinion"/>
  42 + <result column="marketing_center_supervisor" property="marketingCenterSupervisor"/>
  43 + <result column="marketing_center_supervisor_review" property="marketingCenterSupervisorReview"/>
  44 + <result column="marketing_center_supervisor_opinion" property="marketingCenterSupervisorOpinion"/>
  45 + <result column="general_manager" property="generalManager"/>
  46 + <result column="general_manager_review" property="generalManagerReview"/>
  47 + <result column="general_manager_opinion" property="generalManagerOpinion"/>
  48 + <result column="create_by_id" property="createById"/>
  49 + <result column="create_by" property="createBy"/>
  50 + <result column="update_by_id" property="updateById"/>
  51 + <result column="update_by" property="updateBy"/>
  52 + <result column="create_time" property="createTime"/>
  53 + <result column="update_time" property="updateTime"/>
  54 + </resultMap>
  55 +
  56 + <sql id="ProductSampleConfirmationSlip_sql">
  57 + SELECT
  58 + tb.id,
  59 + tb.ordering_unit,
  60 + cu.name AS ordering_unit_name,
  61 + tb.sample_type,
  62 + tb.customer_type,
  63 + tb.workshop_id,
  64 + ws.name AS workshop_name,
  65 + tb.belonging_breed,
  66 + tb.original_supplier_peer,
  67 + tb.total_quantity,
  68 + tb.sample_quantity_regulation,
  69 + tb.specification_quantity_regulation,
  70 + tb.sample_frequency,
  71 + tb.early_nonconformity_description,
  72 + tb.prepared_by,
  73 + tb.status,
  74 + tb.office_clerk,
  75 + tb.office_clerk_review,
  76 + tb.office_supervisor,
  77 + tb.office_supervisor_review,
  78 + tb.office_supervisor_opinion,
  79 + tb.marketing_deputy_director,
  80 + tb.marketing_deputy_director_review,
  81 + tb.marketing_deputy_director_opinion,
  82 + tb.office_management_supervisor,
  83 + tb.office_management_supervisor_review,
  84 + tb.office_management_supervisor_opinion,
  85 + tb.quality_manager,
  86 + tb.quality_manager_review,
  87 + tb.quality_manager_opinion,
  88 + tb.branch_factory_supervisor,
  89 + tb.branch_factory_supervisor_review,
  90 + tb.branch_factory_supervisor_opinion,
  91 + tb.marketing_department_manager,
  92 + tb.marketing_department_manager_review,
  93 + tb.marketing_department_manager_opinion,
  94 + tb.marketing_center_supervisor,
  95 + tb.marketing_center_supervisor_review,
  96 + tb.marketing_center_supervisor_opinion,
  97 + tb.general_manager,
  98 + tb.general_manager_review,
  99 + tb.general_manager_opinion,
  100 + tb.create_by_id,
  101 + tb.create_by,
  102 + tb.update_by_id,
  103 + tb.update_by,
  104 + tb.create_time,
  105 + tb.update_time
  106 + FROM product_sample_confirmation_slip AS tb
  107 + left join base_data_customer as cu on cu.id = tb.ordering_unit
  108 + left join base_data_workshop as ws on ws.id = tb.workshop_id
  109 + </sql>
  110 +
  111 + <select id="query" resultMap="ProductSampleConfirmationSlip">
  112 + <include refid="ProductSampleConfirmationSlip_sql"/>
  113 + <where>
  114 + <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''">
  115 + AND cu.name LIKE CONCAT('%', #{vo.orderingUnitName},'%')
  116 + </if>
  117 + <if test="vo.sampleType != null and vo.sampleType != ''">
  118 + AND tb.sample_type = #{vo.sampleType}
  119 + </if>
  120 + <if test="vo.customerType != null and vo.customerType != ''">
  121 + AND tb.customer_type = #{vo.customerType}
  122 + </if>
  123 + <if test="vo.workshopId != null and vo.workshopId != ''">
  124 + AND tb.workshop_id = #{vo.workshopId}
  125 + </if>
  126 + </where>
  127 + ORDER BY tb.create_time DESC
  128 + </select>
  129 +
  130 + <select id="findById" resultType="com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip">
  131 + <include refid="ProductSampleConfirmationSlip_sql"/>
  132 + <where>
  133 + <if test="id != null and id != ''">
  134 + AND tb.id = #{id}
  135 + </if>
  136 + </where>
  137 + </select>
  138 +</mapper>