退货修改运到和订单;

This commit is contained in:
王奎兴
2026-05-29 23:40:25 +08:00
parent df1d16a7ab
commit aef39a9555
5 changed files with 23 additions and 6 deletions
@@ -39,4 +39,9 @@ public interface ReservationStockInOrderMapper extends BaseMapper<ReservationSto
List<ReservationStockInOrderPO> queryNoticePrint(ReservationStockInOrderDO stockInOrderDO);
List<ReservationInMaterialDetailPO> queryNoticePrintDetail(ReservationStockInOrderDO stockInOrderDO);}
List<ReservationInMaterialDetailPO> queryNoticePrintDetail(ReservationStockInOrderDO stockInOrderDO);
public void updateByTransportationNumber(@Param("transportationNumber") String transportationNumber);
public void updateByOrderId(@Param("orderId") String orderId);
}
@@ -61,6 +61,7 @@ import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
import java.io.IOException;
@@ -1293,7 +1294,7 @@ public class ReservationStockOutOrderApplicationService {
reservationStockOutOrderMapper.updateById(entity);
}
public void returnGoods(String invoiceNumber) {
stockOutOrderDomainService.returnGoods(invoiceNumber);
public void returnGoods(String invoiceNumber, String transportationNumber, String orderId) {
stockOutOrderDomainService.returnGoods(invoiceNumber, transportationNumber, orderId);
}
}
@@ -727,7 +727,9 @@ public class ReservationStockOutOrderDomainService {
return stockOutOrderService.queryOutStockNoticePrintDetail(stockOutOrderDO);
}
public void returnGoods(String invoiceNumber) {
public void returnGoods(String invoiceNumber, String transportationNumber, String orderId) {
reservationStockInOrderMapper.updateByOrderId(orderId);
reservationStockInOrderMapper.updateByTransportationNumber(transportationNumber);
LoginUser loginUser = SecurityUtils.getLoginUser();
BusinessDeliveryDetailsLink businessDeliveryDetailsLink = businessDeliveryDetailsLinkService.getOne(new QueryWrapper<BusinessDeliveryDetailsLink>().lambda().eq(BusinessDeliveryDetailsLink::getInvoiceNumber, invoiceNumber), false);
if (businessDeliveryDetailsLink != null) {
@@ -202,11 +202,11 @@ public class ReservationStockOutOrderApi extends BaseController {
@ApiOperation("退货")
@GetMapping("/returnGoods")
public AjaxResult returnGoods(@RequestParam("invoiceNumber") String invoiceNumber) {
public AjaxResult returnGoods(@RequestParam("invoiceNumber") String invoiceNumber, @RequestParam("transportationNumber") String transportationNumber, @RequestParam("orderId") String orderId) {
if (invoiceNumber == null || invoiceNumber.trim().isEmpty()) {
return AjaxResult.error("发票编号不能为空");
}
stockOutOrderApplicationService.returnGoods(invoiceNumber);
stockOutOrderApplicationService.returnGoods(invoiceNumber, transportationNumber, orderId);
return AjaxResult.success();
}
@@ -534,4 +534,13 @@
<result property="inboundQuantity" column="inbound_quantity"/>
</resultMap>
<update id="updateByOrderId" parameterType="java.lang.String">
update "NGWL_TEST_WLHY".tms_order set ORDER_STATUS = 9 where ID = #{orderId}
</update>
<update id="updateByTransportationNumber" parameterType="java.lang.String">
update "NGWL_TEST_WLHY".TMS_TRANSPORT_NOTE set WAYBILL_STATUS =11 where TRANSPORTATION_NUMBER = #{transportationNumber}
</update>
</mapper>