Browse Source

物流公司增删改,及其他BUG修改。

dev
wangfukang 2 years ago
parent
commit
672e83647b
  1. 16
      hiver-admin/test-output/test-report.html
  2. 114
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/controller/LogisticsCompanyRouteController.java
  3. 36
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/entity/LogisticsCompanyRoute.java
  4. 26
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/mapper/LogisticsCompanyRouteMapper.java
  5. 23
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/service/LogisticsCompanyRouteService.java
  6. 38
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/service/impl/LogisticsCompanyRouteServiceImpl.java
  7. 29
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/vo/LogisticsCompanyRouteQueryVo.java
  8. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/entity/LogisticsOrder.java
  9. 6
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/impl/LogisticsOrderServiceImpl.java
  10. 45
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/vo/LogisticsOrderQueryVo.java
  11. 21
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/controller/LogisticsStationController.java
  12. 12
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/mapper/LogisticsStationMapper.java
  13. 12
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/LogisticsStationService.java
  14. 15
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/impl/LogisticsStationServiceImpl.java
  15. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/vo/LogisticsStationQueryVo.java
  16. 2
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/entity/LogisticsUser.java
  17. 6
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/utils/AliOcrUtil.java
  18. 187
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsCompanyRouteMapper.xml
  19. 33
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsOrderMapper.xml
  20. 11
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsStationMapper.xml

16
hiver-admin/test-output/test-report.html

@ -35,7 +35,7 @@
<a href="#"><span class="badge badge-primary">Hiver</span></a>
</li>
<li class="m-r-10">
<a href="#"><span class="badge badge-primary">八月 28, 2024 10:01:13</span></a>
<a href="#"><span class="badge badge-primary">八月 31, 2024 18:53:32</span></a>
</li>
</ul>
</div>
@ -84,7 +84,7 @@
<div class="test-detail">
<span class="meta text-white badge badge-sm"></span>
<p class="name">passTest</p>
<p class="text-sm"><span>10:01:14 上</span> / <span>0.016 secs</span></p>
<p class="text-sm"><span>18:53:32 下</span> / <span>0.02 secs</span></p>
</div>
<div class="test-contents d-none">
<div class="detail-head">
@ -92,9 +92,9 @@
<div class="info">
<div class='float-right'><span class='badge badge-default'>#test-id=1</span></div>
<h5 class="test-status text-pass">passTest</h5>
<span class='badge badge-success'>08.28.2024 10:01:14</span>
<span class='badge badge-danger'>08.28.2024 10:01:14</span>
<span class='badge badge-default'>0.016 secs</span>
<span class='badge badge-success'>08.31.2024 18:53:32</span>
<span class='badge badge-danger'>08.31.2024 18:53:32</span>
<span class='badge badge-default'>0.02 secs</span>
</div>
<div class="m-t-10 m-l-5"></div>
</div>
@ -104,7 +104,7 @@
<tbody>
<tr class="event-row">
<td><span class="badge log pass-bg">Pass</span></td>
<td>10:01:14</td>
<td>18:53:32</td>
<td>
Test passed
</td>
@ -128,13 +128,13 @@
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Started</p>
<h3>八月 28, 2024 10:01:13</h3>
<h3>八月 31, 2024 18:53:32</h3>
</div></div>
</div>
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Ended</p>
<h3>八月 28, 2024 10:01:14</h3>
<h3>八月 31, 2024 18:53:32</h3>
</div></div>
</div>
<div class="col-md-3">

114
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/controller/LogisticsCompanyRouteController.java

@ -0,0 +1,114 @@
package cc.hiver.mall.logisticscompanyroute.controller;
import cc.hiver.core.common.utils.ResultUtil;
import cc.hiver.core.common.vo.Result;
import cc.hiver.mall.logisticscompanyroute.entity.LogisticsCompanyRoute;
import cc.hiver.mall.logisticscompanyroute.service.LogisticsCompanyRouteService;
import cc.hiver.mall.logisticscompanyroute.vo.LogisticsCompanyRouteQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 物流公司线路控制器
*
* @author 王富康
* @date 2024/8/24
*/
@Slf4j
@RestController
@Api(tags = "物流公司线路关联接口")
@RequestMapping("/hiver/app/logisticsCompanyRoute/")
@Transactional
public class LogisticsCompanyRouteController {
@Autowired
private LogisticsCompanyRouteService logisticsCompanyRouteService;
@PostMapping(value = "/addLogisticsCompanyRoute")
@ApiOperation("新增物流公司线路关联")
public Result addLogisticsCompanyRoute(@RequestBody LogisticsCompanyRoute logisticsCompanyRoute) {
final boolean b = logisticsCompanyRouteService.saveOrUpdate(logisticsCompanyRoute);
if (b) {
return ResultUtil.success("保存成功!");
} else {
return ResultUtil.error("保存失败!");
}
}
/**
* 更新物流公司线路关联
*
* @param logisticsCompanyRoute
* @return Result
* @author 王富康
* @date 2024/8/24
*/
@PostMapping(value = "/updateLogisticsCompanyRoute")
@ApiOperation("更新物流公司线路关联")
public Result updateLogisticsCompanyRoute(@RequestBody LogisticsCompanyRoute logisticsCompanyRoute) {
if (StringUtils.isEmpty(logisticsCompanyRoute.getId())) {
return ResultUtil.error("公司线路关联id不能为空!");
}
final boolean b = logisticsCompanyRouteService.saveOrUpdate(logisticsCompanyRoute);
if (b) {
return ResultUtil.success("保存成功!");
} else {
return ResultUtil.error("保存失败!");
}
}
/**
* 删除物流公司线路关联
*
* @param id
* @return Result
* @author 王富康
* @date 2024/8/24
*/
@PostMapping(value = "/deleteLogisticsCompanyRoute")
@ApiOperation("删除物流公司线路关联")
public Result deleteLogisticsCompanyRoute(String id) {
if (StringUtils.isEmpty(id)) {
return ResultUtil.error("公司线路关联id不能为空!");
}
final boolean b = logisticsCompanyRouteService.removeById(id);
if (b) {
return ResultUtil.success("删除成功!");
} else {
return ResultUtil.error("删除失败!");
}
}
/**
* 分页查询物流公司线路关联
*
* @param logisticsCompanyRouteQueryVo
* @return Result<IPage < LogisticsCompanyRoute>>
* @author 王富康
* @date 2024/8/24
*/
@RequestMapping(value = "/getLogisticsCompanyRoutePageList", method = RequestMethod.POST)
@ApiOperation(value = "分页查询物流公司线路关联")
public Result<IPage<LogisticsCompanyRoute>> getLogisticsCompanyRoutePageList(@RequestBody(required = false) LogisticsCompanyRouteQueryVo logisticsCompanyRouteQueryVo) {
final IPage<LogisticsCompanyRoute> result = logisticsCompanyRouteService.getLogisticsCompanyRoutePageList(logisticsCompanyRouteQueryVo);
return new ResultUtil<IPage<LogisticsCompanyRoute>>().setData(result);
}
// 根据公司id查询所有关联的线路信息(不分页)
@RequestMapping(value = "/getLogisticsCompanyRouteListByCompanyId", method = RequestMethod.POST)
@ApiOperation(value = "根据公司id查询所有关联的线路信息(不分页)")
public Result<List<LogisticsCompanyRoute>> getLogisticsCompanyRouteListByCompanyId(@RequestBody(required = false) LogisticsCompanyRouteQueryVo logisticsCompanyRouteQueryVo) {
final List<LogisticsCompanyRoute> result = logisticsCompanyRouteService.getLogisticsCompanyRouteListByCompanyId(logisticsCompanyRouteQueryVo);
return new ResultUtil<List<LogisticsCompanyRoute>>().setData(result);
}
}

36
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/entity/LogisticsCompanyRoute.java

@ -0,0 +1,36 @@
package cc.hiver.mall.logisticscompanyroute.entity;
import cc.hiver.core.base.HiverBaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 物流线路实体
*
* @author 王富康
* @date 2024/8/24
*/
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "物流线路关联表")
@TableName(value = "t_logistics_company_route", autoResultMap = true)
public class LogisticsCompanyRoute extends HiverBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "物流公司id")
private String companyId;
@ApiModelProperty(value = "物流公司名称")
private String companyName;
@ApiModelProperty(value = "线路id")
private String circuitId;
@ApiModelProperty(value = "线路名称")
private String circuitName;
}

26
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/mapper/LogisticsCompanyRouteMapper.java

@ -0,0 +1,26 @@
package cc.hiver.mall.logisticscompanyroute.mapper;
import cc.hiver.mall.logisticscompanyroute.entity.LogisticsCompanyRoute;
import cc.hiver.mall.logisticscompanyroute.vo.LogisticsCompanyRouteQueryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface LogisticsCompanyRouteMapper extends BaseMapper<LogisticsCompanyRoute> {
/**
* 分页查询物流线路
*
* @param page
* @param logisticsCompanyRouteQueryVo
* @return IPage<LogisticsCompanyRoute>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsCompanyRoute> getLogisticsCompanyRoutePageList(Page<LogisticsCompanyRoute> page, @Param("queryParams") LogisticsCompanyRouteQueryVo logisticsCompanyRouteQueryVo);
List<LogisticsCompanyRoute> getLogisticsCompanyRouteListByCompanyId(@Param("queryParams")LogisticsCompanyRouteQueryVo logisticsCompanyRouteQueryVo);
}

23
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/service/LogisticsCompanyRouteService.java

@ -0,0 +1,23 @@
package cc.hiver.mall.logisticscompanyroute.service;
import cc.hiver.mall.logisticscompanyroute.entity.LogisticsCompanyRoute;
import cc.hiver.mall.logisticscompanyroute.vo.LogisticsCompanyRouteQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
public interface LogisticsCompanyRouteService extends IService<LogisticsCompanyRoute> {
/**
* 分页查询物流线路
*
* @param logisticsCompanyRouteQueryVo
* @return IPage<LogisticsCompanyRoute>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsCompanyRoute> getLogisticsCompanyRoutePageList(LogisticsCompanyRouteQueryVo logisticsCompanyRouteQueryVo);
List<LogisticsCompanyRoute> getLogisticsCompanyRouteListByCompanyId(LogisticsCompanyRouteQueryVo logisticsCompanyRouteQueryVo);
}

38
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/service/impl/LogisticsCompanyRouteServiceImpl.java

@ -0,0 +1,38 @@
package cc.hiver.mall.logisticscompanyroute.service.impl;
import cc.hiver.mall.logisticscompanyroute.entity.LogisticsCompanyRoute;
import cc.hiver.mall.logisticscompanyroute.mapper.LogisticsCompanyRouteMapper;
import cc.hiver.mall.logisticscompanyroute.service.LogisticsCompanyRouteService;
import cc.hiver.mall.logisticscompanyroute.vo.LogisticsCompanyRouteQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class LogisticsCompanyRouteServiceImpl extends ServiceImpl<LogisticsCompanyRouteMapper, LogisticsCompanyRoute> implements LogisticsCompanyRouteService {
@Autowired
private LogisticsCompanyRouteMapper logisticsCompanyRouteMapper;
/**
* 分页查询物流线路
* @author 王富康
* @date 2024/8/24
* @param logisticsCompanyRouteQueryVo
* @return IPage<LogisticsCompanyRoute>
*/
@Override
public IPage<LogisticsCompanyRoute> getLogisticsCompanyRoutePageList(LogisticsCompanyRouteQueryVo logisticsCompanyRouteQueryVo) {
final Page<LogisticsCompanyRoute> page = new Page<>(logisticsCompanyRouteQueryVo.getPageNum(), logisticsCompanyRouteQueryVo.getPageSize());
return logisticsCompanyRouteMapper.getLogisticsCompanyRoutePageList(page, logisticsCompanyRouteQueryVo);
}
@Override
public List<LogisticsCompanyRoute> getLogisticsCompanyRouteListByCompanyId(LogisticsCompanyRouteQueryVo logisticsCompanyRouteQueryVo) {
return logisticsCompanyRouteMapper.getLogisticsCompanyRouteListByCompanyId(logisticsCompanyRouteQueryVo);
}
}

29
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticscompanyroute/vo/LogisticsCompanyRouteQueryVo.java

@ -0,0 +1,29 @@
package cc.hiver.mall.logisticscompanyroute.vo;
import cc.hiver.core.base.HiverBasePageQuery;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 物流线路关联查询条件
*
* @author 王富康
* @date 2024/8/24
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class LogisticsCompanyRouteQueryVo extends HiverBasePageQuery {
@ApiModelProperty(value = "物流公司id")
private String companyId;
@ApiModelProperty(value = "物流公司名称")
private String companyName;
@ApiModelProperty(value = "线路id")
private String circuitId;
@ApiModelProperty(value = "线路名称")
private String circuitName;
}

3
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/entity/LogisticsOrder.java

@ -107,5 +107,8 @@ public class LogisticsOrder extends HiverBaseEntity {
@ApiModelProperty(value = "收货站人姓名")
private String receivingUserName;
@ApiModelProperty(value = "图片路径")
private String imagePath;
}

6
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/impl/LogisticsOrderServiceImpl.java

@ -4,9 +4,11 @@ import cc.hiver.mall.logisticsorder.entity.LogisticsOrder;
import cc.hiver.mall.logisticsorder.mapper.LogisticsOrderMapper;
import cc.hiver.mall.logisticsorder.service.LogisticsOrderService;
import cc.hiver.mall.logisticsorder.vo.LogisticsOrderQueryVo;
import cc.hiver.mall.utils.DateUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -26,6 +28,10 @@ public class LogisticsOrderServiceImpl extends ServiceImpl<LogisticsOrderMapper,
*/
@Override
public IPage<LogisticsOrder> getLogisticsOrderPageList(LogisticsOrderQueryVo logisticsOrderQueryVo) {
// 如果按照时间范围查询,结束时间加1天
if(StringUtils.isNotEmpty(logisticsOrderQueryVo.getEndDate())){
logisticsOrderQueryVo.setEndDate(DateUtil.addDay(logisticsOrderQueryVo.getEndDate(), 1));
}
final Page<LogisticsOrder> page = new Page<>(logisticsOrderQueryVo.getPageNum(), logisticsOrderQueryVo.getPageSize());
return logisticsOrderMapper.getLogisticsOrderPageList(page, logisticsOrderQueryVo);
}

45
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/vo/LogisticsOrderQueryVo.java

@ -15,11 +15,17 @@ import lombok.EqualsAndHashCode;
@Data
public class LogisticsOrderQueryVo extends HiverBasePageQuery {
@ApiModelProperty(value = "物流公司名称")
private String companyName;
@ApiModelProperty(value = "物流公司id")
private String companyId;
@ApiModelProperty(value = "线路名称")
private String circuitName;
@ApiModelProperty(value = "线路id")
private String circuitId;
@ApiModelProperty(value = "出发站id")
private String goStationId;
@ApiModelProperty(value = "到达站id")
private String arrivalStationId;
@ApiModelProperty(value = "发货人名称")
private String shipperName;
@ -27,11 +33,38 @@ public class LogisticsOrderQueryVo extends HiverBasePageQuery {
@ApiModelProperty(value = "发货人联系方式")
private String shipperMobile;
@ApiModelProperty(value = "收货人名称")
private String receiverName;
@ApiModelProperty(value = "收货人联系方式")
private String receiverMobile;
@ApiModelProperty(value = "物流公司名称")
private String companyName;
@ApiModelProperty(value = "线路名称")
private String circuitName;
@ApiModelProperty(value = "发货地址")
private String shipperAddress;
@ApiModelProperty(value = "收货人名称")
private String receiverName;
@ApiModelProperty(value = "收货地址")
private String receiverAddress;
@ApiModelProperty(value = "出发站名称")
private String goStationName;
@ApiModelProperty(value = "到达站名称")
private String arrivalStationName;
@ApiModelProperty(value = "票号")
private String orderNumber;
@ApiModelProperty(value = "物体名称")
private String objectName;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "开始时间")
private String startDate;

21
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/controller/LogisticsStationController.java

@ -9,10 +9,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 物流站点控制器
*
@ -103,4 +106,22 @@ public class LogisticsStationController {
final IPage<LogisticsStation> result = logisticsStationService.getLogisticsStationPageList(logisticsRouteQueryVo);
return new ResultUtil<IPage<LogisticsStation>>().setData(result);
}
/**
* 根据物流公司id查询所有站点信息
*
* @param logisticsRouteQueryVo
* @return Result<List < LogisticsStation>>
* @author 王富康
* @date 2024/8/28
*/
@RequestMapping(value = "/getLogisticsStationListByCompanyId", method = RequestMethod.POST)
@ApiOperation(value = "根据物流公司id查询所有站点信息")
public Result<List<LogisticsStation>> getLogisticsStationListByCompanyId(@RequestBody(required = false) LogisticsStationQueryVo logisticsRouteQueryVo) {
if (StringUtils.isEmpty(logisticsRouteQueryVo.getCompanyId())) {
return ResultUtil.error("物流公司信息不能为空!");
}
final List<LogisticsStation> result = logisticsStationService.getLogisticsStationListByCompanyId(logisticsRouteQueryVo);
return new ResultUtil<List<LogisticsStation>>().setData(result);
}
}

12
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/mapper/LogisticsStationMapper.java

@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface LogisticsStationMapper extends BaseMapper<LogisticsStation> {
/**
@ -19,4 +21,14 @@ public interface LogisticsStationMapper extends BaseMapper<LogisticsStation> {
* @date 2024/8/24
*/
IPage<LogisticsStation> getLogisticsStationPageList(Page<LogisticsStation> page, @Param("queryParams") LogisticsStationQueryVo logisticsRouteQueryVo);
/**
* 根据物流公司id查询所有站点信息
*
* @param logisticsRouteQueryVo
* @return List<LogisticsStation>
* @author 王富康
* @date 2024/8/28
*/
List<LogisticsStation> getLogisticsStationListByCompanyId(@Param("queryParams") LogisticsStationQueryVo logisticsRouteQueryVo);
}

12
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/LogisticsStationService.java

@ -5,6 +5,8 @@ import cc.hiver.mall.logisticsstation.vo.LogisticsStationQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
public interface LogisticsStationService extends IService<LogisticsStation> {
/**
@ -16,4 +18,14 @@ public interface LogisticsStationService extends IService<LogisticsStation> {
* @date 2024/8/24
*/
IPage<LogisticsStation> getLogisticsStationPageList(LogisticsStationQueryVo logisticsRouteQueryVo);
/**
* 根据物流公司id查询所有站点信息
*
* @param logisticsRouteQueryVo
* @return List<LogisticsStation>
* @author 王富康
* @date 2024/8/28
*/
List<LogisticsStation> getLogisticsStationListByCompanyId(LogisticsStationQueryVo logisticsRouteQueryVo);
}

15
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/impl/LogisticsStationServiceImpl.java

@ -10,6 +10,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class LogisticsStationServiceImpl extends ServiceImpl<LogisticsStationMapper, LogisticsStation> implements LogisticsStationService {
@ -29,4 +31,17 @@ public class LogisticsStationServiceImpl extends ServiceImpl<LogisticsStationMap
final Page<LogisticsStation> page = new Page<>(logisticsRouteQueryVo.getPageNum(), logisticsRouteQueryVo.getPageSize());
return logisticsStationMapper.getLogisticsStationPageList(page, logisticsRouteQueryVo);
}
/**
* 根据物流公司id查询所有站点信息
*
* @param logisticsRouteQueryVo
* @return List<LogisticsStation>
* @author 王富康
* @date 2024/8/28
*/
@Override
public List<LogisticsStation> getLogisticsStationListByCompanyId(LogisticsStationQueryVo logisticsRouteQueryVo) {
return logisticsStationMapper.getLogisticsStationListByCompanyId(logisticsRouteQueryVo);
}
}

3
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/vo/LogisticsStationQueryVo.java

@ -12,6 +12,9 @@ import lombok.Data;
@Data
public class LogisticsStationQueryVo extends HiverBasePageQuery {
@ApiModelProperty(value = "物流公司id")
private String companyId;
@ApiModelProperty(value = "线路id")
private String circuitId;

2
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/entity/LogisticsUser.java

@ -31,6 +31,6 @@ public class LogisticsUser extends HiverBaseEntity {
private String companyId;
@ApiModelProperty(value = "角色:0:管理员、1:操作员、2:收货员")
private String role;
private String userRole;
}

6
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/utils/AliOcrUtil.java

@ -851,7 +851,7 @@ public class AliOcrUtil {
msgManager.add(userMsg);
stopWatch.start("开始回答");
final QwenParam param =
QwenParam.builder().model("qwen2-72b-instruct").messages(msgManager.get())
QwenParam.builder().model("qwen-max").messages(msgManager.get())
.resultFormat(QwenParam.ResultFormat.MESSAGE)
.seed(1234)
.temperature(0.85F)
@ -903,7 +903,7 @@ public class AliOcrUtil {
msgManager.add(systemMsg);
msgManager.add(userMsg);
final QwenParam param =
QwenParam.builder().model("qwen2-72b-instruct").messages(msgManager.get())
QwenParam.builder().model("qwen-max").messages(msgManager.get())
.resultFormat(QwenParam.ResultFormat.MESSAGE)
.seed(1234)
.temperature(0.85F)
@ -945,7 +945,7 @@ public class AliOcrUtil {
msgManager.add(userMsg);
stopWatch.start("开始回答");
final QwenParam param =
QwenParam.builder().model("qwen2-72b-instruct").messages(msgManager.get())
QwenParam.builder().model("qwen-max").messages(msgManager.get())
.resultFormat(QwenParam.ResultFormat.MESSAGE)
.seed(1234)
.temperature(0.85F)

187
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsCompanyRouteMapper.xml

@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.hiver.mall.logisticscompanyroute.mapper.LogisticsCompanyRouteMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.logisticscompanyroute.entity.LogisticsCompanyRoute">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="circuit_id" jdbcType="VARCHAR" property="circuitId" />
<result column="circuit_name" jdbcType="VARCHAR" property="circuitName" />
</resultMap>
<sql id="Base_Column_List">
id, create_by, create_time, del_flag, update_by, update_time,company_id, company_name, circuit_id, circuit_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_company_route
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_logistics_company_route
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.logisticscompanyroute.entity.LogisticsCompanyRoute">
insert into t_logistics_company_route
(id, create_by, create_time, del_flag, update_by, update_time,company_id, company_name, circuit_id, circuit_name)
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{circuitId,jdbcType=VARCHAR}, #{circuitName,jdbcType=VARCHAR})
</insert>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_company_route
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=INTEGER},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=VARCHAR},
</if>
<if test="record.companyName != null">
company_name = #{record.companyName,jdbcType=VARCHAR},
</if>
<if test="record.circuitId != null">
circuit_id = #{record.circuitId,jdbcType=VARCHAR},
</if>
<if test="record.circuitName != null">
circuit_name = #{record.circuitName,jdbcType=VARCHAR},
</if>
</set>
</update>
<update id="updateByExample" parameterType="map">
update t_logistics_company_route
set id = #{record.id,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
del_flag = #{record.delFlag,jdbcType=INTEGER},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
company_id = #{record.companyId,jdbcType=VARCHAR},
company_name = #{record.companyName,jdbcType=VARCHAR},
circuit_id = #{record.circuitId,jdbcType=VARCHAR},
circuit_name = #{record.circuitName,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.logisticscompanyroute.entity.LogisticsCompanyRoute">
update t_logistics_company_route
<set>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if test="circuitId != null">
circuit_id = #{circuitId,jdbcType=VARCHAR},
</if>
<if test="circuitName != null">
circuit_name = #{circuitName,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.logisticscompanyroute.entity.LogisticsCompanyRoute">
update t_logistics_company_route
set create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=INTEGER},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
company_id = #{companyId,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
circuit_id = #{circuitId,jdbcType=VARCHAR},
circuit_name = #{circuitName,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<!--管理商品分页列表-->
<select id="getLogisticsCompanyRoutePageList" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticscompanyroute.vo.LogisticsCompanyRouteQueryVo">
select
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.company_id,t.company_name,t.circuit_id,t.circuit_name
from t_logistics_company_route t
<where>
<!--反馈内容-->
<if test='queryParams.companyId!=null and queryParams.companyId.trim() neq ""'>
AND t.company_id = #{queryParams.companyId}
</if>
<if test='queryParams.circuitId!=null and queryParams.circuitId.trim() neq ""'>
AND t.circuit_id = #{queryParams.circuitId}
</if>
<if test='queryParams.companyName!=null and queryParams.companyName.trim() neq ""'>
AND t.company_name like concat('%',#{queryParams.companyName},'%')
</if>
<if test='queryParams.circuitName!=null and queryParams.circuitName.trim() neq ""'>
AND t.circuit_name like concat('%',#{queryParams.circuitName},'%')
</if>
</where>
ORDER BY
t.create_time desc
</select>
<select id="getLogisticsCompanyRouteListByCompanyId" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticscompanyroute.vo.LogisticsCompanyRouteQueryVo">
select
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.company_id,t.company_name,t.circuit_id,t.circuit_name
from t_logistics_company_route t
<where>
<!--反馈内容-->
<if test='queryParams.companyId!=null and queryParams.companyId.trim() neq ""'>
AND t.company_id = #{queryParams.companyId}
</if>
<if test='queryParams.circuitId!=null and queryParams.circuitId.trim() neq ""'>
AND t.circuit_id = #{queryParams.circuitId}
</if>
<if test='queryParams.companyName!=null and queryParams.companyName.trim() neq ""'>
AND t.company_name like concat('%',#{queryParams.companyName},'%')
</if>
<if test='queryParams.circuitName!=null and queryParams.circuitName.trim() neq ""'>
AND t.circuit_name like concat('%',#{queryParams.circuitName},'%')
</if>
</where>
ORDER BY
t.create_time desc
</select>
</mapper>

33
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsOrderMapper.xml

@ -36,13 +36,14 @@
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="receiving_user_id" jdbcType="VARCHAR" property="receivingUserId" />
<result column="receiving_user_name" jdbcType="VARCHAR" property="receivingUserName" />
<result column="image_path" jdbcType="VARCHAR" property="imagePath" />
</resultMap>
<sql id="Base_Column_List">
id, create_by, create_time, del_flag, update_by, update_time,company_id, company_name, circuit_id, circuit_name,
shipper_name, shipper_mobile, shipper_address, receiver_name, receiver_mobile, receiver_address,
go_station_id, go_station_name, arrival_station_id, arrival_station_name, weight, count, freight, premium,
transit_fee, tips, method_of_settlement, cost, all_cost, order_number, object_name, remark, receiving_user_id, receiving_user_name
transit_fee, tips, method_of_settlement, cost, all_cost, order_number, object_name, remark, receiving_user_id, receiving_user_name,image_path
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
@ -62,7 +63,7 @@
(id, create_by, create_time, del_flag, update_by, update_time,company_id, company_name, circuit_id, circuit_name,
shipper_name, shipper_mobile, shipper_address, receiver_name, receiver_mobile, receiver_address,
go_station_id, go_station_name, arrival_station_id, arrival_station_name, weight, count, freight, premium,
transit_fee, tips, method_of_settlement, cost, all_cost, order_number, object_name, remark, receiving_user_id, receiving_user_name)
transit_fee, tips, method_of_settlement, cost, all_cost, order_number, object_name, remark, receiving_user_id, receiving_user_name,image_path)
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{circuitId,jdbcType=VARCHAR}, #{circuitName,jdbcType=VARCHAR},
@ -72,7 +73,7 @@
#{weight,jdbcType=DECIMAL}, #{count,jdbcType=INTEGER}, #{freight,jdbcType=DECIMAL}, #{premium,jdbcType=DECIMAL},
#{transitFee,jdbcType=DECIMAL}, #{tips,jdbcType=DECIMAL}, #{methodOfSettlement,jdbcType=VARCHAR}, #{cost,jdbcType=DECIMAL},
#{allCost,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR}, #{objectName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{receivingUserId,jdbcType=VARCHAR}, #{receivingUserName,jdbcType=VARCHAR})
#{receivingUserId,jdbcType=VARCHAR}, #{receivingUserName,jdbcType=VARCHAR},#{imagePath,jdbcType=VARCHAR})
</insert>
<!--管理商品分页列表-->
@ -81,6 +82,20 @@
<include refid="Base_Column_List" />
from t_logistics_order
<where>
<!-- 根据物流公司id、线路id、出发站id、到达站id查 精准查询-->
<if test='queryParams.companyId!=null and queryParams.companyId.trim() neq ""'>
AND company_id = #{queryParams.companyId}
</if>
<if test='queryParams.circuitId!=null and queryParams.circuitId.trim() neq ""'>
AND circuit_id = #{queryParams.circuitId}
</if>
<if test='queryParams.goStationId!=null and queryParams.goStationId.trim() neq ""'>
AND go_station_id = #{queryParams.goStationId}
</if>
<if test='queryParams.arrivalStationId!=null and queryParams.arrivalStationId.trim() neq ""'>
AND arrival_station_id = #{queryParams.arrivalStationId}
</if>
<!--模糊查询项:收货人电话、收货人名称、发货人电话、发货人名称、站点名、操作人名、线路名-->
<if test='queryParams.companyName!=null and queryParams.companyName.trim() neq ""'>
AND company_name like concat('%',#{queryParams.companyName},'%')
</if>
@ -99,6 +114,18 @@
<if test='queryParams.receiverName!=null and queryParams.receiverName.trim() neq ""'>
AND receiver_name like concat('%',#{queryParams.receiverName},'%')
</if>
<if test='queryParams.receiverMobile!=null and queryParams.receiverMobile.trim() neq ""'>
AND receiver_mobile like concat('%',#{queryParams.receiverMobile},'%')
</if>
<if test='queryParams.goStationName!=null and queryParams.goStationName.trim() neq ""'>
AND go_station_name like concat('%',#{queryParams.goStationName},'%')
</if>
<if test='queryParams.arrivalStationName!=null and queryParams.arrivalStationName.trim() neq ""'>
AND arrival_station_name like concat('%',#{queryParams.arrivalStationName},'%')
</if>
<if test='queryParams.orderNumber!=null and queryParams.orderNumber.trim() neq ""'>
AND order_number like concat('%',#{queryParams.orderNumber},'%')
</if>
<!--开始时间、结束时间-->
<if test="queryParams.startDate!=null and queryParams.endDate!=null">

11
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsStationMapper.xml

@ -164,4 +164,15 @@
ORDER BY
t.create_time desc
</select>
<select id="getLogisticsStationListByCompanyId" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticsstation.vo.LogisticsStationQueryVo">
select
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.circuit_id,t.station_name,t.freight_rules,t.landing_fee_rules,t.delivery_fee_rules
from t_logistics_station t
where circuit_id in (
select circuit_id from t_logistics_company_route t where company_id = #{queryParams.companyId}
)
ORDER BY
t.create_time desc
</select>
</mapper>
Loading…
Cancel
Save