| | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITBoxSizeService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | import com.stylefeng.guns.modular.system.service.ITUserService; |
| | | import com.stylefeng.guns.modular.system.utils.UserInfoUtil; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Resource |
| | | private TUserAddressMapper userAddressMapper; |
| | | @Override |
| | | public List<TUserVo> getList(Page<TUserVo> tUserVoPage, String name, Integer id) { |
| | | Integer companyId = UserInfoUtil.getId(); |
| | | public List<TUserVo> getList(Page<TUserVo> tUserVoPage, String name, Integer id,int companyId) { |
| | | List<TUserVo> list = this.baseMapper.getListCompany(tUserVoPage, name, id, companyId); |
| | | for (TUserVo tUserVo : list) { |
| | | List<TUserAddress> addresses = userAddressMapper.selectList(new EntityWrapper<TUserAddress>().eq("user_id", tUserVo.getId()).eq("is_default", 1)); |
| | |
| | | return this.baseMapper.getInvoices(invoicesInfoPage,userId); |
| | | } |
| | | |
| | | @Resource |
| | | private TTransportationService tTransportationService; |
| | | |
| | | @Resource |
| | | private ITPortService portService; |
| | | |
| | | @Resource |
| | | private IWarehouseService warehouseService; |
| | | |
| | | @Override |
| | | public InvoicesVo getInvoicesFromNumber(Long number) { |
| | | // 1先获取订单详情 发货收货信息 |
| | |
| | | // 根据订单id 获取货物信息 |
| | | Long id = info.getId(); |
| | | TOrder tOrder = orderService.selectById(id); |
| | | if(info.getType().equals("Live Unload")){ |
| | | // 还柜码头 |
| | | TTransportation tTransportation = tTransportationService.selectOne(new EntityWrapper<TTransportation>().eq("order_id", id).eq("type", 4)); |
| | | Integer portId = tTransportation.getPortId(); |
| | | TPort tPort = portService.selectById(portId); |
| | | info.setEPortName(tPort.getName()); |
| | | } |
| | | if(!"0".equals(tOrder.getWarehouse())){ |
| | | TWarehouse code = warehouseService.selectList(new EntityWrapper<TWarehouse>().eq("code", tOrder.getWarehouse())).get(0); |
| | | info.setEAddress(code.getAddress()); |
| | | }else { |
| | | info.setEAddress(tOrder.geteAddress()); |
| | | } |
| | | |
| | | |
| | | List<TGoods> orders = tGoodsMapper.selectList(new EntityWrapper<TGoods>().eq("order_id", id)); |
| | | ArrayList<TGoodsVo> tGoodsVos = new ArrayList<>(); |
| | | TCompany tCompany = tCompanyMapper.selectById(info.getCompanyId()); |
| | | List<TBoxSize> tBoxSizes = sizeService.selectList(null); |
| | | for (TGoods order : orders) { |
| | | TGoodsVo tGoodsVo = new TGoodsVo(); |
| | | tGoodsVo.setName(tCompany.getName()); |
| | | tGoodsVo.setSize(order.getSize()); |
| | | tGoodsVo.setKg(order.getKg()); |
| | | String size = order.getSize(); |
| | | for (TBoxSize tBoxSize : tBoxSizes) { |
| | | if(size.equals(tBoxSize.getBoxName())){ |
| | | tGoodsVo.setLength(tBoxSize.getBoxLength()); |
| | | tGoodsVo.setWidth(tBoxSize.getBoxWidth()); |
| | | tGoodsVo.setHeight(tBoxSize.getBoxHigh()); |
| | | } |
| | | } |
| | | String size = order.getType(); |
| | | tGoodsVo.setType(size); |
| | | tGoodsVos.add(tGoodsVo); |
| | | } |
| | | |