维他奶退货功能;
This commit is contained in:
+2
@@ -23,6 +23,8 @@ public class ReservationDeliveryDetailsLink extends BaseVOEntity {
|
||||
private Long orderId;
|
||||
@ApiModelProperty(value = "业务单号")
|
||||
private String orderNumber;
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty(value = "类别")
|
||||
private String category;
|
||||
|
||||
|
||||
+15
@@ -463,4 +463,19 @@ public class ReservationStockOutOrder extends BaseVOEntity {
|
||||
@ApiModelProperty("路线")
|
||||
private String route;
|
||||
|
||||
@ApiModelProperty(value = "发票编号")
|
||||
private String invoiceNumber;
|
||||
|
||||
@ApiModelProperty(value = "客户编号")
|
||||
private String customerNumber;
|
||||
|
||||
@ApiModelProperty(value = "配送名称")
|
||||
private String deliveryName;
|
||||
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal returnQuantity;
|
||||
|
||||
}
|
||||
+16
@@ -475,5 +475,21 @@ public class ReservationStockOutOrderPO extends BaseVOEntity {
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("路线")
|
||||
private String route;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "发票编号")
|
||||
private String invoiceNumber;
|
||||
|
||||
@ApiModelProperty(value = "客户编号")
|
||||
private String customerNumber;
|
||||
|
||||
@ApiModelProperty(value = "配送名称")
|
||||
private String deliveryName;
|
||||
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal returnQuantity;
|
||||
private List<ReservationDeliveryDetailsLink> reservationDeliveryDetailsLinkList;
|
||||
}
|
||||
+16
@@ -510,4 +510,20 @@ public class ReservationStockOutOrderDO extends BaseVOEntity {
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("路线")
|
||||
private String route;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "发票编号")
|
||||
private String invoiceNumber;
|
||||
|
||||
@ApiModelProperty(value = "客户编号")
|
||||
private String customerNumber;
|
||||
|
||||
@ApiModelProperty(value = "配送名称")
|
||||
private String deliveryName;
|
||||
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal returnQuantity;
|
||||
}
|
||||
+16
@@ -498,4 +498,20 @@ public class ReservationStockOutOrderDTO extends ReservationStockOutOrderBaseDTO
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("路线")
|
||||
private String route;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "发票编号")
|
||||
private String invoiceNumber;
|
||||
|
||||
@ApiModelProperty(value = "客户编号")
|
||||
private String customerNumber;
|
||||
|
||||
@ApiModelProperty(value = "配送名称")
|
||||
private String deliveryName;
|
||||
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal returnQuantity;
|
||||
}
|
||||
+4
@@ -1229,4 +1229,8 @@ public class ReservationStockOutOrderApplicationService {
|
||||
}
|
||||
reservationStockOutOrderMapper.updateById(entity);
|
||||
}
|
||||
|
||||
public void returnGoods(String invoiceNumber) {
|
||||
stockOutOrderDomainService.returnGoods(invoiceNumber);
|
||||
}
|
||||
}
|
||||
+51
-34
@@ -12,8 +12,12 @@ import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.businessDeliveryDetailsLink.entity.BusinessDeliveryDetailsLink;
|
||||
import com.mhd.oms.domain.businessDeliveryDetailsLink.repository.facade.IBusinessDeliveryDetailsLinkService;
|
||||
import com.mhd.oms.domain.businessDocumentOrder.entity.BusinessDocumentOrder;
|
||||
import com.mhd.oms.domain.businessDocumentOrder.repository.mapper.BusinessDocumentOrderMapper;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.entity.ReservationDeliveryDetailsLink;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.repository.facade.IReservationDeliveryDetailsLinkService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.entity.ReservationOutMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.facade.IReservationOutMaterialDetailService;
|
||||
@@ -64,48 +68,16 @@ public class ReservationStockOutOrderDomainService {
|
||||
private IReservationOutMaterialDetailService outMaterialDetailService;
|
||||
@Autowired
|
||||
private IReservationStockInOrderService reservationStockInOrderService;
|
||||
// @Autowired
|
||||
// private IHandoverTaskOrderService handoverTaskOrderService;
|
||||
// @Autowired
|
||||
// private IOutOrderAbnormalService outOrderAbnormalService;
|
||||
// @Autowired
|
||||
// private PickingOrderDomainService pickingOrderDomainService;
|
||||
// @Autowired
|
||||
// private ReplenishmentNoticeDomainService replenishmentNoticeDomainService;
|
||||
// @Autowired
|
||||
// private IMobilizeManageService iMobilizeManageService;
|
||||
// @Autowired
|
||||
// private IMobilizeManageDetailService iMobilizeManageDetailService;
|
||||
// @Autowired
|
||||
// private StockInOrderDomainService stockInOrderDomainService;
|
||||
// @Autowired
|
||||
// private IInventoryStandingDetailService inventoryStandingDetailService;
|
||||
// @Autowired
|
||||
// private IDeliveTaskService deliveTaskService;
|
||||
// @Autowired
|
||||
// private WaveOrderServiceFactory waveOrderServiceFactory;
|
||||
// @Autowired
|
||||
// private IMaterialBaseInfoService materialBaseInfoService;
|
||||
@Autowired
|
||||
private ReservationStockInOrderMapper reservationStockInOrderMapper;
|
||||
@Autowired
|
||||
private BusinessDocumentOrderMapper businessDocumentOrderMapper;
|
||||
// @Autowired
|
||||
// private IMaterialWarehouseControlService materialWarehouseControlService;
|
||||
// @Autowired
|
||||
// private IMaterialInventoryService materialInventoryService;
|
||||
@Resource
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Resource
|
||||
private WmsServiceFeign wmsServiceFeign;
|
||||
// @Autowired
|
||||
// private PushSyncBmsDomainService pushSyncBmsDomainService;
|
||||
// @Autowired
|
||||
// private MaterialBaseInfoMapper materialBaseInfoMapper;
|
||||
// @Autowired
|
||||
// private MaterialInventoryMapper materialInventoryMapper;
|
||||
// @Autowired
|
||||
// private IPickingMaterialDetailService pickingMaterialDetailService;
|
||||
@Autowired
|
||||
private IReservationDeliveryDetailsLinkService reservationDeliveryDetailsLinkService;
|
||||
|
||||
/**
|
||||
* 分页查询出库单列表
|
||||
@@ -707,4 +679,49 @@ public class ReservationStockOutOrderDomainService {
|
||||
return stockOutOrderService.queryOutStockNoticePrintDetail(stockOutOrderDO);
|
||||
}
|
||||
|
||||
public void returnGoods(String invoiceNumber) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<ReservationDeliveryDetailsLink> list = reservationDeliveryDetailsLinkService.list(new QueryWrapper<ReservationDeliveryDetailsLink>().lambda().eq(ReservationDeliveryDetailsLink::getInvoiceNumber, invoiceNumber));
|
||||
if (list != null && !list.isEmpty() && list.size()==1) {
|
||||
ReservationDeliveryDetailsLink reservationDeliveryDetailsLink = list.get(0);
|
||||
String orderNumber = reservationDeliveryDetailsLink.getOrderNumber();
|
||||
Integer bag = reservationDeliveryDetailsLink.getBag();
|
||||
ReservationStockOutOrder stockOutOrder = stockOutOrderService.getOne(new QueryWrapper<ReservationStockOutOrder>().lambda().eq(ReservationStockOutOrder::getOutOrderNumber, orderNumber), false);
|
||||
if (stockOutOrder != null) {
|
||||
ReservationStockInOrder reservationStockInOrder = new ReservationStockInOrder();
|
||||
reservationStockInOrder.setOrganizationId(stockOutOrder.getOrganizationId());
|
||||
reservationStockInOrder.setOrganizationName(stockOutOrder.getOrganizationName());
|
||||
reservationStockInOrder.setTopOrganizationId(stockOutOrder.getTopOrganizationId());
|
||||
reservationStockInOrder.setShipperId(stockOutOrder.getShipperId());
|
||||
reservationStockInOrder.setShipperName(stockOutOrder.getShipperName());
|
||||
reservationStockInOrder.setShipperCode(stockOutOrder.getShipperCode());
|
||||
reservationStockInOrder.setBusinessOrderNo(stockOutOrder.getOutOrderNumber());
|
||||
reservationStockInOrder.setIssueStatus(0);
|
||||
reservationStockInOrder.setCreateTime(new Date());
|
||||
reservationStockInOrder.setCreateBy(loginUser.getUserPo().getUserId());
|
||||
reservationStockInOrder.setCreateByName(loginUser.getUserPo().getUserName());
|
||||
reservationStockInOrder.setStatus(1);
|
||||
reservationStockInOrder.setAuditStatus(1);
|
||||
reservationStockInOrder.setOrderTypeName("退货入库");
|
||||
reservationStockInOrder.setOrderTypeCode("tui_huo_ru_ku");
|
||||
reservationStockInOrder.setDirectWarehouse(1);
|
||||
reservationStockInOrder.setCloseOrder(2);
|
||||
reservationStockInOrder.setOrderSource(1);
|
||||
reservationStockInOrder.setOrderStatus("新增");
|
||||
reservationStockInOrder.setSalesmanId(loginUser.getUserPo().getUserId().toString());
|
||||
reservationStockInOrder.setSalesmanName(loginUser.getUserPo().getUserName());
|
||||
reservationStockInOrder.setInOrderNumber("退"+stockOutOrder.getOutOrderNumber());
|
||||
reservationStockInOrderMapper.insert(reservationStockInOrder);
|
||||
reservationDeliveryDetailsLink.setReturnOrderNumber(reservationStockInOrder.getInOrderNumber());
|
||||
reservationDeliveryDetailsLinkService.updateById(reservationDeliveryDetailsLink);
|
||||
stockOutOrder.setReturnOrderNumber(reservationStockInOrder.getInOrderNumber());
|
||||
stockOutOrder.setDeliveryName(reservationDeliveryDetailsLink.getDeliveryName());
|
||||
stockOutOrder.setInvoiceNumber(reservationDeliveryDetailsLink.getInvoiceNumber());
|
||||
stockOutOrder.setCustomerNumber(reservationDeliveryDetailsLink.getCustomerNumber());
|
||||
stockOutOrder.setReturnQuantity(new BigDecimal(bag));
|
||||
stockOutOrderService.updateById(stockOutOrder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -99,6 +99,7 @@ public class SysTableConfigServiceImpl extends ServiceImpl<SysTableConfigMapper,
|
||||
existingConfig.setUpdateTime(new Date());
|
||||
existingConfig.setDetailValue(sysTableConfigDTO.getDetailValue());
|
||||
existingConfig.setMaterialAddType(sysTableConfigDTO.getMaterialAddType());
|
||||
existingConfig.setDeliveryDetail(sysTableConfigDTO.getDeliveryDetail());
|
||||
if (StringUtils.isNotBlank(sysTableConfigDTO.getRemark())) {
|
||||
existingConfig.setRemark(sysTableConfigDTO.getRemark());
|
||||
}
|
||||
|
||||
+11
-22
@@ -129,28 +129,6 @@ public class ReservationStockOutOrderApi extends BaseController {
|
||||
return AjaxResult.success(stockOutOrderApplicationService.getInfoChildren(stockOutOrder.getOutOrderId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核出库单
|
||||
*/
|
||||
// @ApiOperation("审核出库单")
|
||||
// @PostMapping(value = "/auditState")
|
||||
// public AjaxResult auditState(@RequestBody ReservationStockOutOrderDTO stockOutOrderDTO) {
|
||||
// ReservationStockOutOrderDO stockOutOrderDO = stockOutOrderAssembler.toDO(stockOutOrderDTO);
|
||||
// return AjaxResult.success(stockOutOrderApplicationService.auditState(stockOutOrderDO));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取出库单复核详细信息
|
||||
*/
|
||||
// @ApiOperation("获取出库单复核详细信息")
|
||||
// @GetMapping(value = "/getCheckInfo")
|
||||
// public AjaxResult getCheckInfo(ReservationStockOutOrderDTO stockOutOrderDTO)
|
||||
// {
|
||||
// //转换实体
|
||||
// ReservationStockOutOrderDO stockOutOrderDO = stockOutOrderAssembler.toDO(stockOutOrderDTO);
|
||||
// return AjaxResult.success(stockOutOrderApplicationService.getCheckInfo(stockOutOrderDO));
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 审核出库单
|
||||
@@ -221,4 +199,15 @@ public class ReservationStockOutOrderApi extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("退货")
|
||||
@GetMapping("/returnGoods")
|
||||
public AjaxResult returnGoods(@RequestParam("invoiceNumber") String invoiceNumber) {
|
||||
if (invoiceNumber == null || invoiceNumber.trim().isEmpty()) {
|
||||
return AjaxResult.error("发票编号不能为空");
|
||||
}
|
||||
stockOutOrderApplicationService.returnGoods(invoiceNumber);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user