Commit b9fef69e5062ead773242dfb672205f46471a7c5
1 parent
4163aded
楚江ERP-1、录入实发数接口开发(包含列表);2、上传签收单据接口开发
Showing
14 changed files
with
353 additions
and
25 deletions
| 1 | 1 | package com.lframework.xingyun.sc.bo.shipments.plan; |
| 2 | 2 | |
| 3 | -import com.baomidou.mybatisplus.annotation.TableField; | |
| 4 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 5 | 4 | import com.lframework.xingyun.sc.entity.ShipmentsPlanDetail; |
| 6 | 5 | import com.lframework.starter.common.constants.StringPool; |
| 7 | 6 | import com.lframework.starter.web.core.bo.BaseBo; |
| 8 | 7 | |
| 9 | 8 | import java.math.BigDecimal; |
| 10 | -import java.math.RoundingMode; | |
| 11 | 9 | import java.time.LocalDate; |
| 12 | 10 | import java.time.LocalTime; |
| 13 | 11 | import java.time.LocalDateTime; |
| ... | ... | @@ -50,6 +48,12 @@ public class ShipmentsPlanDetailBo extends BaseBo<ShipmentsPlanDetail> { |
| 50 | 48 | private String orderNo; |
| 51 | 49 | |
| 52 | 50 | /** |
| 51 | + * 包装费 | |
| 52 | + */ | |
| 53 | + @ApiModelProperty("包装费") | |
| 54 | + private String packagingFee; | |
| 55 | + | |
| 56 | + /** | |
| 53 | 57 | * 客户ID |
| 54 | 58 | */ |
| 55 | 59 | @ApiModelProperty("客户ID") |
| ... | ... | @@ -94,6 +98,12 @@ public class ShipmentsPlanDetailBo extends BaseBo<ShipmentsPlanDetail> { |
| 94 | 98 | private Boolean canShipments; |
| 95 | 99 | |
| 96 | 100 | /** |
| 101 | + * 牌号 | |
| 102 | + */ | |
| 103 | + @ApiModelProperty("牌号") | |
| 104 | + private String brand; | |
| 105 | + | |
| 106 | + /** | |
| 97 | 107 | * 厚度 |
| 98 | 108 | */ |
| 99 | 109 | @ApiModelProperty("厚度") |
| ... | ... | @@ -154,6 +164,30 @@ public class ShipmentsPlanDetailBo extends BaseBo<ShipmentsPlanDetail> { |
| 154 | 164 | private BigDecimal quantity; |
| 155 | 165 | |
| 156 | 166 | /** |
| 167 | + * 单价 | |
| 168 | + */ | |
| 169 | + @ApiModelProperty("单价") | |
| 170 | + private BigDecimal salesPrice; | |
| 171 | + | |
| 172 | + /** | |
| 173 | + * 实发数 | |
| 174 | + */ | |
| 175 | + @ApiModelProperty("实发数") | |
| 176 | + private Double actualShipmentQuantity; | |
| 177 | + | |
| 178 | + /** | |
| 179 | + * 生产批号 | |
| 180 | + */ | |
| 181 | + @ApiModelProperty("生产批号") | |
| 182 | + private String yieldBatchNo; | |
| 183 | + | |
| 184 | + /** | |
| 185 | + * 件数 | |
| 186 | + */ | |
| 187 | + @ApiModelProperty("件数") | |
| 188 | + private Double num; | |
| 189 | + | |
| 190 | + /** | |
| 157 | 191 | * 创建人ID |
| 158 | 192 | */ |
| 159 | 193 | @ApiModelProperty("创建人ID") |
| ... | ... | @@ -195,8 +229,6 @@ public class ShipmentsPlanDetailBo extends BaseBo<ShipmentsPlanDetail> { |
| 195 | 229 | |
| 196 | 230 | @Override |
| 197 | 231 | protected void afterInit(ShipmentsPlanDetail dto) { |
| 198 | - if (dto.getQuantity() != null && dto.getQuantity().compareTo(BigDecimal.ZERO) != 0) { | |
| 199 | - this.quantity = dto.getQuantity().divide(new BigDecimal(1000), 4, RoundingMode.HALF_EVEN); | |
| 200 | - } | |
| 232 | + | |
| 201 | 233 | } |
| 202 | 234 | } | ... | ... |
| ... | ... | @@ -2,11 +2,11 @@ package com.lframework.xingyun.sc.controller.shipments; |
| 2 | 2 | |
| 3 | 3 | import com.lframework.xingyun.sc.bo.shipments.order.GetShipmentsOrderInfoBo; |
| 4 | 4 | import com.lframework.xingyun.sc.bo.shipments.order.QueryShipmentsOrderInfoBo; |
| 5 | -import com.lframework.xingyun.sc.vo.shipments.order.GenerateShipmentsOrderVo; | |
| 6 | -import com.lframework.xingyun.sc.vo.shipments.order.QueryShipmentsOrderInfoVo; | |
| 5 | +import com.lframework.xingyun.sc.bo.shipments.plan.ShipmentsPlanDetailBo; | |
| 6 | +import com.lframework.xingyun.sc.entity.ShipmentsPlanDetail; | |
| 7 | +import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanDetailService; | |
| 8 | +import com.lframework.xingyun.sc.vo.shipments.order.*; | |
| 7 | 9 | import com.lframework.xingyun.sc.service.shipments.ShipmentsOrderInfoService; |
| 8 | -import com.lframework.xingyun.sc.vo.shipments.order.CreateShipmentsOrderInfoVo; | |
| 9 | -import com.lframework.xingyun.sc.vo.shipments.order.UpdateShipmentsOrderInfoVo; | |
| 10 | 10 | import com.lframework.xingyun.sc.entity.ShipmentsOrderInfo; |
| 11 | 11 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 12 | 12 | import com.lframework.starter.web.core.components.resp.PageResult; |
| ... | ... | @@ -43,6 +43,8 @@ public class ShipmentsOrderInfoController extends DefaultBaseController { |
| 43 | 43 | |
| 44 | 44 | @Resource |
| 45 | 45 | private ShipmentsOrderInfoService shipmentsOrderInfoService; |
| 46 | + @Resource | |
| 47 | + private ShipmentsPlanDetailService shipmentsPlanDetailService; | |
| 46 | 48 | |
| 47 | 49 | |
| 48 | 50 | /** |
| ... | ... | @@ -124,4 +126,42 @@ public class ShipmentsOrderInfoController extends DefaultBaseController { |
| 124 | 126 | shipmentsOrderInfoService.generate(vo); |
| 125 | 127 | return InvokeResultBuilder.success(); |
| 126 | 128 | } |
| 129 | + | |
| 130 | + | |
| 131 | + /** | |
| 132 | + * 发货单明细数据 | |
| 133 | + */ | |
| 134 | + @ApiOperation("发货单明细数据") | |
| 135 | + @HasPermission({"shipping-plan-manage:shipping-plan:query"}) | |
| 136 | + @GetMapping("/listByShipmentOrderId") | |
| 137 | + public InvokeResult<List<ShipmentsPlanDetailBo>> listByShipmentOrderId(@NotBlank(message = "发货单ID不能为空!") String shipmentsOrderId) { | |
| 138 | + List<ShipmentsPlanDetail> dataList = shipmentsPlanDetailService.listByShipmentOrderId(shipmentsOrderId); | |
| 139 | + List<ShipmentsPlanDetailBo> results = null; | |
| 140 | + if (!CollectionUtil.isEmpty(dataList)) { | |
| 141 | + results = dataList.stream().map(ShipmentsPlanDetailBo::new).collect(Collectors.toList()); | |
| 142 | + } | |
| 143 | + return InvokeResultBuilder.success(results); | |
| 144 | + } | |
| 145 | + | |
| 146 | + /** | |
| 147 | + * 明细数据补充录入 | |
| 148 | + */ | |
| 149 | + @ApiOperation("明细数据补充录入") | |
| 150 | + @HasPermission({"shipping-plan-manage:shipping-plan:query"}) | |
| 151 | + @GetMapping("/dataReplenishInput") | |
| 152 | + public InvokeResult<Void> dataReplenishInput(@Valid @RequestBody ShipmentsOrderVo vo) { | |
| 153 | + shipmentsOrderInfoService.dataReplenishInput(vo); | |
| 154 | + return InvokeResultBuilder.success(); | |
| 155 | + } | |
| 156 | + | |
| 157 | + /** | |
| 158 | + * 保存签收单据 | |
| 159 | + */ | |
| 160 | + @ApiOperation("保存签收单据") | |
| 161 | + @HasPermission({"shipping-plan-manage:shipping-plan:query"}) | |
| 162 | + @GetMapping("/saveSignInTicket") | |
| 163 | + public InvokeResult<Void> saveSignInTicket(@Valid SignInTicketVo vo) { | |
| 164 | + shipmentsOrderInfoService.saveSignInTicket(vo); | |
| 165 | + return InvokeResultBuilder.success(); | |
| 166 | + } | |
| 127 | 167 | } | ... | ... |
| ... | ... | @@ -89,9 +89,14 @@ public class ShipmentsOrderInfo extends BaseEntity implements BaseDto { |
| 89 | 89 | private String paymentType; |
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | - * 实发数量 | |
| 92 | + * 签收单据文件ID | |
| 93 | 93 | */ |
| 94 | - private Double actualShipmentQuantity; | |
| 94 | + private String receiptsId; | |
| 95 | + | |
| 96 | + /** | |
| 97 | + * 签收单据文件名称 | |
| 98 | + */ | |
| 99 | + private String receiptsName; | |
| 95 | 100 | |
| 96 | 101 | /** |
| 97 | 102 | * 状态 | ... | ... |
| ... | ... | @@ -58,6 +58,12 @@ public class ShipmentsPlanDetail extends BaseEntity implements BaseDto { |
| 58 | 58 | private String orderNo; |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | + * 包装费 | |
| 62 | + */ | |
| 63 | + @TableField(exist = false) | |
| 64 | + private String packagingFee; | |
| 65 | + | |
| 66 | + /** | |
| 61 | 67 | * 合同类型 |
| 62 | 68 | */ |
| 63 | 69 | @TableField(exist = false) |
| ... | ... | @@ -76,6 +82,12 @@ public class ShipmentsPlanDetail extends BaseEntity implements BaseDto { |
| 76 | 82 | private String customerName; |
| 77 | 83 | |
| 78 | 84 | /** |
| 85 | + * 牌号 | |
| 86 | + */ | |
| 87 | + @TableField(exist = false) | |
| 88 | + private String brand; | |
| 89 | + | |
| 90 | + /** | |
| 79 | 91 | * 厚度 |
| 80 | 92 | */ |
| 81 | 93 | @TableField(exist = false) |
| ... | ... | @@ -136,6 +148,27 @@ public class ShipmentsPlanDetail extends BaseEntity implements BaseDto { |
| 136 | 148 | private BigDecimal quantity; |
| 137 | 149 | |
| 138 | 150 | /** |
| 151 | + * 单价 | |
| 152 | + */ | |
| 153 | + @TableField(exist = false) | |
| 154 | + private BigDecimal salesPrice; | |
| 155 | + | |
| 156 | + /** | |
| 157 | + * 实发数 | |
| 158 | + */ | |
| 159 | + private Double actualShipmentQuantity; | |
| 160 | + | |
| 161 | + /** | |
| 162 | + * 生产批号 | |
| 163 | + */ | |
| 164 | + private String yieldBatchNo; | |
| 165 | + | |
| 166 | + /** | |
| 167 | + * 件数 | |
| 168 | + */ | |
| 169 | + private Double num; | |
| 170 | + | |
| 171 | + /** | |
| 139 | 172 | * 父类ID |
| 140 | 173 | */ |
| 141 | 174 | private String parentId; | ... | ... |
| ... | ... | @@ -391,6 +391,18 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | + @Override | |
| 395 | + @Transactional(rollbackFor = Exception.class) | |
| 396 | + public void updateStatus(List<String> ids, String status) { | |
| 397 | + if (CollectionUtils.isNotEmpty(ids) || StringUtils.isBlank(status)) { | |
| 398 | + return; | |
| 399 | + } | |
| 400 | + LambdaUpdateWrapper<PurchaseOrderInfo> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderInfo.class); | |
| 401 | + updateWrapper.set(PurchaseOrderInfo::getStatus, status) | |
| 402 | + .in(PurchaseOrderInfo::getId, ids); | |
| 403 | + getBaseMapper().update(updateWrapper); | |
| 404 | + } | |
| 405 | + | |
| 394 | 406 | @OpLog(type = OtherOpLogType.class, name = "更新撤销状态,ID:{}", params = {"#id"}) |
| 395 | 407 | @Transactional(rollbackFor = Exception.class) |
| 396 | 408 | @Override | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/shipments/ShipmentsOrderInfoServiceImpl.java
| ... | ... | @@ -31,16 +31,13 @@ import com.lframework.xingyun.sc.utils.CommonUtil; |
| 31 | 31 | import com.lframework.xingyun.sc.vo.shipments.car.CreateCarRequestPlanVo; |
| 32 | 32 | import com.lframework.xingyun.sc.vo.shipments.car.CreateDraftRequestCarTicketVo; |
| 33 | 33 | import com.lframework.xingyun.sc.vo.shipments.car.CreateRequestCarTicketVo; |
| 34 | -import com.lframework.xingyun.sc.vo.shipments.order.GenerateShipmentsOrderVo; | |
| 34 | +import com.lframework.xingyun.sc.vo.shipments.order.*; | |
| 35 | 35 | import lombok.extern.slf4j.Slf4j; |
| 36 | 36 | import org.apache.commons.collections4.CollectionUtils; |
| 37 | 37 | import org.apache.commons.lang3.StringUtils; |
| 38 | 38 | import org.springframework.transaction.annotation.Transactional; |
| 39 | 39 | import com.lframework.xingyun.sc.mappers.ShipmentsOrderInfoMapper; |
| 40 | 40 | import com.lframework.xingyun.sc.service.shipments.ShipmentsOrderInfoService; |
| 41 | -import com.lframework.xingyun.sc.vo.shipments.order.CreateShipmentsOrderInfoVo; | |
| 42 | -import com.lframework.xingyun.sc.vo.shipments.order.QueryShipmentsOrderInfoVo; | |
| 43 | -import com.lframework.xingyun.sc.vo.shipments.order.UpdateShipmentsOrderInfoVo; | |
| 44 | 41 | import org.springframework.stereotype.Service; |
| 45 | 42 | |
| 46 | 43 | import javax.annotation.Resource; |
| ... | ... | @@ -269,6 +266,66 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr |
| 269 | 266 | getBaseMapper().batchAdd(orderInfos); |
| 270 | 267 | } |
| 271 | 268 | |
| 269 | + @Override | |
| 270 | + @Transactional(rollbackFor = Exception.class) | |
| 271 | + public void dataReplenishInput(ShipmentsOrderVo vo) { | |
| 272 | + String shipmentsOrderId = vo.getId(); | |
| 273 | + List<ShipmentsOrderDetailVo> detailList = vo.getDetailList(); | |
| 274 | + if (CollectionUtils.isEmpty(detailList)) { | |
| 275 | + return; | |
| 276 | + } | |
| 277 | + List<ShipmentsPlanDetail> dataList = new ArrayList<>(); | |
| 278 | + for (ShipmentsOrderDetailVo detailVo : detailList) { | |
| 279 | + ShipmentsPlanDetail detail = new ShipmentsPlanDetail(); | |
| 280 | + detail.setId(detailVo.getId()); | |
| 281 | + detail.setActualShipmentQuantity(detailVo.getActualShipmentQuantity()); | |
| 282 | + detail.setNum(detailVo.getNum()); | |
| 283 | + detail.setYieldBatchNo(detailVo.getYieldBatchNo()); | |
| 284 | + // 判断发货数量 | |
| 285 | + Double quantity = detailVo.getQuantity(); | |
| 286 | + Double actualShipmentQuantity = detailVo.getActualShipmentQuantity(); | |
| 287 | + if (actualShipmentQuantity >= quantity) { | |
| 288 | + purchaseOrderInfoService.updateStatus(detailVo.getOrderId(), "SHIPPED"); | |
| 289 | + } else { | |
| 290 | + purchaseOrderInfoService.updateStatus(detailVo.getOrderId(), "TRANSIT"); | |
| 291 | + } | |
| 292 | + dataList.add(detail); | |
| 293 | + } | |
| 294 | + // 更新发货明细 | |
| 295 | + shipmentsPlanDetailService.updateBatchById(dataList); | |
| 296 | + // 更新发货单状态 | |
| 297 | + updateStatus(shipmentsOrderId, "SHIPMENTS"); | |
| 298 | + } | |
| 299 | + | |
| 300 | + @Override | |
| 301 | + @Transactional(rollbackFor = Exception.class) | |
| 302 | + public void saveSignInTicket(SignInTicketVo vo) { | |
| 303 | + LambdaUpdateWrapper<ShipmentsOrderInfo> updateWrapper = Wrappers.lambdaUpdate(ShipmentsOrderInfo.class); | |
| 304 | + updateWrapper.set(ShipmentsOrderInfo::getReceiptsId, vo.getFileId()) | |
| 305 | + .set(ShipmentsOrderInfo::getReceiptsName, vo.getFileName()) | |
| 306 | + .set(ShipmentsOrderInfo::getStatus, "DELIVERED") | |
| 307 | + .eq(ShipmentsOrderInfo::getId, vo.getShipmentsOrderId()); | |
| 308 | + getBaseMapper().update(updateWrapper); | |
| 309 | + // 更新订货单状态 | |
| 310 | + List<ShipmentsPlanDetail> detailList = shipmentsPlanDetailService.listByShipmentOrderId(vo.getShipmentsOrderId()); | |
| 311 | + if (CollectionUtils.isEmpty(detailList)) { | |
| 312 | + return; | |
| 313 | + } | |
| 314 | + List<String> orderIds = detailList.stream().map(ShipmentsPlanDetail::getOrderId).distinct().collect(Collectors.toList()); | |
| 315 | + purchaseOrderInfoService.updateStatus(orderIds, "DELIVERED"); | |
| 316 | + } | |
| 317 | + | |
| 318 | + @Override | |
| 319 | + public void updateStatus(String id, String status) { | |
| 320 | + if (StringUtils.isBlank(id) || StringUtils.isBlank(status)) { | |
| 321 | + return; | |
| 322 | + } | |
| 323 | + LambdaUpdateWrapper<ShipmentsOrderInfo> updateWrapper = Wrappers.lambdaUpdate(ShipmentsOrderInfo.class); | |
| 324 | + updateWrapper.set(ShipmentsOrderInfo::getStatus, status) | |
| 325 | + .eq(ShipmentsOrderInfo::getId, id); | |
| 326 | + getBaseMapper().update(updateWrapper); | |
| 327 | + } | |
| 328 | + | |
| 272 | 329 | |
| 273 | 330 | /** |
| 274 | 331 | * 处理批次数据 | ... | ... |
| ... | ... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | 6 | import com.github.pagehelper.PageInfo; |
| 7 | 7 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 8 | +import com.lframework.starter.web.core.utils.*; | |
| 8 | 9 | import com.lframework.xingyun.basedata.entity.Workshop; |
| 9 | 10 | import com.lframework.xingyun.basedata.service.workshop.WorkshopService; |
| 10 | 11 | import com.lframework.xingyun.basedata.vo.workshop.QueryWorkshopVo; |
| ... | ... | @@ -13,14 +14,10 @@ import com.lframework.xingyun.sc.entity.PurchaseOrderLine; |
| 13 | 14 | import com.lframework.xingyun.sc.entity.ShipmentsPlan; |
| 14 | 15 | import com.lframework.xingyun.sc.entity.ShipmentsPlanDetail; |
| 15 | 16 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| 16 | -import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 17 | 17 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 18 | -import com.lframework.starter.web.core.utils.OpLogUtil; | |
| 19 | 18 | import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
| 20 | -import com.lframework.starter.web.core.utils.IdUtil; | |
| 21 | 19 | import com.lframework.starter.common.utils.ObjectUtil; |
| 22 | 20 | import com.lframework.starter.web.core.annotations.oplog.OpLog; |
| 23 | -import com.lframework.starter.web.core.utils.PageHelperUtil; | |
| 24 | 21 | import com.lframework.starter.common.utils.Assert; |
| 25 | 22 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 26 | 23 | import com.lframework.xingyun.sc.mappers.ShipmentsPlanDetailMapper; |
| ... | ... | @@ -335,6 +332,7 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
| 335 | 332 | ShipmentsPlanDetail data = new ShipmentsPlanDetail(); |
| 336 | 333 | data.setId(IdUtil.getId()); |
| 337 | 334 | data.setPlanId(detail.getPlanId()); |
| 335 | + data.setShipmentOrderId(detail.getShipmentOrderId()); | |
| 338 | 336 | data.setOrderId(detail.getOrderId()); |
| 339 | 337 | data.setOrderSpecId(IdUtil.getId()); |
| 340 | 338 | data.setParentId(detail.getId()); | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.service.shipments; |
| 2 | 2 | |
| 3 | -import com.lframework.xingyun.sc.vo.shipments.order.CreateShipmentsOrderInfoVo; | |
| 4 | -import com.lframework.xingyun.sc.vo.shipments.order.GenerateShipmentsOrderVo; | |
| 5 | -import com.lframework.xingyun.sc.vo.shipments.order.QueryShipmentsOrderInfoVo; | |
| 6 | -import com.lframework.xingyun.sc.vo.shipments.order.UpdateShipmentsOrderInfoVo; | |
| 3 | +import com.lframework.xingyun.sc.vo.shipments.order.*; | |
| 7 | 4 | import com.lframework.xingyun.sc.entity.ShipmentsOrderInfo; |
| 8 | 5 | import com.lframework.starter.web.core.service.BaseMpService; |
| 9 | 6 | import com.lframework.starter.web.core.components.resp.PageResult; |
| ... | ... | @@ -72,4 +69,26 @@ public interface ShipmentsOrderInfoService extends BaseMpService<ShipmentsOrderI |
| 72 | 69 | * @param orderInfos 数据集合 |
| 73 | 70 | */ |
| 74 | 71 | void batchAdd(List<ShipmentsOrderInfo> orderInfos); |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 数据补充录入 | |
| 75 | + * | |
| 76 | + * @param vo 数据实体 | |
| 77 | + */ | |
| 78 | + void dataReplenishInput(ShipmentsOrderVo vo); | |
| 79 | + | |
| 80 | + /** | |
| 81 | + * 保存签收单据 | |
| 82 | + * | |
| 83 | + * @param vo 数据实体 | |
| 84 | + */ | |
| 85 | + void saveSignInTicket(SignInTicketVo vo); | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 更新状态 | |
| 89 | + * | |
| 90 | + * @param id 主键ID | |
| 91 | + * @param status 状态 | |
| 92 | + */ | |
| 93 | + void updateStatus(String id, String status); | |
| 75 | 94 | } | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/shipments/order/ShipmentsOrderDetailVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.shipments.order; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 4 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +import javax.validation.constraints.NotBlank; | |
| 9 | +import javax.validation.constraints.NotNull; | |
| 10 | +import java.io.Serializable; | |
| 11 | + | |
| 12 | +@Data | |
| 13 | +public class ShipmentsOrderDetailVo implements BaseVo, Serializable { | |
| 14 | + | |
| 15 | + private static final long serialVersionUID = 1L; | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * ID | |
| 19 | + */ | |
| 20 | + @ApiModelProperty(value = "ID", required = true) | |
| 21 | + @NotBlank(message = "id不能为空!") | |
| 22 | + private String id; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 订货单ID | |
| 26 | + */ | |
| 27 | + @ApiModelProperty(value = "订货单ID", required = true) | |
| 28 | + @NotBlank(message = "订货单ID不能为空!") | |
| 29 | + private String orderId; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 实发数 | |
| 33 | + */ | |
| 34 | + @ApiModelProperty(value = "实发数") | |
| 35 | + @NotNull(message = "实发数不能为空!") | |
| 36 | + @TypeMismatch(message = "实发数格式有误!") | |
| 37 | + private Double actualShipmentQuantity; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 生产批号 | |
| 41 | + */ | |
| 42 | + @ApiModelProperty(value = "生产批号") | |
| 43 | + @NotBlank(message = "生产批号不能为空!") | |
| 44 | + private String yieldBatchNo; | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 件数 | |
| 48 | + */ | |
| 49 | + @ApiModelProperty(value = "件数") | |
| 50 | + @NotNull(message = "件数不能为空!") | |
| 51 | + @TypeMismatch(message = "件数格式有误!") | |
| 52 | + private Double num; | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 需发数量 | |
| 56 | + */ | |
| 57 | + @ApiModelProperty(value = "需发数量") | |
| 58 | + @NotNull(message = "需发数量不能为空!") | |
| 59 | + @TypeMismatch(message = "需发数量格式有误!") | |
| 60 | + private Double quantity; | |
| 61 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/shipments/order/ShipmentsOrderVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.shipments.order; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +import javax.validation.Valid; | |
| 8 | +import javax.validation.constraints.NotBlank; | |
| 9 | +import javax.validation.constraints.NotEmpty; | |
| 10 | +import java.io.Serializable; | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | +@Data | |
| 14 | +public class ShipmentsOrderVo implements BaseVo, Serializable { | |
| 15 | + | |
| 16 | + private static final long serialVersionUID = 1L; | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * ID | |
| 20 | + */ | |
| 21 | + @ApiModelProperty(value = "ID", required = true) | |
| 22 | + @NotBlank(message = "id不能为空!") | |
| 23 | + private String id; | |
| 24 | + | |
| 25 | + | |
| 26 | + @ApiModelProperty(value = "发货单明细") | |
| 27 | + @NotEmpty(message = "发货单明细不能为空!") | |
| 28 | + @Valid | |
| 29 | + private List<ShipmentsOrderDetailVo> detailList; | |
| 30 | +} | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/shipments/order/SignInTicketVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.shipments.order; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +import javax.validation.constraints.NotBlank; | |
| 8 | +import java.io.Serializable; | |
| 9 | + | |
| 10 | +@Data | |
| 11 | +public class SignInTicketVo implements BaseVo, Serializable { | |
| 12 | + | |
| 13 | + private static final long serialVersionUID = 1L; | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 发货单ID | |
| 17 | + */ | |
| 18 | + @ApiModelProperty(value = "发货单ID", required = true) | |
| 19 | + @NotBlank(message = "发货单ID不能为空!") | |
| 20 | + private String shipmentsOrderId; | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 文件ID | |
| 24 | + */ | |
| 25 | + @ApiModelProperty(value = "订货单ID", required = true) | |
| 26 | + @NotBlank(message = "文件ID不能为空!") | |
| 27 | + private String fileId; | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 文件名称 | |
| 31 | + */ | |
| 32 | + @ApiModelProperty(value = "需发数量") | |
| 33 | + private String fileName; | |
| 34 | +} | ... | ... |
| ... | ... | @@ -23,13 +23,13 @@ public class UpdateShipmentsPlanDetailVo implements BaseVo, Serializable { |
| 23 | 23 | /** |
| 24 | 24 | * 发货时间点 |
| 25 | 25 | */ |
| 26 | - @ApiModelProperty(value = "发货时间点", required = true) | |
| 26 | + @ApiModelProperty(value = "发货时间点") | |
| 27 | 27 | private String shipmentsTime; |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * 是否可以发货 |
| 31 | 31 | */ |
| 32 | - @ApiModelProperty(value = "是否可以发货", required = true) | |
| 32 | + @ApiModelProperty(value = "是否可以发货") | |
| 33 | 33 | @TypeMismatch(message = "是否可以发货格式有误!") |
| 34 | 34 | private Boolean canShipments; |
| 35 | 35 | ... | ... |
| ... | ... | @@ -166,9 +166,11 @@ |
| 166 | 166 | o.ordering_unit AS customer_id, |
| 167 | 167 | o.delivery_method, |
| 168 | 168 | o.settlement_terms, |
| 169 | + o.packaging_fee, | |
| 169 | 170 | sc.type as contract_type, |
| 170 | 171 | c.name AS customer_name, |
| 171 | 172 | tb.order_spec_id, |
| 173 | + ol.brand, | |
| 172 | 174 | ol.thickness, |
| 173 | 175 | ol.thickness_tol_pos, |
| 174 | 176 | ol.thickness_tol_neg, |
| ... | ... | @@ -179,11 +181,15 @@ |
| 179 | 181 | ol.length_tol_pos, |
| 180 | 182 | ol.length_tol_neg, |
| 181 | 183 | ol.quantity, |
| 184 | + ol.sales_price, | |
| 182 | 185 | tb.parent_id, |
| 183 | 186 | tb.status, |
| 184 | 187 | tb.shipments_date, |
| 185 | 188 | tb.shipments_time, |
| 186 | 189 | tb.can_shipments, |
| 190 | + tb.actual_shipment_quantity, | |
| 191 | + tb.num, | |
| 192 | + tb.yield_batch_no, | |
| 187 | 193 | tb.del_flag, |
| 188 | 194 | tb.create_by_id, |
| 189 | 195 | tb.update_by_id, | ... | ... |