|
|
@ -11,6 +11,7 @@ import com.hai.common.security.SessionObject; |
|
|
|
import com.hai.common.security.UserCenter; |
|
|
|
import com.hai.common.security.UserCenter; |
|
|
|
import com.hai.common.utils.DateUtil; |
|
|
|
import com.hai.common.utils.DateUtil; |
|
|
|
import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
|
|
|
|
import com.hai.config.CommonConfig; |
|
|
|
import com.hai.config.EtcService; |
|
|
|
import com.hai.config.EtcService; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.enum_type.CarTypeEnum; |
|
|
|
import com.hai.enum_type.CarTypeEnum; |
|
|
@ -66,7 +67,13 @@ public class EtcCustomerController { |
|
|
|
map.put("custName", custName); |
|
|
|
map.put("custName", custName); |
|
|
|
map.put("phone", phone); |
|
|
|
map.put("phone", phone); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(etcCustMsgService.getEtcCustList(map)); |
|
|
|
List<EtcCustMsg> list = etcCustMsgService.getEtcCustList(map); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(EtcCustMsg custMsg : list){ |
|
|
|
|
|
|
|
custMsg.setCustIdNo(CommonConfig.desensitize(custMsg.getCustIdNo())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(list); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("BsMsgController --> getMsgByList() error!", e); |
|
|
|
log.error("BsMsgController --> getMsgByList() error!", e); |
|
|
@ -269,7 +276,7 @@ public class EtcCustomerController { |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询车辆列表") |
|
|
|
@ApiOperation(value = "查询车辆列表") |
|
|
|
public ResponseData getEtcCarMsgList( |
|
|
|
public ResponseData getEtcCarMsgList( |
|
|
|
@RequestParam(value = "vehPlateNo", required = false) String vehPlateNo, HttpServletRequest request |
|
|
|
@RequestParam(value = "vehPlateNo", required = false) String vehPlateNo, @RequestParam(value = "custId", required = false) String custId, HttpServletRequest request |
|
|
|
) { |
|
|
|
) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
@ -280,21 +287,20 @@ public class EtcCustomerController { |
|
|
|
|
|
|
|
|
|
|
|
map.put("userId", userInfoModel.getSecUser().getId()); |
|
|
|
map.put("userId", userInfoModel.getSecUser().getId()); |
|
|
|
map.put("vehPlateNo", vehPlateNo); |
|
|
|
map.put("vehPlateNo", vehPlateNo); |
|
|
|
|
|
|
|
map.put("custId", custId); |
|
|
|
|
|
|
|
|
|
|
|
List<EtcCarMsg> list = etcCarMsgService.getEtcCarList(map); |
|
|
|
List<EtcCarMsg> list = etcCarMsgService.getEtcCarList(map); |
|
|
|
|
|
|
|
|
|
|
|
for (EtcCarMsg etcCarMsg :list) { |
|
|
|
for (EtcCarMsg etcCarMsg :list) { |
|
|
|
JSONObject car = EtcService.getVehStatus(etcCarMsg); |
|
|
|
JSONObject car = EtcService.getVehStatus(etcCarMsg); |
|
|
|
if (car.getString("errCode").equals("0")) { |
|
|
|
if (car.getString("errCode").equals("0")) { |
|
|
|
|
|
|
|
|
|
|
|
if (car.getJSONObject("result").getInteger("vehStatus") == 11) { |
|
|
|
|
|
|
|
etcCarMsg.setVehStatus(13); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
etcCarMsg.setVehStatus(car.getJSONObject("result").getInteger("vehStatus")); |
|
|
|
etcCarMsg.setVehStatus(car.getJSONObject("result").getInteger("vehStatus")); |
|
|
|
} |
|
|
|
|
|
|
|
etcCarMsg.setPayStatus(car.getJSONObject("result").getInteger("payStatus")); |
|
|
|
etcCarMsg.setPayStatus(car.getJSONObject("result").getInteger("payStatus")); |
|
|
|
etcCarMsg.setSignStatus(car.getJSONObject("result").getInteger("signStatus")); |
|
|
|
etcCarMsg.setSignStatus(car.getJSONObject("result").getInteger("signStatus")); |
|
|
|
|
|
|
|
etcCarMsg.setCardNo(car.getJSONObject("result").getString("cardNo")); |
|
|
|
|
|
|
|
etcCarMsg.setObuNo(car.getJSONObject("result").getString("obuNo")); |
|
|
|
etcCarMsg.setExt2(car.getJSONObject("result").getString("docException")); |
|
|
|
etcCarMsg.setExt2(car.getJSONObject("result").getString("docException")); |
|
|
|
|
|
|
|
etcCarMsgService.updateEtcCar(etcCarMsg); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -380,6 +386,57 @@ public class EtcCustomerController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/deleteEtcCar", method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "删除车辆信息") |
|
|
|
|
|
|
|
public ResponseData deleteEtcCar(@RequestParam(value = "id", required = true) Long id) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EtcCarMsg etcCarMsg = etcCarMsgService.findEtcCarById(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (etcCarMsg == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到相关内容!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (etcCarMsg.getVehStatus() == 11 || etcCarMsg.getVehStatus() == 12 || etcCarMsg.getVehStatus() == 13 || etcCarMsg.getVehStatus() == 15 || etcCarMsg.getVehStatus() == 20) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "状态错误!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
etcCarMsgService.deleteEtcCar(id); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success("删除成功!"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("HighUserController --> findByUserId() error!", e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/deleteEtcCust", method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "删除用户信息") |
|
|
|
|
|
|
|
public ResponseData deleteEtcCust(@RequestParam(value = "id", required = true) Long id) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EtcCustMsg etcCustMsg = etcCustMsgService.findEtcCustById(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (etcCustMsg == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到相关内容!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
etcCustMsg.setStatus(0); |
|
|
|
|
|
|
|
etcCustMsgService.editEtcCust(etcCustMsg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success("删除成功!"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("HighUserController --> findByUserId() error!", e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getVehStatus", method = RequestMethod.GET) |
|
|
|
@RequestMapping(value = "/getVehStatus", method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "根据id查询详情") |
|
|
|
@ApiOperation(value = "根据id查询详情") |
|
|
|