1.修复撤回未验收单据后未置空扫码单据关联业务单据号问题

feature-order-fix
x_z 2 years ago
parent f26bce6ece
commit 78a040565f

@ -60,4 +60,12 @@ public interface OrderDetailDao {
* @return
*/
int countByOrderId(@Param("orderId") String orderId);
/**
*
*
* @param orderIdFk ID
* @param erpOrderId
*/
void updateErpOrderId(@Param("orderIdFk") String orderIdFk, @Param("erpOrderId") String erpOrderId);
}

@ -16,6 +16,7 @@ import com.glxp.api.admin.dao.business.StockOrderDao;
import com.glxp.api.admin.dao.business.StockOrderDetailDao;
import com.glxp.api.admin.dao.inout.CodesDao;
import com.glxp.api.admin.dao.inout.OrderDao;
import com.glxp.api.admin.dao.inout.OrderDetailDao;
import com.glxp.api.admin.dao.inventory.InvPreInProductDao;
import com.glxp.api.admin.dao.inventory.InvPreInProductDetailDao;
import com.glxp.api.admin.dao.inventory.InvProductDao;
@ -92,6 +93,8 @@ public class StockOrderServiceImpl implements StockOrderService {
@Resource
BussinessTypeService bussinessTypeService;
@Resource
private OrderDetailDao orderDetailDao;
@Override
@ -319,19 +322,16 @@ public class StockOrderServiceImpl implements StockOrderService {
orderEntity.setErpFk("");
stockOrderDao.updateById(stockOrderEntity);
orderDao.updateOrder(orderEntity);
//置空扫码单据详情关联的业务单据号
orderDetailDao.updateErpOrderId(orderEntity.getId(), null);
} else {
orderEntity.setErpFk("");
stockOrderDao.deleteById(stockOrderEntity.getId());
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
orderDao.updateOrder(orderEntity);
List<WarehouseEntity> warehouseEntityList = codesDao.findByReceiptId(orderEntity.getId());
if (CollUtil.isNotEmpty(warehouseEntityList)) {
codesTempService.insertCodesTemp(warehouseEntityList);
codesDao.deleteByOrderId(orderEntity.getId());
}
//置空扫码单据详情关联的业务单据号
orderDetailDao.updateErpOrderId(orderEntity.getId(), null);
}
} else {
//回退已完成单据
@ -460,7 +460,6 @@ public class StockOrderServiceImpl implements StockOrderService {
}
}
}
}
//更新业务单据数据

@ -272,4 +272,9 @@
where orderIdFk = #{orderId}
</select>
<update id="updateErpOrderId">
update io_order_detail
set erpOrderId = #{erpOrderId}
where orderIdFk = #{orderIdFk}
</update>
</mapper>
Loading…
Cancel
Save