|
@@ -353,4 +353,94 @@ public class CustomerInterLowerServiceImpl implements CustomerInterLowerService
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description 自有车 无车、协议上传状态查询
|
|
|
+ * @Author mashengyi
|
|
|
+ * @Date 2022/3/27 22:51
|
|
|
+ * @Param
|
|
|
+ * @Return
|
|
|
+ * @Exception
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public DataResult customeProtocolStatus(String appKey, String api, String data, String requestid) {
|
|
|
+ long costtimestart = System.currentTimeMillis();
|
|
|
+
|
|
|
+ DataResult result = new DataResult();
|
|
|
+
|
|
|
+ result.setData(3);
|
|
|
+ result.setCode(200);
|
|
|
+ result.setRequestid(requestid);
|
|
|
+ result.setMsg("无法认证");
|
|
|
+
|
|
|
+ try {
|
|
|
+ log.info("[-CustomerInterLowerServiceImpl.customeProtocolStatus-] request appKey=" + appKey + " ,api=" + api + " ,data=" +data+ " ,requestid=" +requestid);
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
+ String companyNum = jsonObject.getString("companyNum");//公司编号
|
|
|
+
|
|
|
+ if(StringUtils.isEmpty(data)|| null == jsonObject){
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ if( StringUtils.isEmpty(companyNum)){
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ CustomerRec customerRec2 = new CustomerRec();
|
|
|
+ customerRec2.setCustomerName(appKey);
|
|
|
+ customerRec2.setCompanyNum(companyNum);
|
|
|
+ CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec2);
|
|
|
+ if (null == customerRec1){
|
|
|
+ result.setMsg("企业还未备案成功!");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (null != customerRec1 && customerRec1.getRecStatus() != 1){
|
|
|
+ result.setMsg("企业还未备案成功!");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
+ customerRec.setCustomerName(appKey);//客户名称
|
|
|
+ customerRec.setCompanyNum(companyNum);
|
|
|
+ customerRec.setInterType(0);//接口
|
|
|
+
|
|
|
+ RespR rs = lowerService.customeRecUploadStatus(customerRec);
|
|
|
+ long costtimeend = System.currentTimeMillis();
|
|
|
+ log.info("[-CustomerInterLowerServiceImpl.customeProtocolStatus-] result is "
|
|
|
+ + rs.toString() + ", request is " + data + " ,costtime="
|
|
|
+ + (costtimeend - costtimestart));
|
|
|
+ if(null != rs && rs.getCode() == 0 && 0 == Integer.parseInt(rs.getData().toString())){
|
|
|
+ result.setData(3);
|
|
|
+ result.setCode(200);
|
|
|
+ result.setMsg("协议上传状态查询失败,请联系管理员处理");
|
|
|
+ return result;
|
|
|
+ } else if(null != rs && rs.getCode() == 0 && 0 != Integer.parseInt(rs.getData().toString())){
|
|
|
+ result.setData(1);
|
|
|
+ result.setCode(200);
|
|
|
+ JSONObject jb = new JSONObject();
|
|
|
+ jb.put("status",rs.getData().toString());
|
|
|
+ result.setMsg(jb.toString());
|
|
|
+ return result;
|
|
|
+ }else {
|
|
|
+ result.setData(3);
|
|
|
+ result.setCode(200);
|
|
|
+ result.setMsg("无法认证");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("[-CustomerInterLowerServiceImpl.customeProtocolStatus-] get httpclient exception is "
|
|
|
+ + e + ", request is " + data);
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|