ae02bd21 by 荆蔚杰

电子证照回调接口

1 parent 8f78e57c
package com.thinkgem.jeesite.modules.eci.Controller;
import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@Controller
@ResponseBody
@RequestMapping("signed")
public class ContractStatusController {
private static Logger logger = LoggerFactory.getLogger(ContractStatusController.class);
@Autowired
ElecLicenseInfoDao licenseInfoDao;
@RequestMapping(method = RequestMethod.POST, value = "/received")
public void received(@RequestParam("contractId") String contractId,
@RequestParam(value = "tenantId", required = false) String tenantId,
@RequestParam(value = "tenantName", required = false) String tenantName,
@RequestParam(value = "sn", required = false) String sn,
@RequestParam("status") String status,
@RequestParam(value = "type", required = false) String type,
@RequestParam(value = "contact", required = false) String contact,
@RequestParam(value = "operatorName", required = false) String operatorName,
@RequestParam(value = "operatorMobile", required = false) String operatorMobile,
@RequestParam(value = "operatorNumber", required = false) String operatorNumber,
@RequestParam(value = "receiverNumber", required = false) String receiverNumber) {
logger.info("contractId=" + contractId, "status=" + status);
licenseInfoDao.updateHtzt(contractId, status);
}
}
......@@ -70,5 +70,19 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> {
List<ElecLicenseInfo> selectZsbs(@Param("zsbs") String zsbs);
/**
* 更新转换后图片路径和状态
* @param jpgPath 图片路径
* @param bizId
* @return
*/
Integer updateJpgWjdzAndStatus(@Param("jpgPath") String jpgPath, @Param("bizId") String bizId);
/**
* 更新合同用印状态
* @param contractId
* @param status
* @return
*/
Integer updateHtzt(@Param("contractId") String contractId, @Param("status") String status);
}
......
package com.thinkgem.jeesite.modules.eci.entity;
import org.apache.poi.ss.formula.functions.T;
import java.io.Serializable;
import java.util.List;
/**
* 创建合同请求实体
*/
public class CreateContractRequest {
public class CreateContractRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
......
......@@ -160,7 +160,6 @@ public class EciHttpUtil {
if (length > 0) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dddd");
String dateDir = simpleDateFormat.format(new Date());
// File file = new File("E:\\ECI\\OFD\\" + dateDir + "\\" + documentId + ".ofd");
File savePath = new File("E:\\ECI\\OFD\\" + dateDir);
if (!savePath.exists()) {
savePath.mkdirs();
......@@ -174,8 +173,6 @@ public class EciHttpUtil {
byte[] buffer = new byte[4096];
int readLength = 0;
while ((readLength = in.read(buffer)) != -1) {
// byte[] bytes = new byte[readLength];
// System.arraycopy(buffer, 0, bytes, 0, readLength);
out.write(buffer, 0, readLength);
}
absolutePath = filePath.getAbsolutePath();
......
......@@ -71,4 +71,10 @@
SFZH = '1'
where BIZ_ID = #{bizId,jdbcType=VARCHAR}
</update>
<update id="updateHtzt">
update ELEC_LICENSE_INFO
set HTZT=#{status,jdbcType=VARCHAR}
where CONTRACT_ID = #{contractId,jdbcType=VARCHAR}
</update>
</mapper>
......
......@@ -9,11 +9,12 @@
<!-- 加载配置属性文件 -->
<context:property-placeholder ignore-unresolvable="true" location="classpath:jeesite.properties" />
<!-- Shiro权限过滤过滤器定义 -->
<bean name="shiroFilterChainDefinitions" class="java.lang.String">
<constructor-arg>
<value>
/signed/received = anon
/static/** = anon
/userfiles/** = anon
${adminPath}/qrcode/QrCodeInterface/** = anon
......@@ -30,7 +31,7 @@
</value>
</constructor-arg>
</bean>
<!-- 安全认证过滤器 -->
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
......@@ -48,12 +49,12 @@
<ref bean="shiroFilterChainDefinitions"/>
</property>
</bean>
<!-- CAS认证过滤器 -->
<bean id="casFilter" class="org.apache.shiro.cas.CasFilter">
<!-- CAS认证过滤器 -->
<bean id="casFilter" class="org.apache.shiro.cas.CasFilter">
<property name="failureUrl" value="${adminPath}/login"/>
</bean>
<bean id="formAuthenticationFilter"
class="com.thinkgem.jeesite.modules.sys.security.FormAuthenticationFilter">
<property name="loginUrl" value="${adminPath}/login" />
......@@ -63,31 +64,31 @@
class="com.thinkgem.jeesite.modules.sys.security.FormAuthenticationFiltergty">
<property name="loginUrl" value="${adminPath}/login/sysIndex" />
<property name="successUrl" value="${adminPath}?login" />
</bean>
</bean>
<!-- 定义Shiro安全管理配置 -->
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="systemAuthorizingRealm" />
<property name="sessionManager" ref="sessionManager" />
<property name="cacheManager" ref="shiroCacheManager" />
</bean>
<!-- 自定义会话管理配置 -->
<bean id="sessionManager" class="com.thinkgem.jeesite.common.security.shiro.session.SessionManager">
<bean id="sessionManager" class="com.thinkgem.jeesite.common.security.shiro.session.SessionManager">
<property name="sessionDAO" ref="sessionDAO"/>
<!-- 会话超时时间,单位:毫秒 -->
<property name="globalSessionTimeout" value="${session.sessionTimeout}"/>
<!-- 定时清理失效会话, 清理用户直接关闭浏览器造成的孤立会话 -->
<property name="sessionValidationInterval" value="${session.sessionTimeoutClean}"/>
<!-- <property name="sessionValidationSchedulerEnabled" value="false"/> -->
<property name="sessionValidationSchedulerEnabled" value="true"/>
<property name="sessionIdCookie" ref="sessionIdCookie"/>
<property name="sessionIdCookieEnabled" value="true"/>
</bean>
<!-- 指定本系统SESSIONID, 默认为: JSESSIONID 问题: 与SERVLET容器名冲突, 如JETTY, TOMCAT 等默认JSESSIONID,
当跳出SHIRO SERVLET时如ERROR-PAGE容器会为JSESSIONID重新分配值导致登录会话丢失! -->
<bean id="sessionIdCookie" class="org.apache.shiro.web.servlet.SimpleCookie">
......@@ -104,16 +105,16 @@
<property name="activeSessionsCacheName" value="activeSessionsCache" />
<property name="cacheManager" ref="shiroCacheManager" />
</bean>
<!-- 定义授权缓存管理器 -->
<!-- <bean id="shiroCacheManager" class="com.thinkgem.jeesite.common.security.shiro.cache.SessionCacheManager" /> -->
<bean id="shiroCacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager">
<property name="cacheManager" ref="cacheManager"/>
</bean>
<!-- 保证实现了Shiro内部lifecycle函数的bean执行 -->
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>
<!-- AOP式方法级权限检查 -->
<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor">
<property name="proxyTargetClass" value="true" />
......@@ -121,5 +122,5 @@
<bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
<property name="securityManager" ref="securityManager"/>
</bean>
</beans>
\ No newline at end of file
</beans>
......