Showing
18 changed files
with
872 additions
and
42 deletions
| ... | ... | @@ -1174,16 +1174,30 @@ create table if not exists sample_result_feedback( |
| 1174 | 1174 | |
| 1175 | 1175 | create table if not exists sample_result_tracking( |
| 1176 | 1176 | id varchar(32) primary key comment 'ID', |
| 1177 | + dept_id varchar(32) not null comment '办事处ID', | |
| 1177 | 1178 | customer_id varchar(32) not null comment '客户ID', |
| 1178 | 1179 | workshop_id varchar(32) not null comment '所属分厂', |
| 1179 | 1180 | order_id varchar(32) not null comment '订单ID', |
| 1180 | - surface varchar(200) comment '表面描述', | |
| 1181 | - performance varchar(200) comment '性能描述', | |
| 1182 | - tolerance varchar(200) comment '公差描述', | |
| 1183 | - banding_pattern varchar(200) comment '带型描述', | |
| 1184 | - packaging varchar(200) comment '包装描述', | |
| 1185 | - weight varchar(200) comment '件重描述', | |
| 1186 | - other varchar(200) comment '其它描述', | |
| 1181 | + surface text comment '表面描述', | |
| 1182 | + performance text comment '性能描述', | |
| 1183 | + tolerance text comment '公差描述', | |
| 1184 | + banding_pattern text comment '带型描述', | |
| 1185 | + packaging text comment '包装描述', | |
| 1186 | + weight text comment '件重描述', | |
| 1187 | + other text comment '其它描述', | |
| 1188 | + sample_success boolean DEFAULT FALSE COMMENT '试样成功', | |
| 1189 | + bulk_order boolean DEFAULT FALSE COMMENT '批量订货', | |
| 1190 | + sample_failure boolean DEFAULT FALSE COMMENT '试样不成功', | |
| 1191 | + continue_sample boolean DEFAULT FALSE COMMENT '继续试样', | |
| 1192 | + stop_sample boolean DEFAULT FALSE COMMENT '停止再试样', | |
| 1193 | + customer_reviews_file_id varchar(100) comment '客户评价依据文件ID', | |
| 1194 | + customer_reviews_file_name varchar(200) comment '客户评价依据文件名称', | |
| 1195 | + status varchar(20) comment '审核状态', | |
| 1196 | + office_supervisor_opinion text DEFAULT NULL COMMENT '办事处主管审核意见', | |
| 1197 | + quality_supervisor_opinion text DEFAULT NULL COMMENT '品质管理科主管审核意见', | |
| 1198 | + quality_manager_opinion text DEFAULT NULL COMMENT '品质经理审核意见', | |
| 1199 | + operations_department_supervisor_opinion text DEFAULT NULL COMMENT '运作科主管审核意见', | |
| 1200 | + marketing_deputy_director_opinion text DEFAULT NULL COMMENT '营销部分管审核意见', | |
| 1187 | 1201 | create_by_id varchar(32) not null comment '创建人ID', |
| 1188 | 1202 | update_by_id varchar(32) not null comment '更新人ID', |
| 1189 | 1203 | create_time datetime default now() comment '创建时间', |
| ... | ... | @@ -1192,8 +1206,8 @@ create table if not exists sample_result_tracking( |
| 1192 | 1206 | |
| 1193 | 1207 | create table if not exists sample_feedback_tracking_detail( |
| 1194 | 1208 | id varchar(32) primary key comment 'ID', |
| 1195 | - feedback_id varchar(32) not null comment '反馈单ID', | |
| 1196 | - tracking_id varchar(32) not null comment '跟踪单ID', | |
| 1209 | + feedback_id varchar(32) comment '反馈单ID', | |
| 1210 | + tracking_id varchar(32) comment '跟踪单ID', | |
| 1197 | 1211 | order_id varchar(32) not null comment '订单ID', |
| 1198 | 1212 | order_spec_id varchar(32) not null comment '订单规格ID', |
| 1199 | 1213 | shipment_order_id varchar(32) not null comment '发货单ID', |
| ... | ... | @@ -1211,6 +1225,7 @@ create table if not exists sample_feedback_tracking_detail( |
| 1211 | 1225 | status varchar(50) comment '状态', |
| 1212 | 1226 | shipment_date date default null comment '发货日期', |
| 1213 | 1227 | quantity double default null comment '实发数量', |
| 1228 | + yield_batch_no varchar(100) comment '批号', | |
| 1214 | 1229 | create_by_id varchar(32) not null comment '创建人ID', |
| 1215 | 1230 | update_by_id varchar(32) not null comment '更新人ID', |
| 1216 | 1231 | create_time datetime default now() comment '创建时间', | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/sample/tracking/GetSampleResultTrackingBo.java
| ... | ... | @@ -112,6 +112,84 @@ public class GetSampleResultTrackingBo extends BaseBo<SampleResultTracking> { |
| 112 | 112 | private List<SampleFeedbackTrackingDetail> detailList; |
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | + * 试样成功 | |
| 116 | + */ | |
| 117 | + @ApiModelProperty("试样成功") | |
| 118 | + private boolean sampleSuccess; | |
| 119 | + | |
| 120 | + /** | |
| 121 | + * 批量订货 | |
| 122 | + */ | |
| 123 | + @ApiModelProperty("批量订货") | |
| 124 | + private boolean bulkOrder; | |
| 125 | + | |
| 126 | + /** | |
| 127 | + * 试样不成功 | |
| 128 | + */ | |
| 129 | + @ApiModelProperty("试样不成功") | |
| 130 | + private boolean sampleFailure; | |
| 131 | + | |
| 132 | + /** | |
| 133 | + * 继续试样 | |
| 134 | + */ | |
| 135 | + @ApiModelProperty("继续试样") | |
| 136 | + private boolean continueSample; | |
| 137 | + | |
| 138 | + /** | |
| 139 | + * 停止再试样 | |
| 140 | + */ | |
| 141 | + @ApiModelProperty("停止再试样") | |
| 142 | + private boolean stopSample; | |
| 143 | + | |
| 144 | + /** | |
| 145 | + * 客户评价依据文件ID | |
| 146 | + */ | |
| 147 | + @ApiModelProperty("客户评价依据文件ID") | |
| 148 | + private String customerReviewsFileId; | |
| 149 | + | |
| 150 | + /** | |
| 151 | + * 客户评价依据文件名称 | |
| 152 | + */ | |
| 153 | + @ApiModelProperty("客户评价依据文件名称") | |
| 154 | + private String customerReviewsFileName; | |
| 155 | + | |
| 156 | + /** | |
| 157 | + * 审核状态 | |
| 158 | + */ | |
| 159 | + @ApiModelProperty("审核状态") | |
| 160 | + private String status; | |
| 161 | + | |
| 162 | + /** | |
| 163 | + * 办事处主管审核意见 | |
| 164 | + */ | |
| 165 | + @ApiModelProperty("办事处主管审核意见") | |
| 166 | + private String officeSupervisorOpinion; | |
| 167 | + | |
| 168 | + /** | |
| 169 | + * 品质管理科主管审核意见 | |
| 170 | + */ | |
| 171 | + @ApiModelProperty("品质管理科主管审核意见") | |
| 172 | + private String qualitySupervisorOpinion; | |
| 173 | + | |
| 174 | + /** | |
| 175 | + * 品质经理审核意见 | |
| 176 | + */ | |
| 177 | + @ApiModelProperty("品质经理审核意见") | |
| 178 | + private String qualityManagerOpinion; | |
| 179 | + | |
| 180 | + /** | |
| 181 | + * 运作科主管审核意见 | |
| 182 | + */ | |
| 183 | + @ApiModelProperty("运作科主管审核意见") | |
| 184 | + private String operationsDepartmentSupervisorOpinion; | |
| 185 | + | |
| 186 | + /** | |
| 187 | + * 营销部分管审核意见 | |
| 188 | + */ | |
| 189 | + @ApiModelProperty("营销部分管审核意见") | |
| 190 | + private String marketingDeputyDirectorOpinion; | |
| 191 | + | |
| 192 | + /** | |
| 115 | 193 | * 创建人ID |
| 116 | 194 | */ |
| 117 | 195 | @ApiModelProperty("创建人ID") | ... | ... |
| ... | ... | @@ -112,6 +112,85 @@ public class QuerySampleResultTrackingBo extends BaseBo<SampleResultTracking> { |
| 112 | 112 | private List<SampleFeedbackTrackingDetail> detailList; |
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | + * 试样成功 | |
| 116 | + */ | |
| 117 | + @ApiModelProperty("试样成功") | |
| 118 | + private boolean sampleSuccess; | |
| 119 | + | |
| 120 | + /** | |
| 121 | + * 批量订货 | |
| 122 | + */ | |
| 123 | + @ApiModelProperty("批量订货") | |
| 124 | + private boolean bulkOrder; | |
| 125 | + | |
| 126 | + /** | |
| 127 | + * 试样不成功 | |
| 128 | + */ | |
| 129 | + @ApiModelProperty("试样不成功") | |
| 130 | + private boolean sampleFailure; | |
| 131 | + | |
| 132 | + /** | |
| 133 | + * 继续试样 | |
| 134 | + */ | |
| 135 | + @ApiModelProperty("继续试样") | |
| 136 | + private boolean continueSample; | |
| 137 | + | |
| 138 | + /** | |
| 139 | + * 停止再试样 | |
| 140 | + */ | |
| 141 | + @ApiModelProperty("停止再试样") | |
| 142 | + private boolean stopSample; | |
| 143 | + | |
| 144 | + | |
| 145 | + /** | |
| 146 | + * 客户评价依据文件ID | |
| 147 | + */ | |
| 148 | + @ApiModelProperty("客户评价依据文件ID") | |
| 149 | + private String customerReviewsFileId; | |
| 150 | + | |
| 151 | + /** | |
| 152 | + * 客户评价依据文件名称 | |
| 153 | + */ | |
| 154 | + @ApiModelProperty("客户评价依据文件名称") | |
| 155 | + private String customerReviewsFileName; | |
| 156 | + | |
| 157 | + /** | |
| 158 | + * 审核状态 | |
| 159 | + */ | |
| 160 | + @ApiModelProperty("审核状态") | |
| 161 | + private String status; | |
| 162 | + | |
| 163 | + /** | |
| 164 | + * 办事处主管审核意见 | |
| 165 | + */ | |
| 166 | + @ApiModelProperty("办事处主管审核意见") | |
| 167 | + private String officeSupervisorOpinion; | |
| 168 | + | |
| 169 | + /** | |
| 170 | + * 品质管理科主管审核意见 | |
| 171 | + */ | |
| 172 | + @ApiModelProperty("品质管理科主管审核意见") | |
| 173 | + private String qualitySupervisorOpinion; | |
| 174 | + | |
| 175 | + /** | |
| 176 | + * 品质经理审核意见 | |
| 177 | + */ | |
| 178 | + @ApiModelProperty("品质经理审核意见") | |
| 179 | + private String qualityManagerOpinion; | |
| 180 | + | |
| 181 | + /** | |
| 182 | + * 运作科主管审核意见 | |
| 183 | + */ | |
| 184 | + @ApiModelProperty("运作科主管审核意见") | |
| 185 | + private String operationsDepartmentSupervisorOpinion; | |
| 186 | + | |
| 187 | + /** | |
| 188 | + * 营销部分管审核意见 | |
| 189 | + */ | |
| 190 | + @ApiModelProperty("营销部分管审核意见") | |
| 191 | + private String marketingDeputyDirectorOpinion; | |
| 192 | + | |
| 193 | + /** | |
| 115 | 194 | * 创建人ID |
| 116 | 195 | */ |
| 117 | 196 | @ApiModelProperty("创建人ID") | ... | ... |
| ... | ... | @@ -2,13 +2,15 @@ package com.lframework.xingyun.sc.controller.sample; |
| 2 | 2 | |
| 3 | 3 | import com.lframework.xingyun.sc.bo.sample.tracking.GetSampleResultTrackingBo; |
| 4 | 4 | import com.lframework.xingyun.sc.bo.sample.tracking.QuerySampleResultTrackingBo; |
| 5 | +import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; | |
| 6 | +import com.lframework.xingyun.sc.service.sample.SampleFeedbackTrackingDetailService; | |
| 7 | +import com.lframework.xingyun.sc.vo.sample.tracking.QuerySampleFeedbackTrackingDetailVo; | |
| 5 | 8 | import com.lframework.xingyun.sc.vo.sample.tracking.QuerySampleResultTrackingVo; |
| 6 | 9 | import com.lframework.xingyun.sc.service.sample.SampleResultTrackingService; |
| 7 | 10 | import com.lframework.xingyun.sc.entity.SampleResultTracking; |
| 8 | 11 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 9 | 12 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 10 | 13 | import com.lframework.starter.web.core.components.resp.InvokeResult; |
| 11 | - | |
| 12 | 14 | import javax.annotation.Resource; |
| 13 | 15 | import javax.validation.constraints.NotBlank; |
| 14 | 16 | import io.swagger.annotations.ApiImplicitParam; |
| ... | ... | @@ -37,9 +39,10 @@ import java.util.stream.Collectors; |
| 37 | 39 | @RequestMapping("/sample/tracking") |
| 38 | 40 | public class SampleResultTrackingController extends DefaultBaseController { |
| 39 | 41 | |
| 40 | - | |
| 41 | 42 | @Resource |
| 42 | 43 | private SampleResultTrackingService sampleResultTrackingService; |
| 44 | + @Resource | |
| 45 | + private SampleFeedbackTrackingDetailService sampleFeedbackTrackingDetailService; | |
| 43 | 46 | |
| 44 | 47 | |
| 45 | 48 | /** |
| ... | ... | @@ -71,6 +74,10 @@ public class SampleResultTrackingController extends DefaultBaseController { |
| 71 | 74 | throw new DefaultClientException("产品试样结果跟踪单不存在!"); |
| 72 | 75 | } |
| 73 | 76 | GetSampleResultTrackingBo result = new GetSampleResultTrackingBo(data); |
| 77 | + QuerySampleFeedbackTrackingDetailVo vo = new QuerySampleFeedbackTrackingDetailVo(); | |
| 78 | + vo.setTrackingId(id); | |
| 79 | + List<SampleFeedbackTrackingDetail> query = sampleFeedbackTrackingDetailService.query(vo); | |
| 80 | + result.setDetailList(query); | |
| 74 | 81 | |
| 75 | 82 | return InvokeResultBuilder.success(result); |
| 76 | 83 | } | ... | ... |
| ... | ... | @@ -123,6 +123,11 @@ public class SampleFeedbackTrackingDetail extends BaseEntity implements BaseDto |
| 123 | 123 | private Double quantity; |
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | + * 批号 | |
| 127 | + */ | |
| 128 | + private String yieldBatchNo; | |
| 129 | + | |
| 130 | + /** | |
| 126 | 131 | * 创建人ID |
| 127 | 132 | */ |
| 128 | 133 | @TableField(fill = FieldFill.INSERT) | ... | ... |
| ... | ... | @@ -20,27 +20,58 @@ public class SampleResultTracking extends BaseEntity implements BaseDto { |
| 20 | 20 | |
| 21 | 21 | private static final long serialVersionUID = 1L; |
| 22 | 22 | |
| 23 | + public static final String CACHE_NAME = "SampleResultTracking"; | |
| 24 | + | |
| 23 | 25 | /** |
| 24 | 26 | * ID |
| 25 | 27 | */ |
| 26 | 28 | private String id; |
| 27 | 29 | |
| 28 | 30 | /** |
| 31 | + * 办事处ID | |
| 32 | + */ | |
| 33 | + private String deptId; | |
| 34 | + | |
| 35 | + /** | |
| 29 | 36 | * 客户ID |
| 30 | 37 | */ |
| 31 | 38 | private String customerId; |
| 32 | 39 | |
| 33 | 40 | /** |
| 41 | + * 客户名称 | |
| 42 | + */ | |
| 43 | + @TableField(exist = false) | |
| 44 | + private String customerName; | |
| 45 | + | |
| 46 | + /** | |
| 34 | 47 | * 所属分厂 |
| 35 | 48 | */ |
| 36 | 49 | private String workshopId; |
| 37 | 50 | |
| 38 | 51 | /** |
| 52 | + * 所属分厂编码 | |
| 53 | + */ | |
| 54 | + @TableField(exist = false) | |
| 55 | + private String workshopCode; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 所属分厂名称 | |
| 59 | + */ | |
| 60 | + @TableField(exist = false) | |
| 61 | + private String workshopName; | |
| 62 | + | |
| 63 | + /** | |
| 39 | 64 | * 订单ID |
| 40 | 65 | */ |
| 41 | 66 | private String orderId; |
| 42 | 67 | |
| 43 | 68 | /** |
| 69 | + * 订单编码 | |
| 70 | + */ | |
| 71 | + @TableField(exist = false) | |
| 72 | + private String orderNo; | |
| 73 | + | |
| 74 | + /** | |
| 44 | 75 | * 表面描述 |
| 45 | 76 | */ |
| 46 | 77 | private String surface; |
| ... | ... | @@ -76,6 +107,71 @@ public class SampleResultTracking extends BaseEntity implements BaseDto { |
| 76 | 107 | private String other; |
| 77 | 108 | |
| 78 | 109 | /** |
| 110 | + * 试样成功 | |
| 111 | + */ | |
| 112 | + private boolean sampleSuccess; | |
| 113 | + | |
| 114 | + /** | |
| 115 | + * 批量订货 | |
| 116 | + */ | |
| 117 | + private boolean bulkOrder; | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * 试样不成功 | |
| 121 | + */ | |
| 122 | + private boolean sampleFailure; | |
| 123 | + | |
| 124 | + /** | |
| 125 | + * 继续试样 | |
| 126 | + */ | |
| 127 | + private boolean continueSample; | |
| 128 | + | |
| 129 | + /** | |
| 130 | + * 停止再试样 | |
| 131 | + */ | |
| 132 | + private boolean stopSample; | |
| 133 | + | |
| 134 | + /** | |
| 135 | + * 客户评价依据文件ID | |
| 136 | + */ | |
| 137 | + private String customerReviewsFileId; | |
| 138 | + | |
| 139 | + /** | |
| 140 | + * 客户评价依据文件名称 | |
| 141 | + */ | |
| 142 | + private String customerReviewsFileName; | |
| 143 | + | |
| 144 | + /** | |
| 145 | + * 审核状态 | |
| 146 | + */ | |
| 147 | + private String status; | |
| 148 | + | |
| 149 | + /** | |
| 150 | + * 办事处主管审核意见 | |
| 151 | + */ | |
| 152 | + private String officeSupervisorOpinion; | |
| 153 | + | |
| 154 | + /** | |
| 155 | + * 品质管理科主管审核意见 | |
| 156 | + */ | |
| 157 | + private String qualitySupervisorOpinion; | |
| 158 | + | |
| 159 | + /** | |
| 160 | + * 品质经理审核意见 | |
| 161 | + */ | |
| 162 | + private String qualityManagerOpinion; | |
| 163 | + | |
| 164 | + /** | |
| 165 | + * 运作科主管审核意见 | |
| 166 | + */ | |
| 167 | + private String operationsDepartmentSupervisorOpinion; | |
| 168 | + | |
| 169 | + /** | |
| 170 | + * 营销部分管审核意见 | |
| 171 | + */ | |
| 172 | + private String marketingDeputyDirectorOpinion; | |
| 173 | + | |
| 174 | + /** | |
| 79 | 175 | * 创建人ID |
| 80 | 176 | */ |
| 81 | 177 | @TableField(fill = FieldFill.INSERT) | ... | ... |
| ... | ... | @@ -4,7 +4,7 @@ import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; |
| 4 | 4 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| 5 | 5 | import com.lframework.starter.web.core.annotations.oplog.OpLog; |
| 6 | 6 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 7 | -import org.apache.commons.collections4.CollectionUtils; | |
| 7 | +import com.lframework.xingyun.sc.vo.sample.tracking.QuerySampleFeedbackTrackingDetailVo; | |
| 8 | 8 | import org.springframework.transaction.annotation.Transactional; |
| 9 | 9 | import com.lframework.xingyun.sc.mappers.SampleFeedbackTrackingDetailMapper; |
| 10 | 10 | import com.lframework.xingyun.sc.service.sample.SampleFeedbackTrackingDetailService; |
| ... | ... | @@ -17,6 +17,12 @@ import java.util.List; |
| 17 | 17 | public class SampleFeedbackTrackingDetailServiceImpl extends BaseMpServiceImpl<SampleFeedbackTrackingDetailMapper, SampleFeedbackTrackingDetail> implements SampleFeedbackTrackingDetailService { |
| 18 | 18 | |
| 19 | 19 | @Override |
| 20 | + public List<SampleFeedbackTrackingDetail> query(QuerySampleFeedbackTrackingDetailVo vo) { | |
| 21 | + | |
| 22 | + return getBaseMapper().query(vo); | |
| 23 | + } | |
| 24 | + | |
| 25 | + @Override | |
| 20 | 26 | public SampleFeedbackTrackingDetail findById(String id) { |
| 21 | 27 | |
| 22 | 28 | return getBaseMapper().selectById(id); | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.impl.sample; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 3 | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.common.utils.CollectionUtil; | |
| 7 | +import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; | |
| 4 | 8 | import com.lframework.xingyun.sc.entity.SampleResultTracking; |
| 5 | 9 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| 6 | 10 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 7 | 11 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 12 | +import com.lframework.starter.web.core.utils.OpLogUtil; | |
| 13 | +import com.lframework.starter.common.utils.StringUtil; | |
| 14 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 15 | +import com.lframework.starter.web.core.utils.IdUtil; | |
| 16 | +import com.lframework.starter.common.utils.ObjectUtil; | |
| 8 | 17 | import com.lframework.starter.web.core.annotations.oplog.OpLog; |
| 9 | 18 | import com.lframework.starter.web.core.utils.PageHelperUtil; |
| 10 | 19 | import com.lframework.starter.common.utils.Assert; |
| 11 | 20 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 21 | +import com.lframework.xingyun.sc.mappers.SampleFeedbackTrackingDetailMapper; | |
| 12 | 22 | import org.springframework.transaction.annotation.Transactional; |
| 13 | 23 | import com.lframework.xingyun.sc.mappers.SampleResultTrackingMapper; |
| 14 | 24 | import com.lframework.xingyun.sc.service.sample.SampleResultTrackingService; |
| 25 | +import com.lframework.xingyun.sc.vo.sample.tracking.CreateSampleResultTrackingVo; | |
| 15 | 26 | import com.lframework.xingyun.sc.vo.sample.tracking.QuerySampleResultTrackingVo; |
| 27 | +import com.lframework.xingyun.sc.vo.sample.tracking.UpdateSampleResultTrackingVo; | |
| 16 | 28 | import org.springframework.stereotype.Service; |
| 17 | 29 | |
| 30 | +import javax.annotation.Resource; | |
| 18 | 31 | import java.util.List; |
| 19 | 32 | |
| 20 | 33 | @Service |
| 21 | 34 | public class SampleResultTrackingServiceImpl extends BaseMpServiceImpl<SampleResultTrackingMapper, SampleResultTracking> implements SampleResultTrackingService { |
| 35 | + @Resource | |
| 36 | + private SampleFeedbackTrackingDetailMapper sampleFeedbackTrackingDetailMapper; | |
| 22 | 37 | |
| 23 | 38 | @Override |
| 24 | 39 | public PageResult<SampleResultTracking> query(Integer pageIndex, Integer pageSize, QuerySampleResultTrackingVo vo) { |
| 40 | + | |
| 25 | 41 | Assert.greaterThanZero(pageIndex); |
| 26 | 42 | Assert.greaterThanZero(pageSize); |
| 27 | - // 开启分页 | |
| 43 | + | |
| 28 | 44 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 29 | - List<SampleResultTracking> dataList = this.query(vo); | |
| 45 | + List<SampleResultTracking> datas = this.query(vo); | |
| 30 | 46 | |
| 31 | - return PageResultUtil.convert(new PageInfo<>(dataList)); | |
| 47 | + return PageResultUtil.convert(new PageInfo<>(datas)); | |
| 32 | 48 | } |
| 33 | 49 | |
| 34 | 50 | @Override |
| ... | ... | @@ -40,7 +56,68 @@ public class SampleResultTrackingServiceImpl extends BaseMpServiceImpl<SampleRes |
| 40 | 56 | @Override |
| 41 | 57 | public SampleResultTracking findById(String id) { |
| 42 | 58 | |
| 43 | - return getBaseMapper().selectById(id); | |
| 59 | + return getBaseMapper().findById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @OpLog(type = OtherOpLogType.class, name = "新增产品试样结果跟踪单,ID:{}", params = {"#id"}) | |
| 63 | + @Transactional(rollbackFor = Exception.class) | |
| 64 | + @Override | |
| 65 | + public String create(CreateSampleResultTrackingVo vo) { | |
| 66 | + | |
| 67 | + SampleResultTracking data = new SampleResultTracking(); | |
| 68 | + data.setId(IdUtil.getId()); | |
| 69 | + data.setDeptId(vo.getDeptId()); | |
| 70 | + data.setCustomerId(vo.getCustomerId()); | |
| 71 | + data.setWorkshopId(vo.getWorkshopId()); | |
| 72 | + data.setOrderId(vo.getOrderId()); | |
| 73 | + | |
| 74 | + getBaseMapper().insert(data); | |
| 75 | + | |
| 76 | + //批量新增明细数据 | |
| 77 | + if (CollectionUtil.isNotEmpty(vo.getSampleFeedbackTrackingDetailList())) { | |
| 78 | + List<SampleFeedbackTrackingDetail> detailList = vo.getSampleFeedbackTrackingDetailList(); | |
| 79 | + detailList.forEach(detail -> detail.setTrackingId(data.getId())); | |
| 80 | + sampleFeedbackTrackingDetailMapper.batchAdd(vo.getSampleFeedbackTrackingDetailList()); | |
| 81 | + } | |
| 82 | + | |
| 83 | + OpLogUtil.setVariable("id", data.getId()); | |
| 84 | + OpLogUtil.setExtra(vo); | |
| 85 | + | |
| 86 | + return data.getId(); | |
| 87 | + } | |
| 88 | + | |
| 89 | + @OpLog(type = OtherOpLogType.class, name = "修改产品试样结果跟踪单,ID:{}", params = {"#id"}) | |
| 90 | + @Transactional(rollbackFor = Exception.class) | |
| 91 | + @Override | |
| 92 | + public void update(UpdateSampleResultTrackingVo vo) { | |
| 93 | + | |
| 94 | + SampleResultTracking data = getBaseMapper().selectById(vo.getId()); | |
| 95 | + if (ObjectUtil.isNull(data)) { | |
| 96 | + throw new DefaultClientException("产品试样结果跟踪单不存在!"); | |
| 97 | + } | |
| 98 | + | |
| 99 | + LambdaUpdateWrapper<SampleResultTracking> updateWrapper = Wrappers.lambdaUpdate(SampleResultTracking.class) | |
| 100 | + .set(SampleResultTracking::getSurface, StringUtil.isBlank(vo.getSurface()) ? null : vo.getSurface()) | |
| 101 | + .set(SampleResultTracking::getPerformance, StringUtil.isBlank(vo.getPerformance()) ? null : vo.getPerformance()) | |
| 102 | + .set(SampleResultTracking::getTolerance, StringUtil.isBlank(vo.getTolerance()) ? null : vo.getTolerance()) | |
| 103 | + .set(SampleResultTracking::getBandingPattern, StringUtil.isBlank(vo.getBandingPattern()) ? null : vo.getBandingPattern()) | |
| 104 | + .set(SampleResultTracking::getPackaging, StringUtil.isBlank(vo.getPackaging()) ? null : vo.getPackaging()) | |
| 105 | + .set(SampleResultTracking::getWeight, StringUtil.isBlank(vo.getWeight()) ? null : vo.getWeight()) | |
| 106 | + .set(SampleResultTracking::getOther, StringUtil.isBlank(vo.getOther()) ? null : vo.getOther()) | |
| 107 | + .set(SampleResultTracking::isSampleSuccess, vo.isSampleSuccess()) | |
| 108 | + .set(SampleResultTracking::isBulkOrder, vo.isBulkOrder()) | |
| 109 | + .set(SampleResultTracking::isSampleFailure, vo.isSampleFailure()) | |
| 110 | + .set(SampleResultTracking::isContinueSample, vo.isContinueSample()) | |
| 111 | + .set(SampleResultTracking::isStopSample, vo.isStopSample()) | |
| 112 | + .set(SampleResultTracking::getCustomerReviewsFileId, StringUtil.isBlank(vo.getCustomerReviewsFileId()) ? null : vo.getCustomerReviewsFileId()) | |
| 113 | + .set(SampleResultTracking::getCustomerReviewsFileName, StringUtil.isBlank(vo.getCustomerReviewsFileName()) ? null : vo.getCustomerReviewsFileName()) | |
| 114 | + .set(SampleResultTracking::getStatus, "AUDIT") | |
| 115 | + .eq(SampleResultTracking::getId, vo.getId()); | |
| 116 | + | |
| 117 | + getBaseMapper().update(updateWrapper); | |
| 118 | + | |
| 119 | + OpLogUtil.setVariable("id", data.getId()); | |
| 120 | + OpLogUtil.setExtra(vo); | |
| 44 | 121 | } |
| 45 | 122 | |
| 46 | 123 | @OpLog(type = OtherOpLogType.class, name = "删除产品试样结果跟踪单,ID:{}", params = {"#id"}) | ... | ... |
| ... | ... | @@ -2,7 +2,9 @@ package com.lframework.xingyun.sc.mappers; |
| 2 | 2 | |
| 3 | 3 | import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; |
| 4 | 4 | import com.lframework.starter.web.core.mapper.BaseMapper; |
| 5 | - | |
| 5 | +import com.lframework.xingyun.sc.vo.sample.tracking.QuerySampleFeedbackTrackingDetailVo; | |
| 6 | +import org.apache.ibatis.annotations.Param; | |
| 7 | +import java.util.List; | |
| 6 | 8 | |
| 7 | 9 | /** |
| 8 | 10 | * <p> |
| ... | ... | @@ -12,4 +14,18 @@ import com.lframework.starter.web.core.mapper.BaseMapper; |
| 12 | 14 | */ |
| 13 | 15 | public interface SampleFeedbackTrackingDetailMapper extends BaseMapper<SampleFeedbackTrackingDetail> { |
| 14 | 16 | |
| 17 | + /** | |
| 18 | + * 查询列表 | |
| 19 | + * | |
| 20 | + * @param vo | |
| 21 | + * @return | |
| 22 | + */ | |
| 23 | + List<SampleFeedbackTrackingDetail> query(@Param("vo") QuerySampleFeedbackTrackingDetailVo vo); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 批量新增 | |
| 27 | + * | |
| 28 | + * @param list | |
| 29 | + */ | |
| 30 | + void batchAdd(@Param("list") List<SampleFeedbackTrackingDetail> list); | |
| 15 | 31 | } | ... | ... |
| ... | ... | @@ -15,11 +15,13 @@ import java.util.List; |
| 15 | 15 | */ |
| 16 | 16 | public interface SampleResultTrackingMapper extends BaseMapper<SampleResultTracking> { |
| 17 | 17 | |
| 18 | - /** | |
| 18 | + /** | |
| 19 | 19 | * 查询列表 |
| 20 | 20 | * |
| 21 | - * @param vo 查询条件 | |
| 22 | - * @return List<SampleResultTracking> | |
| 21 | + * @param vo 查询条件 | |
| 22 | + * @return List<SampleResultTracking> | |
| 23 | 23 | */ |
| 24 | 24 | List<SampleResultTracking> query(@Param("vo") QuerySampleResultTrackingVo vo); |
| 25 | + | |
| 26 | + SampleResultTracking findById(@Param("id") String id); | |
| 25 | 27 | } | ... | ... |
| ... | ... | @@ -2,6 +2,7 @@ package com.lframework.xingyun.sc.service.sample; |
| 2 | 2 | |
| 3 | 3 | import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; |
| 4 | 4 | import com.lframework.starter.web.core.service.BaseMpService; |
| 5 | +import com.lframework.xingyun.sc.vo.sample.tracking.QuerySampleFeedbackTrackingDetailVo; | |
| 5 | 6 | |
| 6 | 7 | import java.util.List; |
| 7 | 8 | |
| ... | ... | @@ -11,6 +12,13 @@ import java.util.List; |
| 11 | 12 | public interface SampleFeedbackTrackingDetailService extends BaseMpService<SampleFeedbackTrackingDetail> { |
| 12 | 13 | |
| 13 | 14 | /** |
| 15 | + * 查询列表 | |
| 16 | + * @param vo | |
| 17 | + * @return | |
| 18 | + */ | |
| 19 | + List<SampleFeedbackTrackingDetail> query(QuerySampleFeedbackTrackingDetailVo vo); | |
| 20 | + | |
| 21 | + /** | |
| 14 | 22 | * 根据ID查询 |
| 15 | 23 | * |
| 16 | 24 | * @param id 主键ID | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.service.sample; |
| 2 | 2 | |
| 3 | +import com.lframework.xingyun.sc.vo.sample.tracking.CreateSampleResultTrackingVo; | |
| 3 | 4 | import com.lframework.xingyun.sc.vo.sample.tracking.QuerySampleResultTrackingVo; |
| 5 | +import com.lframework.xingyun.sc.vo.sample.tracking.UpdateSampleResultTrackingVo; | |
| 4 | 6 | import com.lframework.xingyun.sc.entity.SampleResultTracking; |
| 7 | +import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | |
| 8 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 5 | 9 | import com.lframework.starter.web.core.service.BaseMpService; |
| 6 | 10 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 11 | +import javax.validation.constraints.NotBlank; | |
| 12 | +import com.lframework.starter.web.core.vo.PageVo; | |
| 13 | +import com.lframework.starter.web.core.utils.OpLogUtil; | |
| 14 | +import com.lframework.starter.common.utils.StringUtil; | |
| 15 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 16 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 17 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 18 | +import com.lframework.starter.web.core.utils.EnumUtil; | |
| 19 | +import com.lframework.starter.web.core.utils.IdUtil; | |
| 20 | +import com.lframework.starter.common.utils.ObjectUtil; | |
| 21 | +import com.lframework.starter.web.core.annotations.oplog.OpLog; | |
| 22 | +import com.lframework.starter.web.core.utils.PageHelperUtil; | |
| 23 | +import com.lframework.starter.common.utils.Assert; | |
| 24 | +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | |
| 25 | +import io.swagger.annotations.ApiModelProperty; | |
| 26 | +import org.springframework.transaction.annotation.Transactional; | |
| 27 | +import org.hibernate.validator.constraints.Length; | |
| 28 | +import java.util.Collection; | |
| 7 | 29 | import java.util.List; |
| 8 | 30 | |
| 9 | 31 | /** |
| ... | ... | @@ -12,32 +34,42 @@ import java.util.List; |
| 12 | 34 | public interface SampleResultTrackingService extends BaseMpService<SampleResultTracking> { |
| 13 | 35 | |
| 14 | 36 | /** |
| 15 | - * 分页查询 | |
| 16 | - * | |
| 17 | - * @return PageResult<SampleResultTracking> | |
| 37 | + * 查询列表 | |
| 38 | + * @return | |
| 18 | 39 | */ |
| 19 | 40 | PageResult<SampleResultTracking> query(Integer pageIndex, Integer pageSize, QuerySampleResultTrackingVo vo); |
| 20 | 41 | |
| 21 | 42 | /** |
| 22 | 43 | * 查询列表 |
| 23 | - * | |
| 24 | - * @param vo 查询条件 | |
| 25 | - * @return List<SampleResultTracking> | |
| 44 | + * @param vo | |
| 45 | + * @return | |
| 26 | 46 | */ |
| 27 | 47 | List<SampleResultTracking> query(QuerySampleResultTrackingVo vo); |
| 28 | 48 | |
| 29 | 49 | /** |
| 30 | 50 | * 根据ID查询 |
| 31 | - * | |
| 32 | - * @param id 主键ID | |
| 33 | - * @return SampleResultTracking | |
| 51 | + * @param id | |
| 52 | + * @return | |
| 34 | 53 | */ |
| 35 | 54 | SampleResultTracking findById(String id); |
| 36 | 55 | |
| 37 | 56 | /** |
| 57 | + * 创建 | |
| 58 | + * @param vo | |
| 59 | + * @return | |
| 60 | + */ | |
| 61 | + String create(CreateSampleResultTrackingVo vo); | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 修改 | |
| 65 | + * @param vo | |
| 66 | + */ | |
| 67 | + void update(UpdateSampleResultTrackingVo vo); | |
| 68 | + | |
| 69 | + /** | |
| 38 | 70 | * 根据ID删除 |
| 39 | - * | |
| 40 | - * @param id 主键ID | |
| 71 | + * @param id | |
| 72 | + * @return | |
| 41 | 73 | */ |
| 42 | 74 | void deleteById(String id); |
| 43 | 75 | } | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.sample.tracking; | |
| 2 | + | |
| 3 | +import javax.validation.constraints.NotBlank; | |
| 4 | +import com.lframework.starter.web.core.utils.IdUtil; | |
| 5 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 6 | +import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; | |
| 7 | +import com.lframework.xingyun.sc.vo.sample.confirm.CreateProductSampleConfirmationSlipDetailVo; | |
| 8 | +import io.swagger.annotations.ApiModelProperty; | |
| 9 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 10 | +import org.hibernate.validator.constraints.Length; | |
| 11 | +import java.io.Serializable; | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +import lombok.Data; | |
| 15 | + | |
| 16 | +@Data | |
| 17 | +public class CreateSampleResultTrackingVo implements BaseVo, Serializable { | |
| 18 | + | |
| 19 | + private static final long serialVersionUID = 1L; | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * 办事处ID | |
| 23 | + */ | |
| 24 | + @ApiModelProperty(value = "办事处ID", required = true) | |
| 25 | + @NotBlank(message = "请输入办事处ID!") | |
| 26 | + @Length(message = "办事处ID最多允许32个字符!") | |
| 27 | + private String deptId; | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 客户ID | |
| 31 | + */ | |
| 32 | + @ApiModelProperty(value = "客户ID", required = true) | |
| 33 | + @NotBlank(message = "请输入客户ID!") | |
| 34 | + @Length(message = "客户ID最多允许32个字符!") | |
| 35 | + private String customerId; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 所属分厂 | |
| 39 | + */ | |
| 40 | + @ApiModelProperty(value = "所属分厂", required = true) | |
| 41 | + @NotBlank(message = "请输入所属分厂!") | |
| 42 | + @Length(message = "所属分厂最多允许32个字符!") | |
| 43 | + private String workshopId; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 订单ID | |
| 47 | + */ | |
| 48 | + @ApiModelProperty(value = "订单ID", required = true) | |
| 49 | + @NotBlank(message = "请输入订单ID!") | |
| 50 | + @Length(message = "订单ID最多允许32个字符!") | |
| 51 | + private String orderId; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 明细数据 | |
| 55 | + */ | |
| 56 | + @ApiModelProperty("客户ID") | |
| 57 | + private List<SampleFeedbackTrackingDetail> sampleFeedbackTrackingDetailList; | |
| 58 | + | |
| 59 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.sample.tracking; | |
| 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 com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 7 | +import io.swagger.annotations.ApiModelProperty; | |
| 8 | +import java.io.Serializable; | |
| 9 | + | |
| 10 | +@Data | |
| 11 | +public class QuerySampleFeedbackTrackingDetailVo extends PageVo implements BaseVo, Serializable { | |
| 12 | + | |
| 13 | + private static final long serialVersionUID = 1L; | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 反馈单ID | |
| 17 | + */ | |
| 18 | + @ApiModelProperty("反馈单ID") | |
| 19 | + private String feedbackId; | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * 跟踪单ID | |
| 23 | + */ | |
| 24 | + @ApiModelProperty("跟踪单ID") | |
| 25 | + private String trackingId; | |
| 26 | + | |
| 27 | +} | ... | ... |
| ... | ... | @@ -14,8 +14,8 @@ public class QuerySampleResultTrackingVo extends PageVo implements BaseVo, Seria |
| 14 | 14 | /** |
| 15 | 15 | * 客户ID |
| 16 | 16 | */ |
| 17 | - @ApiModelProperty("客户ID") | |
| 18 | - private String customerId; | |
| 17 | + @ApiModelProperty("客户名称") | |
| 18 | + private String customerName; | |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * 所属分厂 |
| ... | ... | @@ -24,9 +24,21 @@ public class QuerySampleResultTrackingVo extends PageVo implements BaseVo, Seria |
| 24 | 24 | private String workshopId; |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * 订单ID | |
| 27 | + * 订单编号 | |
| 28 | 28 | */ |
| 29 | - @ApiModelProperty("订单ID") | |
| 30 | - private String orderId; | |
| 29 | + @ApiModelProperty("订单编号") | |
| 30 | + private String orderCode; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 审核状态 | |
| 34 | + */ | |
| 35 | + @ApiModelProperty("审核状态") | |
| 36 | + private String status; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 搜索关键字 | |
| 40 | + */ | |
| 41 | + @ApiModelProperty("搜索关键字") | |
| 42 | + private String searchKey; | |
| 31 | 43 | |
| 32 | 44 | } | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.sample.tracking; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | +import javax.validation.constraints.NotBlank; | |
| 5 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 6 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 7 | +import io.swagger.annotations.ApiModelProperty; | |
| 8 | +import org.hibernate.validator.constraints.Length; | |
| 9 | +import java.io.Serializable; | |
| 10 | + | |
| 11 | +@Data | |
| 12 | +public class UpdateSampleResultTrackingVo implements BaseVo, Serializable { | |
| 13 | + | |
| 14 | + private static final long serialVersionUID = 1L; | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * ID | |
| 18 | + */ | |
| 19 | + @ApiModelProperty(value = "ID", required = true) | |
| 20 | + @NotBlank(message = "id不能为空!") | |
| 21 | + private String id; | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 表面描述 | |
| 25 | + */ | |
| 26 | + @ApiModelProperty("表面描述") | |
| 27 | + @Length(message = "表面描述最多允许200个字符!") | |
| 28 | + private String surface; | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 性能描述 | |
| 32 | + */ | |
| 33 | + @ApiModelProperty("性能描述") | |
| 34 | + @Length(message = "性能描述最多允许200个字符!") | |
| 35 | + private String performance; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 公差描述 | |
| 39 | + */ | |
| 40 | + @ApiModelProperty("公差描述") | |
| 41 | + @Length(message = "公差描述最多允许200个字符!") | |
| 42 | + private String tolerance; | |
| 43 | + | |
| 44 | + /** | |
| 45 | + * 带型描述 | |
| 46 | + */ | |
| 47 | + @ApiModelProperty("带型描述") | |
| 48 | + @Length(message = "带型描述最多允许200个字符!") | |
| 49 | + private String bandingPattern; | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 包装描述 | |
| 53 | + */ | |
| 54 | + @ApiModelProperty("包装描述") | |
| 55 | + @Length(message = "包装描述最多允许200个字符!") | |
| 56 | + private String packaging; | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 件重描述 | |
| 60 | + */ | |
| 61 | + @ApiModelProperty("件重描述") | |
| 62 | + @Length(message = "件重描述最多允许200个字符!") | |
| 63 | + private String weight; | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 其它描述 | |
| 67 | + */ | |
| 68 | + @ApiModelProperty("其它描述") | |
| 69 | + @Length(message = "其它描述最多允许200个字符!") | |
| 70 | + private String other; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 试样成功 | |
| 74 | + */ | |
| 75 | + @ApiModelProperty("试样成功") | |
| 76 | + @TypeMismatch(message = "试样成功格式有误!") | |
| 77 | + private boolean sampleSuccess; | |
| 78 | + | |
| 79 | + /** | |
| 80 | + * 批量订货 | |
| 81 | + */ | |
| 82 | + @ApiModelProperty("批量订货") | |
| 83 | + @TypeMismatch(message = "批量订货格式有误!") | |
| 84 | + private boolean bulkOrder; | |
| 85 | + | |
| 86 | + /** | |
| 87 | + * 试样不成功 | |
| 88 | + */ | |
| 89 | + @ApiModelProperty("试样不成功") | |
| 90 | + @TypeMismatch(message = "试样不成功格式有误!") | |
| 91 | + private boolean sampleFailure; | |
| 92 | + | |
| 93 | + /** | |
| 94 | + * 继续试样 | |
| 95 | + */ | |
| 96 | + @ApiModelProperty("继续试样") | |
| 97 | + @TypeMismatch(message = "继续试样格式有误!") | |
| 98 | + private boolean continueSample; | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 停止再试样 | |
| 102 | + */ | |
| 103 | + @ApiModelProperty("停止再试样") | |
| 104 | + @TypeMismatch(message = "停止再试样格式有误!") | |
| 105 | + private boolean stopSample; | |
| 106 | + | |
| 107 | + /** | |
| 108 | + * 客户评价依据文件ID | |
| 109 | + */ | |
| 110 | + @ApiModelProperty("客户评价依据文件ID") | |
| 111 | + private String customerReviewsFileId; | |
| 112 | + | |
| 113 | + /** | |
| 114 | + * 客户评价依据文件名称 | |
| 115 | + */ | |
| 116 | + @ApiModelProperty("客户评价依据文件名称") | |
| 117 | + private String customerReviewsFileName; | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * 审核状态 | |
| 121 | + */ | |
| 122 | + @ApiModelProperty("审核状态") | |
| 123 | + private String status; | |
| 124 | + | |
| 125 | +} | ... | ... |
| 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.SampleFeedbackTrackingDetailMapper"> | |
| 4 | + | |
| 5 | + <resultMap id="SampleFeedbackTrackingDetail" type="com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail"> | |
| 6 | + <id column="id" property="id"/> | |
| 7 | + <result column="feedback_id" property="feedbackId"/> | |
| 8 | + <result column="tracking_id" property="trackingId"/> | |
| 9 | + <result column="order_id" property="orderId"/> | |
| 10 | + <result column="order_spec_id" property="orderSpecId"/> | |
| 11 | + <result column="shipment_order_id" property="shipmentOrderId"/> | |
| 12 | + <result column="shipment_detail_id" property="shipmentDetailId"/> | |
| 13 | + <result column="brand" property="brand"/> | |
| 14 | + <result column="thickness" property="thickness"/> | |
| 15 | + <result column="thickness_tol_pos" property="thicknessTolPos"/> | |
| 16 | + <result column="thickness_tol_neg" property="thicknessTolNeg"/> | |
| 17 | + <result column="width" property="width"/> | |
| 18 | + <result column="width_tol_pos" property="widthTolPos"/> | |
| 19 | + <result column="width_tol_neg" property="widthTolNeg"/> | |
| 20 | + <result column="length" property="length"/> | |
| 21 | + <result column="length_tol_pos" property="lengthTolPos"/> | |
| 22 | + <result column="length_tol_neg" property="lengthTolNeg"/> | |
| 23 | + <result column="status" property="status"/> | |
| 24 | + <result column="shipment_date" property="shipmentDate"/> | |
| 25 | + <result column="quantity" property="quantity"/> | |
| 26 | + <result column="yield_batch_no" property="yieldBatchNo"/> | |
| 27 | + <result column="create_by_id" property="createById"/> | |
| 28 | + <result column="update_by_id" property="updateById"/> | |
| 29 | + <result column="create_time" property="createTime"/> | |
| 30 | + <result column="update_time" property="updateTime"/> | |
| 31 | + </resultMap> | |
| 32 | + | |
| 33 | + <sql id="SampleFeedbackTrackingDetail_sql"> | |
| 34 | + SELECT | |
| 35 | + tb.id, | |
| 36 | + tb.feedback_id, | |
| 37 | + tb.tracking_id, | |
| 38 | + tb.order_id, | |
| 39 | + tb.order_spec_id, | |
| 40 | + tb.shipment_order_id, | |
| 41 | + tb.shipment_detail_id, | |
| 42 | + tb.brand, | |
| 43 | + tb.thickness, | |
| 44 | + tb.thickness_tol_pos, | |
| 45 | + tb.thickness_tol_neg, | |
| 46 | + tb.width, | |
| 47 | + tb.width_tol_pos, | |
| 48 | + tb.width_tol_neg, | |
| 49 | + tb.length, | |
| 50 | + tb.length_tol_pos, | |
| 51 | + tb.length_tol_neg, | |
| 52 | + tb.status, | |
| 53 | + tb.shipment_date, | |
| 54 | + tb.quantity, | |
| 55 | + tb.yield_batch_no, | |
| 56 | + tb.create_by_id, | |
| 57 | + tb.update_by_id, | |
| 58 | + tb.create_time, | |
| 59 | + tb.update_time | |
| 60 | + FROM sample_feedback_tracking_detail AS tb | |
| 61 | + </sql> | |
| 62 | + | |
| 63 | + <select id="query" resultMap="SampleFeedbackTrackingDetail"> | |
| 64 | + <include refid="SampleFeedbackTrackingDetail_sql"/> | |
| 65 | + <where> | |
| 66 | + <if test="vo.feedbackId != null and vo.feedbackId != ''"> | |
| 67 | + AND tb.feedback_id = #{vo.feedbackId} | |
| 68 | + </if> | |
| 69 | + <if test="vo.trackingId != null and vo.trackingId != ''"> | |
| 70 | + AND tb.tracking_id = #{vo.trackingId} | |
| 71 | + </if> | |
| 72 | + </where> | |
| 73 | + </select> | |
| 74 | + | |
| 75 | + <insert id="batchAdd"> | |
| 76 | + INSERT INTO sample_feedback_tracking_detail ( | |
| 77 | + id, | |
| 78 | + feedback_id, | |
| 79 | + tracking_id, | |
| 80 | + order_id, | |
| 81 | + order_spec_id, | |
| 82 | + shipment_order_id, | |
| 83 | + shipment_detail_id, | |
| 84 | + brand, | |
| 85 | + thickness, | |
| 86 | + thickness_tol_pos, | |
| 87 | + thickness_tol_neg, | |
| 88 | + width, | |
| 89 | + width_tol_pos, | |
| 90 | + width_tol_neg, | |
| 91 | + length, | |
| 92 | + length_tol_pos, | |
| 93 | + length_tol_neg, | |
| 94 | + status, | |
| 95 | + shipment_date, | |
| 96 | + quantity, | |
| 97 | + yield_batch_no, | |
| 98 | + create_by_id, | |
| 99 | + update_by_id, | |
| 100 | + create_time, | |
| 101 | + update_time | |
| 102 | + ) VALUES | |
| 103 | + <foreach collection="list" item="item" separator=","> | |
| 104 | + ( | |
| 105 | + #{item.id}, | |
| 106 | + #{item.feedbackId}, | |
| 107 | + #{item.trackingId}, | |
| 108 | + #{item.orderId}, | |
| 109 | + #{item.orderSpecId}, | |
| 110 | + #{item.shipmentOrderId}, | |
| 111 | + #{item.shipmentDetailId}, | |
| 112 | + #{item.brand}, | |
| 113 | + #{item.thickness}, | |
| 114 | + #{item.thicknessTolPos}, | |
| 115 | + #{item.thicknessTolNeg}, | |
| 116 | + #{item.width}, | |
| 117 | + #{item.widthTolPos}, | |
| 118 | + #{item.widthTolNeg}, | |
| 119 | + #{item.length}, | |
| 120 | + #{item.lengthTolPos}, | |
| 121 | + #{item.lengthTolNeg}, | |
| 122 | + #{item.status}, | |
| 123 | + #{item.shipmentDate}, | |
| 124 | + #{item.quantity}, | |
| 125 | + #{item.yieldBatchNo}, | |
| 126 | + #{item.createById}, | |
| 127 | + #{item.updateById}, | |
| 128 | + #{item.createTime}, | |
| 129 | + #{item.updateTime} | |
| 130 | + ) | |
| 131 | + </foreach> | |
| 132 | + </insert> | |
| 133 | +</mapper> | ... | ... |
| ... | ... | @@ -5,8 +5,12 @@ |
| 5 | 5 | <resultMap id="SampleResultTracking" type="com.lframework.xingyun.sc.entity.SampleResultTracking"> |
| 6 | 6 | <id column="id" property="id"/> |
| 7 | 7 | <result column="customer_id" property="customerId"/> |
| 8 | + <result column="customer_name" property="customerName"/> | |
| 8 | 9 | <result column="workshop_id" property="workshopId"/> |
| 10 | + <result column="workshop_code" property="workshopCode"/> | |
| 11 | + <result column="workshop_name" property="workshopName"/> | |
| 9 | 12 | <result column="order_id" property="orderId"/> |
| 13 | + <result column="order_code" property="orderCode"/> | |
| 10 | 14 | <result column="surface" property="surface"/> |
| 11 | 15 | <result column="performance" property="performance"/> |
| 12 | 16 | <result column="tolerance" property="tolerance"/> |
| ... | ... | @@ -14,6 +18,19 @@ |
| 14 | 18 | <result column="packaging" property="packaging"/> |
| 15 | 19 | <result column="weight" property="weight"/> |
| 16 | 20 | <result column="other" property="other"/> |
| 21 | + <result column="sample_success" property="sampleSuccess"/> | |
| 22 | + <result column="bulk_order" property="bulkOrder"/> | |
| 23 | + <result column="sample_failure" property="sampleFailure"/> | |
| 24 | + <result column="continue_sample" property="continueSample"/> | |
| 25 | + <result column="stop_sample" property="stopSample"/> | |
| 26 | + <result column="customer_reviews_file_id" property="customerReviewsFileId"/> | |
| 27 | + <result column="customer_reviews_file_name" property="customerReviewsFileName"/> | |
| 28 | + <result column="status" property="status"/> | |
| 29 | + <result column="office_supervisor_opinion" property="officeSupervisorOpinion"/> | |
| 30 | + <result column="quality_supervisor_opinion" property="qualitySupervisorOpinion"/> | |
| 31 | + <result column="quality_manager_opinion" property="qualityManagerOpinion"/> | |
| 32 | + <result column="operations_department_supervisor_opinion" property="operationsDepartmentSupervisorOpinion"/> | |
| 33 | + <result column="marketing_deputy_director_opinion" property="marketingDeputyDirectorOpinion"/> | |
| 17 | 34 | <result column="create_by_id" property="createById"/> |
| 18 | 35 | <result column="update_by_id" property="updateById"/> |
| 19 | 36 | <result column="create_time" property="createTime"/> |
| ... | ... | @@ -24,8 +41,12 @@ |
| 24 | 41 | SELECT |
| 25 | 42 | tb.id, |
| 26 | 43 | tb.customer_id, |
| 44 | + cu.name AS customer_name, | |
| 27 | 45 | tb.workshop_id, |
| 46 | + ws.code AS workshop_code, | |
| 47 | + ws.name AS workshop_name, | |
| 28 | 48 | tb.order_id, |
| 49 | + poi.order_no AS order_code, | |
| 29 | 50 | tb.surface, |
| 30 | 51 | tb.performance, |
| 31 | 52 | tb.tolerance, |
| ... | ... | @@ -33,24 +54,56 @@ |
| 33 | 54 | tb.packaging, |
| 34 | 55 | tb.weight, |
| 35 | 56 | tb.other, |
| 57 | + tb.sample_success, | |
| 58 | + tb.bulk_order, | |
| 59 | + tb.sample_failure, | |
| 60 | + tb.continue_sample, | |
| 61 | + tb.stop_sample, | |
| 62 | + tb.customer_reviews_file_id, | |
| 63 | + tb.customer_reviews_file_name, | |
| 64 | + tb.status, | |
| 65 | + tb.office_supervisor_opinion, | |
| 66 | + tb.quality_supervisor_opinion, | |
| 67 | + tb.quality_manager_opinion, | |
| 68 | + tb.operations_department_supervisor_opinion, | |
| 69 | + tb.marketing_deputy_director_opinion, | |
| 36 | 70 | tb.create_by_id, |
| 37 | 71 | tb.update_by_id, |
| 38 | 72 | tb.create_time, |
| 39 | - tb.update_time | |
| 73 | + tb.update_time, | |
| 40 | 74 | FROM sample_result_tracking AS tb |
| 75 | + left join base_data_customer as cu on cu.id = tb.customer_id | |
| 76 | + left join base_data_workshop as ws on ws.id = tb.workshop_id | |
| 77 | + left join purchase_order_info as poi on poi.id = tb.order_id | |
| 41 | 78 | </sql> |
| 42 | 79 | |
| 43 | 80 | <select id="query" resultMap="SampleResultTracking"> |
| 44 | 81 | <include refid="SampleResultTracking_sql"/> |
| 45 | 82 | <where> |
| 46 | - <if test="vo.customerId != null and vo.customerId != ''"> | |
| 47 | - AND tb.customer_id = #{vo.customerId} | |
| 83 | + <if test="vo.customerName != null and vo.customerName != ''"> | |
| 84 | + AND cu.name LIKE CONCAT('%', #{vo.customerName},'%') | |
| 48 | 85 | </if> |
| 49 | 86 | <if test="vo.workshopId != null and vo.workshopId != ''"> |
| 50 | - AND tb.workshop_id = #{vo.workshopId} | |
| 87 | + AND tb.workshop_id = #{vo.workshopId} | |
| 51 | 88 | </if> |
| 52 | - <if test="vo.orderId != null and vo.orderId != ''"> | |
| 53 | - AND tb.order_id = #{vo.orderId} | |
| 89 | + <if test="vo.orderCode != null and vo.orderCode != ''"> | |
| 90 | + AND poi.order_no LIKE CONCAT('%', #{vo.orderCode},'%') | |
| 91 | + </if> | |
| 92 | + <if test="vo.status != null and vo.status != ''"> | |
| 93 | + AND tb.status = #{vo.status} | |
| 94 | + </if> | |
| 95 | + <if test="vo.searchKey != null and vo.searchKey != ''"> | |
| 96 | + AND (cu.name LIKE CONCAT('%', #{vo.searchKey},'%') | |
| 97 | + OR poi.order_no LIKE CONCAT('%', #{vo.searchKey},'%')) | |
| 98 | + </if> | |
| 99 | + </where> | |
| 100 | + </select> | |
| 101 | + | |
| 102 | + <select id="findById" resultType="com.lframework.xingyun.sc.entity.SampleResultTracking"> | |
| 103 | + <include refid="SampleResultTracking_sql"/> | |
| 104 | + <where> | |
| 105 | + <if test="id != null and id != ''"> | |
| 106 | + AND tb.id = #{id} | |
| 54 | 107 | </if> |
| 55 | 108 | </where> |
| 56 | 109 | </select> | ... | ... |