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> {
OrderApprovalDO itemApprovalCount(@Param("orderItemId") Long orderItemId, @Param("orderId") Long orderId, @Param("types") List<Integer> types);
@ResultType(OrderSpecialApplyVO.class)
@ResultType(Integer.class)
@Select({
"<script>",
"select",
......
......@@ -3833,7 +3833,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "</when>",
// "</script>"
// })
StatisticsOrderVO statisticsMyOrder(@Param("query") OrderQueryDTO query);
StatisticsOrderVO statisticsMyOrder(@Param("query") OrderQueryVO query);
/**
......@@ -4844,38 +4844,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "where whl.dest_warehouse_id = #{query.destWarehouseId} ",
// "))",
// "</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" +
" select whl.id\n" +
" from ecw_warehouse_line whl\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" +
" </foreach>\n" +
"\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" +
" </foreach>\n" +
"\n" +
" ))\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" +
" select whl.id\n" +
" from ecw_warehouse_line whl\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" +
" </foreach>\n" +
" ))\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" +
" select whl.id\n" +
" from ecw_warehouse_line whl\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" +
" </foreach>\n" +
"\n" +
......@@ -4919,7 +4919,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
"</when>",
"</script>"
})
StatisticsOrderVO statisticsMyWarehouseIn(@Param("query") OrderQueryDTO query);
StatisticsOrderVO statisticsMyWarehouseIn(@Param("query") OrderQueryVO query);
@ResultType(StatisticsOrderVO.class)
@Select({
......@@ -5766,38 +5766,38 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
// "where whl.dest_warehouse_id = #{query.destWarehouseId} ",
// "))",
// "</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" +
" select whl.id\n" +
" from ecw_warehouse_line whl\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" +
" </foreach>\n" +
"\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" +
" </foreach>\n" +
"\n" +
" ))\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" +
" select whl.id\n" +
" from ecw_warehouse_line whl\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" +
" </foreach>\n" +
" ))\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" +
" select whl.id\n" +
" from ecw_warehouse_line whl\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" +
" </foreach>\n" +
"\n" +
......@@ -5841,7 +5841,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
"</when>",
"</script>"
})
StatisticsOrderVO statisticsMyPickUp(@Param("query") OrderQueryDTO query);
StatisticsOrderVO statisticsMyPickUp(@Param("query") OrderQueryVO query);
@ResultType(OrderDO.class)
@Select({
......
......@@ -314,7 +314,7 @@ public interface OrderQueryService {
List<OrderDO> getOrderChildren(List<Long> orderIds);
StatisticsOrderVO statisticsOrder(OrderQueryVO query);
StatisticsOrderVO statisticsMyOrder(OrderQueryDTO query) ;
StatisticsOrderVO statisticsMyOrder(OrderQueryVO query) ;
void exportOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException;
......
......@@ -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.dto.CurrencyRespDTO;
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.dto.UnitRespDto;
import cn.iocoder.yudao.module.ecw.dal.dataobject.country.CountryDO;
......@@ -146,6 +147,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
private final CurrencyApi currencyApi;
private final OrderQueryService orderQueryService;
private final UnitApi unitApi;
private final CustomerApi customerApi;
private final OrderOperateLogService orderOperateLogService;
......@@ -1419,6 +1421,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderTimeDO.setRemarksZh(orderAirTimeEnum.getRemarksZh());
orderTimeDO.setRemarksEn(orderAirTimeEnum.getRemarksEn());
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;
case AIR_CUSTOMS_IN_PROGRESS:
orderTimeDO.setRemarksZh(String.format(orderAirTimeEnum.getRemarksZh(), reasonZh));
......@@ -1584,6 +1593,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderTimeDO.setMark(1); // 装柜字体标红
orderTimeDO.setRemarksZh(String.format(orderSeaTimeEnum.getRemarksZh(), 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;
case SEA_CUSTOMS_PASS_SEA:
orderTimeDO.setRemarksZh(String.format(orderSeaTimeEnum.getRemarksZh(), Objects.nonNull(estTime) ? DateUtil.formatDateTime(estTime) : ""));
......
......@@ -1767,8 +1767,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
}
@Override
public StatisticsOrderVO statisticsMyOrder(OrderQueryDTO query) {
caseStatus(query.getStatus(), query);
public StatisticsOrderVO statisticsMyOrder(OrderQueryVO query) {
// caseStatus(query.getStatus(), query);
StatisticsOrderVO vo = orderMapper.statisticsMyOrder(query);
if (Objects.nonNull(vo)) {
vo.setTotalVolume(new BigDecimal(vo.getTotalVolume()).setScale(2, RoundingMode.HALF_UP).toString());
......
......@@ -607,6 +607,11 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
}
Date now = new Date();
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());
orderCargoControlApplyVO.setOrderNo(releaseInfoDto.getOrderNo());
orderCargoControlApplyVO.setPickQuantity(releaseInfoDto.getPickQuantity());
......
......@@ -560,6 +560,14 @@ public class OrderQueryVO {
@ApiModelProperty(value = "报关类别:我司全代:1,自单代报:2,混合报关:3")
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 为正常")
private List<Integer> auditTypeList;
......
......@@ -731,7 +731,7 @@ public class OrderController {
@GetMapping("/dept/statistics")
@ApiOperation("参数查询获得部门订单统计")
public CommonResult<StatisticsOrderVO> statisticsDeptOrder(OrderQueryDTO query) {
public CommonResult<StatisticsOrderVO> statisticsDeptOrder(OrderQueryVO query) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); // 获取当前登录用户ID
query.setUserType(UserTypeEnum.ADMIN.getValue());
// query.setSalesmanId(salesmanId);
......@@ -761,7 +761,7 @@ public class OrderController {
@GetMapping("/my/statistics")
@ApiOperation("参数查询获得我的订单统计")
public CommonResult<StatisticsOrderVO> statisticsMyOrder(OrderQueryDTO query) {
public CommonResult<StatisticsOrderVO> statisticsMyOrder(OrderQueryVO query) {
Long salesmanId = SecurityFrameworkUtils.getLoginUserId(); // 获取当前登录用户ID
query.setUserType(UserTypeEnum.ADMIN.getValue());
// query.setSalesmanId(salesmanId);
......@@ -772,7 +772,7 @@ public class OrderController {
@GetMapping("/statistics")
@ApiOperation("参数查询订单管理统计")
public CommonResult<StatisticsOrderVO> statisticsOrder(OrderQueryDTO query) {
public CommonResult<StatisticsOrderVO> statisticsOrder(OrderQueryVO query) {
return success(orderQueryService.statisticsMyOrder(query));
}
......
......@@ -146,6 +146,7 @@ public class OrderCargoControlController {
@PutMapping("/update/apply")
@ApiOperation("控货业务审批申请")
@Idempotent(timeout = 10)
public CommonResult<Boolean> orderCargoControlApply(@Valid @RequestBody OrderCargoControlApplyVO orderCargoControlApplyVO) {
orderCargoControlService.orderCargoControlApply(orderCargoControlApplyVO);
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