|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|