Commit c9e95124 authored by chenjiuping's avatar chenjiuping

Merge remote-tracking branch 'origin/dev' into dev

parents 5a05a369 60557476
...@@ -100,7 +100,7 @@ public interface OrderApprovalMapper extends AbstractMapper<OrderApprovalDO> { ...@@ -100,7 +100,7 @@ public interface OrderApprovalMapper extends AbstractMapper<OrderApprovalDO> {
OrderApprovalDO itemApprovalCount(@Param("orderItemId") Long orderItemId, @Param("orderId") Long orderId, @Param("types") List<Integer> types); OrderApprovalDO itemApprovalCount(@Param("orderItemId") Long orderItemId, @Param("orderId") Long orderId, @Param("types") List<Integer> types);
@ResultType(OrderSpecialApplyVO.class) @ResultType(Integer.class)
@Select({ @Select({
"<script>", "<script>",
"select", "select",
......
...@@ -3833,7 +3833,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -3833,7 +3833,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "</when>", // "</when>",
// "</script>" // "</script>"
// }) // })
StatisticsOrderVO statisticsMyOrder(@Param("query") OrderQueryDTO query); StatisticsOrderVO statisticsMyOrder(@Param("query") OrderQueryVO query);
/** /**
...@@ -4844,38 +4844,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -4844,38 +4844,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "where whl.dest_warehouse_id = #{query.destWarehouseId} ", // "where whl.dest_warehouse_id = #{query.destWarehouseId} ",
// "))", // "))",
// "</when>", // "</when>",
" <if test=\"query.startWarehouseId !=null and query.destWarehouseId !=null \">\n" + " <if test=\"query.startWarehouseIds !=null and query.destWarehouseIds !=null \">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.start_warehouse_id in\n" + " where whl.start_warehouse_id in\n" +
" <foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='warehouseId' collection='query.startWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{warehouseId}\n" + " #{warehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
" and whl.dest_warehouse_id in\n" + " and whl.dest_warehouse_id in\n" +
" <foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='destWarehouseId' collection='query.destWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{destWarehouseId}\n" + " #{destWarehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
" ))\n" + " ))\n" +
" </if>\n" + " </if>\n" +
" <if test=\"query.startWarehouseId !=null and query.destWarehouseId==null\">\n" + " <if test=\"query.startWarehouseIds !=null and query.destWarehouseIds==null\">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.start_warehouse_id in\n" + " where whl.start_warehouse_id in\n" +
" <foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='warehouseId' collection='query.startWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{warehouseId}\n" + " #{warehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
" ))\n" + " ))\n" +
" </if>\n" + " </if>\n" +
" <if test=\"query.startWarehouseId ==null and query.destWarehouseId !=null \">\n" + " <if test=\"query.startWarehouseIds ==null and query.destWarehouseIds !=null \">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.dest_warehouse_id in\n" + " where whl.dest_warehouse_id in\n" +
" <foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='destWarehouseId' collection='query.destWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{destWarehouseId}\n" + " #{destWarehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
...@@ -4919,7 +4919,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -4919,7 +4919,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
"</when>", "</when>",
"</script>" "</script>"
}) })
StatisticsOrderVO statisticsMyWarehouseIn(@Param("query") OrderQueryDTO query); StatisticsOrderVO statisticsMyWarehouseIn(@Param("query") OrderQueryVO query);
@ResultType(StatisticsOrderVO.class) @ResultType(StatisticsOrderVO.class)
@Select({ @Select({
...@@ -5766,38 +5766,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -5766,38 +5766,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "where whl.dest_warehouse_id = #{query.destWarehouseId} ", // "where whl.dest_warehouse_id = #{query.destWarehouseId} ",
// "))", // "))",
// "</when>", // "</when>",
" <if test=\"query.startWarehouseId !=null and query.destWarehouseId !=null \">\n" + " <if test=\"query.startWarehouseIds !=null and query.destWarehouseIds !=null \">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.start_warehouse_id in\n" + " where whl.start_warehouse_id in\n" +
" <foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='warehouseId' collection='query.startWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{warehouseId}\n" + " #{warehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
" and whl.dest_warehouse_id in\n" + " and whl.dest_warehouse_id in\n" +
" <foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='destWarehouseId' collection='query.destWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{destWarehouseId}\n" + " #{destWarehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
" ))\n" + " ))\n" +
" </if>\n" + " </if>\n" +
" <if test=\"query.startWarehouseId !=null and query.destWarehouseId==null\">\n" + " <if test=\"query.startWarehouseIds !=null and query.destWarehouseIds==null\">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.start_warehouse_id in\n" + " where whl.start_warehouse_id in\n" +
" <foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='warehouseId' collection='query.startWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{warehouseId}\n" + " #{warehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
" ))\n" + " ))\n" +
" </if>\n" + " </if>\n" +
" <if test=\"query.startWarehouseId ==null and query.destWarehouseId !=null \">\n" + " <if test=\"query.startWarehouseIds ==null and query.destWarehouseIds !=null \">\n" +
" and (o.line_id in(\n" + " and (o.line_id in(\n" +
" select whl.id\n" + " select whl.id\n" +
" from ecw_warehouse_line whl\n" + " from ecw_warehouse_line whl\n" +
" where whl.dest_warehouse_id in\n" + " where whl.dest_warehouse_id in\n" +
" <foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>\n" + " <foreach item='destWarehouseId' collection='query.destWarehouseIds' open='(' separator=',' close=')'>\n" +
" #{destWarehouseId}\n" + " #{destWarehouseId}\n" +
" </foreach>\n" + " </foreach>\n" +
"\n" + "\n" +
...@@ -5841,7 +5841,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -5841,7 +5841,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
"</when>", "</when>",
"</script>" "</script>"
}) })
StatisticsOrderVO statisticsMyPickUp(@Param("query") OrderQueryDTO query); StatisticsOrderVO statisticsMyPickUp(@Param("query") OrderQueryVO query);
@ResultType(OrderDO.class) @ResultType(OrderDO.class)
@Select({ @Select({
......
...@@ -314,7 +314,7 @@ public interface OrderQueryService { ...@@ -314,7 +314,7 @@ public interface OrderQueryService {
List<OrderDO> getOrderChildren(List<Long> orderIds); List<OrderDO> getOrderChildren(List<Long> orderIds);
StatisticsOrderVO statisticsOrder(OrderQueryVO query); StatisticsOrderVO statisticsOrder(OrderQueryVO query);
StatisticsOrderVO statisticsMyOrder(OrderQueryDTO query) ; StatisticsOrderVO statisticsMyOrder(OrderQueryVO query) ;
void exportOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException; void exportOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException;
......
...@@ -28,6 +28,7 @@ import cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto; ...@@ -28,6 +28,7 @@ import cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto;
import cn.iocoder.yudao.module.ecw.api.currency.CurrencyApi; import cn.iocoder.yudao.module.ecw.api.currency.CurrencyApi;
import cn.iocoder.yudao.module.ecw.api.currency.dto.CurrencyRespDTO; import cn.iocoder.yudao.module.ecw.api.currency.dto.CurrencyRespDTO;
import cn.iocoder.yudao.module.ecw.api.currency.dto.ExchangeRateRespDTO; import cn.iocoder.yudao.module.ecw.api.currency.dto.ExchangeRateRespDTO;
import cn.iocoder.yudao.module.ecw.api.customer.CustomerApi;
import cn.iocoder.yudao.module.ecw.api.unit.UnitApi; import cn.iocoder.yudao.module.ecw.api.unit.UnitApi;
import cn.iocoder.yudao.module.ecw.api.unit.dto.UnitRespDto; import cn.iocoder.yudao.module.ecw.api.unit.dto.UnitRespDto;
import cn.iocoder.yudao.module.ecw.dal.dataobject.country.CountryDO; import cn.iocoder.yudao.module.ecw.dal.dataobject.country.CountryDO;
...@@ -146,6 +147,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -146,6 +147,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
private final CurrencyApi currencyApi; private final CurrencyApi currencyApi;
private final OrderQueryService orderQueryService; private final OrderQueryService orderQueryService;
private final UnitApi unitApi; private final UnitApi unitApi;
private final CustomerApi customerApi;
private final OrderOperateLogService orderOperateLogService; private final OrderOperateLogService orderOperateLogService;
...@@ -1419,6 +1421,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -1419,6 +1421,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderTimeDO.setRemarksZh(orderAirTimeEnum.getRemarksZh()); orderTimeDO.setRemarksZh(orderAirTimeEnum.getRemarksZh());
orderTimeDO.setRemarksEn(orderAirTimeEnum.getRemarksEn()); orderTimeDO.setRemarksEn(orderAirTimeEnum.getRemarksEn());
orderTimeDO.setMark(1); orderTimeDO.setMark(1);
// 空运出仓动态更新时,需要同步更新订单的收发客户的首次成交状态
OrderConsignorDO orderConsignorDO = orderConsignorService.getOrderConsignorByOrderId(orderDO.getOrderId());
customerApi.fillFirstDealTimeIfNull(orderConsignorDO.getCustomerId(), businessTime);
OrderConsigneeDO orderConsigneeDO = orderConsigneeService.getOrderConsigneeByOrderId(orderDO.getOrderId());
if (Objects.nonNull(orderConsigneeDO)) {
customerApi.fillFirstDealTimeIfNull(orderConsigneeDO.getCustomerId(), businessTime);
}
break; break;
case AIR_CUSTOMS_IN_PROGRESS: case AIR_CUSTOMS_IN_PROGRESS:
orderTimeDO.setRemarksZh(String.format(orderAirTimeEnum.getRemarksZh(), reasonZh)); orderTimeDO.setRemarksZh(String.format(orderAirTimeEnum.getRemarksZh(), reasonZh));
...@@ -1584,6 +1593,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -1584,6 +1593,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderTimeDO.setMark(1); // 装柜字体标红 orderTimeDO.setMark(1); // 装柜字体标红
orderTimeDO.setRemarksZh(String.format(orderSeaTimeEnum.getRemarksZh(), Objects.nonNull(estTime) ? DateUtil.formatDateTime(estTime) : "")); orderTimeDO.setRemarksZh(String.format(orderSeaTimeEnum.getRemarksZh(), Objects.nonNull(estTime) ? DateUtil.formatDateTime(estTime) : ""));
orderTimeDO.setRemarksEn(String.format(orderSeaTimeEnum.getRemarksEn(), Objects.nonNull(estTime) ? DateUtil.formatDateTime(estTime) : "")); orderTimeDO.setRemarksEn(String.format(orderSeaTimeEnum.getRemarksEn(), Objects.nonNull(estTime) ? DateUtil.formatDateTime(estTime) : ""));
// 海运装柜动态更新时,需要同步更新订单的收发客户的首次成交状态
OrderConsignorDO orderConsignorDO = orderConsignorService.getOrderConsignorByOrderId(orderDO.getOrderId());
customerApi.fillFirstDealTimeIfNull(orderConsignorDO.getCustomerId(), businessTime);
OrderConsigneeDO orderConsigneeDO = orderConsigneeService.getOrderConsigneeByOrderId(orderDO.getOrderId());
if (Objects.nonNull(orderConsigneeDO)) {
customerApi.fillFirstDealTimeIfNull(orderConsigneeDO.getCustomerId(), businessTime);
}
break; break;
case SEA_CUSTOMS_PASS_SEA: case SEA_CUSTOMS_PASS_SEA:
orderTimeDO.setRemarksZh(String.format(orderSeaTimeEnum.getRemarksZh(), Objects.nonNull(estTime) ? DateUtil.formatDateTime(estTime) : "")); orderTimeDO.setRemarksZh(String.format(orderSeaTimeEnum.getRemarksZh(), Objects.nonNull(estTime) ? DateUtil.formatDateTime(estTime) : ""));
......
...@@ -1767,8 +1767,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1767,8 +1767,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
} }
@Override @Override
public StatisticsOrderVO statisticsMyOrder(OrderQueryDTO query) { public StatisticsOrderVO statisticsMyOrder(OrderQueryVO query) {
caseStatus(query.getStatus(), query); // caseStatus(query.getStatus(), query);
StatisticsOrderVO vo = orderMapper.statisticsMyOrder(query); StatisticsOrderVO vo = orderMapper.statisticsMyOrder(query);
if (Objects.nonNull(vo)) { if (Objects.nonNull(vo)) {
vo.setTotalVolume(new BigDecimal(vo.getTotalVolume()).setScale(2, RoundingMode.HALF_UP).toString()); vo.setTotalVolume(new BigDecimal(vo.getTotalVolume()).setScale(2, RoundingMode.HALF_UP).toString());
......
...@@ -607,6 +607,11 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont ...@@ -607,6 +607,11 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
} }
Date now = new Date(); Date now = new Date();
OrderDO orderDO = orderService.getById(orderCargoControlApplyVO.getOrderId()); OrderDO orderDO = orderService.getById(orderCargoControlApplyVO.getOrderId());
// TODO 待确认具体拦截哪些审批任务
int count = orderApprovalMapper.processingItemApproval(null, orderCargoControlApplyVO.getOrderId(), Arrays.asList(orderCargoControlApplyVO.getApplyType(), 14));
if (count > 0){
throw exception(ORDER_IS_APPROVAL_IN_PROCESS);
}
OrderCargoControlReleaseInfoDto releaseInfoDto = this.getOrderCargoControlReleaseInfo(orderCargoControlApplyVO.getOrderId()); OrderCargoControlReleaseInfoDto releaseInfoDto = this.getOrderCargoControlReleaseInfo(orderCargoControlApplyVO.getOrderId());
orderCargoControlApplyVO.setOrderNo(releaseInfoDto.getOrderNo()); orderCargoControlApplyVO.setOrderNo(releaseInfoDto.getOrderNo());
orderCargoControlApplyVO.setPickQuantity(releaseInfoDto.getPickQuantity()); orderCargoControlApplyVO.setPickQuantity(releaseInfoDto.getPickQuantity());
......
...@@ -560,6 +560,14 @@ public class OrderQueryVO { ...@@ -560,6 +560,14 @@ public class OrderQueryVO {
@ApiModelProperty(value = "报关类别:我司全代:1,自单代报:2,混合报关:3") @ApiModelProperty(value = "报关类别:我司全代:1,自单代报:2,混合报关:3")
private List<Integer> customsTypes; private List<Integer> customsTypes;
@ApiModelProperty(value = "产品备案属性:1有牌,2无牌,3中性,4混牌")
private List<Integer> productRecords;
@ApiModelProperty(value = "客户经理ids")
private List<Long> salesmanIds;
@ApiModelProperty(value = "渠道ids")
private List<Long> channelIds;
@ApiModelProperty(value = "审核类型(字典 order_approval_type) 0 为正常") @ApiModelProperty(value = "审核类型(字典 order_approval_type) 0 为正常")
private List<Integer> auditTypeList; private List<Integer> auditTypeList;
......
...@@ -731,7 +731,7 @@ public class OrderController { ...@@ -731,7 +731,7 @@ public class OrderController {
@GetMapping("/dept/statistics") @GetMapping("/dept/statistics")
@ApiOperation("参数查询获得部门订单统计") @ApiOperation("参数查询获得部门订单统计")
public CommonResult<StatisticsOrderVO> statisticsDeptOrder(OrderQueryDTO query) { public CommonResult<StatisticsOrderVO> statisticsDeptOrder(OrderQueryVO query) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); // 获取当前登录用户ID LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); // 获取当前登录用户ID
query.setUserType(UserTypeEnum.ADMIN.getValue()); query.setUserType(UserTypeEnum.ADMIN.getValue());
// query.setSalesmanId(salesmanId); // query.setSalesmanId(salesmanId);
...@@ -761,7 +761,7 @@ public class OrderController { ...@@ -761,7 +761,7 @@ public class OrderController {
@GetMapping("/my/statistics") @GetMapping("/my/statistics")
@ApiOperation("参数查询获得我的订单统计") @ApiOperation("参数查询获得我的订单统计")
public CommonResult<StatisticsOrderVO> statisticsMyOrder(OrderQueryDTO query) { public CommonResult<StatisticsOrderVO> statisticsMyOrder(OrderQueryVO query) {
Long salesmanId = SecurityFrameworkUtils.getLoginUserId(); // 获取当前登录用户ID Long salesmanId = SecurityFrameworkUtils.getLoginUserId(); // 获取当前登录用户ID
query.setUserType(UserTypeEnum.ADMIN.getValue()); query.setUserType(UserTypeEnum.ADMIN.getValue());
// query.setSalesmanId(salesmanId); // query.setSalesmanId(salesmanId);
...@@ -772,7 +772,7 @@ public class OrderController { ...@@ -772,7 +772,7 @@ public class OrderController {
@GetMapping("/statistics") @GetMapping("/statistics")
@ApiOperation("参数查询订单管理统计") @ApiOperation("参数查询订单管理统计")
public CommonResult<StatisticsOrderVO> statisticsOrder(OrderQueryDTO query) { public CommonResult<StatisticsOrderVO> statisticsOrder(OrderQueryVO query) {
return success(orderQueryService.statisticsMyOrder(query)); return success(orderQueryService.statisticsMyOrder(query));
} }
......
...@@ -146,6 +146,7 @@ public class OrderCargoControlController { ...@@ -146,6 +146,7 @@ public class OrderCargoControlController {
@PutMapping("/update/apply") @PutMapping("/update/apply")
@ApiOperation("控货业务审批申请") @ApiOperation("控货业务审批申请")
@Idempotent(timeout = 10)
public CommonResult<Boolean> orderCargoControlApply(@Valid @RequestBody OrderCargoControlApplyVO orderCargoControlApplyVO) { public CommonResult<Boolean> orderCargoControlApply(@Valid @RequestBody OrderCargoControlApplyVO orderCargoControlApplyVO) {
orderCargoControlService.orderCargoControlApply(orderCargoControlApplyVO); orderCargoControlService.orderCargoControlApply(orderCargoControlApplyVO);
return success(true); return success(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment