Commit be47e826 by wangnb

包活干V1.9.0接口完善--think.wang

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@27048 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 3e6bf885
package com.glsx.ordercenter.service.api.impl; package com.glsx.ordercenter.service.api.impl;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Semaphore;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.glsx.common.utils.DateUtil; import com.glsx.common.utils.DateUtil;
import com.glsx.ordercenter.config.ThreadPoolConfig; import com.glsx.ordercenter.config.ThreadPoolConfig;
import com.glsx.ordercenter.constants.insurance.InsuranceCardType; import com.glsx.ordercenter.constants.insurance.*;
import com.glsx.ordercenter.constants.insurance.InsuranceCustomerType;
import com.glsx.ordercenter.constants.insurance.InsuranceSource;
import com.glsx.ordercenter.constants.insurance.InsuranceStatus;
import com.glsx.ordercenter.constants.insurance.OraResultCode;
import com.glsx.ordercenter.dto.req.OraInsuranceRefundReq; import com.glsx.ordercenter.dto.req.OraInsuranceRefundReq;
import com.glsx.ordercenter.dto.req.OraInsuranceUpdateReq; import com.glsx.ordercenter.dto.req.OraInsuranceUpdateReq;
import com.glsx.ordercenter.dto.resp.OraResultObject; import com.glsx.ordercenter.dto.resp.OraResultObject;
...@@ -23,7 +15,7 @@ import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicy; ...@@ -23,7 +15,7 @@ import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicy;
import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicyExample; import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicyExample;
import com.glsx.ordercenter.service.BaseOrderService; import com.glsx.ordercenter.service.BaseOrderService;
import com.glsx.ordercenter.service.api.OraInsuranceService; import com.glsx.ordercenter.service.api.OraInsuranceService;
import com.glsx.ordercenter.thread.OraReturnPdfTask; import com.glsx.ordercenter.thread.OraReturnInsurancePdfTask;
import com.glsx.ordercenter.thread.TspGetInsurancePdfTask; import com.glsx.ordercenter.thread.TspGetInsurancePdfTask;
import com.glsx.ordercenter.thread.TspSaveInsuranceDataTask; import com.glsx.ordercenter.thread.TspSaveInsuranceDataTask;
import com.glsx.ordercenter.utils.EmilUtils; import com.glsx.ordercenter.utils.EmilUtils;
...@@ -31,6 +23,11 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -31,6 +23,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Semaphore;
/** /**
* <p>Description: * <p>Description:
* *
...@@ -82,7 +79,7 @@ public class OraInsuranceServiceImpl extends BaseOrderService implements OraInsu ...@@ -82,7 +79,7 @@ public class OraInsuranceServiceImpl extends BaseOrderService implements OraInsu
TspGetInsurancePdfTask getInsurancePdfTask = new TspGetInsurancePdfTask(policy.getId(), insuranceMapper, semaphore); TspGetInsurancePdfTask getInsurancePdfTask = new TspGetInsurancePdfTask(policy.getId(), insuranceMapper, semaphore);
taskExecutor.defaultThreadPool().execute(getInsurancePdfTask); taskExecutor.defaultThreadPool().execute(getInsurancePdfTask);
//请求结果返回给欧拉 //请求结果返回给欧拉
OraReturnPdfTask returnPdfTask = new OraReturnPdfTask(policy.getId(), insuranceMapper, semaphore); OraReturnInsurancePdfTask returnPdfTask = new OraReturnInsurancePdfTask(policy.getId(), insuranceMapper, semaphore);
taskExecutor.defaultThreadPool().execute(returnPdfTask); taskExecutor.defaultThreadPool().execute(returnPdfTask);
} }
//返回成功结果 //返回成功结果
......
...@@ -29,7 +29,7 @@ import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicy; ...@@ -29,7 +29,7 @@ import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicy;
import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicyExample; import com.glsx.ordercenter.pojo.insurance.SysInsurancePolicyExample;
import com.glsx.ordercenter.service.BaseOrderService; import com.glsx.ordercenter.service.BaseOrderService;
import com.glsx.ordercenter.service.InsuranceService; import com.glsx.ordercenter.service.InsuranceService;
import com.glsx.ordercenter.thread.OraReturnPdfTask; import com.glsx.ordercenter.thread.OraReturnInsurancePdfTask;
import com.glsx.ordercenter.thread.TspGetInsurancePdfTask; import com.glsx.ordercenter.thread.TspGetInsurancePdfTask;
import com.glsx.ordercenter.thread.TspSaveInsuranceDataTask; import com.glsx.ordercenter.thread.TspSaveInsuranceDataTask;
import com.glsx.ordercenter.utils.TspApiInvoker; import com.glsx.ordercenter.utils.TspApiInvoker;
...@@ -527,7 +527,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -527,7 +527,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
TspGetInsurancePdfTask getInsurancePdfTask = new TspGetInsurancePdfTask(insertPolicy.getId(), insuranceMapper, semaphore); TspGetInsurancePdfTask getInsurancePdfTask = new TspGetInsurancePdfTask(insertPolicy.getId(), insuranceMapper, semaphore);
taskExecutor.defaultThreadPool().execute(getInsurancePdfTask); taskExecutor.defaultThreadPool().execute(getInsurancePdfTask);
//请求结果返回给欧拉 //请求结果返回给欧拉
OraReturnPdfTask returnPdfTask = new OraReturnPdfTask(insertPolicy.getId(), insuranceMapper, semaphore); OraReturnInsurancePdfTask returnPdfTask = new OraReturnInsurancePdfTask(insertPolicy.getId(), insuranceMapper, semaphore);
taskExecutor.defaultThreadPool().execute(returnPdfTask); taskExecutor.defaultThreadPool().execute(returnPdfTask);
return new ResultObject(com.glsx.common.constants.ResultCodeEnum.SUCCESS); return new ResultObject(com.glsx.common.constants.ResultCodeEnum.SUCCESS);
} }
...@@ -543,7 +543,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -543,7 +543,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
} }
Semaphore semaphore = new Semaphore(1); Semaphore semaphore = new Semaphore(1);
//回传保单pdf地址给欧拉 //回传保单pdf地址给欧拉
OraReturnPdfTask returnPdfTask = new OraReturnPdfTask(sysInsuranceReq.getId(), insuranceMapper, semaphore); OraReturnInsurancePdfTask returnPdfTask = new OraReturnInsurancePdfTask(sysInsuranceReq.getId(), insuranceMapper, semaphore);
taskExecutor.defaultThreadPool().execute(returnPdfTask); taskExecutor.defaultThreadPool().execute(returnPdfTask);
return new ResultObject(com.glsx.common.constants.ResultCodeEnum.SUCCESS); return new ResultObject(com.glsx.common.constants.ResultCodeEnum.SUCCESS);
} }
......
...@@ -22,14 +22,14 @@ import java.util.concurrent.Semaphore; ...@@ -22,14 +22,14 @@ import java.util.concurrent.Semaphore;
/** /**
* @author think.wang * @author think.wang
* @version 1.0.0 * @version 1.0.0
* @Title OraReturnPdfTask * @Title OraReturnInsurancePdfTask
* @Package com.glsx.ordercenter.thread * @Package com.glsx.ordercenter.thread
* @Description 调用欧拉接口回传保单信息 * @Description 调用欧拉接口回传保单信息
* @date 2020/5/28 * @date 2020/5/28
*/ */
public class OraReturnPdfTask implements Runnable{ public class OraReturnInsurancePdfTask implements Runnable{
private Logger logger = LoggerFactory.getLogger(OraReturnPdfTask.class); private Logger logger = LoggerFactory.getLogger(OraReturnInsurancePdfTask.class);
private Integer id; private Integer id;
private SysInsurancePolicyMapper policyMapper; private SysInsurancePolicyMapper policyMapper;
...@@ -38,7 +38,7 @@ public class OraReturnPdfTask implements Runnable{ ...@@ -38,7 +38,7 @@ public class OraReturnPdfTask implements Runnable{
protected final int TRY_COUNT = 3; protected final int TRY_COUNT = 3;
protected final int TRY_WAIT_TIME = 5 * 100; protected final int TRY_WAIT_TIME = 5 * 100;
public OraReturnPdfTask(Integer id, SysInsurancePolicyMapper policyMapper, Semaphore semaphore) { public OraReturnInsurancePdfTask(Integer id, SysInsurancePolicyMapper policyMapper, Semaphore semaphore) {
this.id = id; this.id = id;
this.policyMapper = policyMapper; this.policyMapper = policyMapper;
this.semaphore = semaphore; this.semaphore = semaphore;
......
...@@ -23,14 +23,14 @@ import java.util.Map; ...@@ -23,14 +23,14 @@ import java.util.Map;
/** /**
* @author think.wang * @author think.wang
* @version 1.0.0 * @version 1.0.0
* @Title OraSendReserveOrderInfoTask * @Title OraReturnReserveOrderInfoTask
* @Package com.glsx.ordercenter.thread * @Package com.glsx.ordercenter.thread
* @Description 欧拉接口更新工单预约信息 * @Description 欧拉接口更新工单预约信息
* @date 2020/5/28 * @date 2020/5/28
*/ */
public class OraSendReserveOrderInfoTask implements Runnable{ public class OraReturnReserveOrderInfoTask implements Runnable{
private Logger logger = LoggerFactory.getLogger(OraSendReserveOrderInfoTask.class); private Logger logger = LoggerFactory.getLogger(OraReturnReserveOrderInfoTask.class);
private Integer id; private Integer id;
private SysOrderMapper orderMapper; private SysOrderMapper orderMapper;
...@@ -39,7 +39,7 @@ public class OraSendReserveOrderInfoTask implements Runnable{ ...@@ -39,7 +39,7 @@ public class OraSendReserveOrderInfoTask implements Runnable{
protected final int TRY_COUNT = 3; protected final int TRY_COUNT = 3;
protected final int TRY_WAIT_TIME = 5 * 100; protected final int TRY_WAIT_TIME = 5 * 100;
public OraSendReserveOrderInfoTask(Integer id, SysOrderMapper orderMapper, SysAreaMapper areaMapper) { public OraReturnReserveOrderInfoTask(Integer id, SysOrderMapper orderMapper, SysAreaMapper areaMapper) {
this.id = id; this.id = id;
this.orderMapper = orderMapper; this.orderMapper = orderMapper;
this.areaMapper = areaMapper; this.areaMapper = areaMapper;
...@@ -58,7 +58,7 @@ public class OraSendReserveOrderInfoTask implements Runnable{ ...@@ -58,7 +58,7 @@ public class OraSendReserveOrderInfoTask implements Runnable{
SysOrder order = orderMapper.selectByPrimaryKey(id); SysOrder order = orderMapper.selectByPrimaryKey(id);
if(order == null){ if(order == null){
this.logger.error("通过id={}未找到订单数据", id); this.logger.error("通过id={}未找到工单数据", id);
return; return;
} }
//业务参数封装 //业务参数封装
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
mechanic_id, repair_reason, remark, create_time, update_time, create_by, update_by, device_no, mechanic_id, repair_reason, remark, create_time, update_time, create_by, update_by, device_no,
install_location, overdue_reason, repair_type, car_picture, vin_no_picture, install_location_picture, install_location, overdue_reason, repair_type, car_picture, vin_no_picture, install_location_picture,
complete_time,install_remark,install_device_type,reserve_install_time, complete_time,install_remark,install_device_type,reserve_install_time,
work_order_no, channel, work_order_no, work_order_number, channel,
merchant_name,reassign_mechanic_time,reserve_install_reason,connect_location_picture,surrounding_picture,is_check_in, merchant_name,reassign_mechanic_time,reserve_install_reason,connect_location_picture,surrounding_picture,is_check_in,
check_in_time,reserve_man,reserve_man_phone,quote_last_time,service_code,longitude,latitude check_in_time,reserve_man,reserve_man_phone,quote_last_time,service_code,longitude,latitude
</sql> </sql>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!