电子证照回调接口
Showing
6 changed files
with
77 additions
and
24 deletions
1 | package com.thinkgem.jeesite.modules.eci.Controller; | ||
2 | |||
3 | import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao; | ||
4 | import org.slf4j.Logger; | ||
5 | import org.slf4j.LoggerFactory; | ||
6 | import org.springframework.beans.factory.annotation.Autowired; | ||
7 | import org.springframework.stereotype.Controller; | ||
8 | import org.springframework.web.bind.annotation.*; | ||
9 | |||
10 | @Controller | ||
11 | @ResponseBody | ||
12 | @RequestMapping("signed") | ||
13 | public class ContractStatusController { | ||
14 | |||
15 | private static Logger logger = LoggerFactory.getLogger(ContractStatusController.class); | ||
16 | |||
17 | @Autowired | ||
18 | ElecLicenseInfoDao licenseInfoDao; | ||
19 | |||
20 | @RequestMapping(method = RequestMethod.POST, value = "/received") | ||
21 | public void received(@RequestParam("contractId") String contractId, | ||
22 | @RequestParam(value = "tenantId", required = false) String tenantId, | ||
23 | @RequestParam(value = "tenantName", required = false) String tenantName, | ||
24 | @RequestParam(value = "sn", required = false) String sn, | ||
25 | @RequestParam("status") String status, | ||
26 | @RequestParam(value = "type", required = false) String type, | ||
27 | @RequestParam(value = "contact", required = false) String contact, | ||
28 | @RequestParam(value = "operatorName", required = false) String operatorName, | ||
29 | @RequestParam(value = "operatorMobile", required = false) String operatorMobile, | ||
30 | @RequestParam(value = "operatorNumber", required = false) String operatorNumber, | ||
31 | @RequestParam(value = "receiverNumber", required = false) String receiverNumber) { | ||
32 | |||
33 | logger.info("contractId=" + contractId, "status=" + status); | ||
34 | licenseInfoDao.updateHtzt(contractId, status); | ||
35 | } | ||
36 | } |
... | @@ -70,5 +70,19 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { | ... | @@ -70,5 +70,19 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { |
70 | 70 | ||
71 | List<ElecLicenseInfo> selectZsbs(@Param("zsbs") String zsbs); | 71 | List<ElecLicenseInfo> selectZsbs(@Param("zsbs") String zsbs); |
72 | 72 | ||
73 | /** | ||
74 | * 更新转换后图片路径和状态 | ||
75 | * @param jpgPath 图片路径 | ||
76 | * @param bizId | ||
77 | * @return | ||
78 | */ | ||
73 | Integer updateJpgWjdzAndStatus(@Param("jpgPath") String jpgPath, @Param("bizId") String bizId); | 79 | Integer updateJpgWjdzAndStatus(@Param("jpgPath") String jpgPath, @Param("bizId") String bizId); |
80 | |||
81 | /** | ||
82 | * 更新合同用印状态 | ||
83 | * @param contractId | ||
84 | * @param status | ||
85 | * @return | ||
86 | */ | ||
87 | Integer updateHtzt(@Param("contractId") String contractId, @Param("status") String status); | ||
74 | } | 88 | } |
... | ... |
1 | package com.thinkgem.jeesite.modules.eci.entity; | 1 | package com.thinkgem.jeesite.modules.eci.entity; |
2 | 2 | ||
3 | import org.apache.poi.ss.formula.functions.T; | 3 | import java.io.Serializable; |
4 | |||
5 | import java.util.List; | 4 | import java.util.List; |
6 | 5 | ||
7 | /** | 6 | /** |
8 | * 创建合同请求实体 | 7 | * 创建合同请求实体 |
9 | */ | 8 | */ |
10 | public class CreateContractRequest { | 9 | public class CreateContractRequest implements Serializable { |
11 | 10 | ||
12 | private static final long serialVersionUID = 1L; | 11 | private static final long serialVersionUID = 1L; |
13 | /** | 12 | /** |
... | ... |
... | @@ -160,7 +160,6 @@ public class EciHttpUtil { | ... | @@ -160,7 +160,6 @@ public class EciHttpUtil { |
160 | if (length > 0) { | 160 | if (length > 0) { |
161 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dddd"); | 161 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dddd"); |
162 | String dateDir = simpleDateFormat.format(new Date()); | 162 | String dateDir = simpleDateFormat.format(new Date()); |
163 | // File file = new File("E:\\ECI\\OFD\\" + dateDir + "\\" + documentId + ".ofd"); | ||
164 | File savePath = new File("E:\\ECI\\OFD\\" + dateDir); | 163 | File savePath = new File("E:\\ECI\\OFD\\" + dateDir); |
165 | if (!savePath.exists()) { | 164 | if (!savePath.exists()) { |
166 | savePath.mkdirs(); | 165 | savePath.mkdirs(); |
... | @@ -174,8 +173,6 @@ public class EciHttpUtil { | ... | @@ -174,8 +173,6 @@ public class EciHttpUtil { |
174 | byte[] buffer = new byte[4096]; | 173 | byte[] buffer = new byte[4096]; |
175 | int readLength = 0; | 174 | int readLength = 0; |
176 | while ((readLength = in.read(buffer)) != -1) { | 175 | while ((readLength = in.read(buffer)) != -1) { |
177 | // byte[] bytes = new byte[readLength]; | ||
178 | // System.arraycopy(buffer, 0, bytes, 0, readLength); | ||
179 | out.write(buffer, 0, readLength); | 176 | out.write(buffer, 0, readLength); |
180 | } | 177 | } |
181 | absolutePath = filePath.getAbsolutePath(); | 178 | absolutePath = filePath.getAbsolutePath(); |
... | ... |
... | @@ -71,4 +71,10 @@ | ... | @@ -71,4 +71,10 @@ |
71 | SFZH = '1' | 71 | SFZH = '1' |
72 | where BIZ_ID = #{bizId,jdbcType=VARCHAR} | 72 | where BIZ_ID = #{bizId,jdbcType=VARCHAR} |
73 | </update> | 73 | </update> |
74 | |||
75 | <update id="updateHtzt"> | ||
76 | update ELEC_LICENSE_INFO | ||
77 | set HTZT=#{status,jdbcType=VARCHAR} | ||
78 | where CONTRACT_ID = #{contractId,jdbcType=VARCHAR} | ||
79 | </update> | ||
74 | </mapper> | 80 | </mapper> |
... | ... |
... | @@ -9,11 +9,12 @@ | ... | @@ -9,11 +9,12 @@ |
9 | 9 | ||
10 | <!-- 加载配置属性文件 --> | 10 | <!-- 加载配置属性文件 --> |
11 | <context:property-placeholder ignore-unresolvable="true" location="classpath:jeesite.properties" /> | 11 | <context:property-placeholder ignore-unresolvable="true" location="classpath:jeesite.properties" /> |
12 | 12 | ||
13 | <!-- Shiro权限过滤过滤器定义 --> | 13 | <!-- Shiro权限过滤过滤器定义 --> |
14 | <bean name="shiroFilterChainDefinitions" class="java.lang.String"> | 14 | <bean name="shiroFilterChainDefinitions" class="java.lang.String"> |
15 | <constructor-arg> | 15 | <constructor-arg> |
16 | <value> | 16 | <value> |
17 | /signed/received = anon | ||
17 | /static/** = anon | 18 | /static/** = anon |
18 | /userfiles/** = anon | 19 | /userfiles/** = anon |
19 | ${adminPath}/qrcode/QrCodeInterface/** = anon | 20 | ${adminPath}/qrcode/QrCodeInterface/** = anon |
... | @@ -30,7 +31,7 @@ | ... | @@ -30,7 +31,7 @@ |
30 | </value> | 31 | </value> |
31 | </constructor-arg> | 32 | </constructor-arg> |
32 | </bean> | 33 | </bean> |
33 | 34 | ||
34 | <!-- 安全认证过滤器 --> | 35 | <!-- 安全认证过滤器 --> |
35 | <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"> | 36 | <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"> |
36 | <property name="securityManager" ref="securityManager" /> | 37 | <property name="securityManager" ref="securityManager" /> |
... | @@ -48,12 +49,12 @@ | ... | @@ -48,12 +49,12 @@ |
48 | <ref bean="shiroFilterChainDefinitions"/> | 49 | <ref bean="shiroFilterChainDefinitions"/> |
49 | </property> | 50 | </property> |
50 | </bean> | 51 | </bean> |
51 | 52 | ||
52 | <!-- CAS认证过滤器 --> | 53 | <!-- CAS认证过滤器 --> |
53 | <bean id="casFilter" class="org.apache.shiro.cas.CasFilter"> | 54 | <bean id="casFilter" class="org.apache.shiro.cas.CasFilter"> |
54 | <property name="failureUrl" value="${adminPath}/login"/> | 55 | <property name="failureUrl" value="${adminPath}/login"/> |
55 | </bean> | 56 | </bean> |
56 | 57 | ||
57 | <bean id="formAuthenticationFilter" | 58 | <bean id="formAuthenticationFilter" |
58 | class="com.thinkgem.jeesite.modules.sys.security.FormAuthenticationFilter"> | 59 | class="com.thinkgem.jeesite.modules.sys.security.FormAuthenticationFilter"> |
59 | <property name="loginUrl" value="${adminPath}/login" /> | 60 | <property name="loginUrl" value="${adminPath}/login" /> |
... | @@ -63,31 +64,31 @@ | ... | @@ -63,31 +64,31 @@ |
63 | class="com.thinkgem.jeesite.modules.sys.security.FormAuthenticationFiltergty"> | 64 | class="com.thinkgem.jeesite.modules.sys.security.FormAuthenticationFiltergty"> |
64 | <property name="loginUrl" value="${adminPath}/login/sysIndex" /> | 65 | <property name="loginUrl" value="${adminPath}/login/sysIndex" /> |
65 | <property name="successUrl" value="${adminPath}?login" /> | 66 | <property name="successUrl" value="${adminPath}?login" /> |
66 | </bean> | 67 | </bean> |
67 | 68 | ||
68 | <!-- 定义Shiro安全管理配置 --> | 69 | <!-- 定义Shiro安全管理配置 --> |
69 | <bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"> | 70 | <bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"> |
70 | <property name="realm" ref="systemAuthorizingRealm" /> | 71 | <property name="realm" ref="systemAuthorizingRealm" /> |
71 | <property name="sessionManager" ref="sessionManager" /> | 72 | <property name="sessionManager" ref="sessionManager" /> |
72 | <property name="cacheManager" ref="shiroCacheManager" /> | 73 | <property name="cacheManager" ref="shiroCacheManager" /> |
73 | </bean> | 74 | </bean> |
74 | 75 | ||
75 | <!-- 自定义会话管理配置 --> | 76 | <!-- 自定义会话管理配置 --> |
76 | <bean id="sessionManager" class="com.thinkgem.jeesite.common.security.shiro.session.SessionManager"> | 77 | <bean id="sessionManager" class="com.thinkgem.jeesite.common.security.shiro.session.SessionManager"> |
77 | <property name="sessionDAO" ref="sessionDAO"/> | 78 | <property name="sessionDAO" ref="sessionDAO"/> |
78 | 79 | ||
79 | <!-- 会话超时时间,单位:毫秒 --> | 80 | <!-- 会话超时时间,单位:毫秒 --> |
80 | <property name="globalSessionTimeout" value="${session.sessionTimeout}"/> | 81 | <property name="globalSessionTimeout" value="${session.sessionTimeout}"/> |
81 | 82 | ||
82 | <!-- 定时清理失效会话, 清理用户直接关闭浏览器造成的孤立会话 --> | 83 | <!-- 定时清理失效会话, 清理用户直接关闭浏览器造成的孤立会话 --> |
83 | <property name="sessionValidationInterval" value="${session.sessionTimeoutClean}"/> | 84 | <property name="sessionValidationInterval" value="${session.sessionTimeoutClean}"/> |
84 | <!-- <property name="sessionValidationSchedulerEnabled" value="false"/> --> | 85 | <!-- <property name="sessionValidationSchedulerEnabled" value="false"/> --> |
85 | <property name="sessionValidationSchedulerEnabled" value="true"/> | 86 | <property name="sessionValidationSchedulerEnabled" value="true"/> |
86 | 87 | ||
87 | <property name="sessionIdCookie" ref="sessionIdCookie"/> | 88 | <property name="sessionIdCookie" ref="sessionIdCookie"/> |
88 | <property name="sessionIdCookieEnabled" value="true"/> | 89 | <property name="sessionIdCookieEnabled" value="true"/> |
89 | </bean> | 90 | </bean> |
90 | 91 | ||
91 | <!-- 指定本系统SESSIONID, 默认为: JSESSIONID 问题: 与SERVLET容器名冲突, 如JETTY, TOMCAT 等默认JSESSIONID, | 92 | <!-- 指定本系统SESSIONID, 默认为: JSESSIONID 问题: 与SERVLET容器名冲突, 如JETTY, TOMCAT 等默认JSESSIONID, |
92 | 当跳出SHIRO SERVLET时如ERROR-PAGE容器会为JSESSIONID重新分配值导致登录会话丢失! --> | 93 | 当跳出SHIRO SERVLET时如ERROR-PAGE容器会为JSESSIONID重新分配值导致登录会话丢失! --> |
93 | <bean id="sessionIdCookie" class="org.apache.shiro.web.servlet.SimpleCookie"> | 94 | <bean id="sessionIdCookie" class="org.apache.shiro.web.servlet.SimpleCookie"> |
... | @@ -104,16 +105,16 @@ | ... | @@ -104,16 +105,16 @@ |
104 | <property name="activeSessionsCacheName" value="activeSessionsCache" /> | 105 | <property name="activeSessionsCacheName" value="activeSessionsCache" /> |
105 | <property name="cacheManager" ref="shiroCacheManager" /> | 106 | <property name="cacheManager" ref="shiroCacheManager" /> |
106 | </bean> | 107 | </bean> |
107 | 108 | ||
108 | <!-- 定义授权缓存管理器 --> | 109 | <!-- 定义授权缓存管理器 --> |
109 | <!-- <bean id="shiroCacheManager" class="com.thinkgem.jeesite.common.security.shiro.cache.SessionCacheManager" /> --> | 110 | <!-- <bean id="shiroCacheManager" class="com.thinkgem.jeesite.common.security.shiro.cache.SessionCacheManager" /> --> |
110 | <bean id="shiroCacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager"> | 111 | <bean id="shiroCacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager"> |
111 | <property name="cacheManager" ref="cacheManager"/> | 112 | <property name="cacheManager" ref="cacheManager"/> |
112 | </bean> | 113 | </bean> |
113 | 114 | ||
114 | <!-- 保证实现了Shiro内部lifecycle函数的bean执行 --> | 115 | <!-- 保证实现了Shiro内部lifecycle函数的bean执行 --> |
115 | <bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/> | 116 | <bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/> |
116 | 117 | ||
117 | <!-- AOP式方法级权限检查 --> | 118 | <!-- AOP式方法级权限检查 --> |
118 | <bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor"> | 119 | <bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor"> |
119 | <property name="proxyTargetClass" value="true" /> | 120 | <property name="proxyTargetClass" value="true" /> |
... | @@ -121,5 +122,5 @@ | ... | @@ -121,5 +122,5 @@ |
121 | <bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor"> | 122 | <bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor"> |
122 | <property name="securityManager" ref="securityManager"/> | 123 | <property name="securityManager" ref="securityManager"/> |
123 | </bean> | 124 | </bean> |
124 | |||
125 | </beans> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
125 | |||
126 | </beans> | ||
... | ... |
-
Please register or sign in to post a comment