|
@@ -19,6 +19,8 @@ import com.yh.saas.plugin.yiliangyiyun.util.EntityAnalyse;
|
|
import com.yh.saas.plugin.yiliangyiyun.util.MonitoringSystemReporting;
|
|
import com.yh.saas.plugin.yiliangyiyun.util.MonitoringSystemReporting;
|
|
import com.yh.saas.plugin.yiliangyiyun.util.TestJson;
|
|
import com.yh.saas.plugin.yiliangyiyun.util.TestJson;
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
|
|
+import net.sf.json.JSONObject;
|
|
|
|
+import org.json.JSONString;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
@@ -55,6 +57,8 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
private ICommonUserService commonUserService;
|
|
private ICommonUserService commonUserService;
|
|
@Autowired
|
|
@Autowired
|
|
private IOrderInfoService orderInfoService;
|
|
private IOrderInfoService orderInfoService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IDriverInfoService driverInfoService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询上报结果(每分钟执行一次)
|
|
* 查询上报结果(每分钟执行一次)
|
|
@@ -65,20 +69,20 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
|
|
|
|
//查询司机上报结果
|
|
//查询司机上报结果
|
|
List<HyDriverInfo> hyDriverInfoList = this.selectList(new EntityWrapper<HyDriverInfo>()
|
|
List<HyDriverInfo> hyDriverInfoList = this.selectList(new EntityWrapper<HyDriverInfo>()
|
|
- .eq("escalation_status_key","5").eq("delete_flag","0"));
|
|
|
|
- if (!CollectionUtils.isEmpty(hyDriverInfoList)){
|
|
|
|
|
|
+ .eq("escalation_status_key", "5").eq("delete_flag", "0"));
|
|
|
|
+ if (!CollectionUtils.isEmpty(hyDriverInfoList)) {
|
|
//获取token
|
|
//获取token
|
|
String token = EntityAnalyse.GetJTToken();
|
|
String token = EntityAnalyse.GetJTToken();
|
|
- for (HyDriverInfo hyDriverInfo : hyDriverInfoList){
|
|
|
|
|
|
+ for (HyDriverInfo hyDriverInfo : hyDriverInfoList) {
|
|
//上报司机信息校验结果查询
|
|
//上报司机信息校验结果查询
|
|
hyDriverInfo.setToken(token);
|
|
hyDriverInfo.setToken(token);
|
|
- if ("通过".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo))){
|
|
|
|
|
|
+ if ("通过".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo))) {
|
|
hyDriverInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
|
|
hyDriverInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
|
|
hyDriverInfo.setEscalationStatus(StatusEnum.PASSED.getName());
|
|
hyDriverInfo.setEscalationStatus(StatusEnum.PASSED.getName());
|
|
- }else if ("待校验".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo))){
|
|
|
|
|
|
+ } else if ("待校验".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo))) {
|
|
hyDriverInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
|
|
hyDriverInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
|
|
hyDriverInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
|
|
hyDriverInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
hyDriverInfo.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
|
|
hyDriverInfo.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
|
|
hyDriverInfo.setEscalationStatus(StatusEnum.FAIL.getName());
|
|
hyDriverInfo.setEscalationStatus(StatusEnum.FAIL.getName());
|
|
hyDriverInfo.setEscalationFailureReason(EntityAnalyse.driverInfoCheck(hyDriverInfo));
|
|
hyDriverInfo.setEscalationFailureReason(EntityAnalyse.driverInfoCheck(hyDriverInfo));
|
|
@@ -88,20 +92,20 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
}
|
|
}
|
|
//查询车辆上报结果
|
|
//查询车辆上报结果
|
|
List<HyDriverCarInfo> hyDriverCarInfoList = driverCarInfoService.selectList(new EntityWrapper<HyDriverCarInfo>()
|
|
List<HyDriverCarInfo> hyDriverCarInfoList = driverCarInfoService.selectList(new EntityWrapper<HyDriverCarInfo>()
|
|
- .eq("escalation_status_key","5").eq("delete_flag","0"));
|
|
|
|
- if (!CollectionUtils.isEmpty(hyDriverCarInfoList)){
|
|
|
|
|
|
+ .eq("escalation_status_key", "5").eq("delete_flag", "0"));
|
|
|
|
+ if (!CollectionUtils.isEmpty(hyDriverCarInfoList)) {
|
|
//获取token
|
|
//获取token
|
|
String token = EntityAnalyse.GetJTToken();
|
|
String token = EntityAnalyse.GetJTToken();
|
|
- for (HyDriverCarInfo hyDriverCarInfo : hyDriverCarInfoList){
|
|
|
|
|
|
+ for (HyDriverCarInfo hyDriverCarInfo : hyDriverCarInfoList) {
|
|
//上报车辆信息校验结果查询
|
|
//上报车辆信息校验结果查询
|
|
hyDriverCarInfo.setToken(token);
|
|
hyDriverCarInfo.setToken(token);
|
|
- if ("通过".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo))){
|
|
|
|
|
|
+ if ("通过".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo))) {
|
|
hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
|
|
hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
|
|
hyDriverCarInfo.setEscalationStatus(StatusEnum.PASSED.getName());
|
|
hyDriverCarInfo.setEscalationStatus(StatusEnum.PASSED.getName());
|
|
- }else if ("待校验".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo))){
|
|
|
|
|
|
+ } else if ("待校验".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo))) {
|
|
hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
|
|
hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
|
|
hyDriverCarInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
|
|
hyDriverCarInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
hyDriverCarInfo.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
|
|
hyDriverCarInfo.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
|
|
hyDriverCarInfo.setEscalationStatus(StatusEnum.FAIL.getName());
|
|
hyDriverCarInfo.setEscalationStatus(StatusEnum.FAIL.getName());
|
|
hyDriverCarInfo.setEscalationFailureReason(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo));
|
|
hyDriverCarInfo.setEscalationFailureReason(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo));
|
|
@@ -111,20 +115,20 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
}
|
|
}
|
|
//查询运单上报结果
|
|
//查询运单上报结果
|
|
List<OrderInfo> orderInfoList = orderInfoService.selectList(new EntityWrapper<OrderInfo>()
|
|
List<OrderInfo> orderInfoList = orderInfoService.selectList(new EntityWrapper<OrderInfo>()
|
|
- .eq("escalation_status_key","5").eq("delete_flag","0"));
|
|
|
|
- if (!CollectionUtils.isEmpty(orderInfoList)){
|
|
|
|
|
|
+ .eq("escalation_status_key", "5").eq("delete_flag", "0"));
|
|
|
|
+ if (!CollectionUtils.isEmpty(orderInfoList)) {
|
|
//获取token
|
|
//获取token
|
|
String token = EntityAnalyse.GetJTToken();
|
|
String token = EntityAnalyse.GetJTToken();
|
|
- for (OrderInfo orderInfo : orderInfoList){
|
|
|
|
|
|
+ for (OrderInfo orderInfo : orderInfoList) {
|
|
//上报车辆信息校验结果查询
|
|
//上报车辆信息校验结果查询
|
|
orderInfo.setToken(token);
|
|
orderInfo.setToken(token);
|
|
- if ("通过".equals(EntityAnalyse.waybillCheck(orderInfo))){
|
|
|
|
|
|
+ if ("通过".equals(EntityAnalyse.waybillCheck(orderInfo))) {
|
|
orderInfo.setEscalationStatusKey(StatusEnum.ADOPTED.getFlag());
|
|
orderInfo.setEscalationStatusKey(StatusEnum.ADOPTED.getFlag());
|
|
orderInfo.setEscalationStatus(StatusEnum.ADOPTED.getName());
|
|
orderInfo.setEscalationStatus(StatusEnum.ADOPTED.getName());
|
|
- }else if ("待校验".equals(EntityAnalyse.waybillCheck(orderInfo))){
|
|
|
|
|
|
+ } else if ("待校验".equals(EntityAnalyse.waybillCheck(orderInfo))) {
|
|
orderInfo.setEscalationStatusKey(StatusEnum.UNDER_REVIEW.getFlag());
|
|
orderInfo.setEscalationStatusKey(StatusEnum.UNDER_REVIEW.getFlag());
|
|
orderInfo.setEscalationStatus(StatusEnum.UNDER_REVIEW.getName());
|
|
orderInfo.setEscalationStatus(StatusEnum.UNDER_REVIEW.getName());
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
orderInfo.setEscalationStatusKey(StatusEnum.NOT_ADOPT.getFlag());
|
|
orderInfo.setEscalationStatusKey(StatusEnum.NOT_ADOPT.getFlag());
|
|
orderInfo.setEscalationStatus(StatusEnum.NOT_ADOPT.getName());
|
|
orderInfo.setEscalationStatus(StatusEnum.NOT_ADOPT.getName());
|
|
orderInfo.setEscalationFailureReason(EntityAnalyse.waybillCheck(orderInfo));
|
|
orderInfo.setEscalationFailureReason(EntityAnalyse.waybillCheck(orderInfo));
|
|
@@ -142,7 +146,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public Page<HyDriverInfo> selectDriverInfoPage(HyDriverInfo driverViewInfo){
|
|
|
|
|
|
+ public Page<HyDriverInfo> selectDriverInfoPage(HyDriverInfo driverViewInfo) {
|
|
Map<String, Object> pageView = new HashMap<>(11);
|
|
Map<String, Object> pageView = new HashMap<>(11);
|
|
pageView.put("startRecord", (driverViewInfo.getCurrentPage() - 1)
|
|
pageView.put("startRecord", (driverViewInfo.getCurrentPage() - 1)
|
|
* driverViewInfo.getPageSize());
|
|
* driverViewInfo.getPageSize());
|
|
@@ -170,8 +174,6 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
page.setTotal(dataCount == null ? 0 : dataCount);
|
|
page.setTotal(dataCount == null ? 0 : dataCount);
|
|
page.setCurrent(driverViewInfo.getCurrentPage());
|
|
page.setCurrent(driverViewInfo.getCurrentPage());
|
|
page.setSize(driverViewInfo.getPageSize());
|
|
page.setSize(driverViewInfo.getPageSize());
|
|
- TestJson j = new TestJson();
|
|
|
|
- j.sendTest();
|
|
|
|
return page;
|
|
return page;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -202,7 +204,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public String addInfo(HyDriverInfo hyDriverInfo) throws IOException , ParseException {
|
|
|
|
|
|
+ public String addInfo(HyDriverInfo hyDriverInfo) throws IOException, ParseException {
|
|
//新增主键id
|
|
//新增主键id
|
|
hyDriverInfo.setId(IdGenerator.generateUUID());
|
|
hyDriverInfo.setId(IdGenerator.generateUUID());
|
|
hyDriverInfo.setFirstFlag("1");
|
|
hyDriverInfo.setFirstFlag("1");
|
|
@@ -211,6 +213,8 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
hyDriverInfo.setAuthenticationStatus(StatusEnum.IDENTITY_REVIEWED.getName());
|
|
hyDriverInfo.setAuthenticationStatus(StatusEnum.IDENTITY_REVIEWED.getName());
|
|
hyDriverInfo.setBackStageStatusKey(StatusEnum.TO_BE_REVIEWED.getFlag());
|
|
hyDriverInfo.setBackStageStatusKey(StatusEnum.TO_BE_REVIEWED.getFlag());
|
|
hyDriverInfo.setBackStageStatus(StatusEnum.TO_BE_REVIEWED.getName());
|
|
hyDriverInfo.setBackStageStatus(StatusEnum.TO_BE_REVIEWED.getName());
|
|
|
|
+ hyDriverInfo.setEscalationStatusKey(StatusEnum.PLATFORM_UNDER_REVIEW.getFlag());
|
|
|
|
+ hyDriverInfo.setEscalationStatus(StatusEnum.PLATFORM_UNDER_REVIEW.getName());
|
|
//判断司机电话是否唯一
|
|
//判断司机电话是否唯一
|
|
List<HyDriverInfo> hyDriverInfos =
|
|
List<HyDriverInfo> hyDriverInfos =
|
|
this.selectList(new EntityWrapper<HyDriverInfo>()
|
|
this.selectList(new EntityWrapper<HyDriverInfo>()
|
|
@@ -287,7 +291,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public String editInfo(HyDriverInfo hyDriverInfo) throws IOException , ParseException {
|
|
|
|
|
|
+ public String editInfo(HyDriverInfo hyDriverInfo) throws IOException, ParseException {
|
|
//获取当前年月日
|
|
//获取当前年月日
|
|
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
|
|
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
|
|
String date = f.format(new Date(System.currentTimeMillis()));
|
|
String date = f.format(new Date(System.currentTimeMillis()));
|
|
@@ -296,24 +300,26 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
//判断身份证有效期
|
|
//判断身份证有效期
|
|
if (!"长期".equals(hyDriverInfo.getCardValidityDate())) {
|
|
if (!"长期".equals(hyDriverInfo.getCardValidityDate())) {
|
|
int result1 = hyDriverInfo.getCardValidityDate().compareTo(date);
|
|
int result1 = hyDriverInfo.getCardValidityDate().compareTo(date);
|
|
- if (result1 == 0){
|
|
|
|
|
|
+ if (result1 == 0) {
|
|
throw new YException(YExceptionEnum.TERM_OF_VALIDITY);
|
|
throw new YException(YExceptionEnum.TERM_OF_VALIDITY);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//驾驶证
|
|
//驾驶证
|
|
int result2 = hyDriverInfo.getDriverLicenseValidityDate().compareTo(date);
|
|
int result2 = hyDriverInfo.getDriverLicenseValidityDate().compareTo(date);
|
|
- if (result2 == 0){
|
|
|
|
|
|
+ if (result2 == 0) {
|
|
throw new YException(YExceptionEnum.DRIVER_TERM_OF_VALIDITY);
|
|
throw new YException(YExceptionEnum.DRIVER_TERM_OF_VALIDITY);
|
|
}
|
|
}
|
|
//从业资格证
|
|
//从业资格证
|
|
int result3 = hyDriverInfo.getQualificationCertificateValidityDate().compareTo(date1);
|
|
int result3 = hyDriverInfo.getQualificationCertificateValidityDate().compareTo(date1);
|
|
- if (result3 < 0){
|
|
|
|
|
|
+ if (result3 < 0) {
|
|
throw new YException(YExceptionEnum.CONG_TERM_OF_VALIDITY);
|
|
throw new YException(YExceptionEnum.CONG_TERM_OF_VALIDITY);
|
|
}
|
|
}
|
|
hyDriverInfo.setAuthenticationStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
|
|
hyDriverInfo.setAuthenticationStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
|
|
hyDriverInfo.setAuthenticationStatus(StatusEnum.IDENTITY_REVIEWED.getName());
|
|
hyDriverInfo.setAuthenticationStatus(StatusEnum.IDENTITY_REVIEWED.getName());
|
|
hyDriverInfo.setBackStageStatusKey(StatusEnum.TO_BE_REVIEWED.getFlag());
|
|
hyDriverInfo.setBackStageStatusKey(StatusEnum.TO_BE_REVIEWED.getFlag());
|
|
hyDriverInfo.setBackStageStatus(StatusEnum.TO_BE_REVIEWED.getName());
|
|
hyDriverInfo.setBackStageStatus(StatusEnum.TO_BE_REVIEWED.getName());
|
|
|
|
+ hyDriverInfo.setEscalationStatusKey(StatusEnum.PLATFORM_UNDER_REVIEW.getFlag());
|
|
|
|
+ hyDriverInfo.setEscalationStatus(StatusEnum.PLATFORM_UNDER_REVIEW.getName());
|
|
|
|
|
|
// //上报
|
|
// //上报
|
|
// List<HyDriverInfo> hyDriverInfos1 = new ArrayList<>();
|
|
// List<HyDriverInfo> hyDriverInfos1 = new ArrayList<>();
|
|
@@ -377,22 +383,26 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public String examine(HyDriverInfo hyDriverInfo) throws IOException {
|
|
public String examine(HyDriverInfo hyDriverInfo) throws IOException {
|
|
- //查询司机列表
|
|
|
|
|
|
+ //查询司机
|
|
HyDriverInfo hyDriverInfo1 = this.selectById(hyDriverInfo.getId());
|
|
HyDriverInfo hyDriverInfo1 = this.selectById(hyDriverInfo.getId());
|
|
if (hyDriverInfo1 != null) {
|
|
if (hyDriverInfo1 != null) {
|
|
- //
|
|
|
|
|
|
+ //通过
|
|
if ("1".equals(hyDriverInfo.getFlag())) {
|
|
if ("1".equals(hyDriverInfo.getFlag())) {
|
|
//上报司机信息校验结果查询
|
|
//上报司机信息校验结果查询
|
|
String token = EntityAnalyse.GetJTToken();
|
|
String token = EntityAnalyse.GetJTToken();
|
|
hyDriverInfo.setToken(token);
|
|
hyDriverInfo.setToken(token);
|
|
- if (!"通过".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo))){
|
|
|
|
|
|
+ if (!"通过".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo))) {
|
|
throw new YException(YExceptionEnum.SHANG_BAO_ERROR);
|
|
throw new YException(YExceptionEnum.SHANG_BAO_ERROR);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ //更改状态
|
|
hyDriverInfo1.setAuthenticationStatusKey(StatusEnum.IDENTITY_COMPLETED.getFlag());
|
|
hyDriverInfo1.setAuthenticationStatusKey(StatusEnum.IDENTITY_COMPLETED.getFlag());
|
|
hyDriverInfo1.setAuthenticationStatus(StatusEnum.IDENTITY_COMPLETED.getName());
|
|
hyDriverInfo1.setAuthenticationStatus(StatusEnum.IDENTITY_COMPLETED.getName());
|
|
hyDriverInfo1.setBackStageStatusKey(StatusEnum.TASK_REJECT.getFlag());
|
|
hyDriverInfo1.setBackStageStatusKey(StatusEnum.TASK_REJECT.getFlag());
|
|
hyDriverInfo1.setBackStageStatus(StatusEnum.TASK_REJECT.getName());
|
|
hyDriverInfo1.setBackStageStatus(StatusEnum.TASK_REJECT.getName());
|
|
|
|
+ hyDriverInfo.setEscalationStatusKey(StatusEnum.NOT_REPORTED.getFlag());
|
|
|
|
+ hyDriverInfo.setEscalationStatus(StatusEnum.NOT_REPORTED.getName());
|
|
|
|
+ hyDriverInfo.setReportedStatusKey(StatusEnum.NO_REPORTED.getFlag());
|
|
|
|
+ hyDriverInfo.setReportedStatus(StatusEnum.NO_REPORTED.getName());
|
|
hyDriverInfo1.setOverdueFlag("0");
|
|
hyDriverInfo1.setOverdueFlag("0");
|
|
hyDriverInfo1.setDriverOverdueFlag("0");
|
|
hyDriverInfo1.setDriverOverdueFlag("0");
|
|
hyDriverInfo1.setQualificationOverdueFlag("0");
|
|
hyDriverInfo1.setQualificationOverdueFlag("0");
|
|
@@ -483,6 +493,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
|
|
|
|
/**
|
|
/**
|
|
* 批量上报
|
|
* 批量上报
|
|
|
|
+ *
|
|
* @param hyDriverInfo
|
|
* @param hyDriverInfo
|
|
* @return
|
|
* @return
|
|
* @throws IOException
|
|
* @throws IOException
|
|
@@ -490,7 +501,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public String batchSubmission (HyDriverInfo hyDriverInfo) throws IOException , ParseException {
|
|
|
|
|
|
+ public String batchSubmission(HyDriverInfo hyDriverInfo) throws IOException, ParseException, Exception {
|
|
//园区上报
|
|
//园区上报
|
|
//获取token
|
|
//获取token
|
|
String token = EntityAnalyse.GetJTToken();
|
|
String token = EntityAnalyse.GetJTToken();
|
|
@@ -498,26 +509,15 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
new Thread(new Runnable() {
|
|
new Thread(new Runnable() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
- try{
|
|
|
|
|
|
+ try {
|
|
EntityAnalyse.uploadDriverInfo(hyDriverInfo);
|
|
EntityAnalyse.uploadDriverInfo(hyDriverInfo);
|
|
- }catch (Exception e){
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}).start();
|
|
}).start();
|
|
- if (!CollectionUtils.isEmpty(hyDriverInfo.getHyDriverInfoList())){
|
|
|
|
- for (HyDriverInfo hyDriverInfo1 : hyDriverInfo.getHyDriverInfoList()){
|
|
|
|
- //监测系统上报
|
|
|
|
- new Thread(new Runnable() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- try{
|
|
|
|
-// MonitoringSystemReporting.testDriverRoot(hyDriverInfo1);
|
|
|
|
- }catch (Exception e){
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }).start();
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(hyDriverInfo.getHyDriverInfoList())) {
|
|
|
|
+ for (HyDriverInfo hyDriverInfo1 : hyDriverInfo.getHyDriverInfoList()) {
|
|
//更改上报状态
|
|
//更改上报状态
|
|
hyDriverInfo1.setEscalationDate(new Date());
|
|
hyDriverInfo1.setEscalationDate(new Date());
|
|
hyDriverInfo1.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
|
|
hyDriverInfo1.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
|
|
@@ -530,21 +530,39 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
|
|
|
|
/**
|
|
/**
|
|
* 管局上报
|
|
* 管局上报
|
|
|
|
+ *
|
|
* @param hyDriverInfo
|
|
* @param hyDriverInfo
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public String administrationReport (HyDriverInfo hyDriverInfo){
|
|
|
|
- if (!CollectionUtils.isEmpty(hyDriverInfo.getHyDriverInfoList())){
|
|
|
|
- for (HyDriverInfo hyDriverInfo1 : hyDriverInfo.getHyDriverInfoList()){
|
|
|
|
|
|
+ public String administrationReport(HyDriverInfo hyDriverInfo) throws Exception {
|
|
|
|
+ if (!CollectionUtils.isEmpty(hyDriverInfo.getHyDriverInfoList())) {
|
|
|
|
+ for (HyDriverInfo hyDriverInfo1 : hyDriverInfo.getHyDriverInfoList()) {
|
|
//监测系统上报
|
|
//监测系统上报
|
|
new Thread(new Runnable() {
|
|
new Thread(new Runnable() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
- try{
|
|
|
|
-// MonitoringSystemReporting.testDriverRoot(hyDriverInfo1);
|
|
|
|
- }catch (Exception e){
|
|
|
|
|
|
+ try {
|
|
|
|
+ String result = MonitoringSystemReporting.testDriverRoot(hyDriverInfo1);
|
|
|
|
+ JSONObject jsonObject = JSONObject.fromObject(result);
|
|
|
|
+ //发送成功
|
|
|
|
+ if ("1001".equals(jsonObject.getString("code"))) {
|
|
|
|
+ hyDriverInfo1.setReportedStatusKey(StatusEnum.REPORTED_SUCESS.getFlag());
|
|
|
|
+ hyDriverInfo1.setReportedStatus(StatusEnum.REPORTED_SUCESS.getName());
|
|
|
|
+ }
|
|
|
|
+ //发送失败
|
|
|
|
+ else if ("3003".equals(jsonObject.getString("code"))) {
|
|
|
|
+ hyDriverInfo1.setReportedStatusKey(StatusEnum.REPORTED_FAIL.getFlag());
|
|
|
|
+ hyDriverInfo1.setReportedStatus(StatusEnum.REPORTED_FAIL.getName());
|
|
|
|
+ String str = jsonObject.getString("data");
|
|
|
|
+ String reg = "[^(0-9\\u4e00-\\u9fa5)]";
|
|
|
|
+ String str1 = str.replaceAll(reg, " ").trim();
|
|
|
|
+ str = str1.replaceAll(" +",",");
|
|
|
|
+ hyDriverInfo1.setReportedFailureReason(str);
|
|
|
|
+ }
|
|
|
|
+ driverInfoService.updateById(hyDriverInfo1);
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -562,11 +580,12 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo hyDriverInfo){
|
|
|
|
|
|
+ public Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo hyDriverInfo) {
|
|
Map<String, Object> pageView = new HashMap<>(9);
|
|
Map<String, Object> pageView = new HashMap<>(9);
|
|
pageView.put("startRecord", (hyDriverInfo.getCurrentPage() - 1)
|
|
pageView.put("startRecord", (hyDriverInfo.getCurrentPage() - 1)
|
|
* hyDriverInfo.getPageSize());
|
|
* hyDriverInfo.getPageSize());
|
|
//公司id
|
|
//公司id
|
|
|
|
+ pageView.put("administrationType", hyDriverInfo.getAdministrationType());
|
|
pageView.put("searchType", hyDriverInfo.getSearchType());
|
|
pageView.put("searchType", hyDriverInfo.getSearchType());
|
|
pageView.put("searchKeyWord", hyDriverInfo.getSearchKeyWord());
|
|
pageView.put("searchKeyWord", hyDriverInfo.getSearchKeyWord());
|
|
pageView.put("startDate", hyDriverInfo.getStartDate());
|
|
pageView.put("startDate", hyDriverInfo.getStartDate());
|