|
|
@ -13,9 +13,11 @@ import com.ruoyi.common.exception.BusinessException; |
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
import com.ruoyi.common.utils.ShiroUtils; |
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.ruoyi.system.domain.SysSalesOrder; |
|
|
|
import com.ruoyi.system.domain.SysSalesOrderChild; |
|
|
|
import com.ruoyi.system.domain.SysSalesShippingInform; |
|
|
|
import com.ruoyi.system.mapper.SysSalesOrderChildMapper; |
|
|
|
import com.ruoyi.system.mapper.SysSalesOrderMapper; |
|
|
|
import com.ruoyi.system.mapper.SysSalesShippingInformMapper; |
|
|
|
import com.ruoyi.warehouse.domain.WarehouseOutOrder; |
|
|
|
import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; |
|
|
@ -53,6 +55,9 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu |
|
|
|
@Autowired |
|
|
|
private SysSalesShippingInformMapper shippingInformMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SysSalesOrderMapper sysSalesOrderMapper; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询出库单 |
|
|
|
* |
|
|
@ -376,6 +381,51 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 确认收货 |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
public int confirmReceivingGoodsById(Long outOrderId) { |
|
|
|
|
|
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
|
WarehouseOutOrder warehouseOutOrder = warehouseOutOrderMapper.selectWarehouseOutOrderById(outOrderId); |
|
|
|
if (warehouseOutOrder == null){ |
|
|
|
log.warn("出库单Id为空:{}",outOrderId); |
|
|
|
} |
|
|
|
String outOrderCode = warehouseOutOrder.getOutOrderCode(); |
|
|
|
SysSalesShippingInform sysSalesShippingInform = new SysSalesShippingInform(); |
|
|
|
sysSalesShippingInform.setOutOrderCode(outOrderCode); |
|
|
|
sysSalesShippingInform.setWarehouseOutStatus("10"); |
|
|
|
sysSalesShippingInform.setUpdateTime(new Date()); |
|
|
|
sysSalesShippingInform.setUpdateBy(loginName); |
|
|
|
|
|
|
|
int updateSalesShippingInformResult = shippingInformMapper.updateSysSalesShippingInformByOutOrderCode(sysSalesShippingInform); |
|
|
|
if (updateSalesShippingInformResult <= 0){ |
|
|
|
throw new BusinessException("更新销售出库数据失败"); |
|
|
|
} |
|
|
|
|
|
|
|
String salesOrderCode = warehouseOutOrder.getSalesOrderCode(); |
|
|
|
if (StringUtils.isEmpty(salesOrderCode)){ |
|
|
|
log.warn("销售订单号为空:{}",salesOrderCode); |
|
|
|
} |
|
|
|
SysSalesOrder sysSalesOrder = new SysSalesOrder(); |
|
|
|
sysSalesOrder.setSalesOrderCode(salesOrderCode); |
|
|
|
//设置为全部出货
|
|
|
|
sysSalesOrder.setDeliveryStatus("6"); |
|
|
|
sysSalesOrder.setUpdateTime(new Date()); |
|
|
|
sysSalesOrder.setUpdateBy(loginName); |
|
|
|
int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); |
|
|
|
if (updateSysSalesOrderResult <= 0){ |
|
|
|
throw new BusinessException("更新销售订单数据失败"); |
|
|
|
} |
|
|
|
warehouseOutOrder.setUpdateTime(new Date()); |
|
|
|
warehouseOutOrder.setUpdateBy(loginName); |
|
|
|
//设置为待验收
|
|
|
|
warehouseOutOrder.setWarehouseOutStatus("10"); |
|
|
|
return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
* 售后第一次维护设备信息根据设备ID删除出货设备信息 |
|
|
|
* */ |
|
|
|