Showing
15 changed files
with
1506 additions
and
0 deletions
| ... | ... | @@ -29,6 +29,12 @@ public class GetShipmentsOrderInfoBo extends BaseBo<ShipmentsOrderInfo> { |
| 29 | 29 | private String id; |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | + * 发货单编号 | |
| 33 | + */ | |
| 34 | + @ApiModelProperty("发货单编号") | |
| 35 | + private String code; | |
| 36 | + | |
| 37 | + /** | |
| 32 | 38 | * 发货计划ID |
| 33 | 39 | */ |
| 34 | 40 | @ApiModelProperty("发货计划ID") | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/shipments/order/QueryShipmentsOrderInfoBo.java
| ... | ... | @@ -26,6 +26,12 @@ public class QueryShipmentsOrderInfoBo extends BaseBo<ShipmentsOrderInfo> { |
| 26 | 26 | private String id; |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | + * 发货单编号 | |
| 30 | + */ | |
| 31 | + @ApiModelProperty("发货单编号") | |
| 32 | + private String code; | |
| 33 | + | |
| 34 | + /** | |
| 29 | 35 | * 发货计划ID |
| 30 | 36 | */ |
| 31 | 37 | @ApiModelProperty("发货计划ID") | ... | ... |
| 1 | +package com.lframework.xingyun.sc.bo.statistics.shipmentDetail; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | +import com.lframework.xingyun.sc.entity.ShipmentDetailStatistics; | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import com.lframework.starter.common.constants.StringPool; | |
| 7 | +import com.lframework.starter.web.core.bo.BaseBo; | |
| 8 | +import java.time.LocalDate; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | +import io.swagger.annotations.ApiModelProperty; | |
| 11 | + | |
| 12 | +import lombok.Data; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * <p> | |
| 16 | + * 发货明细统计 QueryBo | |
| 17 | + * </p> | |
| 18 | + * | |
| 19 | + */ | |
| 20 | +@Data | |
| 21 | +public class QueryShipmentDetailStatisticsBo extends BaseBo<ShipmentDetailStatistics> { | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * ID | |
| 25 | + */ | |
| 26 | + @ApiModelProperty("ID") | |
| 27 | + private String id; | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 发货单编号 | |
| 31 | + */ | |
| 32 | + @ApiModelProperty("发货单编号") | |
| 33 | + private String shipmentOrderNo; | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 生产厂 | |
| 37 | + */ | |
| 38 | + @ApiModelProperty("生产厂") | |
| 39 | + private String workshopName; | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 办事处 | |
| 43 | + */ | |
| 44 | + @ApiModelProperty("办事处") | |
| 45 | + private String deptName; | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 区域 | |
| 49 | + */ | |
| 50 | + @ApiModelProperty("区域") | |
| 51 | + private String regionName; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 订货单名称 | |
| 55 | + */ | |
| 56 | + @ApiModelProperty("订货单名称") | |
| 57 | + private String orderingUnitName; | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 牌号 | |
| 61 | + */ | |
| 62 | + @ApiModelProperty("牌号") | |
| 63 | + private String brand; | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 厚度 | |
| 67 | + */ | |
| 68 | + @ApiModelProperty("厚度") | |
| 69 | + private Double thickness; | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 宽度 | |
| 73 | + */ | |
| 74 | + @ApiModelProperty("宽度") | |
| 75 | + private Double width; | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 长度 | |
| 79 | + */ | |
| 80 | + @ApiModelProperty("长度") | |
| 81 | + private Double length; | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * 状态 | |
| 85 | + */ | |
| 86 | + @ApiModelProperty("状态") | |
| 87 | + private String status; | |
| 88 | + | |
| 89 | + /** | |
| 90 | + * 应发数 | |
| 91 | + */ | |
| 92 | + @ApiModelProperty("应发数") | |
| 93 | + private Double quantity; | |
| 94 | + | |
| 95 | + /** | |
| 96 | + * 实发数 | |
| 97 | + */ | |
| 98 | + @ApiModelProperty("实发数") | |
| 99 | + private Double actualShipmentQuantity; | |
| 100 | + | |
| 101 | + /** | |
| 102 | + * 单价 | |
| 103 | + */ | |
| 104 | + @ApiModelProperty("单价") | |
| 105 | + private BigDecimal salesPrice; | |
| 106 | + | |
| 107 | + /** | |
| 108 | + * 厚度公差正 | |
| 109 | + */ | |
| 110 | + @ApiModelProperty("厚度公差正") | |
| 111 | + private Double thicknessTolPos; | |
| 112 | + | |
| 113 | + /** | |
| 114 | + * 厚度公差负 | |
| 115 | + */ | |
| 116 | + @ApiModelProperty("厚度公差负") | |
| 117 | + private Double thicknessTolNeg; | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * 宽度公差正 | |
| 121 | + */ | |
| 122 | + @ApiModelProperty("宽度公差正") | |
| 123 | + private Double widthTolPos; | |
| 124 | + | |
| 125 | + /** | |
| 126 | + * 宽度公差负 | |
| 127 | + */ | |
| 128 | + @ApiModelProperty("宽度公差负") | |
| 129 | + private Double widthTolNeg; | |
| 130 | + | |
| 131 | + /** | |
| 132 | + * 长度公差正 | |
| 133 | + */ | |
| 134 | + @ApiModelProperty("长度公差正") | |
| 135 | + private Double lengthTolPos; | |
| 136 | + | |
| 137 | + /** | |
| 138 | + * 长度公差负 | |
| 139 | + */ | |
| 140 | + @ApiModelProperty("长度公差负") | |
| 141 | + private Double lengthTolNeg; | |
| 142 | + | |
| 143 | + /** | |
| 144 | + * 超协价 | |
| 145 | + */ | |
| 146 | + @ApiModelProperty("超协价") | |
| 147 | + private String assessmentExceedsAgreement; | |
| 148 | + | |
| 149 | + /** | |
| 150 | + * 运费 | |
| 151 | + */ | |
| 152 | + @ApiModelProperty("运费") | |
| 153 | + private String shippingCost; | |
| 154 | + | |
| 155 | + /** | |
| 156 | + * 回程运费 | |
| 157 | + */ | |
| 158 | + @ApiModelProperty("回程运费") | |
| 159 | + private String returnFreight; | |
| 160 | + | |
| 161 | + /** | |
| 162 | + * 行业 | |
| 163 | + */ | |
| 164 | + @ApiModelProperty("行业") | |
| 165 | + private String industry; | |
| 166 | + | |
| 167 | + /** | |
| 168 | + * 备货单位名称 | |
| 169 | + */ | |
| 170 | + @ApiModelProperty("备货单位名称") | |
| 171 | + private String stockUpCompanyName; | |
| 172 | + | |
| 173 | + /** | |
| 174 | + * 订货单编号 | |
| 175 | + */ | |
| 176 | + @ApiModelProperty("订货单编号") | |
| 177 | + private String orderNo; | |
| 178 | + | |
| 179 | + /** | |
| 180 | + * 生产批号 | |
| 181 | + */ | |
| 182 | + @ApiModelProperty("生产批号") | |
| 183 | + private String yieldBatchNo; | |
| 184 | + | |
| 185 | + /** | |
| 186 | + * 开票情况 | |
| 187 | + */ | |
| 188 | + @ApiModelProperty("开票情况") | |
| 189 | + private String invoicingStatus; | |
| 190 | + | |
| 191 | + /** | |
| 192 | + * 订货日期 | |
| 193 | + */ | |
| 194 | + @ApiModelProperty("订货日期") | |
| 195 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 196 | + private LocalDate orderDate; | |
| 197 | + | |
| 198 | + /** | |
| 199 | + * 包装费 | |
| 200 | + */ | |
| 201 | + @ApiModelProperty("包装费") | |
| 202 | + private BigDecimal packagingFee; | |
| 203 | + | |
| 204 | + /** | |
| 205 | + * 品质 | |
| 206 | + */ | |
| 207 | + @ApiModelProperty("品质") | |
| 208 | + private String quality; | |
| 209 | + | |
| 210 | + /** | |
| 211 | + * 件数 | |
| 212 | + */ | |
| 213 | + @ApiModelProperty("件数") | |
| 214 | + private Double num; | |
| 215 | + | |
| 216 | + /** | |
| 217 | + * 结算方式 | |
| 218 | + */ | |
| 219 | + @ApiModelProperty("结算方式") | |
| 220 | + private String settlementTerms; | |
| 221 | + | |
| 222 | + /** | |
| 223 | + * 加工、经销 | |
| 224 | + */ | |
| 225 | + @ApiModelProperty("加工、经销") | |
| 226 | + private String processingOrDistribution; | |
| 227 | + | |
| 228 | + /** | |
| 229 | + * 包装要求 | |
| 230 | + */ | |
| 231 | + @ApiModelProperty("包装要求") | |
| 232 | + private String packagingRequirements; | |
| 233 | + | |
| 234 | + /** | |
| 235 | + * 发货日期 | |
| 236 | + */ | |
| 237 | + @ApiModelProperty("发货日期") | |
| 238 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 239 | + private LocalDate shipmentDate; | |
| 240 | + | |
| 241 | + /** | |
| 242 | + * 发货公司 | |
| 243 | + */ | |
| 244 | + @ApiModelProperty("发货公司") | |
| 245 | + private String supplier; | |
| 246 | + | |
| 247 | + /** | |
| 248 | + * 客户简称 | |
| 249 | + */ | |
| 250 | + @ApiModelProperty("客户简称") | |
| 251 | + private String customerShortName; | |
| 252 | + | |
| 253 | + /** | |
| 254 | + * 客户类型 | |
| 255 | + */ | |
| 256 | + @ApiModelProperty("客户类型") | |
| 257 | + private String customerType; | |
| 258 | + | |
| 259 | + /** | |
| 260 | + * 创建人ID | |
| 261 | + */ | |
| 262 | + @ApiModelProperty("创建人ID") | |
| 263 | + private String createById; | |
| 264 | + | |
| 265 | + /** | |
| 266 | + * 更新人ID | |
| 267 | + */ | |
| 268 | + @ApiModelProperty("更新人ID") | |
| 269 | + private String updateById; | |
| 270 | + | |
| 271 | + /** | |
| 272 | + * 创建时间 | |
| 273 | + */ | |
| 274 | + @ApiModelProperty("创建时间") | |
| 275 | + @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN) | |
| 276 | + private LocalDateTime createTime; | |
| 277 | + | |
| 278 | + /** | |
| 279 | + * 更新时间 | |
| 280 | + */ | |
| 281 | + @ApiModelProperty("更新时间") | |
| 282 | + @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN) | |
| 283 | + private LocalDateTime updateTime; | |
| 284 | + | |
| 285 | + public QueryShipmentDetailStatisticsBo() { | |
| 286 | + | |
| 287 | + } | |
| 288 | + | |
| 289 | + public QueryShipmentDetailStatisticsBo(ShipmentDetailStatistics dto) { | |
| 290 | + | |
| 291 | + super(dto); | |
| 292 | + } | |
| 293 | + | |
| 294 | + @Override | |
| 295 | + public BaseBo<ShipmentDetailStatistics> convert(ShipmentDetailStatistics dto) { | |
| 296 | + return super.convert(dto); | |
| 297 | + } | |
| 298 | + | |
| 299 | + @Override | |
| 300 | + protected void afterInit(ShipmentDetailStatistics dto) { | |
| 301 | + | |
| 302 | + } | |
| 303 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.controller.statistics; | |
| 2 | + | |
| 3 | +import com.lframework.xingyun.sc.bo.statistics.shipmentDetail.QueryShipmentDetailStatisticsBo; | |
| 4 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.QueryShipmentDetailStatisticsVo; | |
| 5 | +import com.lframework.xingyun.sc.service.statistics.ShipmentDetailStatisticsService; | |
| 6 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.CreateShipmentDetailStatisticsVo; | |
| 7 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.UpdateShipmentDetailStatisticsVo; | |
| 8 | +import com.lframework.xingyun.sc.entity.ShipmentDetailStatistics; | |
| 9 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 10 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 11 | +import com.lframework.starter.web.core.components.resp.InvokeResult; | |
| 12 | +import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; | |
| 13 | +import io.swagger.annotations.ApiOperation; | |
| 14 | +import com.lframework.starter.common.utils.CollectionUtil; | |
| 15 | +import io.swagger.annotations.Api; | |
| 16 | +import com.lframework.starter.web.core.controller.DefaultBaseController; | |
| 17 | +import com.lframework.starter.web.core.annotations.security.HasPermission; | |
| 18 | +import org.springframework.validation.annotation.Validated; | |
| 19 | +import org.springframework.web.bind.annotation.*; | |
| 20 | + | |
| 21 | +import javax.annotation.Resource; | |
| 22 | +import javax.validation.Valid; | |
| 23 | +import javax.validation.constraints.NotBlank; | |
| 24 | +import java.util.List; | |
| 25 | +import java.util.stream.Collectors; | |
| 26 | + | |
| 27 | +/** | |
| 28 | + * 发货明细统计 Controller | |
| 29 | + * | |
| 30 | + */ | |
| 31 | +@Api(tags = "发货明细统计") | |
| 32 | +@Validated | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/statistics/shipmentDetail") | |
| 35 | +public class ShipmentDetailStatisticsController extends DefaultBaseController { | |
| 36 | + | |
| 37 | + @Resource | |
| 38 | + private ShipmentDetailStatisticsService shipmentDetailStatisticsService; | |
| 39 | + | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 查询列表 | |
| 43 | + */ | |
| 44 | + @ApiOperation("查询列表") | |
| 45 | + @HasPermission({"statistics:shipmentDetail:query"}) | |
| 46 | + @GetMapping("/query") | |
| 47 | + public InvokeResult<PageResult<QueryShipmentDetailStatisticsBo>> query(@Valid QueryShipmentDetailStatisticsVo vo) { | |
| 48 | + | |
| 49 | + PageResult<ShipmentDetailStatistics> pageResult = shipmentDetailStatisticsService.query(getPageIndex(vo), getPageSize(vo), vo); | |
| 50 | + | |
| 51 | + List<ShipmentDetailStatistics> dataList = pageResult.getDatas(); | |
| 52 | + List<QueryShipmentDetailStatisticsBo> results = null; | |
| 53 | + if (!CollectionUtil.isEmpty(dataList)) { | |
| 54 | + results = dataList.stream().map(QueryShipmentDetailStatisticsBo::new).collect(Collectors.toList()); | |
| 55 | + } | |
| 56 | + return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results)); | |
| 57 | + } | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 新增 | |
| 61 | + */ | |
| 62 | + @ApiOperation("新增") | |
| 63 | + @HasPermission({"statistics:shipmentDetail:add"}) | |
| 64 | + @PostMapping | |
| 65 | + public InvokeResult<Void> create(@Valid CreateShipmentDetailStatisticsVo vo) { | |
| 66 | + | |
| 67 | + shipmentDetailStatisticsService.create(vo); | |
| 68 | + | |
| 69 | + return InvokeResultBuilder.success(); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 修改 | |
| 74 | + */ | |
| 75 | + @ApiOperation("修改") | |
| 76 | + @HasPermission({"statistics:shipmentDetail:modify"}) | |
| 77 | + @PutMapping | |
| 78 | + public InvokeResult<Void> update(@Valid UpdateShipmentDetailStatisticsVo vo) { | |
| 79 | + | |
| 80 | + shipmentDetailStatisticsService.update(vo); | |
| 81 | + | |
| 82 | + return InvokeResultBuilder.success(); | |
| 83 | + } | |
| 84 | + | |
| 85 | + /** | |
| 86 | + * 根据发货单ID获取发货明细数据 | |
| 87 | + */ | |
| 88 | + @ApiOperation("根据发货单ID获取发货明细数据") | |
| 89 | + @HasPermission({"statistics:shipmentDetail:modify"}) | |
| 90 | + @GetMapping("/getByShipmentOrderId") | |
| 91 | + public InvokeResult<List<ShipmentDetailStatistics>> getByShipmentOrderId(@NotBlank(message = "id不能为空!") String shipmentOrderId) { | |
| 92 | + return InvokeResultBuilder.success(shipmentDetailStatisticsService.getShipmentDetailInfo(shipmentOrderId)); | |
| 93 | + } | |
| 94 | +} | ... | ... |
| 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.LocalDate; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import com.baomidou.mybatisplus.annotation.FieldFill; | |
| 9 | +import com.lframework.starter.web.core.entity.BaseEntity; | |
| 10 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 11 | +import lombok.Data; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * 发货明细统计 | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +@Data | |
| 20 | +@TableName("shipments_detail_statistics") | |
| 21 | +public class ShipmentDetailStatistics extends BaseEntity implements BaseDto { | |
| 22 | + | |
| 23 | + private static final long serialVersionUID = 1L; | |
| 24 | + | |
| 25 | + public static final String CACHE_NAME = "ShipmentDetailStatistics"; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * ID | |
| 29 | + */ | |
| 30 | + private String id; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 发货单编号 | |
| 34 | + */ | |
| 35 | + private String shipmentOrderNo; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 生产厂 | |
| 39 | + */ | |
| 40 | + private String workshopName; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 办事处ID | |
| 44 | + */ | |
| 45 | + @TableField(exist = false) | |
| 46 | + private String deptId; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 办事处 | |
| 50 | + */ | |
| 51 | + private String deptName; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 区域ID | |
| 55 | + */ | |
| 56 | + @TableField(exist = false) | |
| 57 | + private String region; | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 区域 | |
| 61 | + */ | |
| 62 | + private String regionName; | |
| 63 | + | |
| 64 | + /** | |
| 65 | + * 订货单位ID | |
| 66 | + */ | |
| 67 | + @TableField(exist = false) | |
| 68 | + private String orderingUnit; | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * 订货单位名称 | |
| 72 | + */ | |
| 73 | + private String orderingUnitName; | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 牌号 | |
| 77 | + */ | |
| 78 | + private String brand; | |
| 79 | + | |
| 80 | + /** | |
| 81 | + * 厚度 | |
| 82 | + */ | |
| 83 | + private Double thickness; | |
| 84 | + | |
| 85 | + /** | |
| 86 | + * 宽度 | |
| 87 | + */ | |
| 88 | + private Double width; | |
| 89 | + | |
| 90 | + /** | |
| 91 | + * 长度 | |
| 92 | + */ | |
| 93 | + private Double length; | |
| 94 | + | |
| 95 | + /** | |
| 96 | + * 状态 | |
| 97 | + */ | |
| 98 | + private String status; | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 应发数 | |
| 102 | + */ | |
| 103 | + private Double quantity; | |
| 104 | + | |
| 105 | + /** | |
| 106 | + * 实发数 | |
| 107 | + */ | |
| 108 | + private Double actualShipmentQuantity; | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * 单价 | |
| 112 | + */ | |
| 113 | + private BigDecimal salesPrice; | |
| 114 | + | |
| 115 | + /** | |
| 116 | + * 厚度公差正 | |
| 117 | + */ | |
| 118 | + private Double thicknessTolPos; | |
| 119 | + | |
| 120 | + /** | |
| 121 | + * 厚度公差负 | |
| 122 | + */ | |
| 123 | + private Double thicknessTolNeg; | |
| 124 | + | |
| 125 | + /** | |
| 126 | + * 宽度公差正 | |
| 127 | + */ | |
| 128 | + private Double widthTolPos; | |
| 129 | + | |
| 130 | + /** | |
| 131 | + * 宽度公差负 | |
| 132 | + */ | |
| 133 | + private Double widthTolNeg; | |
| 134 | + | |
| 135 | + /** | |
| 136 | + * 长度公差正 | |
| 137 | + */ | |
| 138 | + private Double lengthTolPos; | |
| 139 | + | |
| 140 | + /** | |
| 141 | + * 长度公差负 | |
| 142 | + */ | |
| 143 | + private Double lengthTolNeg; | |
| 144 | + | |
| 145 | + /** | |
| 146 | + * 超协价 | |
| 147 | + */ | |
| 148 | + private String assessmentExceedsAgreement; | |
| 149 | + | |
| 150 | + /** | |
| 151 | + * 运费 | |
| 152 | + */ | |
| 153 | + private String shippingCost; | |
| 154 | + | |
| 155 | + /** | |
| 156 | + * 回程运费 | |
| 157 | + */ | |
| 158 | + private String returnFreight; | |
| 159 | + | |
| 160 | + /** | |
| 161 | + * 行业 | |
| 162 | + */ | |
| 163 | + private String industry; | |
| 164 | + | |
| 165 | + /** | |
| 166 | + * 备货单位ID | |
| 167 | + */ | |
| 168 | + @TableField(exist = false) | |
| 169 | + private String stockUpCompany; | |
| 170 | + | |
| 171 | + /** | |
| 172 | + * 备货单位名称 | |
| 173 | + */ | |
| 174 | + private String stockUpCompanyName; | |
| 175 | + | |
| 176 | + /** | |
| 177 | + * 订货单编号 | |
| 178 | + */ | |
| 179 | + private String orderNo; | |
| 180 | + | |
| 181 | + /** | |
| 182 | + * 生产批号 | |
| 183 | + */ | |
| 184 | + private String yieldBatchNo; | |
| 185 | + | |
| 186 | + /** | |
| 187 | + * 开票情况 | |
| 188 | + */ | |
| 189 | + private String invoicingStatus; | |
| 190 | + | |
| 191 | + /** | |
| 192 | + * 订货日期 | |
| 193 | + */ | |
| 194 | + private LocalDate orderDate; | |
| 195 | + | |
| 196 | + /** | |
| 197 | + * 包装费 | |
| 198 | + */ | |
| 199 | + private BigDecimal packagingFee; | |
| 200 | + | |
| 201 | + /** | |
| 202 | + * 品质 | |
| 203 | + */ | |
| 204 | + private String quality; | |
| 205 | + | |
| 206 | + /** | |
| 207 | + * 件数 | |
| 208 | + */ | |
| 209 | + private Double num; | |
| 210 | + | |
| 211 | + /** | |
| 212 | + * 结算方式 | |
| 213 | + */ | |
| 214 | + private String settlementTerms; | |
| 215 | + | |
| 216 | + /** | |
| 217 | + * 加工、经销 | |
| 218 | + */ | |
| 219 | + private String processingOrDistribution; | |
| 220 | + | |
| 221 | + /** | |
| 222 | + * 包装要求 | |
| 223 | + */ | |
| 224 | + private String packagingRequirements; | |
| 225 | + | |
| 226 | + /** | |
| 227 | + * 发货日期 | |
| 228 | + */ | |
| 229 | + private LocalDate shipmentDate; | |
| 230 | + | |
| 231 | + /** | |
| 232 | + * 发货公司 | |
| 233 | + */ | |
| 234 | + private String supplier; | |
| 235 | + | |
| 236 | + /** | |
| 237 | + * 客户简称 | |
| 238 | + */ | |
| 239 | + private String customerShortName; | |
| 240 | + | |
| 241 | + /** | |
| 242 | + * 客户类型 | |
| 243 | + */ | |
| 244 | + private String customerType; | |
| 245 | + | |
| 246 | + /** | |
| 247 | + * 创建人ID | |
| 248 | + */ | |
| 249 | + @TableField(fill = FieldFill.INSERT) | |
| 250 | + private String createById; | |
| 251 | + | |
| 252 | + /** | |
| 253 | + * 更新人ID | |
| 254 | + */ | |
| 255 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 256 | + private String updateById; | |
| 257 | + | |
| 258 | + /** | |
| 259 | + * 创建时间 | |
| 260 | + */ | |
| 261 | + @TableField(fill = FieldFill.INSERT) | |
| 262 | + private LocalDateTime createTime; | |
| 263 | + | |
| 264 | + /** | |
| 265 | + * 更新时间 | |
| 266 | + */ | |
| 267 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 268 | + private LocalDateTime updateTime; | |
| 269 | + | |
| 270 | + /** | |
| 271 | + * 运输方式 | |
| 272 | + */ | |
| 273 | + private String deliveryMethod; | |
| 274 | + | |
| 275 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.impl.statistics; | |
| 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.inner.entity.SysDept; | |
| 7 | +import com.lframework.starter.web.inner.service.system.SysDeptService; | |
| 8 | +import com.lframework.xingyun.basedata.entity.Customer; | |
| 9 | +import com.lframework.xingyun.basedata.service.customer.CustomerService; | |
| 10 | +import com.lframework.xingyun.sc.entity.ShipmentDetailStatistics; | |
| 11 | +import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | |
| 12 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 13 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 14 | +import com.lframework.starter.web.core.utils.OpLogUtil; | |
| 15 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 16 | +import com.lframework.starter.web.core.utils.IdUtil; | |
| 17 | +import com.lframework.starter.common.utils.ObjectUtil; | |
| 18 | +import com.lframework.starter.web.core.annotations.oplog.OpLog; | |
| 19 | +import com.lframework.starter.web.core.utils.PageHelperUtil; | |
| 20 | +import com.lframework.starter.common.utils.Assert; | |
| 21 | +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | |
| 22 | +import com.lframework.xingyun.sc.mappers.ShipmentDetailStatisticsMapper; | |
| 23 | +import com.lframework.xingyun.sc.service.statistics.ShipmentDetailStatisticsService; | |
| 24 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.CreateShipmentDetailStatisticsVo; | |
| 25 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.QueryShipmentDetailStatisticsVo; | |
| 26 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.UpdateShipmentDetailStatisticsVo; | |
| 27 | +import org.apache.commons.collections4.CollectionUtils; | |
| 28 | +import org.apache.commons.lang3.StringUtils; | |
| 29 | +import org.springframework.stereotype.Service; | |
| 30 | +import org.springframework.transaction.annotation.Transactional; | |
| 31 | + | |
| 32 | +import javax.annotation.Resource; | |
| 33 | +import java.util.*; | |
| 34 | +import java.util.function.Function; | |
| 35 | +import java.util.stream.Collectors; | |
| 36 | + | |
| 37 | +@Service | |
| 38 | +public class ShipmentDetailStatisticsServiceImpl extends BaseMpServiceImpl<ShipmentDetailStatisticsMapper, ShipmentDetailStatistics> implements ShipmentDetailStatisticsService { | |
| 39 | + | |
| 40 | + @Resource | |
| 41 | + private SysDeptService sysDeptService; | |
| 42 | + @Resource | |
| 43 | + private CustomerService customerService; | |
| 44 | + | |
| 45 | + | |
| 46 | + @Override | |
| 47 | + public PageResult<ShipmentDetailStatistics> query(Integer pageIndex, Integer pageSize, QueryShipmentDetailStatisticsVo vo) { | |
| 48 | + | |
| 49 | + Assert.greaterThanZero(pageIndex); | |
| 50 | + Assert.greaterThanZero(pageSize); | |
| 51 | + | |
| 52 | + PageHelperUtil.startPage(pageIndex, pageSize); | |
| 53 | + List<ShipmentDetailStatistics> dataList = this.query(vo); | |
| 54 | + | |
| 55 | + return PageResultUtil.convert(new PageInfo<>(dataList)); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @Override | |
| 59 | + public List<ShipmentDetailStatistics> query(QueryShipmentDetailStatisticsVo vo) { | |
| 60 | + | |
| 61 | + return getBaseMapper().query(vo); | |
| 62 | + } | |
| 63 | + | |
| 64 | + @Override | |
| 65 | + public ShipmentDetailStatistics findById(String id) { | |
| 66 | + | |
| 67 | + return getBaseMapper().selectById(id); | |
| 68 | + } | |
| 69 | + | |
| 70 | + @OpLog(type = OtherOpLogType.class, name = "新增发货明细统计,ID:{}", params = {"#id"}) | |
| 71 | + @Transactional(rollbackFor = Exception.class) | |
| 72 | + @Override | |
| 73 | + public String create(CreateShipmentDetailStatisticsVo vo) { | |
| 74 | + | |
| 75 | + ShipmentDetailStatistics data = new ShipmentDetailStatistics(); | |
| 76 | + data.setId(IdUtil.getUUID()); | |
| 77 | + data.setShipmentOrderNo(vo.getShipmentOrderNo()); | |
| 78 | + data.setWorkshopName(vo.getWorkshopName()); | |
| 79 | + data.setDeptName(vo.getDeptName()); | |
| 80 | + data.setRegionName(vo.getRegionName()); | |
| 81 | + data.setOrderingUnitName(vo.getOrderingUnitName()); | |
| 82 | + data.setBrand(vo.getBrand()); | |
| 83 | + data.setThickness(vo.getThickness()); | |
| 84 | + data.setWidth(vo.getWidth()); | |
| 85 | + data.setLength(vo.getLength()); | |
| 86 | + data.setStatus(vo.getStatus()); | |
| 87 | + data.setQuantity(vo.getQuantity()); | |
| 88 | + data.setActualShipmentQuantity(vo.getActualShipmentQuantity()); | |
| 89 | + data.setSalesPrice(vo.getSalesPrice()); | |
| 90 | + data.setThicknessTolPos(vo.getThicknessTolPos()); | |
| 91 | + data.setThicknessTolNeg(vo.getThicknessTolNeg()); | |
| 92 | + data.setWidthTolPos(vo.getWidthTolPos()); | |
| 93 | + data.setWidthTolNeg(vo.getWidthTolNeg()); | |
| 94 | + data.setLengthTolPos(vo.getLengthTolPos()); | |
| 95 | + data.setLengthTolNeg(vo.getLengthTolNeg()); | |
| 96 | + data.setAssessmentExceedsAgreement(vo.getAssessmentExceedsAgreement()); | |
| 97 | + data.setShippingCost(vo.getShippingCost()); | |
| 98 | + data.setReturnFreight(vo.getReturnFreight()); | |
| 99 | + data.setIndustry(vo.getIndustry()); | |
| 100 | + data.setStockUpCompanyName(vo.getStockUpCompanyName()); | |
| 101 | + data.setOrderNo(vo.getOrderNo()); | |
| 102 | + data.setYieldBatchNo(vo.getYieldBatchNo()); | |
| 103 | + data.setInvoicingStatus(vo.getInvoicingStatus()); | |
| 104 | + data.setOrderDate(vo.getOrderDate()); | |
| 105 | + data.setPackagingFee(vo.getPackagingFee()); | |
| 106 | + data.setQuality(vo.getQuality()); | |
| 107 | + data.setNum(vo.getNum()); | |
| 108 | + data.setSettlementTerms(vo.getSettlementTerms()); | |
| 109 | + data.setProcessingOrDistribution(vo.getProcessingOrDistribution()); | |
| 110 | + data.setPackagingRequirements(vo.getPackagingRequirements()); | |
| 111 | + data.setShipmentDate(vo.getShipmentDate()); | |
| 112 | + data.setSupplier(vo.getSupplier()); | |
| 113 | + data.setCustomerShortName(vo.getCustomerShortName()); | |
| 114 | + data.setCustomerType(vo.getCustomerType()); | |
| 115 | + | |
| 116 | + getBaseMapper().insert(data); | |
| 117 | + | |
| 118 | + OpLogUtil.setVariable("id", data.getId()); | |
| 119 | + OpLogUtil.setExtra(vo); | |
| 120 | + | |
| 121 | + return data.getId(); | |
| 122 | + } | |
| 123 | + | |
| 124 | + @OpLog(type = OtherOpLogType.class, name = "修改发货明细统计,ID:{}", params = {"#id"}) | |
| 125 | + @Transactional(rollbackFor = Exception.class) | |
| 126 | + @Override | |
| 127 | + public void update(UpdateShipmentDetailStatisticsVo vo) { | |
| 128 | + | |
| 129 | + ShipmentDetailStatistics data = getBaseMapper().selectById(vo.getId()); | |
| 130 | + if (ObjectUtil.isNull(data)) { | |
| 131 | + throw new DefaultClientException("发货明细统计不存在!"); | |
| 132 | + } | |
| 133 | + | |
| 134 | + LambdaUpdateWrapper<ShipmentDetailStatistics> updateWrapper = Wrappers.lambdaUpdate(ShipmentDetailStatistics.class) | |
| 135 | + .set(ShipmentDetailStatistics::getActualShipmentQuantity, vo.getActualShipmentQuantity()) | |
| 136 | + .eq(ShipmentDetailStatistics::getId, vo.getId()); | |
| 137 | + | |
| 138 | + getBaseMapper().update(updateWrapper); | |
| 139 | + | |
| 140 | + OpLogUtil.setVariable("id", data.getId()); | |
| 141 | + OpLogUtil.setExtra(vo); | |
| 142 | + } | |
| 143 | + | |
| 144 | + @Override | |
| 145 | + public List<ShipmentDetailStatistics> getShipmentDetailInfo(String shipmentOrderId) { | |
| 146 | + if (StringUtils.isBlank(shipmentOrderId)) { | |
| 147 | + return Collections.emptyList(); | |
| 148 | + } | |
| 149 | + List<ShipmentDetailStatistics> shipmentDetailInfo = getBaseMapper().getShipmentDetailInfo(shipmentOrderId); | |
| 150 | + if (CollectionUtils.isEmpty(shipmentDetailInfo)) { | |
| 151 | + return Collections.emptyList(); | |
| 152 | + } | |
| 153 | + List<String> deptIds = new ArrayList<>(); | |
| 154 | + List<String> customerIds = new ArrayList<>(); | |
| 155 | + for (ShipmentDetailStatistics detail : shipmentDetailInfo) { | |
| 156 | + if (StringUtils.isNotBlank(detail.getDeptId()) && !deptIds.contains(detail.getDeptId())) { | |
| 157 | + deptIds.add(detail.getDeptId()); | |
| 158 | + } | |
| 159 | + if (StringUtils.isNotBlank(detail.getRegion()) && !deptIds.contains(detail.getRegion())) { | |
| 160 | + deptIds.add(detail.getRegion()); | |
| 161 | + } | |
| 162 | + if (StringUtils.isNotBlank(detail.getOrderingUnit()) && !customerIds.contains(detail.getOrderingUnit())) { | |
| 163 | + customerIds.add(detail.getOrderingUnit()); | |
| 164 | + } | |
| 165 | + if (StringUtils.isNotBlank(detail.getStockUpCompany()) && !customerIds.contains(detail.getStockUpCompany())) { | |
| 166 | + customerIds.add(detail.getStockUpCompany()); | |
| 167 | + } | |
| 168 | + } | |
| 169 | + Map<String, SysDept> deptMap = new HashMap<>(); | |
| 170 | + // 获取部门数据 | |
| 171 | + List<SysDept> deptList = sysDeptService.listByIds(deptIds); | |
| 172 | + if (CollectionUtils.isNotEmpty(deptList)) { | |
| 173 | + deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getId, Function.identity())); | |
| 174 | + } | |
| 175 | + Map<String, Customer> customerMap = new HashMap<>(); | |
| 176 | + // 获取公司数据 | |
| 177 | + List<Customer> customerList = customerService.listByIds(customerIds); | |
| 178 | + if (CollectionUtils.isNotEmpty(customerList)) { | |
| 179 | + customerMap = customerList.stream().collect(Collectors.toMap(Customer::getId, Function.identity())); | |
| 180 | + } | |
| 181 | + for (ShipmentDetailStatistics detail : shipmentDetailInfo) { | |
| 182 | + SysDept sysDept = deptMap.get(detail.getDeptId()); | |
| 183 | + if (sysDept != null) { | |
| 184 | + detail.setDeptName(sysDept.getName()); | |
| 185 | + } | |
| 186 | + SysDept region = deptMap.get(detail.getRegion()); | |
| 187 | + if (region != null) { | |
| 188 | + detail.setRegionName(region.getName()); | |
| 189 | + } | |
| 190 | + Customer orderingUnit = customerMap.get(detail.getOrderingUnit()); | |
| 191 | + if (orderingUnit != null) { | |
| 192 | + detail.setOrderingUnitName(orderingUnit.getName()); | |
| 193 | + } | |
| 194 | + Customer stockUpCompany = customerMap.get(detail.getStockUpCompany()); | |
| 195 | + if (stockUpCompany != null) { | |
| 196 | + detail.setStockUpCompanyName(stockUpCompany.getName()); | |
| 197 | + } | |
| 198 | + } | |
| 199 | + return shipmentDetailInfo; | |
| 200 | + } | |
| 201 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/mappers/ShipmentDetailStatisticsMapper.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.mappers; | |
| 2 | + | |
| 3 | +import com.lframework.xingyun.sc.entity.ShipmentDetailStatistics; | |
| 4 | +import com.lframework.starter.web.core.mapper.BaseMapper; | |
| 5 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.QueryShipmentDetailStatisticsVo; | |
| 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 ShipmentDetailStatisticsMapper extends BaseMapper<ShipmentDetailStatistics> { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 查询列表 | |
| 20 | + * @param vo 查询条件 | |
| 21 | + * @return List<ShipmentDetailStatistics> | |
| 22 | + */ | |
| 23 | + List<ShipmentDetailStatistics> query(@Param("vo") QueryShipmentDetailStatisticsVo vo); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 获取发货明细数据 | |
| 27 | + * | |
| 28 | + * @param shipmentOrderId 发货单ID | |
| 29 | + * @return List<ShipmentDetailStatistics> | |
| 30 | + */ | |
| 31 | + List<ShipmentDetailStatistics> getShipmentDetailInfo(String shipmentOrderId); | |
| 32 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.service.statistics; | |
| 2 | + | |
| 3 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.CreateShipmentDetailStatisticsVo; | |
| 4 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.QueryShipmentDetailStatisticsVo; | |
| 5 | +import com.lframework.xingyun.sc.vo.statistics.shipmentDetail.UpdateShipmentDetailStatisticsVo; | |
| 6 | +import com.lframework.xingyun.sc.entity.ShipmentDetailStatistics; | |
| 7 | +import com.lframework.starter.web.core.service.BaseMpService; | |
| 8 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 发货明细统计 Service | |
| 13 | + */ | |
| 14 | +public interface ShipmentDetailStatisticsService extends BaseMpService<ShipmentDetailStatistics> { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 查询列表 | |
| 18 | + * | |
| 19 | + * @return PageResult<ShipmentDetailStatistics> | |
| 20 | + */ | |
| 21 | + PageResult<ShipmentDetailStatistics> query(Integer pageIndex, Integer pageSize, QueryShipmentDetailStatisticsVo vo); | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 查询列表 | |
| 25 | + * | |
| 26 | + * @param vo 查询条件 | |
| 27 | + * @return List<ShipmentDetailStatistics> | |
| 28 | + */ | |
| 29 | + List<ShipmentDetailStatistics> query(QueryShipmentDetailStatisticsVo vo); | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 根据ID查询 | |
| 33 | + * | |
| 34 | + * @param id 主键ID | |
| 35 | + * @return ShipmentDetailStatistics | |
| 36 | + */ | |
| 37 | + ShipmentDetailStatistics findById(String id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 创建 | |
| 41 | + * | |
| 42 | + * @param vo 数据实体 | |
| 43 | + * @return String | |
| 44 | + */ | |
| 45 | + String create(CreateShipmentDetailStatisticsVo vo); | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 修改 | |
| 49 | + * | |
| 50 | + * @param vo 数据实体 | |
| 51 | + */ | |
| 52 | + void update(UpdateShipmentDetailStatisticsVo vo); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获取发货明细数据 | |
| 56 | + * | |
| 57 | + * @param shipmentOrderId 发货单ID | |
| 58 | + * @return List<ShipmentDetailStatistics> | |
| 59 | + */ | |
| 60 | + List<ShipmentDetailStatistics> getShipmentDetailInfo(String shipmentOrderId); | |
| 61 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/shipments/order/QueryShipmentsOrderInfoVo.java
| ... | ... | @@ -15,6 +15,12 @@ public class QueryShipmentsOrderInfoVo extends PageVo implements BaseVo, Seriali |
| 15 | 15 | private static final long serialVersionUID = 1L; |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | + * 发货单编号 | |
| 19 | + */ | |
| 20 | + @ApiModelProperty("发货单编号") | |
| 21 | + private String code; | |
| 22 | + | |
| 23 | + /** | |
| 18 | 24 | * 购货单位名称 |
| 19 | 25 | */ |
| 20 | 26 | @ApiModelProperty("购货单位名称") | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.statistics.shipmentDetail; | |
| 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.LocalDate; | |
| 7 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 8 | +import javax.validation.constraints.NotNull; | |
| 9 | +import io.swagger.annotations.ApiModelProperty; | |
| 10 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 11 | +import org.hibernate.validator.constraints.Length; | |
| 12 | +import java.io.Serializable; | |
| 13 | +import lombok.Data; | |
| 14 | + | |
| 15 | +@Data | |
| 16 | +public class CreateShipmentDetailStatisticsVo implements BaseVo, Serializable { | |
| 17 | + | |
| 18 | + private static final long serialVersionUID = 1L; | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 发货单编号 | |
| 22 | + */ | |
| 23 | + @ApiModelProperty(value = "发货单编号", required = true) | |
| 24 | + @NotBlank(message = "请输入发货单编号!") | |
| 25 | + @Length(message = "发货单编号最多允许50个字符!") | |
| 26 | + private String shipmentOrderNo; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 生产厂 | |
| 30 | + */ | |
| 31 | + @ApiModelProperty(value = "生产厂", required = true) | |
| 32 | + @NotBlank(message = "请输入生产厂!") | |
| 33 | + @Length(message = "生产厂最多允许50个字符!") | |
| 34 | + private String workshopName; | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 办事处 | |
| 38 | + */ | |
| 39 | + @ApiModelProperty(value = "办事处", required = true) | |
| 40 | + @NotBlank(message = "请输入办事处!") | |
| 41 | + @Length(message = "办事处最多允许50个字符!") | |
| 42 | + private String deptName; | |
| 43 | + | |
| 44 | + /** | |
| 45 | + * 区域 | |
| 46 | + */ | |
| 47 | + @ApiModelProperty(value = "区域", required = true) | |
| 48 | + @NotBlank(message = "请输入区域!") | |
| 49 | + @Length(message = "区域最多允许50个字符!") | |
| 50 | + private String regionName; | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 订货单名称 | |
| 54 | + */ | |
| 55 | + @ApiModelProperty(value = "订货单名称", required = true) | |
| 56 | + @NotBlank(message = "请输入订货单名称!") | |
| 57 | + @Length(message = "订货单名称最多允许50个字符!") | |
| 58 | + private String orderingUnitName; | |
| 59 | + | |
| 60 | + /** | |
| 61 | + * 牌号 | |
| 62 | + */ | |
| 63 | + @ApiModelProperty(value = "牌号", required = true) | |
| 64 | + @NotBlank(message = "请输入牌号!") | |
| 65 | + @Length(message = "牌号最多允许50个字符!") | |
| 66 | + private String brand; | |
| 67 | + | |
| 68 | + /** | |
| 69 | + * 厚度 | |
| 70 | + */ | |
| 71 | + @ApiModelProperty(value = "厚度", required = true) | |
| 72 | + @NotNull(message = "请输入厚度!") | |
| 73 | + @TypeMismatch(message = "厚度格式有误!") | |
| 74 | + private Double thickness; | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 宽度 | |
| 78 | + */ | |
| 79 | + @ApiModelProperty(value = "宽度", required = true) | |
| 80 | + @NotNull(message = "请输入宽度!") | |
| 81 | + @TypeMismatch(message = "宽度格式有误!") | |
| 82 | + private Double width; | |
| 83 | + | |
| 84 | + /** | |
| 85 | + * 长度 | |
| 86 | + */ | |
| 87 | + @ApiModelProperty(value = "长度", required = true) | |
| 88 | + @NotNull(message = "请输入长度!") | |
| 89 | + @TypeMismatch(message = "长度格式有误!") | |
| 90 | + private Double length; | |
| 91 | + | |
| 92 | + /** | |
| 93 | + * 状态 | |
| 94 | + */ | |
| 95 | + @ApiModelProperty(value = "状态", required = true) | |
| 96 | + @NotBlank(message = "请输入状态!") | |
| 97 | + @Length(message = "状态最多允许50个字符!") | |
| 98 | + private String status; | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 应发数 | |
| 102 | + */ | |
| 103 | + @ApiModelProperty(value = "应发数", required = true) | |
| 104 | + @NotNull(message = "请输入应发数!") | |
| 105 | + @TypeMismatch(message = "应发数格式有误!") | |
| 106 | + private Double quantity; | |
| 107 | + | |
| 108 | + /** | |
| 109 | + * 实发数 | |
| 110 | + */ | |
| 111 | + @ApiModelProperty(value = "实发数", required = true) | |
| 112 | + @NotNull(message = "请输入实发数!") | |
| 113 | + @TypeMismatch(message = "实发数格式有误!") | |
| 114 | + private Double actualShipmentQuantity; | |
| 115 | + | |
| 116 | + /** | |
| 117 | + * 单价 | |
| 118 | + */ | |
| 119 | + @ApiModelProperty(value = "单价", required = true) | |
| 120 | + @NotNull(message = "请输入单价!") | |
| 121 | + @TypeMismatch(message = "单价格式有误!") | |
| 122 | + @IsNumberPrecision(message = "单价最多允许4位小数!", value = 4) | |
| 123 | + private BigDecimal salesPrice; | |
| 124 | + | |
| 125 | + /** | |
| 126 | + * 厚度公差正 | |
| 127 | + */ | |
| 128 | + @ApiModelProperty(value = "厚度公差正", required = true) | |
| 129 | + @NotNull(message = "请输入厚度公差正!") | |
| 130 | + @TypeMismatch(message = "厚度公差正格式有误!") | |
| 131 | + private Double thicknessTolPos; | |
| 132 | + | |
| 133 | + /** | |
| 134 | + * 厚度公差负 | |
| 135 | + */ | |
| 136 | + @ApiModelProperty(value = "厚度公差负", required = true) | |
| 137 | + @NotNull(message = "请输入厚度公差负!") | |
| 138 | + @TypeMismatch(message = "厚度公差负格式有误!") | |
| 139 | + private Double thicknessTolNeg; | |
| 140 | + | |
| 141 | + /** | |
| 142 | + * 宽度公差正 | |
| 143 | + */ | |
| 144 | + @ApiModelProperty(value = "宽度公差正", required = true) | |
| 145 | + @NotNull(message = "请输入宽度公差正!") | |
| 146 | + @TypeMismatch(message = "宽度公差正格式有误!") | |
| 147 | + private Double widthTolPos; | |
| 148 | + | |
| 149 | + /** | |
| 150 | + * 宽度公差负 | |
| 151 | + */ | |
| 152 | + @ApiModelProperty(value = "宽度公差负", required = true) | |
| 153 | + @NotNull(message = "请输入宽度公差负!") | |
| 154 | + @TypeMismatch(message = "宽度公差负格式有误!") | |
| 155 | + private Double widthTolNeg; | |
| 156 | + | |
| 157 | + /** | |
| 158 | + * 长度公差正 | |
| 159 | + */ | |
| 160 | + @ApiModelProperty(value = "长度公差正", required = true) | |
| 161 | + @NotNull(message = "请输入长度公差正!") | |
| 162 | + @TypeMismatch(message = "长度公差正格式有误!") | |
| 163 | + private Double lengthTolPos; | |
| 164 | + | |
| 165 | + /** | |
| 166 | + * 长度公差负 | |
| 167 | + */ | |
| 168 | + @ApiModelProperty(value = "长度公差负", required = true) | |
| 169 | + @NotNull(message = "请输入长度公差负!") | |
| 170 | + @TypeMismatch(message = "长度公差负格式有误!") | |
| 171 | + private Double lengthTolNeg; | |
| 172 | + | |
| 173 | + /** | |
| 174 | + * 超协价 | |
| 175 | + */ | |
| 176 | + @ApiModelProperty(value = "超协价", required = true) | |
| 177 | + @NotBlank(message = "请输入超协价!") | |
| 178 | + @Length(message = "超协价最多允许20个字符!") | |
| 179 | + private String assessmentExceedsAgreement; | |
| 180 | + | |
| 181 | + /** | |
| 182 | + * 运费 | |
| 183 | + */ | |
| 184 | + @ApiModelProperty(value = "运费", required = true) | |
| 185 | + @NotBlank(message = "请输入运费!") | |
| 186 | + @Length(message = "运费最多允许20个字符!") | |
| 187 | + private String shippingCost; | |
| 188 | + | |
| 189 | + /** | |
| 190 | + * 回程运费 | |
| 191 | + */ | |
| 192 | + @ApiModelProperty(value = "回程运费", required = true) | |
| 193 | + @NotBlank(message = "请输入回程运费!") | |
| 194 | + @Length(message = "回程运费最多允许20个字符!") | |
| 195 | + private String returnFreight; | |
| 196 | + | |
| 197 | + /** | |
| 198 | + * 行业 | |
| 199 | + */ | |
| 200 | + @ApiModelProperty(value = "行业", required = true) | |
| 201 | + @NotBlank(message = "请输入行业!") | |
| 202 | + @Length(message = "行业最多允许50个字符!") | |
| 203 | + private String industry; | |
| 204 | + | |
| 205 | + /** | |
| 206 | + * 备货单位名称 | |
| 207 | + */ | |
| 208 | + @ApiModelProperty(value = "备货单位名称", required = true) | |
| 209 | + @NotBlank(message = "请输入备货单位名称!") | |
| 210 | + @Length(message = "备货单位名称最多允许50个字符!") | |
| 211 | + private String stockUpCompanyName; | |
| 212 | + | |
| 213 | + /** | |
| 214 | + * 订货单编号 | |
| 215 | + */ | |
| 216 | + @ApiModelProperty(value = "订货单编号", required = true) | |
| 217 | + @NotBlank(message = "请输入订货单编号!") | |
| 218 | + @Length(message = "订货单编号最多允许50个字符!") | |
| 219 | + private String orderNo; | |
| 220 | + | |
| 221 | + /** | |
| 222 | + * 生产批号 | |
| 223 | + */ | |
| 224 | + @ApiModelProperty(value = "生产批号", required = true) | |
| 225 | + @NotBlank(message = "请输入生产批号!") | |
| 226 | + @Length(message = "生产批号最多允许50个字符!") | |
| 227 | + private String yieldBatchNo; | |
| 228 | + | |
| 229 | + /** | |
| 230 | + * 开票情况 | |
| 231 | + */ | |
| 232 | + @ApiModelProperty(value = "开票情况", required = true) | |
| 233 | + @NotBlank(message = "请输入开票情况!") | |
| 234 | + @Length(message = "开票情况最多允许50个字符!") | |
| 235 | + private String invoicingStatus; | |
| 236 | + | |
| 237 | + /** | |
| 238 | + * 订货日期 | |
| 239 | + */ | |
| 240 | + @ApiModelProperty(value = "订货日期", required = true) | |
| 241 | + @NotNull(message = "请输入订货日期!") | |
| 242 | + @TypeMismatch(message = "订货日期格式有误!") | |
| 243 | + private LocalDate orderDate; | |
| 244 | + | |
| 245 | + /** | |
| 246 | + * 包装费 | |
| 247 | + */ | |
| 248 | + @ApiModelProperty(value = "包装费", required = true) | |
| 249 | + @NotNull(message = "请输入包装费!") | |
| 250 | + @TypeMismatch(message = "包装费格式有误!") | |
| 251 | + @IsNumberPrecision(message = "包装费最多允许4位小数!", value = 4) | |
| 252 | + private BigDecimal packagingFee; | |
| 253 | + | |
| 254 | + /** | |
| 255 | + * 品质 | |
| 256 | + */ | |
| 257 | + @ApiModelProperty(value = "品质", required = true) | |
| 258 | + @NotBlank(message = "请输入品质!") | |
| 259 | + @Length(message = "品质最多允许50个字符!") | |
| 260 | + private String quality; | |
| 261 | + | |
| 262 | + /** | |
| 263 | + * 件数 | |
| 264 | + */ | |
| 265 | + @ApiModelProperty(value = "件数", required = true) | |
| 266 | + @NotNull(message = "请输入件数!") | |
| 267 | + @TypeMismatch(message = "件数格式有误!") | |
| 268 | + private Double num; | |
| 269 | + | |
| 270 | + /** | |
| 271 | + * 结算方式 | |
| 272 | + */ | |
| 273 | + @ApiModelProperty(value = "结算方式", required = true) | |
| 274 | + @NotBlank(message = "请输入结算方式!") | |
| 275 | + @Length(message = "结算方式最多允许50个字符!") | |
| 276 | + private String settlementTerms; | |
| 277 | + | |
| 278 | + /** | |
| 279 | + * 加工、经销 | |
| 280 | + */ | |
| 281 | + @ApiModelProperty(value = "加工、经销", required = true) | |
| 282 | + @NotBlank(message = "请输入加工、经销!") | |
| 283 | + @Length(message = "加工、经销最多允许20个字符!") | |
| 284 | + private String processingOrDistribution; | |
| 285 | + | |
| 286 | + /** | |
| 287 | + * 包装要求 | |
| 288 | + */ | |
| 289 | + @ApiModelProperty(value = "包装要求", required = true) | |
| 290 | + @NotBlank(message = "请输入包装要求!") | |
| 291 | + @Length(message = "包装要求最多允许200个字符!") | |
| 292 | + private String packagingRequirements; | |
| 293 | + | |
| 294 | + /** | |
| 295 | + * 发货日期 | |
| 296 | + */ | |
| 297 | + @ApiModelProperty(value = "发货日期", required = true) | |
| 298 | + @NotNull(message = "请输入发货日期!") | |
| 299 | + @TypeMismatch(message = "发货日期格式有误!") | |
| 300 | + private LocalDate shipmentDate; | |
| 301 | + | |
| 302 | + /** | |
| 303 | + * 发货公司 | |
| 304 | + */ | |
| 305 | + @ApiModelProperty(value = "发货公司", required = true) | |
| 306 | + @NotBlank(message = "请输入发货公司!") | |
| 307 | + @Length(message = "发货公司最多允许20个字符!") | |
| 308 | + private String supplier; | |
| 309 | + | |
| 310 | + /** | |
| 311 | + * 客户简称 | |
| 312 | + */ | |
| 313 | + @ApiModelProperty(value = "客户简称", required = true) | |
| 314 | + @NotBlank(message = "请输入客户简称!") | |
| 315 | + @Length(message = "客户简称最多允许50个字符!") | |
| 316 | + private String customerShortName; | |
| 317 | + | |
| 318 | + /** | |
| 319 | + * 客户类型 | |
| 320 | + */ | |
| 321 | + @ApiModelProperty(value = "客户类型", required = true) | |
| 322 | + @NotBlank(message = "请输入客户类型!") | |
| 323 | + @Length(message = "客户类型最多允许20个字符!") | |
| 324 | + private String customerType; | |
| 325 | + | |
| 326 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.statistics.shipmentDetail; | |
| 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 QueryShipmentDetailStatisticsVo extends PageVo implements BaseVo, Serializable { | |
| 11 | + | |
| 12 | + private static final long serialVersionUID = 1L; | |
| 13 | + | |
| 14 | + /** | |
| 15 | + * 生产厂 | |
| 16 | + */ | |
| 17 | + @ApiModelProperty("生产厂") | |
| 18 | + private String workshopName; | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 办事处 | |
| 22 | + */ | |
| 23 | + @ApiModelProperty("办事处") | |
| 24 | + private String deptName; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 订货单名称 | |
| 28 | + */ | |
| 29 | + @ApiModelProperty("订货单名称") | |
| 30 | + private String orderingUnitName; | |
| 31 | + | |
| 32 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.statistics.shipmentDetail; | |
| 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 java.io.Serializable; | |
| 10 | + | |
| 11 | +@Data | |
| 12 | +public class UpdateShipmentDetailStatisticsVo 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(value = "实发数", required = true) | |
| 27 | + @TypeMismatch(message = "实发数格式有误!") | |
| 28 | + @NotNull(message = "请输入实发数!") | |
| 29 | + private Double actualShipmentQuantity; | |
| 30 | + | |
| 31 | +} | ... | ... |
| ... | ... | @@ -24,6 +24,7 @@ |
| 24 | 24 | <sql id="ShipmentsOrderInfo_sql"> |
| 25 | 25 | SELECT |
| 26 | 26 | tb.id, |
| 27 | + tb.code, | |
| 27 | 28 | tb.plan_id, |
| 28 | 29 | tb.customer_id, |
| 29 | 30 | c.name AS customer_name, |
| ... | ... | @@ -72,6 +73,9 @@ |
| 72 | 73 | <if test="vo.customerName != null and vo.customerName != ''"> |
| 73 | 74 | AND c.name like concat('%', #{vo.customerName}, '%') |
| 74 | 75 | </if> |
| 76 | + <if test="vo.code != null and vo.code != ''"> | |
| 77 | + AND tb.code like concat('%', #{vo.code}, '%') | |
| 78 | + </if> | |
| 75 | 79 | </where> |
| 76 | 80 | ORDER BY tb.create_time DESC |
| 77 | 81 | </select> | ... | ... |
| 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.ShipmentDetailStatisticsMapper"> | |
| 4 | + | |
| 5 | + <resultMap id="ShipmentDetailStatistics" type="com.lframework.xingyun.sc.entity.ShipmentDetailStatistics"> | |
| 6 | + <id column="id" property="id"/> | |
| 7 | + <result column="shipment_order_no" property="shipmentOrderNo"/> | |
| 8 | + <result column="workshop_name" property="workshopName"/> | |
| 9 | + <result column="dept_name" property="deptName"/> | |
| 10 | + <result column="region_name" property="regionName"/> | |
| 11 | + <result column="ordering_unit_name" property="orderingUnitName"/> | |
| 12 | + <result column="brand" property="brand"/> | |
| 13 | + <result column="thickness" property="thickness"/> | |
| 14 | + <result column="width" property="width"/> | |
| 15 | + <result column="length" property="length"/> | |
| 16 | + <result column="status" property="status"/> | |
| 17 | + <result column="quantity" property="quantity"/> | |
| 18 | + <result column="actual_shipment_quantity" property="actualShipmentQuantity"/> | |
| 19 | + <result column="sales_price" property="salesPrice"/> | |
| 20 | + <result column="thickness_tol_pos" property="thicknessTolPos"/> | |
| 21 | + <result column="thickness_tol_neg" property="thicknessTolNeg"/> | |
| 22 | + <result column="width_tol_pos" property="widthTolPos"/> | |
| 23 | + <result column="width_tol_neg" property="widthTolNeg"/> | |
| 24 | + <result column="length_tol_pos" property="lengthTolPos"/> | |
| 25 | + <result column="length_tol_neg" property="lengthTolNeg"/> | |
| 26 | + <result column="assessment_exceeds_agreement" property="assessmentExceedsAgreement"/> | |
| 27 | + <result column="shipping_cost" property="shippingCost"/> | |
| 28 | + <result column="return_freight" property="returnFreight"/> | |
| 29 | + <result column="industry" property="industry"/> | |
| 30 | + <result column="stock_up_company_name" property="stockUpCompanyName"/> | |
| 31 | + <result column="order_no" property="orderNo"/> | |
| 32 | + <result column="yield_batch_no" property="yieldBatchNo"/> | |
| 33 | + <result column="invoicing_status" property="invoicingStatus"/> | |
| 34 | + <result column="order_date" property="orderDate"/> | |
| 35 | + <result column="packaging_fee" property="packagingFee"/> | |
| 36 | + <result column="quality" property="quality"/> | |
| 37 | + <result column="num" property="num"/> | |
| 38 | + <result column="settlement_terms" property="settlementTerms"/> | |
| 39 | + <result column="processing_or_distribution" property="processingOrDistribution"/> | |
| 40 | + <result column="packaging_requirements" property="packagingRequirements"/> | |
| 41 | + <result column="shipment_date" property="shipmentDate"/> | |
| 42 | + <result column="supplier" property="supplier"/> | |
| 43 | + <result column="customer_short_name" property="customerShortName"/> | |
| 44 | + <result column="customer_type" property="customerType"/> | |
| 45 | + <result column="create_by_id" property="createById"/> | |
| 46 | + <result column="update_by_id" property="updateById"/> | |
| 47 | + <result column="create_time" property="createTime"/> | |
| 48 | + <result column="update_time" property="updateTime"/> | |
| 49 | + <result column="delivery_method" property="deliveryMethod"/> | |
| 50 | + </resultMap> | |
| 51 | + | |
| 52 | + <sql id="ShipmentDetailStatistics_sql"> | |
| 53 | + SELECT | |
| 54 | + tb.id, | |
| 55 | + tb.shipment_order_no, | |
| 56 | + tb.workshop_name, | |
| 57 | + tb.dept_name, | |
| 58 | + tb.region_name, | |
| 59 | + tb.ordering_unit_name, | |
| 60 | + tb.brand, | |
| 61 | + tb.thickness, | |
| 62 | + tb.width, | |
| 63 | + tb.length, | |
| 64 | + tb.status, | |
| 65 | + tb.quantity, | |
| 66 | + tb.actual_shipment_quantity, | |
| 67 | + tb.sales_price, | |
| 68 | + tb.thickness_tol_pos, | |
| 69 | + tb.thickness_tol_neg, | |
| 70 | + tb.width_tol_pos, | |
| 71 | + tb.width_tol_neg, | |
| 72 | + tb.length_tol_pos, | |
| 73 | + tb.length_tol_neg, | |
| 74 | + tb.assessment_exceeds_agreement, | |
| 75 | + tb.shipping_cost, | |
| 76 | + tb.return_freight, | |
| 77 | + tb.industry, | |
| 78 | + tb.stock_up_company_name, | |
| 79 | + tb.order_no, | |
| 80 | + tb.yield_batch_no, | |
| 81 | + tb.invoicing_status, | |
| 82 | + tb.order_date, | |
| 83 | + tb.packaging_fee, | |
| 84 | + tb.quality, | |
| 85 | + tb.num, | |
| 86 | + tb.settlement_terms, | |
| 87 | + tb.processing_or_distribution, | |
| 88 | + tb.packaging_requirements, | |
| 89 | + tb.shipment_date, | |
| 90 | + tb.supplier, | |
| 91 | + tb.customer_short_name, | |
| 92 | + tb.customer_type, | |
| 93 | + tb.create_by_id, | |
| 94 | + tb.update_by_id, | |
| 95 | + tb.create_time, | |
| 96 | + tb.update_time, | |
| 97 | + tb.delivery_method | |
| 98 | + FROM shipments_detail_statistics AS tb | |
| 99 | + </sql> | |
| 100 | + | |
| 101 | + <select id="query" resultMap="ShipmentDetailStatistics"> | |
| 102 | + <include refid="ShipmentDetailStatistics_sql"/> | |
| 103 | + <where> | |
| 104 | + <if test="vo.workshopName != null and vo.workshopName != ''"> | |
| 105 | + AND tb.workshop_name LIKE CONCAT('%', #{vo.workshopName}, '%') | |
| 106 | + </if> | |
| 107 | + <if test="vo.deptName != null and vo.deptName != ''"> | |
| 108 | + AND tb.dept_name LIKE CONCAT('%', #{vo.deptName}, '%') | |
| 109 | + </if> | |
| 110 | + <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''"> | |
| 111 | + AND tb.ordering_unit_name LIKE CONCAT('%', #{vo.orderingUnitName}, '%') | |
| 112 | + </if> | |
| 113 | + </where> | |
| 114 | + </select> | |
| 115 | + | |
| 116 | + <select id="getShipmentDetailInfo" resultType="com.lframework.xingyun.sc.entity.ShipmentDetailStatistics"> | |
| 117 | + select ol.*, o.*,w.name as workshop_name,sd.actual_shipment_quantity,sd.yield_batch_no | |
| 118 | + from shipments_plan_detail sd | |
| 119 | + left join tbl_purchase_order_line ol on sd.order_spec_id = ol.id | |
| 120 | + left join purchase_order_info o on ol.purchase_order_id = o.id | |
| 121 | + left join base_data_workshop w on o.workshop_id = w.id | |
| 122 | + where sd.shipment_order_id = #{shipmentOrderId} | |
| 123 | + </select> | |
| 124 | +</mapper> | ... | ... |