Browse Source

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

single_db
pref_mail@163.com 1 year ago
parent
commit
4a1d8bf0c0
  1. 7
      blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java
  2. 4
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessingMoneyEntity.java
  3. 22
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessorController.java
  4. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  5. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  6. 8
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessorService.java
  7. 19
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessorServiceImpl.java
  8. 14
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

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

@ -3,9 +3,9 @@ package org.springblade.common.constant.aftersales;
public enum WorkOrderStatusConstant {
daichuli("待处理","10"),
yichuli("已处理","30"),
chulizhong("处理中","20"),
chulijeiguoyitianxei("处理结果已填写","21"),
yichuli("已处理","30"),
daishenhe("待审核","40"),
yishenhe("已审核","50"),
chaoshiweichuli("超时未处理","60"),
@ -13,10 +13,7 @@ public enum WorkOrderStatusConstant {
yiwanjei("完结","80"),
lipeijineweichu("理赔金额未出","90"),
shenshuzhong("申述中","100"),
yijeishu("已结束","110"),
yuzhangdan("预账单","120"),
quedingzhangdan("确定账单","130")
yijeishu("已结束","110")
;

4
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessingMoneyEntity.java

@ -17,6 +17,7 @@
package com.logpm.aftersales.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -101,7 +102,8 @@ public class AftersalesProcessingMoneyEntity extends TenantEntity {
* 类型
*/
@ApiModelProperty(value = "赔付时间")
private String compensationTime;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
private Date compensationTime;
}

22
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessorController.java

@ -16,6 +16,8 @@
*/
package com.logpm.aftersales.controller;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.aftersales.dto.AftersalesProcessorDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -23,6 +25,8 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -54,6 +58,7 @@ import javax.servlet.http.HttpServletResponse;
@RestController
@AllArgsConstructor
@RequestMapping("/aftersalesProcessor")
@Slf4j
@Api(value = "异常责任方和处理方", tags = "异常责任方和处理方接口")
public class AftersalesProcessorController extends BladeController {
@ -111,6 +116,23 @@ public class AftersalesProcessorController extends BladeController {
return R.status(aftersalesProcessorService.updateById(aftersalesProcessor));
}
/**
* 异常责任方和处理方 取消处理方
*/
@PutMapping("/updateProcessingParty")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入aftersalesProcessor")
public R updateProcessingParty(@Valid @RequestBody AftersalesProcessorDTO aftersalesProcessor) {
log.info("请求的处理方数据》》》》{}",aftersalesProcessor.toString());
if(ObjectUtils.isNull( aftersalesProcessor.getId()) ){
throw new ServiceException("缺失必要数据ID");
}
return R.status(aftersalesProcessorService.updateProcessingParty(aftersalesProcessor));
}
/**
* 异常责任方和处理方 新增或修改
*/

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

@ -440,6 +440,18 @@ public class AftersalesWorkOrderController extends BladeController {
@ApiOperation(value = "新增或修改", notes = "传入aftersalesWorkOrder")
public R submit(@Valid @RequestBody AftersalesWorkOrderDTO aftersalesWorkOrder) {
log.info("工单创建的数据{}",aftersalesWorkOrder.toString());
if(ObjectUtils.isNull( aftersalesWorkOrder.getId()) ){
//新增
if(ObjectUtils.isNull( aftersalesWorkOrder.getOrderCode()) ){
throw new ServiceException("订单自编号未填!");
}
if(ObjectUtils.isNull( aftersalesWorkOrder.getFirst()) ){
throw new ServiceException("一级品类未填!");
}
// if(ObjectUtils.isNull( aftersalesWorkOrder.getSecondary()) ){
// throw new ServiceException("二级品类未填!");
// }
}
aftersalesWorkOrder.setInitiationIdentification("PC");
return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder));
}

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

@ -80,7 +80,8 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<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 = #{param.waybillMall } </if>
<if test="param.deliveryDriver != null and param.deliveryDriver != '' ">and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' ">and lawo.work_order_status = #{param.workOrderStatus } </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' ">and lawo.work_order_status in( #{param.workOrderStatus }) </if>
<if test="param.workOrderStatus == '30' ">and lawo.work_order_status in (21,30) </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 = #{param.customerServiceName } </if>
<if test="param.waybillMallId != null and param.waybillMallId != '' ">and lawo.waybill_mall_id = #{param.waybillMallId } </if>
@ -156,7 +157,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
las.work_order_type workOrderType,las.result_type resultType,las.laprId, las.discovery_node discoveryNode, las.result_description resultDescription,
las.vehicle_route vehicleRoute,las.indemnitor,las.reason,las.money,las.lawoId,las.create_time createTime,las.process_number processNumber,
las.work_order_status workOrderStatus
from logpm_aftersales_settlement las
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>

8
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessorService.java

@ -17,6 +17,7 @@
package com.logpm.aftersales.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.aftersales.dto.AftersalesProcessorDTO;
import com.logpm.aftersales.entity.AftersalesProcessorEntity;
import com.logpm.aftersales.vo.AftersalesProcessorVO;
import com.logpm.aftersales.excel.AftersalesProcessorExcel;
@ -49,4 +50,11 @@ public interface IAftersalesProcessorService extends BaseService<AftersalesProce
*/
List<AftersalesProcessorExcel> exportAftersalesProcessor(Wrapper<AftersalesProcessorEntity> queryWrapper);
/**
* 取消处理方数据
*
* @param aftersalesProcessor
* @return
*/
boolean updateProcessingParty(AftersalesProcessorDTO aftersalesProcessor);
}

19
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessorServiceImpl.java

@ -16,11 +16,13 @@
*/
package com.logpm.aftersales.service.impl;
import com.logpm.aftersales.dto.AftersalesProcessorDTO;
import com.logpm.aftersales.entity.AftersalesProcessorEntity;
import com.logpm.aftersales.vo.AftersalesProcessorVO;
import com.logpm.aftersales.excel.AftersalesProcessorExcel;
import com.logpm.aftersales.mapper.AftersalesProcessorMapper;
import com.logpm.aftersales.service.IAftersalesProcessorService;
import org.springblade.core.log.exception.ServiceException;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -51,4 +53,21 @@ public class AftersalesProcessorServiceImpl extends BaseServiceImpl<AftersalesPr
return aftersalesProcessorList;
}
/**
* 取消处理方
*
* @param aftersalesProcessor
* @return
*/
@Override
public boolean updateProcessingParty(AftersalesProcessorDTO aftersalesProcessor) {
AftersalesProcessorEntity processor = baseMapper.selectById(aftersalesProcessor.getId());
if(!"1".equals(processor.getProcessingStatus())){
throw new ServiceException("当前处理方有工单待处理,请处理过后再移除!");
}
return baseMapper.deleteById(aftersalesProcessor.getId()) > 0;
}
}

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

@ -505,10 +505,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if(ObjectUtils.isNotNull(v.getCompletionRecipientEntities())){
completionRecipientService.saveBatch(v.getCompletionRecipientEntities());
}
//修改工单异常完结状态
//修改工单异常待审核状态
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(v.getId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.daishenhe.getValue());
workOrderEntity.setOverTime(new Date());
if(ObjectUtils.isNotNull(v.getReasonArbitration())){
workOrderEntity.setReasonArbitration(v.getReasonArbitration());
@ -1136,10 +1136,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
List<AftersalesWorkOrderDTO> orderDTOList = new ArrayList<>();
orderDTOList.add(aftersalesWorkOrder);
addCompletionEnd(orderDTOList);
//修改工单状态
//修改工单状态待审核
AftersalesWorkOrderEntity aftersalesWorkOrderEntity = new AftersalesWorkOrderEntity();
aftersalesWorkOrderEntity.setId(l);
aftersalesWorkOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue());
aftersalesWorkOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.daishenhe.getValue());
aftersalesWorkOrderEntity.setOverTime(new Date());
baseMapper.updateById(aftersalesWorkOrderEntity);
//修改
@ -1564,7 +1564,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
List<AftersalesSettlementEntity> settlementEntityList = baseMapper.getWholeListSettlement(settlementEntity);
List<AftersalesWorkOrderEntity> aftersalesWorkOrderEntities = baseMapper.selectList(Wrappers.<AftersalesWorkOrderEntity>query().lambda()
.eq(AftersalesWorkOrderEntity::getWorkOrderStatus, WorkOrderStatusConstant.yuzhangdan.getValue())
.eq(AftersalesWorkOrderEntity::getWorkOrderStatus, WorkOrderStatusConstant.yiwanjei.getValue())
);
List<AftersalesWorkOrderEntity> list = new ArrayList<>();
@ -1593,7 +1593,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
//修改数据
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(i.getId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.quedingzhangdan.getValue());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yijeishu.getValue());
baseMapper.updateById(workOrderEntity);
});
}
@ -1696,7 +1696,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.getAssignList().forEach(i ->{
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(i);
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yuzhangdan.getValue());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue());
baseMapper.updateById(workOrderEntity);
});

Loading…
Cancel
Save