Browse Source

售后问题修复 和功能开发

dev-pushdata-important
Diss 1 year ago
parent
commit
3cdf1fa83e
  1. 4
      blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java
  2. 9
      blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderTypeConstant.java
  3. 2
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesCustomerMallEntity.java
  4. 9
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java
  5. 11
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java
  6. 44
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesCustomerMallController.java
  7. 17
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  8. 3
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesCustomerMallDTO.java
  9. 44
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesOvertimeFineExcel.java
  10. 137
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java
  11. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.java
  12. 4
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.xml
  13. 14
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCustomerMallMapper.java
  14. 37
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCustomerMallMapper.xml
  15. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesOvertimeFineMapper.xml
  16. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.java
  17. 240
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  18. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCompletionRecordService.java
  19. 4
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCustomerMallService.java
  20. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesCompletionRecordServiceImpl.java
  21. 13
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesCustomerMallServiceImpl.java
  22. 318
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

4
blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java

@ -9,8 +9,8 @@ public enum WorkOrderStatusConstant {
daishenhe("待审核","40"),
yishenhe("已审核","50"),
chaoshiweichuli("超时未处理","60"),
zhongchaizhong("仲裁中","70"),
yiwanjei("完结","80"),
zhongchaizhong("客服介入中","70"),
yiwanjei("仲裁中","80"),
lipeijineweichu("理赔金额未出","90"),
shenshuzhong("申述中","100"),
yijeishu("已结束","110")

9
blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderTypeConstant.java

@ -43,4 +43,13 @@ public enum WorkOrderTypeConstant {
public void setAnotherName(String anotherName) {
this.anotherName = anotherName;
}
public static String getNameByValue(String targetValue) {
for (WorkOrderTypeConstant type : WorkOrderTypeConstant.values()) {
if (type.getValue().equals(targetValue)) {
return type.getName();
}
}
// 如果没有找到匹配的项,可以根据需要返回一个默认值或者抛出异常等处理
return null;
}
}

2
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesCustomerMallEntity.java

@ -55,7 +55,7 @@ public class AftersalesCustomerMallEntity extends TenantEntity {
*/
private String typesOf;
/**
* 状态 1 正常
* 状态 1 第一优先默认 2 备用',
*/
private String conditions;

9
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java

@ -22,6 +22,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@ -291,8 +293,11 @@ public class AftersalesWorkOrderEntity extends TenantEntity {
* 离职状态
*/
private boolean departStatus;
/**
* 金额总和
*/
@TableField(exist=false)
private String totalAmountNum;

11
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java

@ -20,6 +20,7 @@ import com.logpm.aftersales.entity.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.List;
/**
@ -88,6 +89,12 @@ public class AftersalesWorkOrderVO extends AftersalesWorkOrderEntity {
* 预计责任人信息
*/
private List<AftersalesCompletionRecipientEntity> completionRecipientEntityList;
/**
* 工单异常类型
*/
private String workOrderType;
/**
* 赔款金额总和
*/
private String totalAmount;
}

44
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesCustomerMallController.java

@ -16,6 +16,10 @@
*/
package com.logpm.aftersales.controller;
import com.logpm.aftersales.dto.AftersalesCustomerMallDTO;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.wrapper.AftersalesWorkOrderWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -23,6 +27,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -52,8 +57,9 @@ import javax.servlet.http.HttpServletResponse;
* @since 2023-12-23
*/
@RestController
@Slf4j
@AllArgsConstructor
@RequestMapping("blade-aftersales/aftersalesCustomerMall")
@RequestMapping("/aftersalesCustomerMall")
@Api(value = "异常工单商场对应客服", tags = "异常工单商场对应客服接口")
public class AftersalesCustomerMallController extends BladeController {
@ -117,14 +123,17 @@ public class AftersalesCustomerMallController extends BladeController {
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入aftersalesCustomerMall")
public R submit(@Valid @RequestBody AftersalesCustomerMallEntity aftersalesCustomerMall) {
return R.status(aftersalesCustomerMallService.saveOrUpdate(aftersalesCustomerMall));
public R submit(@RequestBody AftersalesCustomerMallDTO aftersalesCustomerMallDTO) {
List<AftersalesCustomerMallEntity> aftersalesCustomerMallEntities = aftersalesCustomerMallDTO.getAftersalesCustomerMallEntities();
for (AftersalesCustomerMallEntity aftersalesCustomerMallEntity : aftersalesCustomerMallEntities) {
aftersalesCustomerMallService.save(aftersalesCustomerMallEntity);
}
return R.success("新增成功");
}
/**
* 异常工单商场对应客服 删除
*/
@PostMapping("/remove")
@GetMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
@ -148,4 +157,29 @@ public class AftersalesCustomerMallController extends BladeController {
ExcelUtil.export(response, "异常工单商场对应客服数据" + DateUtil.time(), "异常工单商场对应客服数据表", list, AftersalesCustomerMallExcel.class);
}
/**
* 设为默认的客服
*/
@PostMapping("/setDefault")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "设为默认的客服", notes = "传入aftersalesCustomerMall")
public R setDefault(@Valid @RequestBody AftersalesCustomerMallEntity aftersalesCustomerMall) {
return R.status(aftersalesCustomerMallService.setDefault(aftersalesCustomerMall));
}
/**
* 客服异常工单 查询异常工单完整数据集合
*/
@GetMapping("/listOwn")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询异常工单完整数据集合", notes = "传入aftersalesWorkOrder")
public R<IPage<AftersalesCustomerMallEntity>> getListOwn(@ApiIgnore @RequestParam Map<String, Object> aftersalesCustomerMallEntity, Query query) {
IPage<AftersalesCustomerMallEntity> pages = aftersalesCustomerMallService.pageListOwn(aftersalesCustomerMallEntity, Condition.getPage(query));
return R.data(pages);
}
}

17
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -22,6 +22,8 @@ import com.logpm.aftersales.entity.AftersaleSurveyRecordEntity;
import com.logpm.aftersales.entity.AftersalesAppealEntity;
import com.logpm.aftersales.entity.AftersalesSettlementEntity;
import com.logpm.aftersales.excel.AftersalesWorkOrderImporter;
import com.logpm.aftersales.mapper.AftersalesCompletionRecordMapper;
import com.logpm.aftersales.service.IAftersalesCompletionRecordService;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.xxl.job.core.handler.annotation.XxlJob;
@ -56,6 +58,7 @@ import org.springblade.core.excel.util.ExcelUtil;
import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;
import java.util.List;
@ -76,6 +79,7 @@ public class AftersalesWorkOrderController extends BladeController {
private final IAftersalesWorkOrderService aftersalesWorkOrderService;
private final IBasicdataWarehouseClient warehouseClient;
private final IAftersalesCompletionRecordService aftersalesCompletionRecordService;
/**
* 客服异常工单 详情
@ -118,7 +122,17 @@ public class AftersalesWorkOrderController extends BladeController {
log.info("异常工单查询参数》》》{}",aftersalesWorkOrder);
try{
IPage<AftersalesWorkOrderEntity> pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query));
return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
R<IPage<AftersalesWorkOrderVO>> data = R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
data.getData().getRecords().forEach(item -> {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (ObjectUtils.isNotNull(myCurrentWarehouse)){
item.setTotalAmount(aftersalesCompletionRecordService.getTotalMoney(item,myCurrentWarehouse.getId()));
log.info("没有仓库信息");
}
});
return data;
}catch (Exception e){
log.error("工单查询系统异常》》》{}",e.getMessage());
return R.fail("系统异常!");
@ -698,6 +712,7 @@ public class AftersalesWorkOrderController extends BladeController {
/**
* 导出数据
*
*/
@GetMapping("/export-aftersalesWorkOrder")
@ApiOperationSupport(order = 9)

3
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesCustomerMallDTO.java

@ -20,6 +20,8 @@ import com.logpm.aftersales.entity.AftersalesCustomerMallEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 异常工单商场对应客服 数据传输对象实体类
*
@ -31,4 +33,5 @@ import lombok.EqualsAndHashCode;
public class AftersalesCustomerMallDTO extends AftersalesCustomerMallEntity {
private static final long serialVersionUID = 1L;
private List<AftersalesCustomerMallEntity> aftersalesCustomerMallEntities ;
}

44
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesOvertimeFineExcel.java

@ -42,48 +42,6 @@ public class AftersalesOvertimeFineExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
/**
* 异常工单ID
*/
@ -101,7 +59,7 @@ public class AftersalesOvertimeFineExcel implements Serializable {
*/
@ColumnWidth(20)
@ExcelProperty("超时时间")
private Date timeout;
private String timeout;
/**
* 仓库ID
*/

137
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java

@ -17,6 +17,7 @@
package com.logpm.aftersales.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import lombok.Data;
import java.util.Date;
@ -48,18 +49,23 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("工单异常类型")
private String workOrderTypeName;
/**
* 发起工单标识;PDAPC
*/
@ColumnWidth(20)
@ExcelProperty("发起工单标识")
private String initiationIdentification;
@ExcelIgnore //工单异常类型
private String workOrderType;
/**
* 发现节点;提货发货干线库内配送其他签收PC安装PC
*/
@ColumnWidth(20)
@ExcelProperty("发现节点")
private String discoveryNodeName;
@ExcelIgnore //发现节点
private String discoveryNode;
/**
* 发起工单标识;PDAPC
*/
// @ColumnWidth(20)
// @ExcelProperty("发起工单标识")
@ExcelIgnore
private String initiationIdentification;
/**
* 异常工单号
*/
@ -78,12 +84,6 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("订单自编号")
private String orderCode;
/**
* 车次号 (干线卸车环节)
*/
@ColumnWidth(20)
@ExcelProperty("车次号 (干线卸车环节)")
private String trainNumber;
/**
* 一级品类
*/
@ -97,11 +97,31 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ExcelProperty("二级品类")
private String secondary;
/**
* 车辆路线;车次号通过车次号自动带出车辆线路
* 运单商场
*/
@ColumnWidth(20)
@ExcelProperty("车辆路线;车次号、通过车次号自动带出车辆线路")
private String vehicleRoute;
@ExcelProperty("运单商场")
private String waybillMall;
/**
* 工单状态
*/
@ColumnWidth(20)
@ExcelProperty("工单状态")
private String workOrderStatus;
@ColumnWidth(20)
@ExcelProperty("品牌")
private String brandName;
/**
* 归属客服ID
*/
@ExcelIgnore
private String customerServiceId;
/**
* 归属客服名称
*/
@ColumnWidth(20)
@ExcelProperty("归属客服名称")
private String customerServiceName;
/**
* 送货时间
*/
@ -120,18 +140,6 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("入库时间(库内作业环节)")
private Date warehousingTime;
/**
* 运单商场
*/
@ColumnWidth(20)
@ExcelProperty("运单商场")
private String waybillMall;
/**
* 备注
*/
@ColumnWidth(20)
@ExcelProperty("备注")
private String remarks;
/**
* 配送时间(配送装车环节)
*/
@ -145,29 +153,17 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ExcelProperty("配送司机(配送装车环节)")
private String deliveryDriver;
/**
* 工单状态
*/
@ColumnWidth(20)
@ExcelProperty("工单状态")
private String workOrderStatus;
/**
* 归属客服ID
*/
@ColumnWidth(20)
@ExcelProperty("归属客服ID")
private String customerServiceId;
/**
* 归属客服名称
* 车次号 (干线卸车环节)
*/
@ColumnWidth(20)
@ExcelProperty("归属客服名称")
private String customerServiceName;
@ExcelProperty("车次号 (干线卸车环节)")
private String trainNumber;
/**
* 商场ID
* 车辆路线;车次号通过车次号自动带出车辆线路
*/
@ColumnWidth(20)
@ExcelProperty("商场ID")
private String waybillMallId;
@ExcelProperty("车辆路线;车次号、通过车次号自动带出车辆线路")
private String vehicleRoute;
/**
* 完结时间
*/
@ -180,24 +176,6 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("异常问题描述")
private String problemDescription;
/**
* 仓库ID
*/
@ColumnWidth(20)
@ExcelProperty("仓库ID")
private String warehouseId;
/**
* 责任人 库内作业环节
*/
@ColumnWidth(20)
@ExcelProperty("责任人 (库内作业环节)")
private String personResponsible;
/**
* 钉钉流程号
*/
@ColumnWidth(20)
@ExcelProperty("钉钉流程号")
private String processNumber;
/**
* 审核人
*/
@ -216,6 +194,39 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("财务入账时间")
private Date entryTime;
/**
* 备注
*/
@ColumnWidth(20)
@ExcelProperty("备注")
private String remarks;
// /**
// * 商场ID
// */
// @ColumnWidth(20)
// @ExcelProperty("商场ID")
// private String waybillMallId;
//
// /**
// * 仓库ID
// */
// @ColumnWidth(20)
// @ExcelProperty("仓库ID")
// private String warehouseId;
/**
* 责任人 库内作业环节
*/
@ColumnWidth(20)
@ExcelProperty("责任人 (库内作业环节)")
private String personResponsible;
/**
* 钉钉流程号
*/
@ColumnWidth(20)
@ExcelProperty("钉钉流程号")
private String processNumber;
/**
* 操作人
*/

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.java

@ -22,6 +22,7 @@ import com.logpm.aftersales.excel.AftersalesCompletionRecordExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -51,4 +52,5 @@ public interface AftersalesCompletionRecordMapper extends BaseMapper<AftersalesC
*/
List<AftersalesCompletionRecordExcel> exportAftersalesCompletionRecord(@Param("ew") Wrapper<AftersalesCompletionRecordEntity> queryWrapper);
String getTotalMoney(@Param("param") AftersalesWorkOrderVO aftersalesWorkOrderVO, @Param("warehouseId") Long id);
}

4
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.xml

@ -35,5 +35,9 @@
<select id="exportAftersalesCompletionRecord" resultType="com.logpm.aftersales.excel.AftersalesCompletionRecordExcel">
SELECT * FROM logpm_aftersales_completion_record ${ew.customSqlSegment}
</select>
<select id="getTotalMoney" resultType="java.lang.String">
SELECT SUM(money) AS money FROM logpm_aftersales_completion_record where work_order_id = #{param.id} and
is_deleted = 0 and warehouse_id = #{warehouseId}
</select>
</mapper>

14
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCustomerMallMapper.java

@ -17,6 +17,8 @@
package com.logpm.aftersales.mapper;
import com.logpm.aftersales.entity.AftersalesCustomerMallEntity;
import com.logpm.aftersales.entity.AftersalesSettlementEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.vo.AftersalesCustomerMallVO;
import com.logpm.aftersales.excel.AftersalesCustomerMallExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -24,6 +26,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 异常工单商场对应客服 Mapper 接口
@ -51,4 +54,15 @@ public interface AftersalesCustomerMallMapper extends BaseMapper<AftersalesCusto
*/
List<AftersalesCustomerMallExcel> exportAftersalesCustomerMall(@Param("ew") Wrapper<AftersalesCustomerMallEntity> queryWrapper);
/**
* 根据仓库查找对应的客服
*/
List<AftersalesCustomerMallEntity> getByWarehouseCode(@Param("clientId")String clientId);
boolean setDefault(@Param("param") AftersalesCustomerMallEntity aftersalesCustomerMall);
IPage<AftersalesCustomerMallEntity> pageListOwn(@Param("param") AftersalesCustomerMallEntity aftersalesCustomerMallEntity, IPage<Object> page);
}

37
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCustomerMallMapper.xml

@ -8,12 +8,45 @@
<select id="selectAftersalesCustomerMallPage" resultMap="aftersalesCustomerMallResultMap">
select * from logpm_aftersales_customer_mall where is_deleted = 0
select *
from logpm_aftersales_customer_mall
where is_deleted = 0
</select>
<select id="exportAftersalesCustomerMall" resultType="com.logpm.aftersales.excel.AftersalesCustomerMallExcel">
SELECT * FROM logpm_aftersales_customer_mall ${ew.customSqlSegment}
SELECT *
FROM logpm_aftersales_customer_mall ${ew.customSqlSegment}
</select>
<select id="getByWarehouseCode" resultType="com.logpm.aftersales.entity.AftersalesCustomerMallEntity">
SELECT *
FROM `logpm_aftersales_customer_mall`
WHERE client_id = #{clientId}
and is_deleted = 0
order by create_time ASC
</select>
<update id="setDefault">
update logpm_aftersales_customer_mall
set conditions = 2
where client_id = #{param.clientId}
and is_deleted = 0 and types_of = #{param.typesOf};
update logpm_aftersales_customer_mall
set conditions = 1
where id = #{param.id}
and is_deleted = 0 and types_of = #{param.typesOf}
</update>
<select id="pageListOwn" resultType="com.logpm.aftersales.entity.AftersalesCustomerMallEntity">
select * from logpm_aftersales_customer_mall
<where>
is_deleted = 0 and types_of = #{param.typesOf}
<if test="param.customerServiceId != null and param.customerServiceId != ''">and customer_service_id = #{param.customerServiceId}</if>
<if test="param.clientName != null and param.clientName != ''">and client_name = #{clientName}</if>
<if test="param.createTime != null and param.createTime != '' ">and date_format(from_unixtime(create_time ),'%Y-%m-%d') = date_format(#{createTime },'%Y-%m-%d') </if>
</where>
</select>
</mapper>

12
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesOvertimeFineMapper.xml

@ -31,12 +31,12 @@
LEFT JOIN logpm_aftersales_work_order lawo on lawo.id = laof.work_order_id
<where>
<if test=" param.id != null and param.id != ''">and laof.id = #{param.id }</if>
<if test=" param.workOrderNumber != null and param.workOrderNumber != ''">and lawo.work_order_number = #{param.workOrderNumber }</if>
<if test=" param.workOrderType != null and param.workOrderType != ''">and lawo.work_order_type = #{param.workOrderType }</if>
<if test=" param.discoveryNode != null and param.discoveryNode != ''">and lawo.discovery_node = #{param.discoveryNode }</if>
<if test=" param.timeout != null and param.timeout != ''">and laof.timeout = #{param.timeout }</if>
<if test=" param.businessId != null and param.businessId != ''">and laof.business_id = #{param.businessId }</if>
<if test=" param.businessName != null and param.businessName != ''">and laof.business_name = #{param.businessName }</if>
<if test="param.workOrderNumber != null and param.workOrderNumber != ''">and lawo.work_order_number LIKE '%${param.workOrderNumber}%'</if>
<if test="param.workOrderType != null and param.workOrderType != ''">and lawo.work_order_type LIKE '%${param.workOrderType}%'</if>
<if test="param.discoveryNode != null and param.discoveryNode != ''">and lawo.discovery_node LIKE '%${param.discoveryNode}%'</if>
<if test="param.timeout != null and param.timeout != ''">and laof.timeout LIKE '%${param.timeout}%'</if>
<if test="param.businessId != null and param.businessId != ''">and laof.business_id LIKE '%${param.businessId}%'</if>
<if test="param.businessName != null and param.businessName != ''">and laof.business_name LIKE '%${param.businessName}%'</if>
<if test=" param.createTime != null "> and date_format(from_unixtime(laof.create_time),'%Y-%m-%d') = date_format(#{param.createTime}),'%Y-%m-%d')</if>
</where>
</select>

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.java

@ -51,7 +51,7 @@ public interface AftersalesWorkOrderMapper extends BaseMapper<AftersalesWorkOrde
* @param queryWrapper
* @return
*/
List<AftersalesWorkOrderExcel> exportAftersalesWorkOrder(@Param("ew") Wrapper<AftersalesWorkOrderEntity> queryWrapper);
List<AftersalesWorkOrderVO> exportAftersalesWorkOrder(@Param("param") AftersalesWorkOrderEntity workOrderEntity);
/**
* 查询待处理的异常工单数据

240
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -48,16 +48,51 @@
<result column="audit_time" property="auditTime"/>
<result column="entry_time" property="entryTime"/>
<result column="operator" property="operator"/>
</resultMap>
<!--查询完整的异常工单信息-->
<select id="pageListOwn" resultType="com.logpm.aftersales.entity.AftersalesWorkOrderEntity">
select DISTINCT lawo.id,lawo.work_order_type,lawo.discovery_node,lawo.work_order_number,lawo.waybill_number,lawo.order_code,lawo.train_number,lawo.first,
lawo.secondary,lawo.vehicle_route,lawo.deliver_goods_time,lawo.discovery_time,lawo.warehousing_time,lawo.waybill_mall,lawo.remarks,lawo.delivery_time,
lawo.delivery_driver,lawo.work_order_status,lawo.problem_description,lawo.responsible_person,lawo.processed_by,lawo.create_time,
lawo.customer_service_name customerServiceName,lawo.warehouse_id warehouseId,lawo.brand_name brandName,lawo.customer_service_id customerServiceId
from logpm_aftersales_work_order lawo
LEFT JOIN logpm_aftersales_processor lap on lawo.id = lap.work_order_id and lap.types_of = '2' and lap.conditions in (1,2)
LEFT JOIN logpm_aftersales_completion_record lacr on lacr.work_order_id = lawo.id and lacr.is_deleted = '0'
SELECT DISTINCT
lawo.id,
lawo.work_order_type,
lawo.discovery_node,
lawo.work_order_number,
lawo.waybill_number,
lawo.order_code,
lawo.train_number,
lawo.FIRST,
lawo.secondary,
lawo.vehicle_route,
lawo.deliver_goods_time,
lawo.discovery_time,
lawo.warehousing_time,
lawo.waybill_mall,
lawo.remarks,
lawo.delivery_time,
lawo.delivery_driver,
lawo.work_order_status,
lawo.problem_description,
lawo.responsible_person,
lawo.processed_by,
lawo.create_time,
lawo.over_time,
lawo.reviewed_by,
lawo.audit_time,
lawo.entry_time,
lawo.operator,
lawo.person_responsible,
lawo.process_number,
lawo.customer_service_name customerServiceName,
lawo.warehouse_id warehouseId,
lawo.brand_name brandName,
lawo.customer_service_id customerServiceId
FROM
logpm_aftersales_work_order lawo
LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id
AND lap.types_of = '2'
AND lap.conditions IN ( 1, 2 )
LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id
AND lacr.is_deleted = '0'
<where>
lawo.is_deleted = 0
<if test="param.id != null and param.id != '' ">and lawo.id = #{param.id } </if>
@ -74,6 +109,7 @@
<!-- create_time >= unix_timestamp('2013-10-24 00:00:00') and create_time <= unix_timestamp('2013-10-24 23:59:59')
date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
-->
<if test="param.brandName !=null and param.brandName !='' " >and lawo.brand_name like concat('%', #{param.brandName },'%') </if>
<if test="param.deliverGoodsTime != null and param.deliverGoodsTime != '' ">and date_format(from_unixtime( lawo.deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test="param.discoveryTime != null and param.discoveryTime != '' ">and date_format(from_unixtime(lawo.discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test="param.warehousingTime != null and param.warehousingTime != '' "> and date_format(from_unixtime(lawo.warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
@ -148,22 +184,162 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
select * from logpm_aftersales_work_order where is_deleted = 0
</select>
<select id="exportAftersalesWorkOrder" resultType="com.logpm.aftersales.excel.AftersalesWorkOrderExcel">
SELECT * FROM logpm_aftersales_work_order ${ew.customSqlSegment}
<!-- 导出-->
<select id="exportAftersalesWorkOrder" resultType="com.logpm.aftersales.vo.AftersalesWorkOrderVO">
SELECT DISTINCT
lawo.id,
lawo.work_order_type,
lawo.discovery_node,
lawo.work_order_number,
lawo.waybill_number,
lawo.order_code,
lawo.train_number,
lawo.FIRST,
lawo.secondary,
lawo.vehicle_route,
lawo.deliver_goods_time,
lawo.discovery_time,
lawo.warehousing_time,
lawo.waybill_mall,
lawo.remarks,
lawo.delivery_time,
lawo.delivery_driver,
lawo.work_order_status,
lawo.problem_description,
lawo.responsible_person,
lawo.processed_by,
lawo.create_time,
lawo.over_time,
lawo.reviewed_by,
lawo.audit_time,
lawo.entry_time,
lawo.operator,
lawo.person_responsible,
lawo.process_number,
lawo.customer_service_name customerServiceName,
lawo.warehouse_id warehouseId,
lawo.brand_name brandName,
lawo.customer_service_id customerServiceId
FROM
logpm_aftersales_work_order lawo
LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id
AND lap.types_of = '2'
AND lap.conditions IN ( 1, 2 )
LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id
AND lacr.is_deleted = '0'
<where>
lawo.is_deleted = 0
<if test="param.id != null and param.id != '' ">and lawo.id = #{param.id } </if>
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
<if test="param.initiationIdentification != null and param.initiationIdentification != '' ">and lawo.initiation_identification = #{param.initiationIdentification } </if>
<if test="param.discoveryNode != null and param.discoveryNode != '' ">and lawo.discovery_node = #{param.discoveryNode } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test="param.first != null and param.first != '' ">and lawo.first like concat('%', #{param.first },'%') </if>
<if test="param.secondary != null and param.secondary != '' ">and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<!-- create_time >= unix_timestamp('2013-10-24 00:00:00') and create_time <= unix_timestamp('2013-10-24 23:59:59')
date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
-->
<if test="param.brandName !=null and param.brandName !='' " >and lawo.brand_name like concat('%', #{param.brandName },'%') </if>
<if test="param.deliverGoodsTime != null and param.deliverGoodsTime != '' ">and date_format(from_unixtime( lawo.deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test="param.discoveryTime != null and param.discoveryTime != '' ">and date_format(from_unixtime(lawo.discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test="param.warehousingTime != null and param.warehousingTime != '' "> and date_format(from_unixtime(lawo.warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
<if test="param.deliveryTime != null and param.deliveryTime != '' ">and date_format(from_unixtime( lawo.delivery_time),'%Y-%m-%d') = date_format(#{param.deliveryTime} param.deliveryTime,'%Y-%m-%d') </if>
<if test="param.auditTime != null and param.auditTime != '' ">and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test="param.entryTime != null and param.entryTime != '' ">and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test="param.overTime != null and param.overTime != '' ">and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test="param.waybillMall != null and param.waybillMall != '' ">and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') </if>
<if test="param.deliveryDriver != null and param.deliveryDriver != '' ">and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test="param.customerServiceState != null and param.customerServiceState == 30 "> and lawo.work_order_status in ('30','40') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 20 "> and lawo.work_order_status in ('30') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 10 "> and lawo.work_order_status in ('80','100') </if>
<if test="param.customerServiceId != null and param.customerServiceId != '' ">and lawo.customer_service_id = #{param.customerServiceId } </if>
<if test="param.customerServiceName != null and param.customerServiceName != '' ">and lawo.customer_service_name like concat('%', #{param.customerServiceName },'%') </if>
<if test="param.waybillMallId != null and param.waybillMallId != '' ">and lawo.waybill_mall_id = #{param.waybillMallId } </if>
<if test="param.problemDescription != null and param.problemDescription != '' ">and lawo.problem_description = #{param.problemDescription} </if>
<if test="param.warehouseId != null and param.warehouseId != '' and param.handleStatus != 20">and lawo.warehouse_id = #{param.warehouseId} </if>
<if test="param.personResponsible != null and param.personResponsible != '' ">and lawo.person_responsible = #{param.personResponsible } </if>
<if test="param.processNumber != null and param.processNumber != '' ">and lawo.process_number = #{param.processNumber } </if>
<if test="param.reviewedBy != null and param.reviewedBy != '' ">and lawo.reviewed_by = #{param.reviewedBy } </if>
<if test="param.operator != null and param.operator != '' ">and lawo.operator = #{param.operator } </if>
<if test="param.responsiblePerson != null and param.responsiblePerson != '' ">and lawo.responsible_person = #{param.responsiblePerson } </if>
<if test="param.processedBy != null and param.processedBy != '' ">and lawo.processed_by = #{param.processedBy} </if>
<if test="param.investigationProcess != null and param.investigationProcess != '' ">and lawo.investigation_process = #{param.investigationProcess } </if>
<if test="param.relatedWorkOrdersId != null and param.relatedWorkOrdersId != '' ">and lawo.related_work_orders_id = #{param.relatedWorkOrdersId } </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != ''">and lawo.work_order_status in( #{param.workOrderStatus }) </if>
<if test="param.customerIdentification != null and param.customerIdentification == 1 ">
and lawo.work_order_status IN ( '10', '20', '21', '30', '40', '50', '60', '70', '80', '90' ,'100','110')
</if>
<if test="param.handleStatus!= null and param.handleStatus == 30">and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<!-- <if test="param.handleStatus!= null and param.handleStatus == 10 ">and lawo.warehouse_id = #{param.warehouseId} </if>-->
<if test="param.handleStatus!= null and param.handleStatus == 20 ">and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
<if test="param.handleStatus != null "> or 1=1 </if>
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
<if test="param.discoveryNode != null and param.discoveryNode != '' ">and lawo.discovery_node = #{param.discoveryNode } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test="param.first != null and param.first != '' ">and lawo.first like concat('%', #{param.first },'%') </if>
<if test="param.secondary != null and param.secondary != '' ">and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<if test="param.warehouseId != null and param.warehouseId != '' and param.handleStatus != 20 "> and lap.business_id = #{param.warehouseId} </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 "> and lawo.work_order_status in ( #{param.workOrderStatus }) </if>
<!-- <if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == null "> and lawo.work_order_status in ( #{param.workOrderStatus }) and lap.types_of = '2' </if>-->
<if test="param.handleStatus != null and param.handleStatus == 40 "> and lawo.work_order_status in ('10','20' ) and lap.types_of = '2' and lap.processing_status in ('1') </if>
<if test="param.handleStatus!= null and param.handleStatus == 10 ">and lap.types_of = '2' </if>
<if test="param.handleStatus!= null and param.handleStatus == 30">and lawo.work_order_status in (21,30,40) and lap.processing_status = '4' </if>
<if test="param.handleStatus!= null and param.handleStatus == 20 ">and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
ORDER BY lawo.create_time DESC
</where>
</select>
<select id="getPendingWorkOrder" resultType="com.logpm.aftersales.vo.AftersalesWorkOrderVO">
select DISTINCT law.id,law.work_order_type, law.initiation_identification,law.discovery_node,law.work_order_number,law.waybill_number,law.order_code, law.train_number, law.first,
law.secondary, law.vehicle_route,law.deliver_goods_time, law.discovery_time, law.warehousing_time, law.waybill_mall,law.remarks, law.delivery_time,law.delivery_driver
,law.work_order_status, law.customer_service_id, law.customer_service_name,law.waybill_mall_id,law.over_time, law.problem_description,law.warehouse_id, law.person_responsible,
law.process_number, law.reviewed_by, law.audit_time, law.entry_time, law.operator
from logpm_aftersales_processor lap
LEFT JOIN logpm_aftersales_work_order law on lap.work_order_id = law.id
SELECT DISTINCT
law.id,
law.work_order_type,
law.initiation_identification,
law.discovery_node,
law.work_order_number,
law.waybill_number,
law.order_code,
law.train_number,
law.FIRST,
law.secondary,
law.vehicle_route,
law.deliver_goods_time,
law.discovery_time,
law.warehousing_time,
law.waybill_mall,
law.remarks,
law.delivery_time,
law.delivery_driver,
law.work_order_status,
law.customer_service_id,
law.customer_service_name,
law.waybill_mall_id,
law.over_time,
law.problem_description,
law.warehouse_id,
law.person_responsible,
law.process_number,
law.reviewed_by,
law.audit_time,
law.entry_time,
law.operator
FROM
logpm_aftersales_processor lap
LEFT JOIN logpm_aftersales_work_order law ON lap.work_order_id = law.id
<where>
lap.conditions != '3' and lap.is_deleted = 0 and law.id is not null and lap.processing_status in ('1','3') and lap.types_of = '2' and law.work_order_status in ('10','20','30')
<if test="param.workOrderStatus != null and param.workOrderStatus != ''">and law.work_order_status = #{param.workOrderStatus}</if>
<if test="param.warehouseId != null and param.warehouseId != ''">and lap.business_id = #{param.warehouseId}</if>
<if test="param.workOrderTypeNameS != null and param.workOrderTypeNameS != ''">and law.work_order_type = #{param.workOrderTypeNameS}</if>
</where>
</select>
@ -186,22 +362,22 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
from logpm_aftersales_settlement las
<where>
las.processing_status = '4' and las.is_deleted = 0
<if test="param.businessId != null "> and las.business_id = #{param.businessId }</if>
<if test="param.businessName != null and param.businessName != '' "> and las.business_name = #{param.businessName }</if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' "> and las.work_order_number = #{param.workOrderNumber }</if>
<if test="param.businessName != null and param.businessName != '' "> and las.business_name = #{param.businessName }</if>
<if test="param.brandName != null and param.brandName != '' "> and las.brand_name = #{param.brandName }</if>
<if test="param.mallName != null and param.mallName != '' "> and las.mall_name = #{param.mallName }</if>
<if test="param.waybillNumber != null and param.waybillNumber != '' "> and las.waybill_number = #{param.waybillNumber }</if>
<if test="param.workOrderType != null and param.workOrderType != '' "> and las.work_order_type = #{param.workOrderType }</if>
<if test="param.resultType != null and param.resultType != '' "> and las.result_type = #{param.resultType }</if>
<if test="param.discoveryNode != null and param.discoveryNode != '' "> and las.discovery_node = #{param.discoveryNode }</if>
<if test="param.resultDescription != null and param.resultDescription != '' "> and las.result_description = #{param.resultDescription }</if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' "> and las.vehicle_route = #{param.vehicleRoute }</if>
<if test="param.indemnitor != null and param.indemnitor != '' "> and las.indemnitor = #{param.indemnitor }</if>
<if test="param.reason != null and param.reason != '' "> and las.reason = #{param.reason }</if>
<if test="param.createTime != null and param.createTime != '' "> and date_format(from_unixtime(las.create_time),'%Y-%m-%d') = date_format(#{param.createTime}),'%Y-%m-%d') </if>
<if test="param.processNumber != null and param.processNumber != '' "> and las.process_number = #{param.processNumber }</if>
<if test="param.businessId != null"> and las.business_id LIKE CONCAT('%', #{param.businessId}, '%')</if>
<if test="param.businessName != null and param.businessName != ''"> and las.business_name LIKE CONCAT('%', #{param.businessName}, '%')</if>
<if test="param.workOrderNumber != null and param.workOrderNumber != ''"> and las.work_order_number LIKE CONCAT('%', #{param.workOrderNumber}, '%')</if>
<if test="param.brandName != null and param.brandName != ''"> and las.brand_name LIKE CONCAT('%', #{param.brandName}, '%')</if>
<if test="param.mallName != null and param.mallName != ''"> and las.mall_name LIKE CONCAT('%', #{param.mallName}, '%')</if>
<if test="param.waybillNumber != null and param.waybillNumber != ''"> and las.waybill_number LIKE CONCAT('%', #{param.waybillNumber}, '%')</if>
<if test="param.workOrderType != null and param.workOrderType != ''"> and las.work_order_type LIKE CONCAT('%', #{param.workOrderType}, '%')</if>
<if test="param.resultType != null and param.resultType != ''"> and las.result_type LIKE CONCAT('%', #{param.resultType}, '%')</if>
<if test="param.discoveryNode != null and param.discoveryNode != ''"> and las.discovery_node LIKE CONCAT('%', #{param.discoveryNode}, '%')</if>
<if test="param.resultDescription != null and param.resultDescription != ''"> and las.result_description LIKE CONCAT('%', #{param.resultDescription}, '%')</if>
<if test="param.vehicleRoute != null and param.vehicleRoute != ''"> and las.vehicle_route LIKE CONCAT('%', #{param.vehicleRoute}, '%')</if>
<if test="param.indemnitor != null and param.indemnitor != ''"> and las.indemnitor LIKE CONCAT('%', #{param.indemnitor}, '%')</if>
<if test="param.reason != null and param.reason != ''"> and las.reason LIKE CONCAT('%', #{param.reason}, '%')</if>
<if test="param.createTime != null and param.createTime != ''"> and date_format(from_unixtime(las.create_time),'%Y-%m-%d') LIKE date_format(CONCAT('%', #{param.createTime}, '%'),'%Y-%m-%d')</if>
<if test="param.processNumber != null and param.processNumber != ''"> and las.process_number LIKE CONCAT('%', #{param.processNumber}, '%')</if>
</where>
</select>

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCompletionRecordService.java

@ -21,6 +21,7 @@ import com.logpm.aftersales.entity.AftersalesCompletionRecordEntity;
import com.logpm.aftersales.vo.AftersalesCompletionRecordVO;
import com.logpm.aftersales.excel.AftersalesCompletionRecordExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
@ -49,4 +50,8 @@ public interface IAftersalesCompletionRecordService extends BaseService<Aftersal
*/
List<AftersalesCompletionRecordExcel> exportAftersalesCompletionRecord(Wrapper<AftersalesCompletionRecordEntity> queryWrapper);
/**
* 获取金额总数
*/
String getTotalMoney(AftersalesWorkOrderVO aftersalesWorkOrder, Long id);
}

4
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCustomerMallService.java

@ -23,6 +23,7 @@ import com.logpm.aftersales.excel.AftersalesCustomerMallExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
import java.util.Map;
/**
* 异常工单商场对应客服 服务类
@ -49,4 +50,7 @@ public interface IAftersalesCustomerMallService extends BaseService<AftersalesCu
*/
List<AftersalesCustomerMallExcel> exportAftersalesCustomerMall(Wrapper<AftersalesCustomerMallEntity> queryWrapper);
boolean setDefault(AftersalesCustomerMallEntity aftersalesCustomerMall);
IPage<AftersalesCustomerMallEntity> pageListOwn(Map<String, Object> aftersalesCustomerMallEntity, IPage<Object> page);
}

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesCompletionRecordServiceImpl.java

@ -21,6 +21,7 @@ import com.logpm.aftersales.vo.AftersalesCompletionRecordVO;
import com.logpm.aftersales.excel.AftersalesCompletionRecordExcel;
import com.logpm.aftersales.mapper.AftersalesCompletionRecordMapper;
import com.logpm.aftersales.service.IAftersalesCompletionRecordService;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -51,4 +52,8 @@ public class AftersalesCompletionRecordServiceImpl extends BaseServiceImpl<After
return aftersalesCompletionRecordList;
}
@Override
public String getTotalMoney(AftersalesWorkOrderVO aftersalesWorkOrderVO, Long id) {
return baseMapper.getTotalMoney(aftersalesWorkOrderVO,id);
}
}

13
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesCustomerMallServiceImpl.java

@ -17,9 +17,11 @@
package com.logpm.aftersales.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.aftersales.entity.AftersalesCustomerMallEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.excel.AftersalesCustomerMallExcel;
import com.logpm.aftersales.mapper.AftersalesCustomerMallMapper;
import com.logpm.aftersales.service.IAftersalesCustomerMallService;
@ -29,6 +31,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 异常工单商场对应客服 服务实现类
@ -54,4 +57,14 @@ public class AftersalesCustomerMallServiceImpl extends BaseServiceImpl<Aftersale
return aftersalesCustomerMallList;
}
@Override
public boolean setDefault(AftersalesCustomerMallEntity aftersalesCustomerMall) {
return baseMapper.setDefault(aftersalesCustomerMall);
}
@Override
public IPage<AftersalesCustomerMallEntity> pageListOwn(Map<String, Object> aftersalesCustomerMallEntity, IPage<Object> page) {
AftersalesCustomerMallEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesCustomerMallEntity), AftersalesCustomerMallEntity.class);
return baseMapper.pageListOwn(workOrderEntity, page);
}
}

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

@ -31,6 +31,7 @@ import com.logpm.aftersales.dto.AftersalesPersonResponsibleDTO;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.*;
import com.logpm.aftersales.mapper.AftersalesAppealMapper;
import com.logpm.aftersales.mapper.AftersalesCustomerMallMapper;
import com.logpm.aftersales.service.*;
import com.logpm.aftersales.vo.*;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
@ -106,7 +107,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
private final ISysClient sysClient;
private final AftersalesCustomerMallMapper aftersalesCustomerMallMapper;
private final IUserSearchClient userSearchClient;
@ -118,14 +119,128 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
@Override
public List<AftersalesWorkOrderExcel> exportAftersalesWorkOrder(Map<String, Object> objectMap) {
//查询用户角色信息
BladeUser user = AuthUtil.getUser();
String roleName = user.getRoleName();
String tenantId = user.getTenantId();
//查询客服岗位
List<DictBiz> warehouseType = DictBizCache.getList("after_sales_visits");
if (warehouseType.isEmpty()) {
throw new ServiceException("注意,注意!售后访问字典未配置!请配置!");
} else {
Optional<DictBiz> first = warehouseType.stream().filter(i -> {
if (i.getDictValue().equals(roleName)) {
return true;
}
return false;
}).findFirst();
Object workOrderStatus = objectMap.get("workOrderStatus");
if(first.isPresent()){
//存在
String dictValue = first.get().getDictKey();
switch (dictValue){
case "1": //客服经理 查询全部待处理工单
//待处理
if( ObjectUtils.isNotNull( workOrderStatus ) && "500".equals(workOrderStatus)){
objectMap.remove("workOrderStatus");
objectMap.put("customerServiceState","30");
}else if(ObjectUtils.isNotNull( workOrderStatus ) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus)) {
objectMap.remove("workOrderStatus");
objectMap.put("customerServiceState","10");
}else if( ObjectUtils.isNull( workOrderStatus ) ){
objectMap.put("customerIdentification", "1");
}
break;
case "2": // 营业部客服
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNotNull(myCurrentWarehouse)){
objectMap.put("warehouseId", myCurrentWarehouse.getId());
}else{
throw new ServiceException("请选择仓库!");
}
//已处理
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yichuli.getValue())){
objectMap.remove("workOrderStatus");
objectMap.put("handleStatus","30");
}
//待处理
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.daichuli.getValue())){
objectMap.put("handleStatus","40");
}
//处理中
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.chulizhong.getValue())){
objectMap.put("handleStatus","50");
}
//已完结
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())){
objectMap.remove("workOrderStatus");
objectMap.put("handleStatus","20");
}
//全部
if(ObjectUtils.isNotNull(workOrderStatus) && "1000".equals(workOrderStatus)){
objectMap.remove("workOrderStatus");
objectMap.put("handleStatus","10");
}
// if( ObjectUtils.isNull(workOrderStatus)){
// aftersalesWorkOrder.put("handleStatus","10");
// }
break;
case "3": //职能客服 查询自己的待处理工单
if( ObjectUtils.isNotNull( workOrderStatus ) && "500".equals(workOrderStatus)){
objectMap.remove("workOrderStatus");
objectMap.put("customerServiceState","20");
objectMap.put("customerServiceId",user.getUserId());
}else if(ObjectUtils.isNull(workOrderStatus)){
objectMap.put("customerIdentification", "1");
}else if( ObjectUtils.isNotNull( workOrderStatus ) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus) ){
objectMap.remove("workOrderStatus");
objectMap.put("customerServiceState","10");
}
break;
}
}else{
//不存在
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNotNull(myCurrentWarehouse)){
objectMap.put("warehouseId", myCurrentWarehouse.getId());
}else{
throw new ServiceException("请选择仓库!");
}
//已处理
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yichuli.getValue())){
objectMap.remove("workOrderStatus");
objectMap.put("handleStatus","30");
}
//待处理
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.daichuli.getValue())){
objectMap.put("handleStatus","40");
}
//处理中
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.chulizhong.getValue())){
objectMap.put("handleStatus","50");
}
//已完结
if(ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())){
objectMap.remove("workOrderStatus");
objectMap.put("handleStatus","20");
}
//全部
if(ObjectUtils.isNotNull(workOrderStatus) && "1000".equals(workOrderStatus)){
objectMap.remove("workOrderStatus");
objectMap.put("handleStatus","10");
}
}
}
AftersalesWorkOrderEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(objectMap), AftersalesWorkOrderEntity.class);
List<AftersalesWorkOrderExcel> aftersalesWorkOrderList = new ArrayList<>();
QueryWrapper<AftersalesWorkOrderEntity> queryWrapper = Condition.getQueryWrapper(objectMap, AftersalesWorkOrderEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(AftersalesWorkOrder::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(AftersalesWorkOrderEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
//导出
List<AftersalesWorkOrderVO> aftersalesWorkOrderEntities = baseMapper.exportAftersalesWorkOrder(workOrderEntity);
List<AftersalesWorkOrderEntity> aftersalesWorkOrderEntities = baseMapper.selectList(queryWrapper);
aftersalesWorkOrderEntities.forEach(i -> {
// aftersalesWorkOrder.setTypeName(DictCache.getValue(DictEnum.YES_NO, AftersalesWorkOrder.getType()));
AftersalesWorkOrderExcel aftersalesWorkOrderExcel = new AftersalesWorkOrderExcel();
@ -139,6 +254,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
//PDA
aftersalesWorkOrderExcel.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PDA_LINK_LNITIATION,i.getDiscoveryNode()));
}
aftersalesWorkOrderExcel.setWorkOrderTypeName(WorkOrderTypeConstant.getNameByValue(i.getWorkOrderType()));
});
return aftersalesWorkOrderList;
@ -187,6 +303,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdateOwn(AftersalesWorkOrderDTO aftersalesWorkOrder) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNull(myCurrentWarehouse)){
throw new ServiceException("请选择仓库!!");
}
@ -223,7 +340,6 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.chulijeiguoyitianxei.getValue());
}
baseMapper.insert(aftersalesWorkOrder);
}else{
//修改
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnPpackageEntityList())){
@ -666,19 +782,19 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
AftersalesWorkOrderEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderEntity.class);
IPage<AftersalesWorkOrderEntity> iPage = baseMapper.pageListOwn(page, workOrderEntity);
iPage.getRecords().forEach( i ->{
if(ObjectUtils.isNotNull(i.getCustomerServiceId())){
R<List<User>> listR = userSearchClient.listByUser(String.valueOf(i.getCustomerServiceId()));
if(ObjectUtils.isNotNull( listR.getData())){
listR.getData().forEach( a ->{
long time = new Date().getTime() / 1000;
long time = new Date().getTime() / 1000; //当前时间
if(ObjectUtils.isNotNull( a.getDownTime() )){
long l = a.getDownTime().getTime() / 1000;
if(l<= time){
i.setDepartStatus(true);
long l = a.getDownTime().getTime() / 1000; //停用时间
if(l <= time){
// 已停用
i.setDepartStatus(true); //已离职
}
}else{
i.setDepartStatus(false);
}
});
@ -686,6 +802,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
}
});
return iPage;
}
@ -719,74 +836,77 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
if(!processorEntities.isEmpty()){
String finalTenantId = tenantId;
processorEntities.forEach(i ->{
// 假设有两个时间戳(秒数)
long timestamp1 = new Date().getTime() / 1000; // 现在时间
long timestamp2 = i.getAssignTime().getTime() / 1000; // 修改时间
// 将时间戳转换为Instant对象
Instant instant1 = Instant.ofEpochSecond(timestamp1);
Instant instant2 = Instant.ofEpochSecond(timestamp2);
log.info("现在时间》》》{}",instant1);
log.info("修改时间》》》{}",instant2);
// 计算两个时间戳之间的小时差
Duration duration = Duration.between(instant1, instant2);
long seconds = duration.getSeconds();
long hours1 = seconds / 3600;
long minutes = (seconds % 3600) / 60;
long remainingseconds = seconds % 60;
String formattedTime = String.format("%02d:%02d:%02d", Math.abs(hours1), Math.abs(minutes), Math.abs(remainingseconds) ); // 差值格式化为HH:m:ss形武
System.out.println("时间差为: "+ formattedTime); // 出结
long hours = duration.toHours();
Integer number =Math.abs( Integer.valueOf((int)hours) );
int i1 = DictTimeoutEnum.huifushijian.getValue();
int ci = 0;
while (number > i1) {
i1 += DictTimeoutEnum.huifushijian.getValue();
ci += 1;
}
//查询处理方的超时的记录
List<AftersalesOvertimeFineEntity> list = aftersalesOvertimeFineService.list(Wrappers.<AftersalesOvertimeFineEntity>query().lambda()
.eq(AftersalesOvertimeFineEntity::getWorkOrderId, i.getWorkOrderId())
.eq(AftersalesOvertimeFineEntity::getProcessorId, i.getId())
);
int size = list.size();
for (int q = 0; q < ci ; q++){
//第一次超时
if(size == 0 ){
//处理超时数据
AftersalesProcessorEntity processor = new AftersalesProcessorEntity();
processor.setProcessingStatus("3");//回复超时
processor.setId(i.getId());
aftersalesProcessorService.updateById(processor);
//添加超时记录
AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity();
overtimeFineEntity.setWorkOrderId(i.getWorkOrderId());
overtimeFineEntity.setTenantId(finalTenantId);
overtimeFineEntity.setMoney(BigDecimal.valueOf(50));
overtimeFineEntity.setTimeout(formattedTime);
overtimeFineEntity.setBusinessId(i.getBusinessId());
overtimeFineEntity.setBusinessName(i.getBusinessName());
overtimeFineEntity.setProcessorId(i.getId());
aftersalesOvertimeFineService.save(overtimeFineEntity);
}else if(q > size){
//添加新的超时记录
AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity();
overtimeFineEntity.setWorkOrderId(i.getWorkOrderId());
overtimeFineEntity.setTenantId(finalTenantId);
overtimeFineEntity.setMoney(BigDecimal.valueOf(50));
overtimeFineEntity.setTimeout(formattedTime);
overtimeFineEntity.setBusinessId(i.getBusinessId());
overtimeFineEntity.setBusinessName(i.getBusinessName());
overtimeFineEntity.setProcessorId(i.getId());
aftersalesOvertimeFineService.save(overtimeFineEntity);
for (AftersalesProcessorEntity i : processorEntities) {
// 假设有两个时间戳(秒数)
long timestamp1 = new Date().getTime() / 1000; // 现在时间
long timestamp2 = i.getAssignTime().getTime() / 1000; // 修改时间
// 将时间戳转换为Instant对象
Instant instant1 = Instant.ofEpochSecond(timestamp1);
Instant instant2 = Instant.ofEpochSecond(timestamp2);
log.info("现在时间》》》{}",instant1);
log.info("修改时间》》》{}",instant2);
// 计算两个时间戳之间的小时差
Duration duration = Duration.between(instant1, instant2);
long seconds = duration.getSeconds();
long hours1 = seconds / 3600;
long minutes = (seconds % 3600) / 60;
long remainingseconds = seconds % 60;
String formattedTime = String.format("%02d:%02d:%02d", Math.abs(hours1), Math.abs(minutes), Math.abs(remainingseconds) ); // 差值格式化为HH:m:ss形武
System.out.println("时间差为: "+ formattedTime); // 出结
long hours = duration.toHours();
Integer number =Math.abs( Integer.valueOf((int)hours) );
int i1 = DictTimeoutEnum.huifushijian.getValue();
int ci = 0;
while (number > i1) {
i1 += DictTimeoutEnum.huifushijian.getValue();
ci += 1;
}
//查询处理方的超时的记录
List<AftersalesOvertimeFineEntity> list = aftersalesOvertimeFineService.list(Wrappers.<AftersalesOvertimeFineEntity>query().lambda()
.eq(AftersalesOvertimeFineEntity::getWorkOrderId, i.getWorkOrderId())
.eq(AftersalesOvertimeFineEntity::getProcessorId, i.getId())
);
int size = list.size();
for (int q = 0; q < ci ; q++){
//第一次超时
if(size == 0 ){
//处理超时数据
AftersalesProcessorEntity processor = new AftersalesProcessorEntity();
processor.setProcessingStatus("3");//回复超时
processor.setId(i.getId());
aftersalesProcessorService.updateById(processor);
//添加超时记录
AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity();
overtimeFineEntity.setWorkOrderId(i.getWorkOrderId());
overtimeFineEntity.setTenantId(finalTenantId);
overtimeFineEntity.setMoney(BigDecimal.valueOf(50));
overtimeFineEntity.setTimeout(formattedTime);
overtimeFineEntity.setBusinessId(i.getBusinessId());
overtimeFineEntity.setBusinessName(i.getBusinessName());
overtimeFineEntity.setProcessorId(i.getId());
aftersalesOvertimeFineService.save(overtimeFineEntity);
}else if(q > size){
//添加新的超时记录
AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity();
overtimeFineEntity.setWorkOrderId(i.getWorkOrderId());
overtimeFineEntity.setTenantId(finalTenantId);
overtimeFineEntity.setMoney(BigDecimal.valueOf(50));
overtimeFineEntity.setTimeout(formattedTime);
overtimeFineEntity.setBusinessId(i.getBusinessId());
overtimeFineEntity.setBusinessName(i.getBusinessName());
overtimeFineEntity.setProcessorId(i.getId());
aftersalesOvertimeFineService.save(overtimeFineEntity);
}
}
}
});
}
}
@ -1473,7 +1593,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
/**
* 营业部提交异常工单处理结果
* 营业部提交异常工单处理结果 112233
* @param aftersalesWorkOrderDTO
* @return
*/
@ -1655,7 +1775,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
//查询调查数据
List<AftersaleSurveyRecordEntity> list = aftersaleSurveyRecordService.list(Wrappers.<AftersaleSurveyRecordEntity>query().lambda()
.eq(AftersaleSurveyRecordEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId())
.eq(AftersaleSurveyRecordEntity::getDifference, "1")
//.eq(AftersaleSurveyRecordEntity::getDifference, "1")
);
aftersalesWorkOrderVO.setSurveyRecordEntities(list);
return aftersalesWorkOrderVO;
@ -1861,21 +1981,33 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
@Async
@Override
public void addAssignCustomerService(AftersalesWorkOrderDTO aftersalesWorkOrderDTO, BladeUser user) {
List<AftersalesCustomerMallEntity> list = aftersalesCustomerMallService.list(Wrappers.<AftersalesCustomerMallEntity>query().lambda()
.eq(AftersalesCustomerMallEntity::getClientId, aftersalesWorkOrderDTO.getWaybillMallId())
.eq(AftersalesCustomerMallEntity::getConditions, "1")
.eq(AftersalesCustomerMallEntity::getTypesOf, "1")
);
if(list.isEmpty()){
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<AftersalesCustomerMallEntity> aftersalesCustomerMallList = aftersalesCustomerMallMapper.getByWarehouseCode(myCurrentWarehouse.getId().toString());
if (aftersalesCustomerMallList.isEmpty()){
log.info("没有客服信息!!!");
}
if(list.size() == 1){
AftersalesCustomerMallEntity finalChoice = null; //最终 确定的AftersalesCustomerMallEntity
for (AftersalesCustomerMallEntity aftersalesCustomerMallEntity : aftersalesCustomerMallList) {
if (aftersalesCustomerMallEntity.getConditions().equals("1")){
finalChoice=aftersalesCustomerMallEntity;
break;
}
}
// 如果存在条件为1的项,则使用创建时间最早的作为选择
if (finalChoice == null) {
AftersalesCustomerMallEntity lastCustomerMall = aftersalesCustomerMallList.get(0);
finalChoice=lastCustomerMall;
}
if(finalChoice!=null){
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(aftersalesWorkOrderDTO.getId());
workOrderEntity.setCustomerServiceId(list.get(0).getCustomerServiceId());
workOrderEntity.setCustomerServiceName(list.get(0).getCustomerServiceName());
workOrderEntity.setCustomerServiceId(finalChoice.getCustomerServiceId());
workOrderEntity.setCustomerServiceName(finalChoice.getCustomerServiceName());
baseMapper.updateById(workOrderEntity);
log.info("异常工单》》》{}指派客服{}",aftersalesWorkOrderDTO.getId(),list.get(0).getCustomerServiceId());
log.info("异常工单》》》{}指派客服{}",aftersalesWorkOrderDTO.getId(),finalChoice.getCustomerServiceId());
//添加记录
AftersaleSurveyRecordDTO aftersaleSurveyRecordDTO = changName(aftersalesWorkOrderDTO, user);
aftersaleSurveyRecordDTO.setCreateUser(user.getUserId());
@ -1884,7 +2016,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersaleSurveyRecordDTO.setStatus(1);
aftersaleSurveyRecordDTO.setIsDeleted(0);
aftersaleSurveyRecordDTO.setTypesOf("1");
aftersaleSurveyRecordDTO.setProcessingResults("异常工单>"+aftersalesWorkOrderDTO.getWorkOrderNumber()+"自动指派了客服>"+list.get(0).getCustomerServiceName());
aftersaleSurveyRecordDTO.setProcessingResults("异常工单>"+aftersalesWorkOrderDTO.getWorkOrderNumber()+"自动指派了客服>"+finalChoice.getCustomerServiceName());
aftersaleSurveyRecordDTO.setDifference("3");
aftersaleSurveyRecordDTO.setWorkOrderId(aftersalesWorkOrderDTO.getId());
// aftersaleSurveyRecordDTO.setFollowWarehouseId(myCurrentWarehouse.getId());

Loading…
Cancel
Save