diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java index 49fd9a4c7..8f128ffaf 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java +++ b/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") ; diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessingMoneyEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessingMoneyEntity.java index 97012b3c8..93b2b42a1 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesProcessingMoneyEntity.java +++ b/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; } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessorController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessorController.java index fc0d7d566..928c0cbbb 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesProcessorController.java +++ b/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)); + } + /** * 异常责任方和处理方 新增或修改 */ diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java index c7b27c259..94c5f0d5f 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java +++ b/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)); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml index c2f1a373c..221eb6221 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml +++ b/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 and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') and lawo.waybill_mall = #{param.waybillMall } and lawo.delivery_driver = #{param.deliveryDriver } - and lawo.work_order_status = #{param.workOrderStatus } + and lawo.work_order_status in( #{param.workOrderStatus }) + and lawo.work_order_status in (21,30) and lawo.customer_service_id = #{param.customerServiceId } and lawo.customer_service_name = #{param.customerServiceName } and lawo.waybill_mall_id = #{param.waybillMallId } @@ -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 las.processing_status = '4' and las.is_deleted = 0 and las.business_id = #{param.businessId } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessorService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessorService.java index 65cf2cd6b..e6ccac2ff 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesProcessorService.java +++ b/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 exportAftersalesProcessor(Wrapper queryWrapper); + /** + * 取消处理方数据 + * + * @param aftersalesProcessor + * @return + */ + boolean updateProcessingParty(AftersalesProcessorDTO aftersalesProcessor); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessorServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessorServiceImpl.java index fd9b128f7..30b13ff2c 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessorServiceImpl.java +++ b/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 0; + + } + } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index 14ed33ce2..a36b3cfe4 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -505,10 +505,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl 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 settlementEntityList = baseMapper.getWholeListSettlement(settlementEntity); List aftersalesWorkOrderEntities = baseMapper.selectList(Wrappers.query().lambda() - .eq(AftersalesWorkOrderEntity::getWorkOrderStatus, WorkOrderStatusConstant.yuzhangdan.getValue()) + .eq(AftersalesWorkOrderEntity::getWorkOrderStatus, WorkOrderStatusConstant.yiwanjei.getValue()) ); List list = new ArrayList<>(); @@ -1593,7 +1593,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl{ AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); workOrderEntity.setId(i); - workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yuzhangdan.getValue()); + workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); baseMapper.updateById(workOrderEntity); });