Browse Source

修改工单定时任务

single_db
caoyizhong 1 year ago
parent
commit
6294c598f0
  1. 74
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/config/XxlJobConfig.java
  2. 20
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  3. 36
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java
  4. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  5. 3
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  6. 4
      blade-service/logpm-aftersales/src/main/resources/application.yml
  7. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  8. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

74
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/config/XxlJobConfig.java

@ -0,0 +1,74 @@
package com.logpm.aftersales.config;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* xxl-job config
*
* @author xuxueli 2017-04-28
*/
@Configuration(proxyBeanMethods = false)
public class XxlJobConfig {
private final Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
@Value("${xxl.job.admin.addresses}")
private String adminAddresses;
@Value("${xxl.job.executor.appname}")
private String appName;
@Value("${xxl.job.executor.ip}")
private String ip;
@Value("${xxl.job.executor.port}")
private int port;
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${xxl.job.executor.logpath}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays}")
private int logRetentionDays;
@Bean
public XxlJobSpringExecutor xxlJobExecutor() {
logger.info(">>>>>>>>>>> xxl-job config init.");
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppName(appName);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
/**
* 针对多网卡容器内部署等情况可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP
*
* 1引入依赖
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}</version>
* </dependency>
*
* 2配置文件或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}

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

@ -150,27 +150,27 @@ public class AftersalesWorkOrderController extends BladeController {
* 客服异常工单 查询处理超时的数据 待处理r
*/
// @GetMapping("/isItTimeout")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询处理超时的数据", notes = "传入aftersalesWorkOrder")
@XxlJob("syncWarehouseToNew")
// @ApiOperationSupport(order = 2)
// @ApiOperation(value = "查询处理超时的数据", notes = "传入aftersalesWorkOrder")
// @XxlJob("syncWarehouseToNew")
// @Scheduled(cron = "0 0/1 * * * ?")
public void getIsItTimeout() {
log.info("查询处理超时的数据>>>>>>>>");
aftersalesWorkOrderService.getIsItTimeout();
}
// public void getIsItTimeout() {
// log.info("查询处理超时的数据>>>>>>>>");
// aftersalesWorkOrderService.getIsItTimeout();
// }
/**
* 客服异常工单 修改理赔工单是否可以申述
*/
// @GetMapping("/isItTimeout")
@ApiOperationSupport(order = 2)
/* @ApiOperationSupport(order = 2)
@ApiOperation(value = "修改理赔工单是否可以申述", notes = "传入aftersalesWorkOrder")
@XxlJob("modifyClaimStatus")
// @Scheduled(cron = "0 0/1 * * * ?")
@Scheduled(cron = "0 0/1 * * * ?")
public void updateModifyClaimStatus() {
log.info("修改理赔工单是否可以申述>>>>>>>>");
aftersalesWorkOrderService.updateModifyClaimStatus();
}
}*/
/**

36
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java

@ -0,0 +1,36 @@
package com.logpm.aftersales.jobhandler;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
/**
* @author 12702
*/
@AllArgsConstructor
@Component
public class AftersalesXxlJob {
private static final Logger logger = LoggerFactory.getLogger(AftersalesXxlJob.class);
private final IAftersalesWorkOrderService aftersalesWorkOrderService;
@XxlJob("syncWarehouseToNew")
public ReturnT<String> getIsItTimeout(String param) throws Exception {
logger.info("查询处理超时的数据>>>>>>>>{}",param);
aftersalesWorkOrderService.getIsItTimeout();
return ReturnT.SUCCESS;
}
@XxlJob("modifyClaimStatus")
public ReturnT<String> updateModifyClaimStatus(String param) throws Exception {
logger.info("修改理赔工单是否可以申述>>>>>>>>{}",param);
aftersalesWorkOrderService.updateModifyClaimStatus();
return ReturnT.SUCCESS;
}
}

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

@ -94,7 +94,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<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.customerIdentification != null and param.customerIdentification == 1 ">
and lawo.work_order_status in ('30','40','50','60','70','80','90')
and lawo.work_order_status in ('30','40','50','60','70','80','90') and lawo.customer_service_id is null
</if>
</where>

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

@ -511,6 +511,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
switch (dictValue){
case "1": //客服经理 查询全部待处理工单
aftersalesWorkOrder.put("customerIdentification", "1");
break;
case "2": // 营业部客服
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
@ -521,7 +522,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
break;
case "3": //职能客服 查询自己的待处理工单
aftersalesWorkOrder.put("customer_service_id",user.getUserId());
aftersalesWorkOrder.put("customerServiceId",user.getUserId());
break;
}

4
blade-service/logpm-aftersales/src/main/resources/application.yml

@ -43,9 +43,9 @@ xxl:
admin:
addresses: http://127.0.0.1:7009/xxl-job-admin
executor:
appname: logpm-factory-xxljob
appname: logpm-aftersales-xxljob
ip: 127.0.0.1
logpath: ../data/applogs/logpm-factory-xxljob/jobhandler
logpath: ../data/applogs/logpm-aftersales-xxljob/jobhandler
logretentiondays: -1
port: 7018
logpm:

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -149,6 +149,7 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperationSupport(order = 1)
@ApiOperation(value = "异常工单查询配送信息", notes = "传入distributionDeliveryList")
public R<IPage<DistributionDeliveryWordVO>> getShippingInformation (DistributionDeliveryListDTO distributionDeliveryInfoDTO, Query query) {
log.info("异常工单查询配送信息参数》》》》》{}",distributionDeliveryInfoDTO.toString());
IPage<DistributionDeliveryWordVO> pages = distributionDeliveryListService.getShippingInformation(Condition.getPage(query), distributionDeliveryInfoDTO);
return R.data(pages);
}

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

@ -6641,6 +6641,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
public IPage<DistributionDeliveryWordVO> getShippingInformation(IPage<Object> page, DistributionDeliveryListDTO distributionDeliveryInfoDTO) {
if(ObjectUtils.isNotNull(distributionDeliveryInfoDTO) && ObjectUtils.isNotNull( distributionDeliveryInfoDTO.getTaskTime())){
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String format1 = format.format(distributionDeliveryInfoDTO.getTaskTime());
}

Loading…
Cancel
Save