mirror of
https://gitee.com/sdyunze/iotlink.git
synced 2026-09-01 15:33:12 +08:00
!95 Merge branch 'master' of <a href="https://gitee.com/sdyunze/iotlink">https://gitee.com/sdyunze/iotlink</a> into hotfix_poster
Merge pull request !95 from 山东云则/hotfix_poster
This commit is contained in:
Generated
+5
-5
@@ -41,16 +41,16 @@
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="rdc-releases" />
|
||||
<option name="name" value="rdc-releases" />
|
||||
<option name="url" value="https://packages.aliyun.com/maven/repository/2318928-release-U2iell/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="rdc-releases" />
|
||||
<option name="name" value="rdc-releases" />
|
||||
<option name="url" value="https://packages.aliyun.com/maven/repository/2318928-release-U2iell/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="public" />
|
||||
<option name="name" value="aliyun nexus" />
|
||||
|
||||
Generated
+12
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,40 @@
|
||||
2024-05-17 08:48:07 [main] DEBUG u.o.l.s.context.SysOutOverSLF4JInitialiser --> Your logging framework class ch.qos.logback.classic.Logger should not need access to the standard println methods on the console, so you should not need to register a logging system package.
|
||||
2024-05-17 08:48:07 [main] INFO uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J --> Replaced standard System.out and System.err PrintStreams with SLF4JPrintStreams
|
||||
2024-05-17 08:48:07 [main] INFO uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J --> Redirected System.out and System.err to SLF4J for this context
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner -->
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner --> . ____ _ __ _ _
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner --> /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner --> ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner --> \\/ ___)| |_)| | | | | || (_| | ) ) ) )
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner --> ' |____| .__|_| |_|_| |_\__, | / / / /
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner --> =========|_|==============|___/=/_/_/_/
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner --> [32m :: Spring Boot :: [39m [2m (v2.2.13.RELEASE)[0;39m
|
||||
2024-05-17 08:48:08 [main] INFO org.springframework.boot.SpringBootBanner -->
|
||||
2024-05-17 08:48:08 [background-preinit] INFO org.hibernate.validator.internal.util.Version --> HV000001: Hibernate Validator 6.0.22.Final
|
||||
2024-05-17 08:48:08 [main] INFO com.yunze.iotapiApplication --> Starting iotapiApplication on LAPTOP-SKITT5PB with PID 3632 (C:\Users\‘\Desktop\云则\部署文档\iotlink\kaiyuan\yunze-iotapi\target\classes started by cph in C:\Users\‘\Desktop\云则\部署文档\iotlink\kaiyuan)
|
||||
2024-05-17 08:48:08 [main] INFO com.yunze.iotapiApplication --> The following profiles are active: druid
|
||||
2024-05-17 08:48:09 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate --> Multiple Spring Data modules found, entering strict repository configuration mode!
|
||||
2024-05-17 08:48:09 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate --> Bootstrapping Spring Data Redis repositories in DEFAULT mode.
|
||||
2024-05-17 08:48:09 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate --> Finished Spring Data repository scanning in 63ms. Found 0 Redis repository interfaces.
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> Skipping MapperFactoryBean with name 'agentAccountMapper' and 'com.yunze.iotapi.mapper.mysql.AgentAccountMapper' mapperInterface. Bean already defined with the same name!
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> Skipping MapperFactoryBean with name 'sysLogsMapper' and 'com.yunze.iotapi.mapper.mysql.SysLogsMapper' mapperInterface. Bean already defined with the same name!
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> No MyBatis mapper was found in '[com.yunze.iotapi.mapper.mysql]' package. Please check your configuration.
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> No MyBatis mapper was found in '[com.yunze.common.mapper.yunze]' package. Please check your configuration.
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> Skipping MapperFactoryBean with name 'yzCardPollingUtilCzcMapper' and 'com.yunze.apiCommon.mapper.mysql.YzCardPollingUtilCzcMapper' mapperInterface. Bean already defined with the same name!
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> Skipping MapperFactoryBean with name 'yzCardRouteMapper' and 'com.yunze.apiCommon.mapper.mysql.YzCardRouteMapper' mapperInterface. Bean already defined with the same name!
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> Skipping MapperFactoryBean with name 'yzCardUpdateMapper' and 'com.yunze.apiCommon.mapper.mysql.YzCardUpdateMapper' mapperInterface. Bean already defined with the same name!
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> Skipping MapperFactoryBean with name 'yzCardxintongMapper' and 'com.yunze.apiCommon.mapper.mysql.YzCardxintongMapper' mapperInterface. Bean already defined with the same name!
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> Skipping MapperFactoryBean with name 'yzIpWhitelistMapper' and 'com.yunze.apiCommon.mapper.mysql.YzIpWhitelistMapper' mapperInterface. Bean already defined with the same name!
|
||||
2024-05-17 08:48:09 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner --> No MyBatis mapper was found in '[com.yunze.apiCommon.mapper]' package. Please check your configuration.
|
||||
2024-05-17 08:48:09 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer --> Tomcat initialized with port(s): 9080 (http)
|
||||
2024-05-17 08:48:09 [main] INFO org.apache.coyote.http11.Http11NioProtocol --> Initializing ProtocolHandler ["http-nio-9080"]
|
||||
2024-05-17 08:48:09 [main] INFO org.apache.catalina.core.StandardService --> Starting service [Tomcat]
|
||||
2024-05-17 08:48:09 [main] INFO org.apache.catalina.core.StandardEngine --> Starting Servlet engine: [Apache Tomcat/9.0.41]
|
||||
2024-05-17 08:48:10 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/route] --> Initializing Spring embedded WebApplicationContext
|
||||
2024-05-17 08:48:10 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext --> Root WebApplicationContext: initialization completed in 1543 ms
|
||||
2024-05-17 08:48:11 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor --> Initializing ExecutorService 'applicationTaskExecutor'
|
||||
2024-05-17 08:48:12 [main] WARN o.s.b.s.r.RedisStarterDeprecationWarningAutoConfiguration --> spring-boot-starter-redis is deprecated as of Spring Boot 1.4, please migrate to spring-boot-starter-data-redis
|
||||
2024-05-17 08:48:12 [main] INFO org.apache.coyote.http11.Http11NioProtocol --> Starting ProtocolHandler ["http-nio-9080"]
|
||||
2024-05-17 08:48:12 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer --> Tomcat started on port(s): 9080 (http) with context path '/route'
|
||||
2024-05-17 08:48:12 [main] INFO com.yunze.iotapiApplication --> Started iotapiApplication in 4.533 seconds (JVM running for 6.886)
|
||||
2024-05-17 08:48:24 [SpringContextShutdownHook] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor --> Shutting down ExecutorService 'applicationTaskExecutor'
|
||||
Generated
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="yunze-admin" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+35
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="public" />
|
||||
<option name="name" value="aliyun nexus" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="rdc-snapshots" />
|
||||
<option name="name" value="rdc-snapshots" />
|
||||
<option name="url" value="https://packages.aliyun.com/maven/repository/2318928-snapshot-7NCTHC/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="rdc-releases" />
|
||||
<option name="name" value="rdc-releases" />
|
||||
<option name="url" value="https://packages.aliyun.com/maven/repository/2318928-release-U2iell/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+12
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
+146
-103
@@ -328,6 +328,7 @@ public class YzCardController extends MyBaseController {
|
||||
|
||||
/**
|
||||
* 同步用量
|
||||
*
|
||||
* @param Pstr
|
||||
* @return
|
||||
*/
|
||||
@@ -355,7 +356,7 @@ public class YzCardController extends MyBaseController {
|
||||
Double Use = Double.parseDouble(Rmap.get("Use").toString());
|
||||
if (Use >= 0) {
|
||||
try {
|
||||
Map<String, Object> RMap = cardFlowSyn.CalculationFlow(Parammap.get("iccid").toString(), Use,Rmap.get("cd_code").toString());
|
||||
Map<String, Object> RMap = cardFlowSyn.CalculationFlow(Parammap.get("iccid").toString(), Use, Rmap.get("cd_code").toString());
|
||||
// //todo 同步成功之后判断是否为第一次同步用量 第一次则添加 第一次用量产生时间
|
||||
// Boolean aBoolean = yzCardServiceImpl.firstUseTimeMethod(Parammap.get("iccid").toString());
|
||||
// if (aBoolean){
|
||||
@@ -389,15 +390,6 @@ public class YzCardController extends MyBaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 同步卡状态
|
||||
*
|
||||
@@ -537,6 +529,63 @@ public class YzCardController extends MyBaseController {
|
||||
return Myerr("同步激活时间 操作失败!");
|
||||
}
|
||||
|
||||
//同步卡冻结状态
|
||||
@PostMapping(value = "/synManageStatus", produces = {"application/json;charset=utf-8"})
|
||||
public String synManageStatus(@RequestBody String Pstr) {
|
||||
HashMap<String, Object> Parammap = new HashMap<>();
|
||||
if (Pstr != null) {
|
||||
Pstr = Pstr.replace("%2F", "/");
|
||||
}
|
||||
try {
|
||||
Pstr = AesEncryptUtil.desEncrypt(Pstr);
|
||||
Parammap.putAll(JSON.parseObject(Pstr));
|
||||
Map<String, Object> Route = yzCardServiceImpl.findRoute(Parammap);
|
||||
if (Route != null) {
|
||||
String cd_status = Route.get("cd_status").toString();
|
||||
if (cd_status != null && cd_status != "" && cd_status.equals("1")) {
|
||||
Map<String, Object> Rmap = internalApiRequest.queryManageStatus(Parammap, Route);
|
||||
|
||||
String code = Rmap.get("code") != null ? Rmap.get("code").toString() : "500";
|
||||
if (code.equals("200")) {
|
||||
//获取 卡状态 开卡日期 更新 card info
|
||||
if (Rmap.get("manageStatusCode") != null && Rmap.get("manageStatusCode") != "" && Rmap.get("manageStatusCode").toString().trim().length() > 0) {
|
||||
String statusCode = Rmap.get("manageStatusCode").toString().trim();
|
||||
if (!"7".equals(statusCode)) {
|
||||
Map<String, Object> Upd_Map = new HashMap<>();
|
||||
Upd_Map.put("manage_status", statusCode);
|
||||
Upd_Map.put("iccid", Parammap.get("iccid").toString());
|
||||
try {
|
||||
boolean bool = yzCardServiceImpl.updManageStatusId(Upd_Map);//变更卡冻结状态
|
||||
if (bool) {
|
||||
return MyRetunSuccess("", "已成功同步卡冻结状态!");
|
||||
} else {
|
||||
return Myerr("保存状态操作失败:False!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return Myerr("DB保存状态操作失败!" + e.getMessage().toString());
|
||||
}
|
||||
} else {
|
||||
return Myerr("同步失败,请稍后重试!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return Myerr("网络繁忙稍后重试!" + Rmap.get("Message").toString());
|
||||
}
|
||||
|
||||
} else {
|
||||
String statusVal = cd_status.equals("2") ? "已停用" : cd_status.equals("3") ? "已删除" : "状态未知";
|
||||
return Myerr("同步卡冻结 操作失败!" + " 通道 [" + statusVal + "]");
|
||||
}
|
||||
} else {
|
||||
return Myerr(" iccid [" + Parammap.get("iccid") + "] 未划分 API通道 !请划分通道后重试!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
|
||||
logger.error("<br/> yunze:card:synManageStatus " + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
|
||||
}
|
||||
return Myerr("同步卡冻结 操作失败!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询在线信息
|
||||
@@ -1566,10 +1615,10 @@ public class YzCardController extends MyBaseController {
|
||||
// System.out.println(map);
|
||||
Parammap.putAll(JSON.parseObject(Pstr));
|
||||
Map<String, Object> rMap = yzCardServiceImpl.singleState(Parammap);
|
||||
boolean bool = (boolean)rMap.get("bool");
|
||||
if(bool){
|
||||
boolean bool = (boolean) rMap.get("bool");
|
||||
if (bool) {
|
||||
return MyRetunSuccess(rMap.get("message"), null);
|
||||
}else {
|
||||
} else {
|
||||
return Myerr(rMap.get("message").toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -1595,9 +1644,9 @@ public class YzCardController extends MyBaseController {
|
||||
Pstr = AesEncryptUtil.desEncrypt(Pstr);
|
||||
Parammap.putAll(JSON.parseObject(Pstr));
|
||||
boolean bool = userService.userPhone(Parammap);
|
||||
if(bool){
|
||||
return MyRetunSuccess("操作成功!",null);
|
||||
}else{
|
||||
if (bool) {
|
||||
return MyRetunSuccess("操作成功!", null);
|
||||
} else {
|
||||
return Myerr("您的手机号不匹对");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -1608,7 +1657,6 @@ public class YzCardController extends MyBaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 验证所属卡号 是否在名下
|
||||
*/
|
||||
@@ -1643,24 +1691,23 @@ public class YzCardController extends MyBaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量短信下发
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "批量短信下发", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('yunze:card:smsCC')")
|
||||
@PostMapping(value = "/SmsCC", produces = {"application/json;charset=utf-8"})
|
||||
public AjaxResult SmsCC(MultipartFile file,@RequestParam Map<String,String> map) {
|
||||
public AjaxResult SmsCC(MultipartFile file, @RequestParam Map<String, String> map) {
|
||||
String Pstr = map.get("Pstr").toString();
|
||||
if(Pstr!=null){
|
||||
if (Pstr != null) {
|
||||
Pstr = Pstr.replace("%2F", "/");//转义 /
|
||||
}
|
||||
HashMap<String, Object> Parammap = new HashMap<String, Object>();
|
||||
try {
|
||||
Pstr = AesEncryptUtil.desEncrypt(Pstr);
|
||||
Pstr = AesEncryptUtil.desEncrypt(Pstr);
|
||||
Parammap.putAll(JSON.parseObject(Pstr.toString()));
|
||||
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
|
||||
SysUser User = loginUser.getUser();
|
||||
@@ -1675,15 +1722,9 @@ public class YzCardController extends MyBaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 同步用量 - [异步同步用量]
|
||||
*
|
||||
* @param Pstr
|
||||
* @return
|
||||
*/
|
||||
@@ -1699,10 +1740,10 @@ public class YzCardController extends MyBaseController {
|
||||
Parammap.putAll(JSON.parseObject((String) Pstr));
|
||||
Map<String, Object> rMap = yzCardServiceImpl.AsynchronousFlow(Parammap);
|
||||
boolean bool = (boolean) rMap.get("bool");
|
||||
String Message = rMap.get("Message").toString();
|
||||
if(bool){
|
||||
String Message = rMap.get("Message").toString();
|
||||
if (bool) {
|
||||
return MyRetunSuccess(null, Message);
|
||||
}else{
|
||||
} else {
|
||||
return Myerr(Message);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -1713,10 +1754,8 @@ public class YzCardController extends MyBaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 同步生命周期 - [异步 同步生命周期]
|
||||
* 同步生命周期 - [异步 同步生命周期]
|
||||
*
|
||||
* @param Pstr
|
||||
* @return
|
||||
@@ -1733,10 +1772,10 @@ public class YzCardController extends MyBaseController {
|
||||
Parammap.putAll(JSON.parseObject((String) Pstr));
|
||||
Map<String, Object> rMap = yzCardServiceImpl.AsynchronousStatus(Parammap);
|
||||
boolean bool = (boolean) rMap.get("bool");
|
||||
String Message = rMap.get("Message").toString();
|
||||
if(bool){
|
||||
String Message = rMap.get("Message").toString();
|
||||
if (bool) {
|
||||
return MyRetunSuccess(null, Message);
|
||||
}else{
|
||||
} else {
|
||||
return Myerr(Message);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -1747,9 +1786,9 @@ public class YzCardController extends MyBaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量短信下发文本域操作
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@@ -1772,9 +1811,9 @@ public class YzCardController extends MyBaseController {
|
||||
Map<String, Object> rMap = yzCardServiceImpl.SmsCCTextField(Parammap);
|
||||
boolean bool = (boolean) rMap.get("bool");
|
||||
String message = rMap.get("Message").toString();
|
||||
if(bool){
|
||||
return MyRetunSuccess(null,message);
|
||||
}else {
|
||||
if (bool) {
|
||||
return MyRetunSuccess(null, message);
|
||||
} else {
|
||||
return Myerr(message);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -1786,6 +1825,7 @@ public class YzCardController extends MyBaseController {
|
||||
|
||||
/**
|
||||
* 卡余额修改
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@@ -1806,13 +1846,13 @@ public class YzCardController extends MyBaseController {
|
||||
Parammap.put("User", User);
|
||||
Parammap.put("agent_id", User.getDeptId());
|
||||
Map<String, Object> map = yzCardServiceImpl.updBalance(Parammap);
|
||||
if (map.get("code").toString().equals("200")){
|
||||
return MyRetunSuccess(null,null);
|
||||
}else {
|
||||
if (map.get("code").toString().equals("200")) {
|
||||
return MyRetunSuccess(null, null);
|
||||
} else {
|
||||
return Myerr("余额修改失败!!!");
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
return Myerr("余额修改失败!!!");
|
||||
}
|
||||
}
|
||||
@@ -1820,6 +1860,7 @@ public class YzCardController extends MyBaseController {
|
||||
|
||||
/**
|
||||
* 修改支付密码
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@@ -1834,10 +1875,10 @@ public class YzCardController extends MyBaseController {
|
||||
try {
|
||||
Pstr = AesEncryptUtil.desEncrypt(Pstr);
|
||||
Parammap.putAll(JSON.parseObject(Pstr));
|
||||
boolean bool = yzCardServiceImpl.updPwd(Parammap);
|
||||
if(bool){
|
||||
return MyRetunSuccess(null,"操作成功!");
|
||||
}else {
|
||||
boolean bool = yzCardServiceImpl.updPwd(Parammap);
|
||||
if (bool) {
|
||||
return MyRetunSuccess(null, "操作成功!");
|
||||
} else {
|
||||
return Myerr("操作失败……");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -1846,10 +1887,12 @@ public class YzCardController extends MyBaseController {
|
||||
}
|
||||
return Myerr("修改支付密码 操作失败!");
|
||||
}
|
||||
|
||||
@PostMapping("/queryAll")
|
||||
public AjaxResult queryAll() {
|
||||
return yzCardServiceImpl.queryAll();
|
||||
return yzCardServiceImpl.queryAll();
|
||||
}
|
||||
|
||||
@PostMapping("/queryLTCardInfoAll")
|
||||
public AjaxResult queryLTCardInfoAll() {
|
||||
return yzCardServiceImpl.queryInfoAll();
|
||||
@@ -1858,7 +1901,7 @@ public class YzCardController extends MyBaseController {
|
||||
//anhuizhiyuan
|
||||
@PostMapping("/queryZYCardInfoAll")
|
||||
public void queryZYCardInfoAll() {
|
||||
yzCardServiceImpl.queryZYCardInfoAll();
|
||||
yzCardServiceImpl.queryZYCardInfoAll();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1928,65 +1971,65 @@ public class YzCardController extends MyBaseController {
|
||||
public AjaxResult SynTuJuCardStatus() {
|
||||
boolean hasErrors = false;
|
||||
StringBuilder errorMessage = new StringBuilder();
|
||||
List<Map<String, Object>> RouteList = yzCardServiceImpl.findTuJuCardStatus();
|
||||
if (RouteList != null && RouteList.size() > 0) {
|
||||
for (Map<String, Object> Route : RouteList) {
|
||||
try {
|
||||
if (Route == null) {
|
||||
errorMessage.append("iccid [null] 未划分 API通道 !请划分通道后重试!<br/>");
|
||||
hasErrors = true;
|
||||
continue;
|
||||
}
|
||||
String cd_status = Route.get("cd_status").toString();
|
||||
if ("1".equals(cd_status)) {
|
||||
//调用对象
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String cdUsername = (String) Route.get("cd_username");
|
||||
String cdPwd = (String) Route.get("cd_pwd");
|
||||
map.put("cd_username", cdUsername);
|
||||
map.put("cd_pwd", cdPwd);
|
||||
TuJuApi qr = new TuJuApi(map);
|
||||
//此处让当前线程睡两秒后执行下一语句
|
||||
try {
|
||||
Thread.sleep(2000); // 暂停2秒
|
||||
} catch (InterruptedException e) {
|
||||
// 处理线程被中断的情况
|
||||
Thread.currentThread().interrupt(); // 恢复中断状态
|
||||
return AjaxResult.error("线程被中断!");
|
||||
List<Map<String, Object>> RouteList = yzCardServiceImpl.findTuJuCardStatus();
|
||||
if (RouteList != null && RouteList.size() > 0) {
|
||||
for (Map<String, Object> Route : RouteList) {
|
||||
try {
|
||||
if (Route == null) {
|
||||
errorMessage.append("iccid [null] 未划分 API通道 !请划分通道后重试!<br/>");
|
||||
hasErrors = true;
|
||||
continue;
|
||||
}
|
||||
String cd_status = Route.get("cd_status").toString();
|
||||
if ("1".equals(cd_status)) {
|
||||
//调用对象
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String cdUsername = (String) Route.get("cd_username");
|
||||
String cdPwd = (String) Route.get("cd_pwd");
|
||||
map.put("cd_username", cdUsername);
|
||||
map.put("cd_pwd", cdPwd);
|
||||
TuJuApi qr = new TuJuApi(map);
|
||||
//此处让当前线程睡两秒后执行下一语句
|
||||
try {
|
||||
Thread.sleep(2000); // 暂停2秒
|
||||
} catch (InterruptedException e) {
|
||||
// 处理线程被中断的情况
|
||||
Thread.currentThread().interrupt(); // 恢复中断状态
|
||||
return AjaxResult.error("线程被中断!");
|
||||
|
||||
}
|
||||
Map<String, Object> res = qr.cardDetail(Route.get("iccid").toString());
|
||||
Map<String, Object> result = ((List<Map<String, Object>>) res.get("result")).get(0);
|
||||
String code = result.get("code") != null ? result.get("code").toString() : "500";
|
||||
if (code.equals("0")) {
|
||||
//解析数据
|
||||
Map<String, Object> cardStatus = internalApiRequest.queryCardStatus(Route, Route);
|
||||
System.out.println(cardStatus);
|
||||
Object statusCode = cardStatus.get("statusCode");
|
||||
Map<String, Object> Upd_Map = new HashMap<>();
|
||||
Upd_Map.put("status_id", statusCode);
|
||||
Upd_Map.put("status_ShowId", getShowStatIdArr.GetShowStatId(statusCode.toString()));
|
||||
Upd_Map.put("iccid", Route.get("iccid").toString());
|
||||
//更新 card info
|
||||
if ("200".equals(cardStatus.get("code"))) {
|
||||
yzCardServiceImpl.updStatusId(Upd_Map); //变更卡状态
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.error("网络繁忙稍后重试!" + result.get("Message").toString());
|
||||
}
|
||||
Map<String, Object> res = qr.cardDetail(Route.get("iccid").toString());
|
||||
Map<String, Object> result = ((List<Map<String, Object>>) res.get("result")).get(0);
|
||||
String code = result.get("code") != null ? result.get("code").toString() : "500";
|
||||
if (code.equals("0")) {
|
||||
//解析数据
|
||||
Map<String, Object> cardStatus = internalApiRequest.queryCardStatus(Route, Route);
|
||||
System.out.println(cardStatus);
|
||||
Object statusCode = cardStatus.get("statusCode");
|
||||
Map<String, Object> Upd_Map = new HashMap<>();
|
||||
Upd_Map.put("status_id", statusCode);
|
||||
Upd_Map.put("status_ShowId", getShowStatIdArr.GetShowStatId(statusCode.toString()));
|
||||
Upd_Map.put("iccid", Route.get("iccid").toString());
|
||||
//更新 card info
|
||||
if ("200".equals(cardStatus.get("code"))) {
|
||||
yzCardServiceImpl.updStatusId(Upd_Map); //变更卡状态
|
||||
}
|
||||
} else {
|
||||
String statusVal = cd_status.equals("2") ? "已停用" : cd_status.equals("3") ? "已删除" : "状态未知";
|
||||
errorMessage.append("同步卡状态 操作失败!通道 [").append(statusVal).append("]<br/>");
|
||||
hasErrors = true;
|
||||
return AjaxResult.error("网络繁忙稍后重试!" + result.get("Message").toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
|
||||
logger.error("<br/> yunze:card:SynFlow " + " <br/> ip = " + ip + " <br/> ", e);
|
||||
errorMessage.append("处理ICCID时发生错误: ").append(Route.getOrDefault("iccid", "未知")).append("<br/>");
|
||||
} else {
|
||||
String statusVal = cd_status.equals("2") ? "已停用" : cd_status.equals("3") ? "已删除" : "状态未知";
|
||||
errorMessage.append("同步卡状态 操作失败!通道 [").append(statusVal).append("]<br/>");
|
||||
hasErrors = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
|
||||
logger.error("<br/> yunze:card:SynFlow " + " <br/> ip = " + ip + " <br/> ", e);
|
||||
errorMessage.append("处理ICCID时发生错误: ").append(Route.getOrDefault("iccid", "未知")).append("<br/>");
|
||||
hasErrors = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasErrors) {
|
||||
return AjaxResult.error(errorMessage.toString());
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.yunze.apiCommon.mapper.mysql;
|
||||
|
||||
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -285,4 +287,9 @@ public interface YzCardRouteMapper {
|
||||
public Integer isbusiCardSms(Map map);
|
||||
|
||||
|
||||
List<String> agentIdSelByCard(@Param("agentId") String agentId);
|
||||
|
||||
Integer agentIdSelByCardCount(Map<String, Object> param);
|
||||
|
||||
List<Map<String, Object>> getAgentCardList(Map<String, Object> param);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.yunze.apiCommon.Vo.DxDetail;
|
||||
import com.yunze.apiCommon.mapper.mysql.YzCardRouteMapper;
|
||||
import com.yunze.apiCommon.mapper.mysql.YzCardUpdateMapper;
|
||||
import com.yunze.apiCommon.upstreamAPI.PublicApiService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -14,10 +15,12 @@ import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ApiUtil_NoStatic {
|
||||
|
||||
|
||||
@Resource
|
||||
private CardManageStatusUtil cardManageStatusUtil;
|
||||
@Resource
|
||||
private PublicApiService publicApiService;
|
||||
@Resource
|
||||
@@ -1014,9 +1017,9 @@ public class ApiUtil_NoStatic {
|
||||
Object resdata = res.get("data");
|
||||
Map<String, Object> objectMap = JSONObject.parseObject(resdata.toString());
|
||||
String state = objectMap.get("state").toString();
|
||||
if (state.equals("0")){
|
||||
if (state.equals("0")) {
|
||||
statusCode = 8;
|
||||
}else if (state.equals("07")) {
|
||||
} else if (state.equals("07")) {
|
||||
statusCode = 7;
|
||||
} else if (state.equals("00")) {
|
||||
statusCode = 1;
|
||||
@@ -1891,7 +1894,7 @@ public class ApiUtil_NoStatic {
|
||||
activateDate = firstActiveTime;
|
||||
statusCode = 200;
|
||||
data.put("Message", "同步成功");
|
||||
}else {
|
||||
} else {
|
||||
data.put("Message", "激活时间数据为空!");
|
||||
}
|
||||
|
||||
@@ -2045,7 +2048,7 @@ public class ApiUtil_NoStatic {
|
||||
} else {
|
||||
statusMessage = "激活时间数据为空!";
|
||||
}
|
||||
}else if("DianXin_CMP_5G".equals(cd_code)){
|
||||
} else if ("DianXin_CMP_5G".equals(cd_code)) {
|
||||
Map<String, Object> Data = JSON.parseObject(data.get("Data").toString());
|
||||
if ("0".equals(Data.get("result"))) {
|
||||
if (Data.get("servCreateDate") != null || !Data.get("servCreateDate").equals("")) {
|
||||
@@ -2055,7 +2058,7 @@ public class ApiUtil_NoStatic {
|
||||
+ "-" + servCreateDate.toString().substring(6, servCreateDate.toString().length());
|
||||
statusCode = 200;
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
statusMessage = "激活时间数据为空!";
|
||||
}
|
||||
}
|
||||
@@ -3404,4 +3407,76 @@ public class ApiUtil_NoStatic {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 单卡是否冻结状态解析
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> queryManageStatus(Map<String, Object> map, Map<String, Object> find_card_route_map) {
|
||||
JSONObject Outdata = new JSONObject();
|
||||
try {
|
||||
//返回数据解析
|
||||
Map<String, Object> Rdata = publicApiService.insideApi(map, "queryManageStatus", find_card_route_map);
|
||||
Map<String, Object> data = (Map<String, Object>) Rdata.get("Data");
|
||||
int manageStatusCode = 7;
|
||||
String manageStatusMessage = null;
|
||||
String activateDate = null;
|
||||
String cd_code = data.get("cd_code").toString();
|
||||
try {
|
||||
if (cd_code.equals("YiDong_EC") || cd_code.equals("YiDong_EC_TOKE_ShuoLang") || cd_code.equals("YiDong_EC_TengYu") || cd_code.equals("YiDong_EC_Combo") || cd_code.equals("ECV5_token_MW")) {
|
||||
//移动解析
|
||||
Map<String, Object> JsonData = JSON.parseObject(data.get("Data").toString());
|
||||
Map<String, Object> Obj = ((List<Map<String, Object>>) JsonData.get("result")).get(0);
|
||||
String StatusCd = Obj.get("manageStopRestartStatus").toString();
|
||||
Map<String, Object> EcV5CardStatusMap = cardManageStatusUtil.geYDCardStatus(StatusCd);
|
||||
manageStatusCode = Integer.parseInt(EcV5CardStatusMap.get("statusCode").toString());
|
||||
manageStatusMessage = EcV5CardStatusMap.get("statusMessage").toString();
|
||||
} else if (cd_code.equals("PYKD")) {
|
||||
//濮阳可当解析
|
||||
Map<String, Object> JsonData = JSON.parseObject(data.get("Data").toString());
|
||||
Map<String, Object> Obj = ((List<Map<String, Object>>) JsonData.get("result")).get(0);
|
||||
int StatusCd = Integer.parseInt(Obj.get("cardStatus").toString());
|
||||
Map<String, Object> EcV5CardStatusMap = cardStatusReplacementUtil.getEcV5CardStatus(StatusCd);
|
||||
manageStatusCode = Integer.parseInt(EcV5CardStatusMap.get("statusCode").toString());
|
||||
manageStatusMessage = EcV5CardStatusMap.get("statusMessage").toString();
|
||||
} else if (cd_code.equals("YDSM")) {
|
||||
//大流量解析
|
||||
Map<String, Object> JsonData = JSON.parseObject(data.get("Data").toString());
|
||||
Map<String, Object> Obj = ((List<Map<String, Object>>) JsonData.get("result")).get(0);
|
||||
int StatusCd = Integer.parseInt(Obj.get("cardStatus").toString());
|
||||
Map<String, Object> EcV5CardStatusMap = cardStatusReplacementUtil.getEcV5CardStatus(StatusCd);
|
||||
manageStatusCode = Integer.parseInt(EcV5CardStatusMap.get("statusCode").toString());
|
||||
manageStatusMessage = EcV5CardStatusMap.get("statusMessage").toString();
|
||||
} else if (cd_code.equals("DianXin_CMP_5G")) {
|
||||
//电信5G解析
|
||||
log.error("{}", data);
|
||||
Map<String, Object> Data = (Map<String, Object>) data.get("Data");
|
||||
String result = Data.get("result").toString();
|
||||
if (result.equals("0")) {
|
||||
List<Map<String, Object>> productInfo = (List<Map<String, Object>>) Data.get("netBlockTypeList");
|
||||
if (productInfo != null && productInfo.size() > 0) {
|
||||
Map<String, Object> obj = productInfo.get(0);
|
||||
String status = obj.get("blockType").toString();
|
||||
Map<String, Object> CardStatusMap = cardManageStatusUtil.getDianXin_CMP_5G_CardStatus(status);
|
||||
manageStatusCode = Integer.parseInt(CardStatusMap.get("statusCode").toString());
|
||||
manageStatusMessage = CardStatusMap.get("statusMessage").toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Outdata.put("Message", data.get("Message"));
|
||||
} catch (Exception e) {
|
||||
manageStatusMessage = "内部接收消息,解析数据异常!";
|
||||
log.error("{}", e);
|
||||
}
|
||||
Outdata.put("code", "200");
|
||||
Outdata.put("manageStatusCode", manageStatusCode);
|
||||
Outdata.put("manageStatusMessage", manageStatusMessage);
|
||||
} catch (Exception e) {
|
||||
Outdata.put("manageStatusMessage", "内部接收消息,解析数据异常!");
|
||||
log.error("{}", e);
|
||||
}
|
||||
return Outdata;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.yunze.apiCommon.utils;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Author: Wang
|
||||
* @Date: 2025/05/07/9:37
|
||||
* @Description: 卡冻结状态解析
|
||||
*/
|
||||
@Component
|
||||
public class CardManageStatusUtil {
|
||||
|
||||
/**
|
||||
* 接口返回状态装换成系统状态
|
||||
* 同步上游移动接口 卡冻结状态
|
||||
*
|
||||
* @param StatusCd
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> geYDCardStatus(String StatusCd) {
|
||||
Map<String, Object> Rmap = new HashMap<>();
|
||||
Integer statusCode = 7;
|
||||
String statusMessage = "";
|
||||
//未冻结 0
|
||||
//已冻结 1
|
||||
if ("0".equals(StatusCd)) {
|
||||
statusCode = 0;
|
||||
statusMessage = "未冻结";
|
||||
} else if ("1".equals(StatusCd)) {
|
||||
statusCode = 1;
|
||||
statusMessage = "已冻结";
|
||||
} else {
|
||||
statusCode = 8;
|
||||
statusMessage = "未知";
|
||||
}
|
||||
Rmap.put("statusCode", statusCode);
|
||||
Rmap.put("statusMessage", statusMessage);
|
||||
return Rmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 接口返回状态装换成系统状态
|
||||
* 获取 DianXin_CMP_5G 卡冻结状态
|
||||
* @param StatusCd
|
||||
*/
|
||||
public Map<String,Object> getDianXin_CMP_5G_CardStatus(String StatusCd){
|
||||
Map<String,Object> Rmap = new HashMap<>();
|
||||
//卡冻结状态(0:未冻结 3:客户级机卡绑定断网 4 机卡绑定断网)
|
||||
Integer statusCode = 7;
|
||||
String statusMessage = "";
|
||||
switch (StatusCd){
|
||||
case "0":
|
||||
statusCode = 0;
|
||||
statusMessage = "未冻结";
|
||||
break;
|
||||
case "3":
|
||||
case "4":
|
||||
statusCode = 1;
|
||||
statusMessage = "已冻结";
|
||||
break;
|
||||
case "8":
|
||||
statusCode = 8;
|
||||
statusMessage = "未知";
|
||||
break;
|
||||
}
|
||||
Rmap.put("statusCode",statusCode);
|
||||
Rmap.put("statusMessage",statusMessage);
|
||||
return Rmap;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -901,6 +901,50 @@
|
||||
cd_username = #{cd_username}
|
||||
</where>
|
||||
</select>
|
||||
<select id="agentIdSelByCard" resultType="java.lang.String">
|
||||
WITH RECURSIVE SubDepts AS (-- 基础情况:选择起始部门
|
||||
SELECT
|
||||
dept_id
|
||||
FROM
|
||||
sys_dept
|
||||
WHERE
|
||||
dept_id = #{agentId} -- 这里的?是你要查询的dept_id
|
||||
UNION ALL-- 递归步骤:连接回sys_dept表以获取子部门
|
||||
SELECT
|
||||
sd.dept_id
|
||||
FROM
|
||||
sys_dept sd
|
||||
JOIN SubDepts sub ON sd.parent_id = sub.dept_id
|
||||
) -- 选择所有递归查询得到的部门ID
|
||||
SELECT
|
||||
dept_id
|
||||
FROM
|
||||
SubDepts;
|
||||
</select>
|
||||
<select id="agentIdSelByCardCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
yz_card_info
|
||||
WHERE
|
||||
dept_id in
|
||||
<foreach item="deptIdArr" collection="deptIdArr" index="deptIdArr" open="(" separator="," close=")">
|
||||
#{deptIdArr}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getAgentCardList" resultType="java.util.Map">
|
||||
SELECT
|
||||
msisdn,
|
||||
iccid,
|
||||
imsi
|
||||
FROM
|
||||
yz_card_info
|
||||
WHERE dept_id in
|
||||
<foreach item="deptIdArr" collection="deptIdArr" index="deptIdArr" open="(" separator="," close=")">
|
||||
#{deptIdArr}
|
||||
</foreach>
|
||||
LIMIT #{StarRow},#{PageSize}
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateKey" parameterType="java.util.HashMap">
|
||||
|
||||
@@ -665,6 +665,12 @@ public interface YzCardMapper
|
||||
Map<String, Object> getOneCardInfo(@Param("iccid") String iccid);
|
||||
|
||||
Map<String, Object> queryDueExpireDateXQ(@Param("iccid") String iccid);
|
||||
|
||||
List<String> indexIccid(@Param("agentId") String agentId);
|
||||
|
||||
Map<String, Object> queryRenewalStatus(Integer renewalId);
|
||||
|
||||
int updManageStatusId(Map<String, Object> updMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -150,9 +150,12 @@
|
||||
#{dimensionValue}
|
||||
</if>
|
||||
|
||||
<if test="exceedsThreshold != null and exceedsThreshold != '' and exceedsThreshold == 1 ">
|
||||
<!--<if test="exceedsThreshold != null and exceedsThreshold != '' and exceedsThreshold == 1 ">
|
||||
and used <![CDATA[ >= ]]> remind_ratio
|
||||
and ISNULL( remind_ratio ) <![CDATA[ != ]]> 1
|
||||
</if>-->
|
||||
<if test="exceedsThreshold != null and exceedsThreshold != '' and exceedsThreshold == 1 ">
|
||||
AND remind_ratio !="" AND used > remind_ratio
|
||||
</if>
|
||||
<if test="is_polling != null and is_polling != '' and is_polling != '99' ">
|
||||
and is_polling =#{is_polling}
|
||||
@@ -2382,8 +2385,18 @@
|
||||
iccid =#{iccid}
|
||||
</where>
|
||||
</update>
|
||||
<update id="updManageStatusId">
|
||||
update yz_card_info
|
||||
<set>
|
||||
manage_status = #{manage_status},
|
||||
syn_Time =now()
|
||||
</set>
|
||||
<where>
|
||||
iccid =#{iccid}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<select id="findTuJuRoute" resultType="java.util.Map">
|
||||
<select id="findTuJuRoute" resultType="java.util.Map">
|
||||
SELECT
|
||||
b.cd_status,
|
||||
a.iccid,
|
||||
@@ -2484,7 +2497,8 @@
|
||||
activate_date as activateDate,
|
||||
DATE_FORMAT(due_expire_time, "%Y-%m-%d") AS dueExpireTime,
|
||||
status_ShowId as status,
|
||||
remarks
|
||||
remarks,
|
||||
type
|
||||
FROM yz_card_info
|
||||
WHERE iccid = #{iccid}
|
||||
AND status_ShowId != 7
|
||||
@@ -2545,5 +2559,28 @@
|
||||
GROUP BY
|
||||
t1.iccid
|
||||
</select>
|
||||
<select id="indexIccid" resultType="java.lang.String">
|
||||
SELECT iccid
|
||||
FROM yz_card_info
|
||||
where dept_id in
|
||||
(WITH RECURSIVE SubDepts AS (SELECT dept_id
|
||||
FROM sys_dept
|
||||
WHERE dept_id = #{agentId}
|
||||
UNION ALL
|
||||
SELECT sd.dept_id
|
||||
FROM sys_dept sd
|
||||
JOIN SubDepts sub ON sd.parent_id = sub.dept_id)
|
||||
SELECT dept_id
|
||||
FROM SubDepts)
|
||||
</select>
|
||||
<select id="queryRenewalStatus" resultType="java.util.Map">
|
||||
SELECT
|
||||
`status`,
|
||||
feedback
|
||||
FROM
|
||||
yz_applicationfor_renewal_primary
|
||||
WHERE
|
||||
id = #{renewalId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
||||
+176
-185
@@ -7,12 +7,18 @@ import com.yunze.apiCommon.upstreamAPI.PublicApiService;
|
||||
import com.yunze.apiCommon.utils.ApiUtil_NoStatic;
|
||||
import com.yunze.apiCommon.utils.HttpUtil;
|
||||
import com.yunze.apiCommon.utils.UrlUtil;
|
||||
import com.yunze.common.core.domain.AjaxResult;
|
||||
import com.yunze.common.core.page.TableDataInfo;
|
||||
import com.yunze.common.mapper.mysql.YzUserMapper;
|
||||
import com.yunze.common.utils.yunze.PageUtil;
|
||||
import com.yunze.iotapi.service.NewOpenApiService;
|
||||
import com.yunze.iotapi.service.impl.OpenApiServiceImpl;
|
||||
import com.yunze.iotapi.utils.AgentCheckShiro;
|
||||
import com.yunze.iotapi.utils.LogAnnotation;
|
||||
import com.yunze.iotapi.utils.ResponseJson;
|
||||
import com.yunze.iotapi.utils.TabDatePageUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -21,10 +27,11 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 物联网卡 通道管理
|
||||
* 物联网卡 通道管理
|
||||
*/
|
||||
//@Controller
|
||||
//@RequestMapping("/open")
|
||||
@@ -49,6 +56,7 @@ public class PublicOpenAapiController {
|
||||
|
||||
/**
|
||||
* 卡信息查询
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -62,7 +70,7 @@ public class PublicOpenAapiController {
|
||||
try {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
Map<String,Object> data = publicApiService.cardInfo(Param);
|
||||
Map<String, Object> data = publicApiService.cardInfo(Param);
|
||||
return new ResponseJson().successOpen(data);
|
||||
} catch (Exception e) {
|
||||
//System.out.println(e);
|
||||
@@ -71,9 +79,9 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 卡套餐详情
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -87,9 +95,9 @@ public class PublicOpenAapiController {
|
||||
try {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
Object all = Param.get("all")!=null?Param.get("all"):"0";
|
||||
Param.put("all",all);
|
||||
Map<String,Object> data = publicApiService.cardPackageInfo(Param);
|
||||
Object all = Param.get("all") != null ? Param.get("all") : "0";
|
||||
Param.put("all", all);
|
||||
Map<String, Object> data = publicApiService.cardPackageInfo(Param);
|
||||
return new ResponseJson().successOpen(data);
|
||||
} catch (Exception e) {
|
||||
//System.out.println(e);
|
||||
@@ -98,10 +106,9 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 流量查询
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -115,13 +122,13 @@ public class PublicOpenAapiController {
|
||||
try {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
Map<String,Object> Rdata = openApiServiceImpl.simDataUsage(Param);
|
||||
Map<String, Object> Rdata = openApiServiceImpl.simDataUsage(Param);
|
||||
boolean bool = (boolean) Rdata.get("bool");
|
||||
String code = Rdata.get("code").toString();
|
||||
if(bool){
|
||||
if (bool) {
|
||||
return new ResponseJson().successOpen(Rdata.get("Data"));
|
||||
}else{
|
||||
return new ResponseJson().errorOpen(code,Rdata.get("Message").toString());
|
||||
} else {
|
||||
return new ResponseJson().errorOpen(code, Rdata.get("Message").toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
@@ -129,7 +136,6 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 历史流量查询
|
||||
*
|
||||
@@ -146,15 +152,15 @@ public class PublicOpenAapiController {
|
||||
try {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
Map<String,Object> Rdata = apiUtil_NoStatic.queryFlowHis(Param);
|
||||
Map<String, Object> Rdata = apiUtil_NoStatic.queryFlowHis(Param);
|
||||
String code = Rdata.get("code").toString();
|
||||
Map<String, Object> returnMap = new HashMap<String, Object>();
|
||||
if(code.equals("200")){
|
||||
returnMap.put("useAmount",Rdata.get("Use"));
|
||||
returnMap.put("useUnit","MB");
|
||||
if (code.equals("200")) {
|
||||
returnMap.put("useAmount", Rdata.get("Use"));
|
||||
returnMap.put("useUnit", "MB");
|
||||
return new ResponseJson().successOpen(returnMap);
|
||||
}else{
|
||||
return new ResponseJson().errorOpen(code,Rdata.get("Message").toString());
|
||||
} else {
|
||||
return new ResponseJson().errorOpen(code, Rdata.get("Message").toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
@@ -162,8 +168,6 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 单卡生命周期
|
||||
*
|
||||
@@ -181,13 +185,13 @@ public class PublicOpenAapiController {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
|
||||
Map<String,Object> Rdata = openApiServiceImpl.simStatus(Param);
|
||||
Map<String, Object> Rdata = openApiServiceImpl.simStatus(Param);
|
||||
boolean bool = (boolean) Rdata.get("bool");
|
||||
String code = Rdata.get("code").toString();
|
||||
if(bool){
|
||||
if (bool) {
|
||||
return new ResponseJson().successOpen(Rdata.get("Data"));
|
||||
}else{
|
||||
return new ResponseJson().errorOpen(code,Rdata.get("Message").toString());
|
||||
} else {
|
||||
return new ResponseJson().errorOpen(code, Rdata.get("Message").toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
@@ -212,32 +216,32 @@ public class PublicOpenAapiController {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
Object Status = Param.get("Status");
|
||||
if(Status!=null && !Status.equals("") && Status.toString().length()>0){
|
||||
if (Status != null && !Status.equals("") && Status.toString().length() > 0) {
|
||||
String Str_Status = Status.toString();
|
||||
if(Str_Status.equals("1") || Str_Status.equals("0")){
|
||||
String Is_Stop = Str_Status.equals("1")?"off":Str_Status.equals("0")?"on":null;
|
||||
if(Is_Stop!=null){
|
||||
Param.put("Is_Stop",Is_Stop);
|
||||
Param.remove("Status");
|
||||
Map<String,Object> Rdata = openApiServiceImpl.changeSimStatus(Param,Is_Stop);
|
||||
boolean bool = (boolean) Rdata.get("bool");
|
||||
String code = Rdata.get("code").toString();
|
||||
if(bool){
|
||||
return new ResponseJson().successOpen(Rdata.get("Data"));
|
||||
}else{
|
||||
return new ResponseJson().errorOpen(code,Rdata.get("Message").toString());
|
||||
}
|
||||
}else{
|
||||
return new ResponseJson().errorOpen("400","参数错误!请按文档说明传入 Status !!");
|
||||
}
|
||||
}else{
|
||||
if (Str_Status.equals("1") || Str_Status.equals("0")) {
|
||||
String Is_Stop = Str_Status.equals("1") ? "off" : Str_Status.equals("0") ? "on" : null;
|
||||
if (Is_Stop != null) {
|
||||
Param.put("Is_Stop", Is_Stop);
|
||||
Param.remove("Status");
|
||||
Map<String, Object> Rdata = openApiServiceImpl.changeSimStatus(Param, Is_Stop);
|
||||
boolean bool = (boolean) Rdata.get("bool");
|
||||
String code = Rdata.get("code").toString();
|
||||
if (bool) {
|
||||
return new ResponseJson().successOpen(Rdata.get("Data"));
|
||||
} else {
|
||||
return new ResponseJson().errorOpen(code, Rdata.get("Message").toString());
|
||||
}
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("400", "参数错误!请按文档说明传入 Status !!");
|
||||
}
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("400", "参数错误!请按文档说明传入 Status !");
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("400", "缺少参数!请按文档说明传入 !");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
}
|
||||
}
|
||||
@@ -245,6 +249,7 @@ public class PublicOpenAapiController {
|
||||
|
||||
/**
|
||||
* 查询是否实名
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -260,15 +265,15 @@ public class PublicOpenAapiController {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
|
||||
Map<String,Object> Rdata = apiUtil_NoStatic.queryRealNameStatus(Param);
|
||||
Map<String, Object> Rdata = apiUtil_NoStatic.queryRealNameStatus(Param);
|
||||
String code = Rdata.get("code").toString();
|
||||
Map<String, Object> returnMap = new HashMap<String, Object>();
|
||||
if(code.equals("200")){
|
||||
if (code.equals("200")) {
|
||||
returnMap.put("statusCode", Rdata.get("Is_status"));
|
||||
returnMap.put("statusMessage", Rdata.get("Is_statusName"));
|
||||
return new ResponseJson().successOpen(returnMap);
|
||||
}else{
|
||||
return new ResponseJson().errorOpen(code,Rdata.get("Message").toString());
|
||||
} else {
|
||||
return new ResponseJson().errorOpen(code, Rdata.get("Message").toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
@@ -276,11 +281,9 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 单独断网
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -295,23 +298,23 @@ public class PublicOpenAapiController {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
Object StatusBreak = Param.get("StatusBreak");
|
||||
if(StatusBreak!=null && !StatusBreak.equals("") && StatusBreak.toString().length()>0){
|
||||
if (StatusBreak != null && !StatusBreak.equals("") && StatusBreak.toString().length() > 0) {
|
||||
String Str_StatusBreak = StatusBreak.toString();
|
||||
if(Str_StatusBreak.equals("1") || Str_StatusBreak.equals("0")){
|
||||
Param.put("Is_Break",Str_StatusBreak);
|
||||
if (Str_StatusBreak.equals("1") || Str_StatusBreak.equals("0")) {
|
||||
Param.put("Is_Break", Str_StatusBreak);
|
||||
Param.remove("StatusBreak");
|
||||
Map<String,Object> Rdata = openApiServiceImpl.simApnFunction(Param,Str_StatusBreak);
|
||||
Map<String, Object> Rdata = openApiServiceImpl.simApnFunction(Param, Str_StatusBreak);
|
||||
boolean bool = (boolean) Rdata.get("bool");
|
||||
String code = Rdata.get("code").toString();
|
||||
if(bool){
|
||||
if (bool) {
|
||||
return new ResponseJson().successOpen(Rdata.get("Data"));
|
||||
}else{
|
||||
return new ResponseJson().errorOpen(code,Rdata.get("Message").toString());
|
||||
} else {
|
||||
return new ResponseJson().errorOpen(code, Rdata.get("Message").toString());
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("400", "参数错误!请按文档说明传入 StatusBreak !");
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("400", "缺少参数!请按文档说明传入 !");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -337,11 +340,11 @@ public class PublicOpenAapiController {
|
||||
Object contactName = Param.get("contactName");
|
||||
Object contactPhone = Param.get("contactPhone");
|
||||
if (contactName != null && !contactName.equals("") && contactName.toString().length() > 0 && contactPhone != null && !contactPhone.equals("") && contactPhone.toString().length() > 0) {
|
||||
Param.put("bind_type",null);
|
||||
Param.put("imei",null);
|
||||
Param.put("bind_type", null);
|
||||
Param.put("imei", null);
|
||||
Map<String, Object> Rdata = apiUtil_NoStatic.unbundling(Param);
|
||||
String code = Rdata.get("code").toString();
|
||||
String Message = Rdata.get("Message")!=null?Rdata.get("Message").toString():"";
|
||||
String Message = Rdata.get("Message") != null ? Rdata.get("Message").toString() : "";
|
||||
if (code.equals("200")) {
|
||||
return new ResponseJson().successOpen(Message);
|
||||
} else {
|
||||
@@ -359,6 +362,7 @@ public class PublicOpenAapiController {
|
||||
|
||||
/**
|
||||
* 查询卡是否在网状态
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -373,20 +377,20 @@ public class PublicOpenAapiController {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
|
||||
Map<String,Object> Rdata = apiUtil_NoStatic.queryOnlineStatus(Param);
|
||||
Map<String, Object> Rdata = apiUtil_NoStatic.queryOnlineStatus(Param);
|
||||
String code = Rdata.get("code").toString();
|
||||
Map<String, Object> returnMap = new HashMap<String, Object>();
|
||||
if(code.equals("200")){
|
||||
if (code.equals("200")) {
|
||||
returnMap.put("type", Rdata.get("type"));
|
||||
returnMap.put("typeName", Rdata.get("typeName"));
|
||||
returnMap.put("imei",Rdata.get("imei"));
|
||||
returnMap.put("imei", Rdata.get("imei"));
|
||||
returnMap.put("statusCode", Rdata.get("statusCode"));
|
||||
returnMap.put("statusMessage", Rdata.get("statusMessage"));
|
||||
returnMap.put("cd_code",Rdata.get("cd_code"));
|
||||
returnMap.put("cd_code", Rdata.get("cd_code"));
|
||||
returnMap.put("Data", Rdata.get("Data"));
|
||||
return new ResponseJson().successOpen(returnMap);
|
||||
}else{
|
||||
return new ResponseJson().errorOpen(code,Rdata.get("Message").toString());
|
||||
} else {
|
||||
return new ResponseJson().errorOpen(code, Rdata.get("Message").toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
@@ -394,9 +398,9 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取共享token
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -410,18 +414,18 @@ public class PublicOpenAapiController {
|
||||
try {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
Map<String,Object> data = publicApiService.getToken(Param);
|
||||
Map<String, Object> data = publicApiService.getToken(Param);
|
||||
Map<String, Object> returnMap = new HashMap<String, Object>();
|
||||
if(data!=null){
|
||||
if (data != null) {
|
||||
String token = data.get("token").toString();
|
||||
if(token!=null){
|
||||
if (token != null) {
|
||||
returnMap.put("Data", data);
|
||||
return new ResponseJson().successOpen(returnMap);
|
||||
}else{
|
||||
return new ResponseJson().errorOpen("500","内部获取token失败");
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("500", "内部获取token失败");
|
||||
}
|
||||
}else{
|
||||
return new ResponseJson().errorOpen("500","未找到对应token获取");
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("500", "未找到对应token获取");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
@@ -429,9 +433,9 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 资费计划 可用查询
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -447,23 +451,23 @@ public class PublicOpenAapiController {
|
||||
Map<String, Object> agentAccount = (Map<String, Object>) request.getAttribute("agentAccount");
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
String companyId = Param.get("companyId").toString();
|
||||
String companyId = Param.get("companyId").toString();
|
||||
String agentID = agentAccount.get("agent_id").toString();
|
||||
//判断 传入的 企业编号 是否与操企业编号一致
|
||||
if(agentID.equals(companyId)){
|
||||
return new ResponseJson().successOpen(yzCardRouteMapper.findTariffplan(Param));
|
||||
}else{
|
||||
return new ResponseJson().errorOpen("400", "操作企业编号不是您所在的企业请核对后重试!");
|
||||
}
|
||||
//判断 传入的 企业编号 是否与操企业编号一致
|
||||
if (agentID.equals(companyId)) {
|
||||
return new ResponseJson().successOpen(yzCardRouteMapper.findTariffplan(Param));
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("400", "操作企业编号不是您所在的企业请核对后重试!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 企业 预存余额查询
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -478,26 +482,26 @@ public class PublicOpenAapiController {
|
||||
Map<String, Object> agentAccount = (Map<String, Object>) request.getAttribute("agentAccount");
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
String companyId = Param.get("companyId").toString();
|
||||
String companyId = Param.get("companyId").toString();
|
||||
String agentID = agentAccount.get("agent_id").toString();
|
||||
//判断 传入的 企业编号 是否与操企业编号一致
|
||||
if(agentID.equals(companyId)){
|
||||
if (agentID.equals(companyId)) {
|
||||
Map<String, Object> YcParamMap = new HashMap<String, Object>();
|
||||
YcParamMap.put("companyName",agentAccount.get("agent_name").toString());
|
||||
YcParamMap.put("companyName", agentAccount.get("agent_name").toString());
|
||||
|
||||
Map<String,Object> FindDeptAmountMap = new HashMap<>();
|
||||
FindDeptAmountMap.put("dept_id",agentID);
|
||||
Map<String,Object> dMap = yzUserMapper.findDeptAmount(FindDeptAmountMap);
|
||||
Map<String, Object> FindDeptAmountMap = new HashMap<>();
|
||||
FindDeptAmountMap.put("dept_id", agentID);
|
||||
Map<String, Object> dMap = yzUserMapper.findDeptAmount(FindDeptAmountMap);
|
||||
Double companyBalance = 0.0;
|
||||
Double companyCredit = 0.0;
|
||||
if(dMap!=null){
|
||||
companyBalance = dMap.get("deposit_amount")!=null?Double.parseDouble(dMap.get("deposit_amount").toString()):companyBalance;
|
||||
companyCredit = dMap.get("be_usable_line_of_credit")!=null?Double.parseDouble(dMap.get("be_usable_line_of_credit").toString()):companyCredit;
|
||||
if (dMap != null) {
|
||||
companyBalance = dMap.get("deposit_amount") != null ? Double.parseDouble(dMap.get("deposit_amount").toString()) : companyBalance;
|
||||
companyCredit = dMap.get("be_usable_line_of_credit") != null ? Double.parseDouble(dMap.get("be_usable_line_of_credit").toString()) : companyCredit;
|
||||
}
|
||||
YcParamMap.put("companyBalance",companyBalance);
|
||||
YcParamMap.put("companyCredit",companyCredit);
|
||||
YcParamMap.put("companyBalance", companyBalance);
|
||||
YcParamMap.put("companyCredit", companyCredit);
|
||||
return new ResponseJson().successOpen(YcParamMap);
|
||||
}else{
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("400", "操作企业编号不是您所在的企业请核对后重试!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -506,7 +510,6 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 资费计划订购
|
||||
* @param request
|
||||
@@ -521,14 +524,14 @@ public class PublicOpenAapiController {
|
||||
Map<String, Object> ParamMap = new HashMap<String, Object>();
|
||||
try {
|
||||
Map<String, Object> agentAccount = (Map<String, Object>) request.getAttribute("agentAccount");
|
||||
ParamMap.putAll(JSON.parseObject( map));
|
||||
Map<String,Object> Rdata = openApiServiceImpl.subscribe(ParamMap,agentAccount);
|
||||
ParamMap.putAll(JSON.parseObject(map));
|
||||
Map<String, Object> Rdata = openApiServiceImpl.subscribe(ParamMap, agentAccount);
|
||||
boolean bool = (boolean) Rdata.get("bool");
|
||||
String code = Rdata.get("code").toString();
|
||||
if(bool){
|
||||
if (bool) {
|
||||
return new ResponseJson().successOpen(Rdata.get("Message"));
|
||||
}else{
|
||||
return new ResponseJson().errorOpen(code,Rdata.get("Message").toString());
|
||||
} else {
|
||||
return new ResponseJson().errorOpen(code, Rdata.get("Message").toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseJson().errorOpen("500", "操作失败请稍后重试!");
|
||||
@@ -544,9 +547,9 @@ public class PublicOpenAapiController {
|
||||
Map<String, Object> ParamMap = new HashMap<String, Object>();
|
||||
try {
|
||||
ParamMap.putAll(JSON.parseObject((String) map));
|
||||
if(ParamMap!=null){
|
||||
if (ParamMap != null) {
|
||||
return new ResponseJson().successOpen("已成功接收消息");
|
||||
}else {
|
||||
} else {
|
||||
return new ResponseJson().errorOpen("500", "返回消息保存异常!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -558,6 +561,7 @@ public class PublicOpenAapiController {
|
||||
|
||||
/**
|
||||
* 批量查询卡基础信息
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@@ -575,6 +579,7 @@ public class PublicOpenAapiController {
|
||||
|
||||
/**
|
||||
* 批量查询卡详情*
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@@ -608,31 +613,6 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量停机功能
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/mulCardStop")
|
||||
@ResponseBody
|
||||
@LogAnnotation(action = "批量停机")
|
||||
public String mulCardStop(HttpServletRequest request) {
|
||||
return newOpenApiService.mulCardStop(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量复机功能
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/mulCardStart")
|
||||
@ResponseBody
|
||||
@LogAnnotation(action = "批量复机")
|
||||
public String mulCardStart(HttpServletRequest request) {
|
||||
return newOpenApiService.mulCardStart(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 续费功能
|
||||
@@ -650,28 +630,77 @@ public class PublicOpenAapiController {
|
||||
}
|
||||
return new ResponseJson().error("500", responseJson.get("message").toString());
|
||||
}
|
||||
/**
|
||||
* 续费状态查询
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
@RequestMapping("/queryRenewalStatus")
|
||||
@ResponseBody
|
||||
@LogAnnotation(action = "续费状态查询")
|
||||
public JSONObject queryRenewalStatus(HttpServletRequest request) {
|
||||
ResponseJson responseJson = null;
|
||||
responseJson = newOpenApiService.queryRenewalStatus(request);
|
||||
if (responseJson.get("data") != null || !"500".equals(responseJson.get("status"))) {
|
||||
return new ResponseJson().successNewOpen(responseJson);
|
||||
}
|
||||
return new ResponseJson().error("500", responseJson.get("message").toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取企业卡数据信息
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/getAgentCardList")
|
||||
@ResponseBody
|
||||
public Map<String, Object> getAgentCardList(HttpServletRequest request) {
|
||||
String map = (String) request.getAttribute("map");
|
||||
Map<String, Object> ParamMap = new HashMap<String, Object>();
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
ParamMap.putAll(JSON.parseObject(map));
|
||||
Map<String, Object> Param = (Map<String, Object>) ParamMap.get("Param");
|
||||
Integer currenPage = Param.get("pageNum") != null ? Integer.parseInt(Param.get("pageNum").toString()) : 0;
|
||||
Integer pageSize = Param.get("pageSize") != null ? Integer.parseInt(Param.get("pageSize").toString()) : 10;
|
||||
Integer rowCount = null; // mapper查询个数
|
||||
PageUtil pu;
|
||||
try {
|
||||
Map<String, Object> agentAccount = (Map<String, Object>) request.getAttribute("agentAccount");
|
||||
if (pageSize > 20000) {
|
||||
return AjaxResult.error("pageSize已超出最大限数20000,请检查参数 !");
|
||||
}
|
||||
List<String> list = yzCardRouteMapper.agentIdSelByCard(agentAccount.get("agent_id").toString());
|
||||
String join = StringUtils.join(list, ",");
|
||||
String[] deptIdArr = join.split(",");
|
||||
Param.put("deptIdArr", deptIdArr);
|
||||
rowCount = yzCardRouteMapper.agentIdSelByCardCount(Param);
|
||||
rowCount = rowCount != null ? rowCount : 0;
|
||||
pu = new PageUtil(rowCount, currenPage, pageSize);//初始化分页工具类
|
||||
Param.put("StarRow", pu.getStarRow());
|
||||
Param.put("PageSize", pu.getPageSize());
|
||||
List<Map<String, Object>> maps = yzCardRouteMapper.getAgentCardList(Param);
|
||||
TabDatePageUtils tabDatePageUtils = new TabDatePageUtils();
|
||||
TableDataInfo dataInfo = tabDatePageUtils.queryDataInfo(maps);
|
||||
resMap.put("data", dataInfo);
|
||||
return resMap;
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("查询失败,请检查参数 !");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
// String url="http://hsapi.e114.xin:9002/Api/yunze/v1";
|
||||
|
||||
|
||||
Map<String, Object> Yzmap = new HashMap<String, Object>();
|
||||
|
||||
// for(int i=0;i<300;i++){
|
||||
String geturl = "http://192.168.100.207:9080/route/open/";
|
||||
//String geturl = "http://192.168.100.207:9080/open/";
|
||||
// String geturl = "http://api.5iot.cn/route/open/";
|
||||
//String geturl = "http://admin.sdyunze.com:9080/route/open/";
|
||||
String geturl = "http://192.168.100.207:9080/route/open/";
|
||||
|
||||
String appId = "ShanDongYunZe";
|
||||
String password = "IoTlink@2022";
|
||||
String access_key = "www.5iot.com/doc.5iot.com/demo.5iot.com";
|
||||
|
||||
|
||||
String access_key = "123";
|
||||
|
||||
|
||||
String timeStamp = System.currentTimeMillis() + "";
|
||||
@@ -690,50 +719,16 @@ public class PublicOpenAapiController {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
Map<String, Object> Parmap = new HashMap<String, Object>();
|
||||
//Parmap.put("dateTime", "202011");
|
||||
geturl+="subscribe";//资费充值
|
||||
//geturl +="simDataUsage";//单卡流量查询
|
||||
//geturl +="queryFlowHis";//单卡历史流量查询
|
||||
//geturl +="simStatus";//单卡生命周期
|
||||
//geturl +="changeCardStatus";//单卡生命周期 变更
|
||||
//geturl += "queryRealNameStatus";//查询是否实名
|
||||
//geturl +="queryAPNInfo";//查询APN设置信息
|
||||
// geturl +="FunctionApnStatus";//单端断网
|
||||
//geturl +="SpeedLimit";//限速
|
||||
//geturl +="todayUse";//今日使用量
|
||||
//geturl +="queryOnlineStatus";//查询卡是否在网状态
|
||||
//geturl +="cardInfo";//卡信息
|
||||
//geturl +="test";//
|
||||
//geturl +="cardPacketInfo";//卡套餐详情
|
||||
//geturl +="sharedToken";//获取共享token
|
||||
// geturl +="simSession";
|
||||
// geturl +="simApnFunction";
|
||||
// geturl +="MachineCardBinding";//机卡解绑
|
||||
geturl += "subscribe";
|
||||
|
||||
|
||||
|
||||
|
||||
// Parmap.put("dateTime", "202011");
|
||||
// Parmap.put("Is_Stop", "on"); // 停复机
|
||||
// Parmap.put("Is_Break", "0"); // 【断网复机】 是否 0 开机 1 停机
|
||||
// Parmap.put("speedValue", "0"); // 【限速】 标准 值
|
||||
// Parmap.put("Is_Spee", "0"); // 【限速】 是否 0 增加 1 删除
|
||||
// Parmap.put("AutomaticRecovery", "0"); // 是否 【限速】月初是否恢复 0 自动恢复 1 不自动恢复
|
||||
|
||||
map.put("verify", Yzmap);
|
||||
String result = null;
|
||||
Parmap.put("iccid", "89860466151980503267");
|
||||
Parmap.put("companyId","100");
|
||||
Parmap.put("effectiveType","1");
|
||||
Parmap.put("blocPlantId","YZ202201140123296552");
|
||||
Parmap.put("callbackAddress","http://192.168.100.207:9080/route/iotlink/callback");
|
||||
//Parmap.put("type", "iccid");
|
||||
//Parmap.put("StatusBreak", "1");
|
||||
//Parmap.put("cardno", "89860799999999999999");
|
||||
//Parmap.put("refreshToken", "1");
|
||||
|
||||
//Parmap.put("contactName", "ZhangSan");
|
||||
//Parmap.put("contactPhone", "18666666666");
|
||||
|
||||
Parmap.put("companyId", "100");
|
||||
Parmap.put("effectiveType", "1");
|
||||
Parmap.put("blocPlantId", "YZ202201140123296552");
|
||||
Parmap.put("callbackAddress", "http://192.168.100.207:9080/route/iotlink/callback");
|
||||
|
||||
|
||||
|
||||
@@ -742,7 +737,7 @@ public class PublicOpenAapiController {
|
||||
try {
|
||||
String data = JSON.toJSONString(map);
|
||||
System.out.println(data);
|
||||
for (int i=0;i<1;i++){
|
||||
for (int i = 0; i < 1; i++) {
|
||||
String qerUrl = UrlUtil.getUrl(geturl, map);
|
||||
System.out.println(qerUrl);
|
||||
System.out.println(JSON.toJSONString(data));
|
||||
@@ -753,11 +748,7 @@ public class PublicOpenAapiController {
|
||||
System.out.println("result↑↑↑↑↑↑");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//System.out.println(e);
|
||||
}
|
||||
|
||||
//for(String keys:map.keySet()){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,4 +27,6 @@ public interface NewOpenApiService {
|
||||
ResponseJson mulCardRenewal(HttpServletRequest request);
|
||||
|
||||
Map<String, Object> queryDueExpireDateXQ(HttpServletRequest request);
|
||||
|
||||
ResponseJson queryRenewalStatus(HttpServletRequest request);
|
||||
}
|
||||
|
||||
+124
-85
@@ -64,6 +64,46 @@ public class NewOPenApiServiceImpl implements NewOpenApiService {
|
||||
List<Object> dataList = new ArrayList<>();
|
||||
for (String iccid : iccidList) {
|
||||
Map<String, Object> cardInfoMaps = yzCardMapper.selectCardInfoList(iccid);
|
||||
//卡类型
|
||||
String prefix = iccid.substring(0, 6); // 提取前6位关键码
|
||||
// 判断中国电信
|
||||
if (prefix.startsWith("898603") || prefix.startsWith("898605") || prefix.startsWith("898611")) {
|
||||
cardInfoMaps.put("type", "中国电信");
|
||||
}
|
||||
// 判断中国移动
|
||||
else if (prefix.startsWith("898600") || prefix.startsWith("898602") || prefix.startsWith("898604") || prefix.startsWith("898607") || prefix.startsWith("898608")) {
|
||||
cardInfoMaps.put("type", "中国移动");
|
||||
}
|
||||
// 判断中国联通
|
||||
else if (prefix.startsWith("898601") || prefix.startsWith("898606") || prefix.startsWith("898609")) {
|
||||
cardInfoMaps.put("type", "中国联通");
|
||||
} else {
|
||||
cardInfoMaps.put("type", "其他");
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("iccid") ||"".equals(cardInfoMaps.get("iccid"))) {
|
||||
cardInfoMaps.put("iccid",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("msisdn") ||"".equals(cardInfoMaps.get("msisdn"))) {
|
||||
cardInfoMaps.put("msisdn",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("imsi")||"".equals(cardInfoMaps.get("imsi"))) {
|
||||
cardInfoMaps.put("imsi",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("imei") || "".equals(cardInfoMaps.get("imei"))) {
|
||||
cardInfoMaps.put("imei",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("activateDate") || "".equals(cardInfoMaps.get("activateDate"))) {
|
||||
cardInfoMaps.put("activateDate",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("dueExpireTime") || "".equals(cardInfoMaps.get("dueExpireTime"))) {
|
||||
cardInfoMaps.put("dueExpireTime",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("status") || "".equals(cardInfoMaps.get("status"))) {
|
||||
cardInfoMaps.put("status",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("remarks") || "".equals(cardInfoMaps.get("remarks"))) {
|
||||
cardInfoMaps.put("remarks",null);
|
||||
}
|
||||
dataList.add(cardInfoMaps);
|
||||
}
|
||||
System.err.println(dataList);
|
||||
@@ -80,9 +120,38 @@ public class NewOPenApiServiceImpl implements NewOpenApiService {
|
||||
List<Object> dataList = new ArrayList<>();
|
||||
for (String iccid : iccidList) {
|
||||
Map<String, Object> cardInfoMaps = yzCardMapper.selectCardDetail(iccid);
|
||||
if (!cardInfoMaps.containsKey("iccid") ||"".equals(cardInfoMaps.get("iccid"))) {
|
||||
cardInfoMaps.put("iccid",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("msisdn") ||"".equals(cardInfoMaps.get("msisdn"))) {
|
||||
cardInfoMaps.put("msisdn",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("imsi") ||"".equals(cardInfoMaps.get("imsi"))) {
|
||||
cardInfoMaps.put("imsi",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("useFlow") ||"".equals(cardInfoMaps.get("useFlow"))) {
|
||||
cardInfoMaps.put("useFlow",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("remaining") ||"".equals(cardInfoMaps.get("remaining"))) {
|
||||
cardInfoMaps.put("remaining",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("startTime") ||"".equals(cardInfoMaps.get("startTime"))) {
|
||||
cardInfoMaps.put("startTime",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("endTime") ||"".equals(cardInfoMaps.get("endTime"))) {
|
||||
cardInfoMaps.put("endTime",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("activateDate") ||"".equals(cardInfoMaps.get("activateDate"))) {
|
||||
cardInfoMaps.put("activateDate",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("status") ||"".equals(cardInfoMaps.get("status"))) {
|
||||
cardInfoMaps.put("status",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("packageName") ||"".equals(cardInfoMaps.get("packageName"))) {
|
||||
cardInfoMaps.put("packageName",null);
|
||||
}
|
||||
dataList.add(cardInfoMaps);
|
||||
}
|
||||
System.err.println(dataList);
|
||||
return new ResponseJson().initSuccessOpen(dataList);
|
||||
}
|
||||
|
||||
@@ -96,6 +165,27 @@ public class NewOPenApiServiceImpl implements NewOpenApiService {
|
||||
List<Object> dataList = new ArrayList<>();
|
||||
for (String iccid : iccidList) {
|
||||
Map<String, Object> cardInfoMaps = yzCardMapper.queryCardPackage(iccid);
|
||||
if (!cardInfoMaps.containsKey("iccid") ||"".equals(cardInfoMaps.get("iccid"))) {
|
||||
cardInfoMaps.put("iccid",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("msisdn") ||"".equals(cardInfoMaps.get("msisdn"))) {
|
||||
cardInfoMaps.put("msisdn",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("imsi") ||"".equals(cardInfoMaps.get("imsi"))) {
|
||||
cardInfoMaps.put("imsi",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("validateType") ||"".equals(cardInfoMaps.get("validateType"))) {
|
||||
cardInfoMaps.put("validateType",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("packageId") ||"".equals(cardInfoMaps.get("packageId"))) {
|
||||
cardInfoMaps.put("packageId",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("packetId") ||"".equals(cardInfoMaps.get("packetId"))) {
|
||||
cardInfoMaps.put("packetId",null);
|
||||
}
|
||||
if (!cardInfoMaps.containsKey("packetName") ||"".equals(cardInfoMaps.get("packetName"))) {
|
||||
cardInfoMaps.put("packetName",null);
|
||||
}
|
||||
dataList.add(cardInfoMaps);
|
||||
}
|
||||
System.err.println(dataList);
|
||||
@@ -104,94 +194,12 @@ public class NewOPenApiServiceImpl implements NewOpenApiService {
|
||||
|
||||
@Override
|
||||
public String mulCardStop(HttpServletRequest request) {
|
||||
//返回变量
|
||||
String apnCardStatusResult = "";
|
||||
//获取请求参数
|
||||
String map = (String) request.getAttribute("map");
|
||||
//fastJson工具转换
|
||||
Map<String, Object> paramMap = JSON.parseObject(map, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> params = (Map<String, Object>) paramMap.get("Param");
|
||||
//拿到业务请求参数后转换为string数组
|
||||
List<String> msisdnList = JSONArray.parseArray(params.get("msisdn").toString(), String.class);
|
||||
for (String msisdn : msisdnList) {
|
||||
//根据msisdn从数据库中拿到调用api所需参数
|
||||
Map<String, Object> apiParams = yzCardMapper.selectApiParams(msisdn);
|
||||
//防止不存在的msisdn异常
|
||||
if (apiParams != null) {
|
||||
//判断区分运营商类别(目前考虑移动和电信5G、电信4G) 调用三方API
|
||||
String cdCode = (String) apiParams.get("cd_code");
|
||||
if ("YiDong_EC".equals(cdCode)) {
|
||||
//移动
|
||||
//停机参数
|
||||
String operType = "0";
|
||||
Query_YD queryYd = new Query_YD(apiParams, cdCode);
|
||||
apnCardStatusResult = queryYd.FunctionApnCardStop(msisdn, operType);
|
||||
} else if ("DianXin_CMP_5G".equals(cdCode)) {
|
||||
//电信5G
|
||||
//停机参数
|
||||
String orderTypeId = "19";
|
||||
Query_DX5G queryDx5G = new Query_DX5G(apiParams);
|
||||
apnCardStatusResult = queryDx5G.FunctionApnCardStop(msisdn, orderTypeId);
|
||||
} else if ("DianXin_CMP".equals(cdCode)) {
|
||||
//电信4G
|
||||
//停机参数
|
||||
String orderTypeId = "19";
|
||||
//固定值 保持为空
|
||||
String acctCd = "";
|
||||
Query_DX queryDx = new Query_DX(apiParams);
|
||||
apnCardStatusResult = queryDx.FunctionApnCardStop(msisdn, orderTypeId, acctCd);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return apnCardStatusResult;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String mulCardStart(HttpServletRequest request) {
|
||||
//返回变量
|
||||
String apnCardStatusResult = "";
|
||||
//获取请求参数
|
||||
String map = (String) request.getAttribute("map");
|
||||
//fastJson工具转换
|
||||
Map<String, Object> paramMap = JSON.parseObject(map, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> params = (Map<String, Object>) paramMap.get("Param");
|
||||
//拿到业务请求参数后转换为string数组
|
||||
List<String> msisdnList = JSONArray.parseArray(params.get("msisdn").toString(), String.class);
|
||||
for (String msisdn : msisdnList) {
|
||||
//根据msisdn从数据库中拿到调用api所需参数
|
||||
Map<String, Object> apiParams = yzCardMapper.selectApiParams(msisdn);
|
||||
//防止不存在的msisdn异常
|
||||
if (apiParams != null) {
|
||||
//判断区分运营商类别(目前考虑移动和电信5G、电信4G) 调用三方API
|
||||
String cdCode = (String) apiParams.get("cd_code");
|
||||
if ("YiDong_EC".equals(cdCode)) {
|
||||
//移动
|
||||
//复机参数
|
||||
String operType = "1";
|
||||
Query_YD queryYd = new Query_YD(apiParams, cdCode);
|
||||
apnCardStatusResult = queryYd.FunctionApnCardStop(msisdn, operType);
|
||||
} else if ("DianXin_CMP_5G".equals(cdCode)) {
|
||||
//电信5G
|
||||
//复机参数
|
||||
String orderTypeId = "20";
|
||||
Query_DX5G queryDx5G = new Query_DX5G(apiParams);
|
||||
apnCardStatusResult = queryDx5G.FunctionApnCardStop(msisdn, orderTypeId);
|
||||
} else if ("DianXin_CMP".equals(cdCode)) {
|
||||
//电信4G
|
||||
//复机参数
|
||||
String orderTypeId = "20";
|
||||
//固定值 保持为空
|
||||
String acctCd = "";
|
||||
Query_DX queryDx = new Query_DX(apiParams);
|
||||
apnCardStatusResult = queryDx.FunctionApnCardStop(msisdn, orderTypeId, acctCd);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return apnCardStatusResult;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -359,4 +367,35 @@ public class NewOPenApiServiceImpl implements NewOpenApiService {
|
||||
}
|
||||
return new ResponseJson().initSuccessOpen(dueExpireDateList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseJson queryRenewalStatus(HttpServletRequest request) {
|
||||
//组装查询信息
|
||||
HashMap<String, Object> ReturnMap = new HashMap<>();
|
||||
String renewalStatus = "";
|
||||
String map = (String) request.getAttribute("map");
|
||||
Map<String, Object> paramMap = JSON.parseObject(map, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> param = (Map<String, Object>) paramMap.get("Param");
|
||||
Integer renewalId = Integer.parseInt((String) param.get("renewalId"));
|
||||
Map<String, Object> renewalInfo = yzCardMapper.queryRenewalStatus(renewalId);
|
||||
Integer status = Integer.parseInt(renewalInfo.get("status").toString());
|
||||
//判断状态
|
||||
if (status == 0) {
|
||||
renewalStatus = "审核中";
|
||||
} else if (status == 1) {
|
||||
renewalStatus = "审核通过";
|
||||
} else {
|
||||
renewalStatus = "审核未通过";
|
||||
}
|
||||
//判断是否有反馈
|
||||
if ("".equals(renewalInfo.get("feedback")) || !renewalInfo.containsKey("feedback")) {
|
||||
ReturnMap.put("feedback", null);
|
||||
} else {
|
||||
ReturnMap.put("feedback", renewalInfo.get("feedback"));
|
||||
}
|
||||
ReturnMap.put("renewalId", renewalId);
|
||||
ReturnMap.put("renewalStatus", renewalStatus);
|
||||
return new ResponseJson().initSuccessOpen(ReturnMap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yunze.iotapi.utils;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.yunze.common.constant.HttpStatus;
|
||||
import com.yunze.common.core.page.TableDataInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TabDatePageUtils {
|
||||
public TableDataInfo getDataInfo(List<?> list){
|
||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||
tableDataInfo.setMsg(String.valueOf(HttpStatus.SUCCESS));
|
||||
tableDataInfo.setTotal(new PageInfo(list).getTotal());
|
||||
tableDataInfo.setRows(list);
|
||||
return tableDataInfo;
|
||||
}
|
||||
|
||||
public TableDataInfo queryDataInfo(List<?> list){
|
||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||
tableDataInfo.setMsg("成功");
|
||||
tableDataInfo.setTotal(new PageInfo(list).getTotal());
|
||||
tableDataInfo.setRows(list);
|
||||
return tableDataInfo;
|
||||
}
|
||||
}
|
||||
@@ -1928,6 +1928,11 @@ public class YzCardServiceImpl implements IYzCardService {
|
||||
yzCardMapper.updNewUsed(putMap);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updManageStatusId(Map<String, Object> updMap) {
|
||||
return yzCardMapper.updManageStatusId(updMap) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
// String key = "M25h0BwJxRUp97SET5DCoV0UDO1x2lZx";
|
||||
|
||||
@@ -331,4 +331,7 @@ public interface IYzCardService
|
||||
List<Map<String, Object>> findTuJuRoute();
|
||||
|
||||
List<Map<String, Object>> findTuJuCardStatus();
|
||||
|
||||
boolean updManageStatusId(Map<String, Object> updMap);
|
||||
|
||||
}
|
||||
|
||||
@@ -55,3 +55,12 @@ export function findIccid(query) {
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出续费信息
|
||||
export function exportRenewalData(map) {
|
||||
return request({
|
||||
url: '/yunze/card/exportRenewalData',
|
||||
method: 'post',
|
||||
data: map
|
||||
})
|
||||
}
|
||||
|
||||
@@ -558,23 +558,23 @@
|
||||
<table border="2px" width="1000px" height="30px" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td>字段说明</td>
|
||||
<td>对应状态</td>
|
||||
<!-- <td>对应状态</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>中国移动</td>
|
||||
<td style="padding-left: 50px; font-size:10px;">1</td>
|
||||
<!-- <td style="padding-left: 50px; font-size:10px;">1</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>中国联通</td>
|
||||
<td style="padding-left: 50px; font-size:10px;">2</td>
|
||||
<!-- <td style="padding-left: 50px; font-size:10px;">2</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>中国电信</td>
|
||||
<td style="padding-left: 50px; font-size:10px;">3</td>
|
||||
<!-- <td style="padding-left: 50px; font-size:10px;">3</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>其他</td>
|
||||
<td style="padding-left: 50px; font-size:10px;">4</td>
|
||||
<!-- <td style="padding-left: 50px; font-size:10px;">4</td>-->
|
||||
</tr>
|
||||
</table>
|
||||
<h2 data-v-md-line="2" style=" font-size:20px;">
|
||||
@@ -2453,9 +2453,13 @@ export default {
|
||||
ServerUrl: 'http://域名/route/open/接口名称',
|
||||
domainName: 'api.5iot.cn',
|
||||
InterfaceName: 'API接口名称',
|
||||
mailbox: 'feizhenlong@139.com',
|
||||
mailbox: '2357498505@qq.com',
|
||||
editionList: [//版本说明
|
||||
{ a: 'V2.0.0', b: '2024-10-11', c: 'Wang', d: '更新对外接口,包括批量查询卡信息、批量停复机(目前支持移动、电信5G和4G)' },
|
||||
{ a: 'V2.0.0', b: '2024-10-11', c: '山东云则信息技术有限公司', d: '更新对外接口,包括批量查询卡信息、批量查询卡详情等' },
|
||||
{ a: 'V2.0.1', b: '2024-12-25', c: '山东云则信息技术有限公司', d: '更新对外接口,批量续费申请' },
|
||||
{ a: 'V2.0.2', b: '2025-02-13', c: '山东云则信息技术有限公司', d: '更新2.1.1 批量查询卡基础信息接口 type字段 (按照当前物联网标准解析,后续有问题及时反馈)' },
|
||||
{ a: 'V2.0.3', b: '2025-03-05', c: '山东云则信息技术有限公司', d: '新增查询续费审核状态接口' },
|
||||
{ a: 'V2.0.4', b: '2025-03-17', c: '山东云则信息技术有限公司', d: '更新对外接口,查询企业下所属卡列表信息' }
|
||||
],
|
||||
cardList: [//接口命名规则
|
||||
{ a: 'appId', b: 'String', c: '是', d: 'Verify Map 内', e: 'appId用于唯一标识请求' },
|
||||
@@ -2605,7 +2609,7 @@ export default {
|
||||
name: 'type',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '卡类型 详细请参考 3.2 卡类型说明'
|
||||
explanation: '卡类型 1.中国移动 2.中国联通 3.中国电信 4.其他 (注: 该参数是根据当前物联网标准解析,后续存在问题请及时反馈)'
|
||||
},
|
||||
{
|
||||
name: 'remark',
|
||||
@@ -2635,18 +2639,22 @@ export default {
|
||||
' "iccid": "8986112124301965000",\n' +
|
||||
' "activateDate": "2022-01-01",\n' +
|
||||
' "dueExpireTime": "2025-05-31",\n' +
|
||||
' "id": 115,\n' +
|
||||
' "imei": "null",\n' +
|
||||
' "imsi": "460113163750388",\n' +
|
||||
' "msisdn": "1410158305863",\n' +
|
||||
' "remarks": "",\n' +
|
||||
' "type": "中国移动",\n' +
|
||||
' "remarks": "null",\n' +
|
||||
' "status": 4\n' +
|
||||
' },\n' +
|
||||
' {\n' +
|
||||
' "iccid": "898604B21522C001001",\n' +
|
||||
' "activateDate": "2024-05-20",\n' +
|
||||
' "id": 2,\n' +
|
||||
' "dueExpireTime": "2025-05-31",\n' +
|
||||
' "imei": "null",\n' +
|
||||
' "imsi": "460083272213811",\n' +
|
||||
' "msisdn": "1441127223812",\n' +
|
||||
' "type": "中国移动",\n' +
|
||||
' "remarks": "null",\n' +
|
||||
' "status": 6\n' +
|
||||
' }\n' +
|
||||
' ]\n' +
|
||||
@@ -2716,7 +2724,7 @@ export default {
|
||||
{
|
||||
name: 'iccid',
|
||||
requiredType: '是',
|
||||
type: 'Object',
|
||||
type: 'String',
|
||||
explanation: '集成电路卡识别码,IC卡的唯一识别号码,共有20位字符组成,举例:89860423123123132135。'
|
||||
},
|
||||
{
|
||||
@@ -2725,18 +2733,6 @@ export default {
|
||||
type: 'String',
|
||||
explanation: '国际移动用户识别码,其总长度不超过15位,使用0~9的数字,举例:460079650004176。'
|
||||
},
|
||||
{
|
||||
name: 'packetType',
|
||||
requiredType: '是',
|
||||
type: 'int',
|
||||
explanation: '加油包类型:0.基础加油包 1.叠加油包'
|
||||
},
|
||||
{
|
||||
name: 'validateType',
|
||||
requiredType: '否',
|
||||
type: 'int',
|
||||
explanation: '生效类型详细请参3.4生效类别说明'
|
||||
},
|
||||
{
|
||||
name: 'activateDate',
|
||||
requiredType: '否',
|
||||
@@ -2773,24 +2769,6 @@ export default {
|
||||
type: 'int',
|
||||
explanation: '卡状态 详细请参考 3.1 卡状态说明'
|
||||
},
|
||||
{
|
||||
name: 'netWorkStatus',
|
||||
requiredType: '否',
|
||||
type: 'int',
|
||||
explanation: '断开网状态:1.正常 2.断网'
|
||||
},
|
||||
{
|
||||
name: 'operatorId',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '运营商类型:1移动 2联通 3电信 4其他'
|
||||
},
|
||||
{
|
||||
name: 'type',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '卡类型: 0.中国移动 1.中国联通 2.中国电信 3.其他'
|
||||
},
|
||||
{
|
||||
name: 'remaining',
|
||||
requiredType: '是',
|
||||
@@ -2803,28 +2781,25 @@ export default {
|
||||
' "result": {\n' +
|
||||
' "data": [\n' +
|
||||
' {\n' +
|
||||
' "packetType": 0,\n' +
|
||||
' "validateType": 1,\n' +
|
||||
' "activateDate": "2022-01-01",\n' +
|
||||
' "imsi": "460113163750000",\n' +
|
||||
' "type": "3",\n' +
|
||||
' "remaining": 50,\n' +
|
||||
' "iccid": "8986112124301965000",\n' +
|
||||
' "useFlow": 30,\n' +
|
||||
' "netWorkStatus": 1,\n' +
|
||||
' "startTime": "2024-06-10",\n' +
|
||||
' "startTime": "2024-11-08",\n' +
|
||||
' "packageName": "移动NB卡",\n' +
|
||||
' "endTime": "2024-10-09",\n' +
|
||||
' "endTime": "2024-11-08",\n' +
|
||||
' "msisdn": "1410158305000",\n' +
|
||||
' "operatorId": "3",\n' +
|
||||
' "status": 4\n' +
|
||||
' },\n' +
|
||||
' {\n' +
|
||||
' "iccid": "898604B21522C001001",\n' +
|
||||
' "useFlow": "25.2",\n' +
|
||||
' "startTime": "null",\n' +
|
||||
' "activateDate": "2024-05-20",\n' +
|
||||
' "netWorkStatus": 1,\n' +
|
||||
' "imsi": "460083272213000",\n' +
|
||||
' "packageName": "联通地王卡",\n' +
|
||||
' "endTime": "null",\n' +
|
||||
' "msisdn": "1441127223000",\n' +
|
||||
' "remaining": 200,\n' +
|
||||
' "status": 6\n' +
|
||||
@@ -2889,7 +2864,7 @@ export default {
|
||||
{
|
||||
name: 'iccid',
|
||||
requiredType: '是',
|
||||
type: 'Object',
|
||||
type: 'String',
|
||||
explanation: '集成电路卡识别码,IC卡的唯一识别号码,共有20位字符组成,举例:89860423123123132135。'
|
||||
},
|
||||
{
|
||||
@@ -2904,32 +2879,161 @@ export default {
|
||||
type: 'String',
|
||||
explanation: '资费计划名称'
|
||||
},
|
||||
{
|
||||
name: 'packageName',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '资费组名称'
|
||||
},
|
||||
{
|
||||
name: 'packetId',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '套餐包ID'
|
||||
},
|
||||
{
|
||||
name: 'packageId',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '套餐ID'
|
||||
},
|
||||
{
|
||||
name: 'validateType',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '资费计划类型 参考3.4生效类型辅助文档'
|
||||
},
|
||||
],
|
||||
backExample_success: tools.formatJson('{\n' +
|
||||
' "result": {\n' +
|
||||
' "data": [\n' +
|
||||
' {\n' +
|
||||
' "iccid": "8986112124301965000",\n' +
|
||||
' "imsi": "460113163750000",\n' +
|
||||
' "msisdn": "1410158305000",\n' +
|
||||
' "packetName": "大王卡30MB一月"\n' +
|
||||
' },\n' +
|
||||
' {\n' +
|
||||
' "iccid": "898604B21522C001001",\n' +
|
||||
' "imsi": "460083272213000",\n' +
|
||||
' "msisdn": "1441127223000",\n' +
|
||||
'\n' +
|
||||
' \t "packetName": "大王卡30MB一月" \n' +
|
||||
'\n' +
|
||||
' }\n' +
|
||||
' ]\n' +
|
||||
' },\n' +
|
||||
' "message": "成功",\n' +
|
||||
' "status": "1"\n' +
|
||||
'}'),
|
||||
backExample_success: tools.formatJson({
|
||||
"result": {
|
||||
"data": [
|
||||
{
|
||||
"packetId": "YZ2021070204353637421010",
|
||||
"iccid": "898602B5132290026822",
|
||||
"validateType": null,
|
||||
"packageId": "YZ202107020435363742",
|
||||
"imsi": "460040574816822",
|
||||
"msisdn": "1064857486822",
|
||||
"packageName": "电信NB",
|
||||
"packetName": "60M月/12月"
|
||||
},
|
||||
{
|
||||
"packetId": "YZ2021070204353637421010",
|
||||
"iccid": "8986112124301965946",
|
||||
"validateType": null,
|
||||
"packageId": "YZ202107020435363742",
|
||||
"imsi": "460113163750388",
|
||||
"msisdn": "1410158305863",
|
||||
"packageName": "电信NB",
|
||||
"packetName": "60M月/12月"
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": "成功",
|
||||
"status": "1"
|
||||
}),
|
||||
backExample_fail: tools.formatJson('{"message":"无访问权限","result":null,"status":"1003"}')
|
||||
},
|
||||
{
|
||||
T1_title: '',
|
||||
T2_title: '2.1.4 批量查询公司所属卡列表信息 注:限制单页最大数据量为20000条',
|
||||
describe: '查询公司所属卡列表信息',
|
||||
url: 'http://api.5iot.cn/route/open/getAgentCardList',
|
||||
type: 'POST',
|
||||
requestParameterArr: [//请求参数
|
||||
{
|
||||
name: 'pageNum',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: 'pageNum:分页参数--起始页'
|
||||
},
|
||||
{
|
||||
name: 'pageSize',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: 'pageSize:分页参数--单页数据量'
|
||||
}
|
||||
],
|
||||
requestInstance: tools.formatJson({
|
||||
'Param': { 'pageNum':'1',
|
||||
'pageSize': '2'
|
||||
},
|
||||
'verify': {
|
||||
'timeStamp': '1625120582169',
|
||||
'password': 'uhbhkh223123',
|
||||
'appId': 'test',
|
||||
'sign': 'C0EBF5F9FCBFFE72CAA5AAF753EACCA5'
|
||||
}
|
||||
}),//请求实例
|
||||
returnParameterDescription_publicIn: [//返回参数说明 公共参数
|
||||
{
|
||||
name: 'code',
|
||||
requiredType: '是',
|
||||
type: 'int',
|
||||
explanation: '错误码。0-成功 非0-失败'
|
||||
},
|
||||
{
|
||||
name: 'msg',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '状态信息。'
|
||||
},
|
||||
{
|
||||
name: 'total',
|
||||
requiredType: '是',
|
||||
type: 'int',
|
||||
explanation: '数据总条数。'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
requiredType: '是',
|
||||
type: 'Object',
|
||||
explanation: '返回结果集(code“0”时,data包含正确的结果数据,从rows数组中取数据'
|
||||
}
|
||||
],
|
||||
returnParameterDescription_answer: [//返回参数说明 应答参数
|
||||
{
|
||||
name: 'msisdn',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '所查询的物联卡号码,最长13位数字,举例:14765004176。'
|
||||
},
|
||||
{
|
||||
name: 'iccid',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '集成电路卡识别码,IC卡的唯一识别号码,共有20位字符组成,举例:89860423123123132135。'
|
||||
},
|
||||
{
|
||||
name: 'imsi',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '国际移动用户识别码,其总长度不超过15位,使用0~9的数字,举例:460079650004176。'
|
||||
},
|
||||
],
|
||||
backExample_success: tools.formatJson({
|
||||
"data": {
|
||||
"total": 2,
|
||||
"rows": [
|
||||
{
|
||||
"iccid": "8986112022804386640",
|
||||
"imsi": "460113413961606",
|
||||
"msisdn": "1410416541451"
|
||||
},
|
||||
{
|
||||
"iccid": "8986112022804387940",
|
||||
"imsi": "460113413960198",
|
||||
"msisdn": "1410409285540"
|
||||
}
|
||||
],
|
||||
"code": 0,
|
||||
"msg": "成功"
|
||||
}
|
||||
}),
|
||||
backExample_fail: tools.formatJson('{"message":"无访问权限","result":null,"status":"1003"}')
|
||||
},
|
||||
|
||||
/*{
|
||||
T1_title: '2.2业务类',
|
||||
T2_title: '2.2.1 SIM卡批量停机',
|
||||
describe: '批量停机(注:同一卡号或群组3分钟内不能调用该接口超过1次)',
|
||||
@@ -3025,11 +3129,11 @@ export default {
|
||||
'\n' +
|
||||
'}'),
|
||||
backExample_fail: tools.formatJson('{"message":"无访问权限","result":null,"status":"1003"}')
|
||||
},
|
||||
},*/
|
||||
{
|
||||
T1_title: '',
|
||||
T2_title: '2.2.3 SIM卡批量续费',
|
||||
describe: '批量复机注:批量续费卡数量单次不能超过500张)',
|
||||
T1_title: ' 2.2业务类',
|
||||
T2_title: '2.2.1 SIM卡批量续费',
|
||||
describe: '批量续费卡数量单次不能超过150张,先通过2.1.3接口 拿到返回的iccid集合和资费计划后 再进行批量续费 原则:同一批卡同一个资费计划',
|
||||
url: 'http://api.5iot.cn/route/open/mulCardRenewal',
|
||||
type: 'POST',
|
||||
requestParameterArr: [//请求参数
|
||||
@@ -3059,13 +3163,15 @@ export default {
|
||||
},
|
||||
],
|
||||
requestInstance: tools.formatJson({
|
||||
'Param': { "iccid":[
|
||||
'Param': {
|
||||
"iccid": [
|
||||
"8986112124301960000",
|
||||
"898604B21522C000000"
|
||||
],
|
||||
"packageId":"20241023",
|
||||
"packetId":"123456",
|
||||
"validateType":"1" },
|
||||
"packageId": "20241023",
|
||||
"packetId": "123456",
|
||||
"validateType": "1"
|
||||
},
|
||||
'verify': {
|
||||
'timeStamp': '1625120582169',
|
||||
'password': 'uhbhkh223123',
|
||||
@@ -3093,7 +3199,7 @@ export default {
|
||||
explanation: '返回结果集(status为“1”时,result包含正确的结果数据;status为“非1”时, result可能为空,也可能包含其他提示数据)'
|
||||
}
|
||||
],
|
||||
returnParameterDescription_answer:[//返回应答参数
|
||||
returnParameterDescription_answer: [//返回应答参数
|
||||
{
|
||||
name: 'iccidList',
|
||||
requiredType: '是',
|
||||
@@ -3127,6 +3233,84 @@ export default {
|
||||
"message": "成功",
|
||||
"status": "1"
|
||||
}),
|
||||
backExample_fail: tools.formatJson('{"message":"无访问权限","result":null,"status":"1003"}'),
|
||||
},
|
||||
{
|
||||
T1_title: '',
|
||||
T2_title: '2.2.2 查询续费审核状态 (需使用2.2.1获取的续费id标识)',
|
||||
describe: '查询续费审核状态',
|
||||
url: 'http://api.5iot.cn/route/open/queryRenewalStatus',
|
||||
type: 'POST',
|
||||
requestParameterArr: [//请求参数
|
||||
{
|
||||
name: 'renewalId (Id中的I为大写的i )',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '批量续费请求的id'
|
||||
}
|
||||
],
|
||||
requestInstance: tools.formatJson({
|
||||
'Param': { 'renewalId':"165" },
|
||||
'verify': {
|
||||
'timeStamp': '1625120582169',
|
||||
'password': 'uhbhkh223123',
|
||||
'appId': 'test',
|
||||
'sign': 'C0EBF5F9FCBFFE72CAA5AAF753EACCA5'
|
||||
}
|
||||
}),//请求实例
|
||||
returnParameterDescription_publicIn: [//返回参数说明 公共参数
|
||||
{
|
||||
name: 'status',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '错误码。1-成功 非1-失败'
|
||||
},
|
||||
{
|
||||
name: 'message',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '错误信息。错误码对应的错误描述,参考错误码列表'
|
||||
},
|
||||
{
|
||||
name: 'result',
|
||||
requiredType: '是',
|
||||
type: 'Object',
|
||||
explanation: '返回结果集(status为“1”时,result包含正确的结果数据;status为“非1”时, result可能为空,也可能包含其他提示数据)'
|
||||
}
|
||||
],
|
||||
returnParameterDescription_answer: [//返回参数说明 应答参数
|
||||
{
|
||||
name: 'renewalId',
|
||||
requiredType: '是',
|
||||
type: 'int',
|
||||
explanation: '批量续费请求的id'
|
||||
},
|
||||
{
|
||||
name: 'renewalStatus',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '续费审核状态 审核中 审核通过 审核不通过'
|
||||
},
|
||||
{
|
||||
name: 'feedback',
|
||||
requiredType: '是',
|
||||
type: 'String',
|
||||
explanation: '当审核不通过时 会返回反馈信息 正常为null'
|
||||
}
|
||||
],
|
||||
backExample_success: tools.formatJson({
|
||||
"result": {
|
||||
"data": [
|
||||
{
|
||||
"renewalId": 63,
|
||||
"renewalStatus": "审核中",
|
||||
"feedback": null
|
||||
},
|
||||
]
|
||||
},
|
||||
"message": "成功",
|
||||
"status": "1"
|
||||
}),
|
||||
backExample_fail: tools.formatJson('{"message":"无访问权限","result":null,"status":"1003"}')
|
||||
},
|
||||
],
|
||||
|
||||
@@ -92,6 +92,18 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
:loading="exportLoading"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['yunze:card:exportData']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" v-hasPermi="['yunze:renewal:list']" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@@ -149,7 +161,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listRenewal,updRenewal } from "@/api/yunze/flowcard/renewal";
|
||||
import {listRenewal,updRenewal,exportRenewalData} from "@/api/yunze/flowcard/renewal";
|
||||
import tools from "@/utils/yunze/tools";
|
||||
import appPrimary from "./appPrimary";
|
||||
|
||||
@@ -321,6 +333,41 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
|
||||
//续费信息导出
|
||||
handleExport() {
|
||||
this.loading = true;
|
||||
this.getParams();
|
||||
let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams));
|
||||
listRenewal(Pwd_Str).then(response => {
|
||||
let jsonobj = JSON.parse(tools.Decrypt(response));
|
||||
console.log(jsonobj);
|
||||
if (jsonobj.code == 200) {
|
||||
// this.cardList = jsonobj.Data.Data;
|
||||
// this.total = jsonobj.Data.Pu.rowCount;
|
||||
this.outCard();
|
||||
} else {
|
||||
this.msgError(jsonobj.msg);
|
||||
}
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
//导出方法
|
||||
outCard(){
|
||||
this.getParams();
|
||||
let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams));
|
||||
exportRenewalData(Pwd_Str).then(response => {
|
||||
let jsonobj = JSON.parse(tools.Decrypt(response));
|
||||
//console.log(jsonobj);
|
||||
if (jsonobj.code == 200) {
|
||||
this.msgSuccess(jsonobj.Data);
|
||||
} else {
|
||||
let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data : jsonobj.msg;
|
||||
this.msgError(msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查看续费申请详情
|
||||
openInfo(row){
|
||||
this.sel.id = row.id;
|
||||
@@ -360,7 +407,6 @@ export default {
|
||||
}
|
||||
}
|
||||
if (tools.Is_null(this.queryParams.timetype) && this.selTime != null) {
|
||||
//console.log(this.selTime);
|
||||
this.queryParams.staTime = this.selTime[0];
|
||||
this.queryParams.endTime = this.selTime[1];
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
ZDbMOlQdWzasvols
|
||||
Reference in New Issue
Block a user