Browse Source

签收列表BUG修复、售后工单增加导出时间限制

dev
汤建军 2 months ago
parent
commit
0098cc3a42
  1. 15
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  2. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  3. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

15
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -16,6 +16,8 @@
*/ */
package com.logpm.aftersales.service.impl; package com.logpm.aftersales.service.impl;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -2736,6 +2738,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if (!Objects.isNull(o)) { if (!Objects.isNull(o)) {
ids = Func.toLongList((String) aftersalesWorkOrder.get("ids")); ids = Func.toLongList((String) aftersalesWorkOrder.get("ids"));
} }
//查询用户角色信息 //查询用户角色信息
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
String roleName = user.getRoleName(); String roleName = user.getRoleName();
@ -2796,10 +2799,20 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
} }
if (warehouseIds.isEmpty()) { if (warehouseIds.isEmpty()) {
throw new CustomerException("当前登录人无仓库信息,请联系管理人员!!!"); throw new CustomerException("当前登录人无仓库信息,请联系管理人员!!!");
} }
AftersalesWorkOrderDTO workOrderDTO = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderDTO.class); AftersalesWorkOrderDTO workOrderDTO = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderDTO.class);
if (ObjectUtil.isNotEmpty(workOrderDTO.getStartCreateTime()) || ObjectUtil.isNotEmpty(workOrderDTO.getEndCreateTime())) {
boolean withinOneMonth = DateUtil.between(workOrderDTO.getStartCreateTime(), workOrderDTO.getEndCreateTime(), DateUnit.DAY) <= 60;
if (!withinOneMonth) {
throw new ServiceException("创建日期不能超过两个月");
}
} else {
throw new ServiceException("导出时配送日期必填");
}
List<AftersalesWorkOrderVO> exportData = baseMapper.getBasicExportData(workOrderDTO, ids, warehouseIds); List<AftersalesWorkOrderVO> exportData = baseMapper.getBasicExportData(workOrderDTO, ids, warehouseIds);
return exportData; return exportData;
} }

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -404,19 +404,19 @@
withoutScanning, withoutScanning,
lds.reservation_id reservationId, lds.reservation_id reservationId,
CASE lddl.kind CASE lddl.kind
WHEN '1' THEN (SELECT driver_phone FROM logpm_distribution_delivery_self AS ldds WHERE ldds.delivery_id= lddl.id WHEN '1' THEN (SELECT GROUP_CONCAT(driver_phone) FROM logpm_distribution_delivery_self AS ldds WHERE ldds.delivery_id= lddl.id
AND ldds.is_deleted = 0 AND ldds.is_master = 2) AND ldds.is_deleted = 0 AND ldds.is_master = 2)
WHEN '2' THEN (SELECT driver_phone FROM logpm_distribution_delivery_tripartite AS lddt WHERE lddt.delivery_id= WHEN '2' THEN (SELECT GROUP_CONCAT(driver_phone) FROM logpm_distribution_delivery_tripartite AS lddt WHERE lddt.delivery_id=
lddl.id AND lddt.is_deleted = 0) lddl.id AND lddt.is_deleted = 0)
ELSE ELSE
'' ''
END driverPhone END driverPhone
FROM FROM
logpm_distribution_signfor lds logpm_distribution_signfor lds
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id AND lddl.is_deleted = 0 AND lddl.customers_number > 0
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id AND ldr.is_deleted = 0 AND ldr.reservation_status != 40
<where> <where>
lds.is_deleted = 0 and ldr.is_deleted = 0 and lddl.is_deleted = 0 AND (ldr.reservation_num + lds.is_deleted = 0 AND (ldr.reservation_num +
ldr.reservation_stock_list_num) > 0 AND lddl.customers_number > 0 ldr.reservation_stock_list_num) > 0 AND lddl.customers_number > 0
<if test="param.mallName != null and param.mallName!=''"> <if test="param.mallName != null and param.mallName!=''">
and ldr.mall_name like concat('%',#{param.mallName},'%') and ldr.mall_name like concat('%',#{param.mallName},'%')

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -3941,6 +3941,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Override @Override
@Transactional
public R stockupScanByStock(StockupDTO stockupDTO) { public R stockupScanByStock(StockupDTO stockupDTO) {
//库存品扫描 //库存品扫描
Long reservationId = stockupDTO.getReservationId(); Long reservationId = stockupDTO.getReservationId();

Loading…
Cancel
Save