|
|
|
@ -35,19 +35,19 @@ public class InvoiceFrontController { |
|
|
|
|
@ApiImplicitParam(name = "secret", value = "身份认证Key", dataType = "java.lang.String", example = "LTEO+oOgWMsuQAOUglqXuQ==", required = true), |
|
|
|
|
@ApiImplicitParam(name = "params", value = "请求体", dataType = "java.lang.String", required = true) |
|
|
|
|
}) |
|
|
|
|
@PostMapping("/rpaLogin/{identity}/{secret}") |
|
|
|
|
public Object rpaLogin(@RequestBody Map<String,Object> params,@PathVariable("identity") String identity, @PathVariable("secret") String secret) { |
|
|
|
|
@PostMapping("/rpaLogin") |
|
|
|
|
public Object rpaLogin(@RequestBody Map<String,Object> params) { |
|
|
|
|
|
|
|
|
|
JSONObject paramJson = new JSONObject(params); |
|
|
|
|
|
|
|
|
|
log.debug("rpaLogin param{} identity:{} secret:{}", paramJson.toJSONString(), identity, secret); |
|
|
|
|
log.debug("rpaLogin param{}", paramJson.toJSONString()); |
|
|
|
|
|
|
|
|
|
//参数校验
|
|
|
|
|
if (StringUtils.isBlank(identity)){ |
|
|
|
|
if (StringUtils.isBlank(paramJson.getString("identity"))){ |
|
|
|
|
return AjaxResult.error("公司ID不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(secret)){ |
|
|
|
|
if (StringUtils.isBlank(paramJson.getString("secret"))){ |
|
|
|
|
return AjaxResult.error("公司Key不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -83,8 +83,8 @@ public class InvoiceFrontController { |
|
|
|
|
paramJson.put("ffm","sms_login"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Companyservice companyservice = iCompanyserviceService.selectCompanyserviceByIdentity(identity); |
|
|
|
|
if (companyservice == null || !secret.equals(companyservice.getSecret())) { |
|
|
|
|
Companyservice companyservice = iCompanyserviceService.selectCompanyserviceByIdentity(paramJson.getString("identity")); |
|
|
|
|
if (companyservice == null || !paramJson.getString("secret").equals(companyservice.getSecret())) { |
|
|
|
|
return AjaxResult.error(ErrorCode.COMPANY_NOT_FOUND); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -100,9 +100,13 @@ public class InvoiceFrontController { |
|
|
|
|
@ApiImplicitParam(name = "identity", value = "身份认证", dataType = "java.lang.String", example = "1130", required = true), |
|
|
|
|
@ApiImplicitParam(name = "secret", value = "身份认证Key", dataType = "java.lang.String", example = "LTEO+oOgWMsuQAOUglqXuQ==", required = true) |
|
|
|
|
}) |
|
|
|
|
@PostMapping("/queryRpaTaxAccount/{identity}/{secret}") |
|
|
|
|
public Object queryRpaTaxAccount(@PathVariable("identity") String identity, @PathVariable("secret") String secret ){ |
|
|
|
|
@PostMapping("/queryRpaTaxAccount") |
|
|
|
|
public Object queryRpaTaxAccount(@RequestBody Map<String,Object> params){ |
|
|
|
|
|
|
|
|
|
JSONObject paramJson = new JSONObject(params); |
|
|
|
|
|
|
|
|
|
String identity = paramJson.getString("identity"); |
|
|
|
|
String secret = paramJson.getString("secret"); |
|
|
|
|
log.debug("queryRpaTaxAccount param identity:{} secret:{}",identity,secret); |
|
|
|
|
//参数校验
|
|
|
|
|
if (StringUtils.isBlank(identity)){ |
|
|
|
@ -130,12 +134,14 @@ public class InvoiceFrontController { |
|
|
|
|
@ApiImplicitParam(name = "secret", value = "身份认证Key", dataType = "java.lang.String", example = "LTEO+oOgWMsuQAOUglqXuQ==", required = true), |
|
|
|
|
@ApiImplicitParam(name = "yhm", value = "电子税局登陆账号", dataType = "java.lang.String", required = true) |
|
|
|
|
}) |
|
|
|
|
@PostMapping("/getRpaQrCode/{identity}/{secret}") |
|
|
|
|
public Object getRpaQrCode(@RequestBody Map<String,Object> params,@PathVariable("identity") String identity, @PathVariable("secret") String secret ) { |
|
|
|
|
@PostMapping("/getRpaQrCode") |
|
|
|
|
public Object getRpaQrCode(@RequestBody Map<String,Object> params) { |
|
|
|
|
|
|
|
|
|
JSONObject paramJson = new JSONObject(params); |
|
|
|
|
log.debug("getRpaQrCode param params:{} identity:{} secret:{}", paramJson,identity,secret); |
|
|
|
|
log.debug("getRpaQrCode param params:{}", paramJson); |
|
|
|
|
|
|
|
|
|
String identity = paramJson.getString("identity"); |
|
|
|
|
String secret = paramJson.getString("secret"); |
|
|
|
|
//参数校验
|
|
|
|
|
if (StringUtils.isBlank(identity)){ |
|
|
|
|
return AjaxResult.error("公司ID不能为空"); |
|
|
|
@ -145,9 +151,9 @@ public class InvoiceFrontController { |
|
|
|
|
return AjaxResult.error("公司Key不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(paramJson.getString("yhm"))){ |
|
|
|
|
return AjaxResult.error("电子税局登录名不能为空"); |
|
|
|
|
} |
|
|
|
|
// if (StringUtils.isBlank(paramJson.getString("yhm"))){
|
|
|
|
|
// return AjaxResult.error("电子税局登录名不能为空");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
Companyservice companyservice = iCompanyserviceService.selectCompanyserviceByIdentity(identity); |
|
|
|
|
|
|
|
|
@ -168,12 +174,14 @@ public class InvoiceFrontController { |
|
|
|
|
@ApiImplicitParam(name = "secret", value = "身份认证Key", dataType = "java.lang.String", example = "LTEO+oOgWMsuQAOUglqXuQ==", required = true), |
|
|
|
|
@ApiImplicitParam(name = "params", value = "请求体", dataType = "java.lang.String", required = true) |
|
|
|
|
}) |
|
|
|
|
@PostMapping("/getRpaAuthStatus/{identity}/{secret}") |
|
|
|
|
public Object getRpaAuthStatus(@RequestBody Map<String,Object> params, @PathVariable("identity") String identity, @PathVariable("secret") String secret ) { |
|
|
|
|
@PostMapping("/getRpaAuthStatus") |
|
|
|
|
public Object getRpaAuthStatus(@RequestBody Map<String,Object> params) { |
|
|
|
|
|
|
|
|
|
JSONObject paramJson = new JSONObject(params); |
|
|
|
|
|
|
|
|
|
log.debug("getRpaAuthStatus param{} identity:{} secret:{}", paramJson.toJSONString(), identity, secret); |
|
|
|
|
log.debug("getRpaAuthStatus param{}", paramJson.toJSONString()); |
|
|
|
|
String identity = paramJson.getString("identity"); |
|
|
|
|
String secret = paramJson.getString("secret"); |
|
|
|
|
|
|
|
|
|
//参数校验
|
|
|
|
|
if (StringUtils.isBlank(identity)){ |
|
|
|
|