袁野 7 months ago
parent ed151e7be3
commit 217e9e25b4
  1. 71
      hai-bweb/src/main/java/com/bweb/controller/Etc/EtcCustomerController.java
  2. 1
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  3. 4
      hai-cweb/src/main/java/com/cweb/controller/Etc/EtcCustomerController.java
  4. 4
      hai-cweb/src/main/java/com/cweb/controller/tPigController.java
  5. 56
      hai-schedule/src/main/java/com/hai/schedule/EtcSchedule.java
  6. 8
      hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java
  7. 8
      hai-service/src/main/java/com/hai/config/CommonConfig.java
  8. 3
      hai-service/src/main/java/com/hai/config/EtcService.java
  9. 2
      hai-service/src/main/java/com/hai/etc/EtcCarMsgService.java
  10. 3
      hai-service/src/main/java/com/hai/etc/EtcCustMsgService.java
  11. 5
      hai-service/src/main/java/com/hai/etc/impl/EtcCarMsgServiceImpl.java
  12. 8
      hai-service/src/main/java/com/hai/etc/impl/EtcCustMsgServiceImpl.java
  13. 4
      hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java
  14. 6
      hai-service/src/main/resources/dev/commonConfig.properties

@ -11,6 +11,7 @@ import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.DateUtil;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.config.CommonConfig;
import com.hai.config.EtcService;
import com.hai.entity.*;
import com.hai.enum_type.CarTypeEnum;
@ -66,7 +67,13 @@ public class EtcCustomerController {
map.put("custName", custName);
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) {
log.error("BsMsgController --> getMsgByList() error!", e);
@ -269,7 +276,7 @@ public class EtcCustomerController {
@ResponseBody
@ApiOperation(value = "查询车辆列表")
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 {
@ -280,21 +287,20 @@ public class EtcCustomerController {
map.put("userId", userInfoModel.getSecUser().getId());
map.put("vehPlateNo", vehPlateNo);
map.put("custId", custId);
List<EtcCarMsg> list = etcCarMsgService.getEtcCarList(map);
for (EtcCarMsg etcCarMsg :list) {
JSONObject car = EtcService.getVehStatus(etcCarMsg);
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.setPayStatus(car.getJSONObject("result").getInteger("payStatus"));
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"));
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)
@ResponseBody
@ApiOperation(value = "根据id查询详情")

@ -149,6 +149,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/highThirdParty/*")
.excludePathPatterns("/group/*")
.excludePathPatterns("/couponCodeOther/*")
.excludePathPatterns("/tPig/*")
;
}

@ -162,7 +162,7 @@ public class EtcCustomerController {
}
// 查询微信签约代扣信息
JSONObject object = EtcService.checkNeedSignWechatWithhold( contractOrder.getProductId() , contractOrder.getCardVarietyId());
JSONObject object = EtcService.checkNeedSignWechatWithhold( contractOrder.getProductId() , contractOrder.getCardVarietyId() , contractOrder.getVehId());
if (object.getString("errCode").equals("0")) {
contractOrder.setWechatSign(object.getJSONObject("result").getBoolean("alreadySignFlag")? 1:0);
contractOrder.setNeedSignWechat(object.getJSONObject("result").getBoolean("needSignFlag")? 1:0);
@ -299,7 +299,7 @@ public class EtcCustomerController {
EtcContractOrder contractOrder = etcCarMsgService.findContractOrderById(contractId);
if (type == 1) {
JSONObject object = EtcService.checkNeedSignWechatWithhold( contractOrder.getProductId() , contractOrder.getCardVarietyId());
JSONObject object = EtcService.checkNeedSignWechatWithhold( contractOrder.getProductId() , contractOrder.getCardVarietyId() , contractOrder.getVehId());
if (object.getString("errCode").equals("0")) {
return ResponseMsgUtil.success(object.getJSONObject("result"));
} else {

@ -41,7 +41,7 @@ public class tPigController {
try {
HighUser highUser = highUserService.findByUserId(userId);
JSONObject token = QianZhuConfig.getToken(highUser.getUnionId() , highUser.getName() , highUser.getPhone());
JSONObject token = QianZhuConfig.getToken(highUser.getId().toString() , highUser.getName() , highUser.getPhone());
String url = "";
if (token.getBoolean("success")) {
JSONObject data = token.getJSONObject("data");
@ -60,7 +60,7 @@ public class tPigController {
try {
HighUser highUser = highUserService.findByUserId(userId);
JSONObject token = QianZhuConfig.getToken(highUser.getUnionId() , highUser.getName() , highUser.getPhone());
JSONObject token = QianZhuConfig.getToken(highUser.getId().toString() , highUser.getName() , highUser.getPhone());
String url = "";
if (token.getBoolean("success")) {
JSONObject data = token.getJSONObject("data");

@ -36,34 +36,34 @@ public class EtcSchedule {
private EtcCarMsgService etcCarMsgService;
@Scheduled(cron = "0 0/10 * * * ?") //每10分钟执行一次
public void etcCarMsg() {
try {
JSONObject object = EtcService.queryActivateVehicleInfoPage(DateUtil.format(DateUtil.reduceDate(new Date() , 2) , "yyyy-MM-dd HH:mm:ss") , DateUtil.format(new Date() , "yyyy-MM-dd HH:mm:ss") );
if (Objects.equals(object.getString("errCode"), "0") && object.getJSONObject("result").getJSONArray("records") != null) {
JSONArray jsonArray = object.getJSONObject("result").getJSONArray("records");
for (int i = 0; i < jsonArray.size(); i++) {
Map<String , Object> map = new HashMap<>();
map.put("vehPlateNo" , jsonArray.getJSONObject(i).getString("vehPlateNo"));
map.put("vehPlateColor" , CarTypeEnum.getNameByName(jsonArray.getJSONObject(i).getString("vehPlateColor")));
map.put("vehStatus" , 20);
EtcCarMsg carMsg = etcCarMsgService.findEtcCarByMap(map);
carMsg.setCardNo(jsonArray.getJSONObject(i).getString("cardNo"));
carMsg.setObuNo(jsonArray.getJSONObject(i).getString("obuNo"));
carMsg.setUpdateTime(jsonArray.getJSONObject(i).getDate("activeTime"));
etcCarMsgService.updateEtcCar(carMsg);
}
}
} catch (Exception e) {
log.error("HighUserController --> findByUserId() error!", e);
}
}
// @Scheduled(cron = "0 0/10 * * * ?") //每10分钟执行一次
// public void etcCarMsg() {
// try {
//
// JSONObject object = EtcService.queryActivateVehicleInfoPage(DateUtil.format(DateUtil.reduceDate(new Date() , 2) , "yyyy-MM-dd HH:mm:ss") , DateUtil.format(new Date() , "yyyy-MM-dd HH:mm:ss") );
// if (Objects.equals(object.getString("errCode"), "0") && object.getJSONObject("result").getJSONArray("records") != null) {
// JSONArray jsonArray = object.getJSONObject("result").getJSONArray("records");
//
// for (int i = 0; i < jsonArray.size(); i++) {
// Map<String , Object> map = new HashMap<>();
// map.put("vehPlateNo" , jsonArray.getJSONObject(i).getString("vehPlateNo"));
// map.put("vehPlateColor" , CarTypeEnum.getNameByName(jsonArray.getJSONObject(i).getString("vehPlateColor")));
// map.put("vehStatus" , 20);
//
// EtcCarMsg carMsg = etcCarMsgService.findEtcCarByMap(map);
// carMsg.setCardNo(jsonArray.getJSONObject(i).getString("cardNo"));
// carMsg.setObuNo(jsonArray.getJSONObject(i).getString("obuNo"));
// carMsg.setUpdateTime(jsonArray.getJSONObject(i).getDate("activeTime"));
//
// etcCarMsgService.updateEtcCar(carMsg);
//
// }
// }
//
// } catch (Exception e) {
// log.error("HighUserController --> findByUserId() error!", e);
// }
// }
}

@ -158,10 +158,10 @@ public class HighGasSchedule {
// gasService.getPayloAllStation();
// }
// @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
// public void getDianAllStation() throws Exception {
// gasService.getDianAllStation();
// }
@Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
public void getDianAllStation() throws Exception {
gasService.getDianAllStation();
}
@Scheduled(cron = "0 0 3 * * ?") // 每日凌晨00:00:7执行一次
public void deleteOilNo() {

@ -184,5 +184,13 @@ public class CommonConfig {
return HttpsUtils.doGet("https://express3.market.alicloudapi.com/express3" , querys ,headers);
}
// 对身份证号码进行脱敏处理
public static String desensitize(String idCard) {
if (idCard == null || idCard.length() != 18) {
return idCard;
}
return idCard.substring(0, 6) + "**********" + idCard.substring(14);
}
}

@ -258,7 +258,7 @@ public class EtcService {
* @Param cardVarietyId
* @return com.alibaba.fastjson.JSONObject
*/
public static JSONObject checkNeedSignWechatWithhold(Integer productId , Integer cardVarietyId) throws Exception {
public static JSONObject checkNeedSignWechatWithhold(Integer productId , Integer cardVarietyId , String vehId) throws Exception {
// 组装数据
JSONObject map = new JSONObject();
map.put("orgCode" , CommonSysConst.getSysConfig().getNdOrgCode());
@ -266,6 +266,7 @@ public class EtcService {
JSONObject jsonObject = new JSONObject();
jsonObject.put("productId" , productId);
jsonObject.put("cardVarietyId" , cardVarietyId);
jsonObject.put("vehId" , vehId);
map.put("body" , jsonObject.toJSONString());
String sign = WxUtils.generateSignByEtc(map , CommonSysConst.getSysConfig().getNdKey());

@ -29,6 +29,8 @@ public interface EtcCarMsgService {
void addEtcCar(EtcCarMsg etcCarMsg) throws Exception;
void deleteEtcCar(Long id) throws Exception;
void updateEtcCar(EtcCarMsg etcCarMsg);
/**

@ -34,6 +34,9 @@ public interface EtcCustMsgService {
*/
void updateEtcCust(EtcCustMsg etcCustMsg) throws Exception;
void editEtcCust(EtcCustMsg etcCustMsg) throws Exception;
/**
* @Author Sum1Dream
* @Name getCustInfoList

@ -84,6 +84,11 @@ public class EtcCarMsgServiceImpl implements EtcCarMsgService {
etcCarMsgMapper.insert(etcCarMsg);
}
@Override
public void deleteEtcCar(Long id) throws Exception {
etcCarMsgMapper.deleteByPrimaryKey(id);
}
@Override
public void updateEtcCar(EtcCarMsg etcCarMsg) {
etcCarMsgMapper.updateByPrimaryKey(etcCarMsg);

@ -42,6 +42,11 @@ public class EtcCustMsgServiceImpl implements EtcCustMsgService {
}
@Override
public void editEtcCust(EtcCustMsg etcCustMsg) throws Exception {
etcCustMsgMapper.updateByPrimaryKey(etcCustMsg);
}
@Override
public List<EtcCustMsg> getEtcCustList(Map<String, Object> map) {
@ -57,6 +62,9 @@ public class EtcCustMsgServiceImpl implements EtcCustMsgService {
if (MapUtils.getString(map , "phone") != null) {
criteria.andPhoneEqualTo(MapUtils.getString(map , "phone"));
}
criteria.andStatusNotEqualTo(0);
example.setOrderByClause("create_time desc");
return etcCustMsgMapper.selectByExample(example);
}

@ -824,8 +824,8 @@ public class HighGasServiceImpl implements HighGasService {
Map<String, Object> param = new HashMap<>();
param.put("sourceType", 2);
// param.put("regionId", "500000");
// param.put("storeName", "壳牌");
param.put("regionId", "500000");
param.put("storeName", "壳牌");
param.put("status", 1);
List<HighMerchantStore> merchantStoreList = merchantStoreService.getMerchantStoreList(param);

@ -178,9 +178,9 @@ EtcPublicKey = MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMyQb5gR1rweB5oHKqRPJtJjLQK
EtcPrivateKey = MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBAO8+KWh/OmBahFk7TWOEjPl13BT5NdlbGvQ/311Yua6CQqul9w1DIR2TwFUUh/Bko/eVoLROfF2XVjHbw2bImTdJ7y9C3511HI59YPNzqyql0DHjLxbH0VW92eUgk8mG09wtrUMu1ImN0b7aFE3uqAgz6pwh3TUiQWsDWz+l/MG7AgMBAAECgYEA7nYsOd8OpbmzT2m/omEdTwz9993KocKgZDJCBj4InftyTrrXO93cZSm/PE6BjMgTcxUuIGpWpcbRgFLHOmzZ4Qd+k/6Yb1ErMTfdGlgrxv2B+vztWYfjmFzEiXpecFH47ED6iYrrqm14X3InpnBv4rUkGdqqNbyPGgTO2ncs/3kCQQD+xqRAQSb/TROlqJdO91y6z9v0PO2GLmokqYg444rKYZKhDE0tdJeLU/sfK8SMg5+SlwdQm4nlo8EDJ/w2CEn3AkEA8GRqVkKgIuH413/a6+luYDjlf30WY7Mi1sm3QPSZ6+eH35UwsL6mdX6mjRpUN9Hez6FMfE7s3XOldoPVMzR1XQJBAOa2VTkGhtz8HEWQZOySXfuhjSogHmu7Dk2C5CO4Eg/wycpjDGSUR0NZWnfAt60S6GbjszEQmJBGeNt10xPO78MCQQCWXwnRaZ3IFDhXfQfRWFSN5ilQ5UszFGQvnUB/ZkI+ObdZmXY6qRdxGcdPLnAN9r78fDZe7/Pk1qljCDY98IuVAkEAnSeO/221gDhL1wnbUhGuX1yo8f5Eo/wDTW5cBxXFGZeexhB8I4jnEV4E/xmikkb3jDFvmrnFk+XUtDqkrvicRQ==
#NUODE
NdPostUrl = http://nuode-test.yuetong18.cn/nuode-module-supplier/
NdOrgCode = 19181483-91e9-4e13-9236-fb917ed9529d
NdKey= 5df3f620-e269-458d-9556-87e26d30256a
NdPostUrl = https://nuode.qianbao18.com/nuode-module-supplier/
NdOrgCode = 414a3d16-30f9-40d1-a2cd-b06066b38708
NdKey= 4a6a6836-42f5-4ead-8629-ca1265bfb98c
#Sph
SphPostUrl = https://api.coupon.shuangpenghui.com//business/entry

Loading…
Cancel
Save