Commit bfb1d5f2 authored by Luochenglong's avatar Luochenglong

电子档案

parent 2a52cf52
......@@ -216,11 +216,6 @@
<artifactId>spring-core</artifactId>
<version>5.3.14</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.3.14</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
......@@ -232,7 +227,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.2</version>
<version>4.2.5</version>
</dependency>
......
package com.hand.att;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.methods.multipart.StringPart;
import org.apache.commons.httpclient.params.HttpMethodParams;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.FileBody;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
......@@ -30,33 +24,8 @@ import java.util.*;
*/
public class HttpPostAttUtil {
public static String httpPostAttImport(String postUrl, String data,String token,String tokentype){
try {
PostMethod postMethod = null;
HttpClient httpClient = new HttpClient();
postMethod = new PostMethod(postUrl) ;
RequestEntity entity = null;
postMethod.setRequestHeader("Content-Type", "application/json") ;
postMethod.setRequestHeader("Authorization", tokentype+" "+token) ;
//参数设置,需要注意的就是里边不能传NULL,要传空字符串
entity = new StringRequestEntity(data, "application/json", "UTF-8");
// 设置请求体信息
postMethod.setRequestEntity(entity);
// 执行POST方法
int response = httpClient.executeMethod(postMethod);
String result = postMethod.getResponseBodyAsString() ;
return result;
} catch (Exception e) {
return "{\n" +
" \"error\": \"interError\",\n" +
" \"message\": \"请求接口失败\",\n" +
" \"path\": \"/oauth/token\"\n" +
"}";
}
}
......@@ -99,7 +68,7 @@ public class HttpPostAttUtil {
}*/
public static String UploadFile(String url, Map<String, String> param, File file, String token, String tokentype ) throws Exception {
HttpClient httpClient = new HttpClient();
/* HttpClient httpClient = new HttpClient();
HttpServletResponse response = null;
PostMethod post = new PostMethod(url);
String resultString = "";
......@@ -125,9 +94,31 @@ public class HttpPostAttUtil {
} finally {
post.releaseConnection();
}
return "";
return "";*/
HttpClient client =null;
String result=null;
try {
HttpPost postMethod = new HttpPost(url);
client = new DefaultHttpClient();
FileBody filebody = new FileBody(file);
MultipartEntity multipartEntity = new MultipartEntity();
multipartEntity.addPart("file", filebody);
multipartEntity.addPart("documentTypeCode",new StringBody(param.get("documentTypeCode")));
multipartEntity.addPart("primaryField", new StringBody(param.get("primaryField")));
multipartEntity.addPart("documentSource", new StringBody(param.get("documentSource")));
multipartEntity.addPart("companyCode", new StringBody(param.get("companyCode")));
postMethod.setEntity(multipartEntity);
HttpResponse response = client.execute(postMethod);
HttpEntity httpEntity = response.getEntity();
result = EntityUtils.toString(httpEntity);
}catch (Exception e){
e.printStackTrace();
}finally {
client.getConnectionManager().shutdown(); // 关闭连接.
return result;
}
}
......
package com.hand.hlcm;
import com.alibaba.fastjson.JSON;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.util.EntityUtils;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HttpPostDocQuery {
public HttpPostDocQuery() {
}
public static String httpPostDocImport(String postUrl, String data, String token, String tokentype) {
HttpClient client = null;
String result = "error";
try {
client = new DefaultHttpClient();
HttpPost post = new HttpPost(postUrl);
//设置超时时间
HttpParams params = client.getParams();
HttpConnectionParams.setConnectionTimeout(params, (int) 10 * 1000);
HttpConnectionParams.setSoTimeout(params, 10 * 1000);
post.setHeader("Content-Type", "application/json");
post.setHeader("Authorization", tokentype + " " + token);
post.setEntity(new StringEntity(data, "UTF-8"));
HttpResponse response = null;
response = client.execute(post);
HttpEntity entity = response.getEntity();
result = EntityUtils.toString(entity, "UTF-8");
EntityUtils.consume(entity); //1. 关闭响应流
if (entity != null) {
InputStream instream = entity.getContent();
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(instream, "UTF-8"));
} catch (Exception e) {
e.printStackTrace();
} finally {
instream.close();
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
client.getConnectionManager().shutdown(); // 关闭连接.
}
return result;
}
public static void main(String[] args) throws Exception {
Map<String, Object> map = new HashMap<>();
map.put("startCreatedDate", "2023-06-20 00:00:00");
map.put("endCreatedDate", "2023-06-21 00:00:00");
List<String> list = new ArrayList<>();
list.add("receiptD");
map.put("documentTypeCodeList", list);
String json = JSON.toJSONString(map);
System.out.println("--------------------" + json);
String response = httpPostDocImport("http://apistage.huilianyi.com/gateway/e-archives/api/open/v1/documents/query?page=1&size=20", json, "6de63d6c-1acd-4b1c-89b8-e91c19442ab9", "Bearer");
System.out.println(response);
}
}
package com.hand.hlcm;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.commons.httpclient.methods.StringRequestEntity;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.util.EntityUtils;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
/**
* description
......@@ -22,7 +23,7 @@ import java.util.Base64;
public class HttpPostUtil {
public static String httpPostGetToken(String postUrl,String appId,String appSecret){
try {
/*try {
PostMethod postMethod = null;
postMethod = new PostMethod(postUrl) ;
postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") ;
......@@ -44,6 +45,32 @@ public class HttpPostUtil {
" \"message\": \"请求接口失败\",\n" +
" \"path\": \"/oauth/token\"\n" +
"}";
}*/
HttpClient client = null;
String result=null;
try {
client = new DefaultHttpClient();
HttpPost post = new HttpPost(postUrl);
//设置超时时间
HttpParams params = client.getParams();
HttpConnectionParams.setConnectionTimeout(params, (int) 10 * 1000);
HttpConnectionParams.setSoTimeout(params, 10 * 1000);
post.setHeader("Content-Type", "application/x-www-form-urlencoded");
post.setHeader("Authorization", "Basic "+ Base64.getUrlEncoder().encodeToString((appId + ":" + appSecret).getBytes()));
//post.setEntity(new StringEntity(data, "UTF-8"));
List<BasicNameValuePair> pairs = new ArrayList<>();
pairs.add(new BasicNameValuePair("grant_type", "client_credentials"));
pairs.add(new BasicNameValuePair("scope", "write"));
post.setEntity(new UrlEncodedFormEntity(pairs, "utf-8"));
HttpResponse response =client.execute(post);
HttpEntity entity = response.getEntity();
result = EntityUtils.toString(entity);
EntityUtils.consume(entity); //1. 关闭响应流
} catch (Exception e) {
e.printStackTrace();
} finally {
client.getConnectionManager().shutdown(); // 关闭连接.
return result;
}
}
......
......@@ -28,6 +28,8 @@
update CSH_TRANSACTION
set confirmed_flag = 'WF_REJECTED'
where transaction_id = ${@transaction_id};
select a.transaction_num into v_transaction_num from CSH_TRANSACTION a where transaction_id = ${@transaction_id};
end if;
end;
]]></bm:update-sql>
......
......@@ -19,6 +19,17 @@
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
csh_deposit_transfer_pkg.create_archives_post_list(
p_user_id =>${/session/@user_id},
p_review_type =>${@review_type},
p_batch_id =>${@batch_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
......
......@@ -6,7 +6,7 @@
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select
......@@ -17,7 +17,7 @@
from sys_code_values_v v
where v.code = 'DATA_CLASSIFICATION'
and v.code_value = t.archive_type) archive_type_desc,
t.func_type,
t.func_type,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'EFILE_FUNC_DESCRIP'
......@@ -31,17 +31,20 @@
from sys_code_values_v v
where v.code = 'DONE_FLAG_STATUS'
and v.code_value = t.done_flag) done_flag_desc,
t.error_message,
to_char(t.last_update_date,'yyyy-mm-dd') last_update_date
t.error_message,
to_char(t.last_update_date,'yyyy-mm-dd') last_update_date,
to_char(t.creation_date,'yyyy-mm-dd') creation_date
from hl_e_archives_post_list t
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="archive_type" queryExpression="t.archive_type like ${@archive_type}"/>
<bm:query-field name="done_flag" queryExpression="t.done_flag=${@done_flag}"/>
<bm:query-field name="document_info" queryExpression="t.document_info like ${@document_info}"/>
</bm:query-fields>
<bm:query-fields>
<bm:query-field name="archive_type" queryExpression="t.archive_type like ${@archive_type}"/>
<bm:query-field name="done_flag" queryExpression="t.done_flag=${@done_flag}"/>
<bm:query-field name="document_info" queryExpression="t.document_info like ${@document_info}"/>
<bm:query-field name="creation_date_from" queryExpression="trunc(t.creation_date) &gt;= to_date(${@creation_date_from},&apos;yyyy-mm-dd hh24:mi:ss&apos;)"/>
<bm:query-field name="creation_date_to" queryExpression="trunc(t.creation_date) &lt;= to_date(${@creation_date_to},&apos;yyyy-mm-dd hh24:mi:ss&apos;)"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="HLS_ARCHIVE_POOL_TMP">
<bm:fields>
<bm:field name="session_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SESSION_ID" prompt="HLS_CCB_MANUAL_DOC_TMP.SESSION_ID"/>
<bm:field name="document_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOCUMENT_ID" prompt="HLS_CCB_MANUAL_DOC_TMP.DOCUMENT_ID"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
BEGIN
INSERT
INTO
hls_archive_pool_tmp
(
session_id,
document_id
)
VALUES
(
${/session/@session_id},
${@document_id},
);
COMMIT;
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
BEGIN
--update by 5390 采用session分批的方式,这里删session需要取整
delete hls_archive_pool_tmp where floor(session_id) = ${/session/@session_id};
commit;
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
efile_pool_job_pkg.job_efile_pool_submit(
${/session/@session_id},
${/session/@user_id},
${/session/@company_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -19,37 +19,36 @@
t1.document_info,
t1.post_status,
t1.e_archives_id,
(SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id) workflow_id,
(SELECT hl.workflow_id FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id) workflow_id,
(SELECT e.je_check_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND e.workflow_id = (SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) je_check_flag,
AND nvl(e.workflow_id,'-1') = nvl((SELECT hl.workflow_id
FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id),'-1')
and nvl(e.func_type,'-1')=nvl((select hl.func_type from hl_e_archives_post_list hl where hl.e_archives_id=t1.e_archives_id),'-1')) je_check_flag,
(SELECT e.post_stru_data_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND nvl(e.workflow_id,'-1') = nvl((SELECT hl.workflow_id
FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id),'-1')
and nvl(e.func_type,'-1')=nvl((select hl.func_type from hl_e_archives_post_list hl where hl.e_archives_id=t1.e_archives_id),'-1')) post_stru_data_flag,
(SELECT e.post_atm_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND nvl(e.workflow_id,'-1') = nvl((SELECT hl.workflow_id
FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id),'-1')
and nvl(e.func_type,'-1')=nvl((select hl.func_type from hl_e_archives_post_list hl where hl.e_archives_id=t1.e_archives_id),'-1')) post_atm_flag,
(SELECT e.base_archive_id
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND e.workflow_id = (SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) base_archive_id,
nvl((SELECT gps.monthly_closed_flag
FROM gld_periods gp,
gld_period_status gps
WHERE REPLACE(gp.period_name,
'-',
'') = t1.internal_period_num
AND gps.company_id = ${ / session / @company_id}
AND gp.internal_period_num = gps.internal_period_num
AND gps.period_set_code = gp.period_set_code),
'N') monthly_closed_flag,
AND nvl(e.workflow_id,'-1') = nvl((SELECT hl.workflow_id
FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id),'-1')
and nvl(e.func_type,'-1')=nvl((select hl.func_type from hl_e_archives_post_list hl where hl.e_archives_id=t1.e_archives_id),'-1')) base_archive_id,
(SELECT c.code_value_name
FROM sys_code_values_v c
WHERE c.code = 'DATA_CLASSIFICATION'
......@@ -58,10 +57,11 @@
FROM sys_code_values_v c
WHERE c.code = 'YES_NO'
AND c.code_value = 'Y') suppl_trans_flag,
t1.hly_req_number AS post_batch_num,
t1.hly_req_number ,
t1.post_message
FROM hl_e_archives_pool t1
where t1.creation_date>=sysdate-30)
where t1.internal_period_num = to_char(ADD_MONTHS(sysdate, -1), 'yyyymm')
AND t1.post_status <>'POST_SUCCESS')
#WHERE_CLAUSE#
]]></bm:query-sql>
......@@ -72,7 +72,6 @@
<bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_ID" />
<bm:field name="je_check_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_CHECK_FLAG"/>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="monthly_closed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MONTHLY_CLOSED_FLAG"/>
<bm:field name="pool_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POOL_ID" />
<bm:field name="primary_field" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRIMARY_ID" />
<bm:field name="internal_period_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INTERNAL_PERIOD_NUM"/>
......
......@@ -19,6 +19,10 @@
t1.document_info,
t1.post_status,
t1.e_archives_id,
(SELECT c.code_value_name
FROM sys_code_values_v c
WHERE c.code = 'POST_STATUS_DESC'
AND c.code_value = t1.post_status) post_status_desc,
(SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
......@@ -40,16 +44,15 @@
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) base_archive_id,
nvl((SELECT gps.monthly_closed_flag
FROM gld_periods gp,
gld_period_status gps
WHERE REPLACE(gp.period_name,
'-',
'') = t1.internal_period_num
AND gps.company_id = ${ / session / @company_id}
AND gp.internal_period_num = gps.internal_period_num
AND gps.period_set_code = gp.period_set_code),
'N') monthly_closed_flag,
nvl( (select 1
from gld_period_status s, gld_periods p
where s.monthly_closed_flag = 'Y'
and s.company_id = ${/session/@company_id}
and s.period_set_code = p.period_set_code
and s.period_name = p.period_name
and p.adjustment_flag = 'N'
and trunc(to_date(t1.internal_period_num,'YYYY-MM')) between
p.start_date and p.end_date),0) monthly_closed_flag,
(SELECT c.code_value_name
FROM sys_code_values_v c
WHERE c.code = 'DATA_CLASSIFICATION'
......@@ -58,7 +61,7 @@
FROM sys_code_values_v c
WHERE c.code = 'YES_NO'
AND c.code_value = nvl(t1.suppl_trans_flag,'N')) suppl_trans_flag_desc,
t1.hly_req_number AS post_batch_num,
t1.hly_req_number,
t1.suppl_trans_flag,
t1.post_message
FROM hl_e_archives_pool t1
......@@ -117,12 +120,14 @@
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="internal_period_num" queryExpression="t1.internal_period_num =${@internal_period_num}"/>
<bm:query-field name="archive_type_desc" queryExpression="t1.archive_type_desc =${@archive_type_desc}"/>
<bm:query-field name="internal_period_num_from" queryExpression="to_number(t1.internal_period_num) &gt;= to_number(${@internal_period_num_from})"/>
<bm:query-field name="internal_period_num_to" queryExpression="to_number(t1.internal_period_num) &lt;= to_number(${@internal_period_num_to})"/>
<bm:query-field name="archive_type" queryExpression="t1.archive_type =${@archive_type}"/>
<bm:query-field name="primary_field" queryExpression="t1.primary_field =${@primary_field}"/>
<bm:query-field name="original_archive_no" queryExpression="t1.original_archive_no =${@original_archive_no}"/>
<bm:query-field name="post_status" queryExpression="t1.post_status =${@post_status}"/>
<bm:query-field name="post_batch_num" queryExpression="t1.post_batch_num =${@post_batch_num}"/>
<bm:query-field name="hly_req_number" queryExpression="t1.hly_req_number =${@hly_req_number}"/>
<bm:query-field name="suppl_trans_flag" queryExpression="t1.suppl_trans_flag =${@suppl_trans_flag}"/>
<bm:query-field name="document_info" queryExpression="t1.document_info like ${@document_info}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 下午3:03:31
$Revision: 1.0
$Purpose:电子档案池bm
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT t1.pool_id,
t1.primary_field,
t1.internal_period_num,
t1.base_archive_code,
t1.archive_type,
t1.document_id,
t1.document_number,
t1.document_info,
t1.post_status,
t1.e_archives_id,
(SELECT zwi.workflow_id FROM zj_wfl_workflow_instance zwi WHERE zwi.instance_id = t1.document_id) workflow_id,
(SELECT e.je_check_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND nvl(e.workflow_id,
'-1') = nvl((SELECT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi
WHERE zwi.instance_id = t1.document_id),
'-1')) je_check_flag,
(SELECT e.post_stru_data_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND nvl(e.workflow_id,
'-1') = nvl((SELECT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi
WHERE zwi.instance_id = t1.document_id),
'-1')) post_stru_data_flag,
(SELECT e.post_atm_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND nvl(e.workflow_id,
'-1') = nvl((SELECT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi
WHERE zwi.instance_id = t1.document_id),
'-1')) post_atm_flag,
(SELECT e.base_archive_id
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND nvl(e.workflow_id,
'-1') = nvl((SELECT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi
WHERE zwi.instance_id = t1.document_id),
'-1')) base_archive_id,
(SELECT c.code_value_name
FROM sys_code_values_v c
WHERE c.code = 'DATA_CLASSIFICATION'
AND c.code_value = t1.archive_type) archive_type_desc,
(SELECT c.code_value_name
FROM sys_code_values_v c
WHERE c.code = 'YES_NO'
AND c.code_value = 'Y') suppl_trans_flag,
t1.hly_req_number ,
t1.post_message
FROM hl_e_archives_pool t1
WHERE to_char(SYSDATE,
'yyyymm') - t1.internal_period_num = 1
AND t1.post_status <>'POST_SUCCESS'
AND t1.pool_id IN
(SELECT tmp.document_id FROM hls_archive_pool_tmp tmp WHERE tmp.session_id = ${@session_id}))
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="e_archives_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="E_ARCHIVES_ID" />
<bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_ID" />
<bm:field name="je_check_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_CHECK_FLAG"/>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="monthly_closed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MONTHLY_CLOSED_FLAG"/>
<bm:field name="pool_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POOL_ID" />
<bm:field name="primary_field" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRIMARY_ID" />
<bm:field name="internal_period_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INTERNAL_PERIOD_NUM"/>
<bm:field name="base_archive_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BASE_ARCHIVE_CODE" />
<bm:field name="archive_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ARCHIVE_TYPE"/>
<bm:field name="document_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOCUMENT_ID"/>
<bm:field name="document_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_NUMBER"/>
<bm:field name="post_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_NUMBER"/>
<bm:field name="document_info" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POST_STATUS"/>
<bm:field name="post_message" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POST_MESSAGE"/>
</bm:fields>
</bm:model>
importClass(Packages.com.hand.attDownload.attDownload);
importPackage(Packages.java.io);
importPackage(Packages.java.util);
//importClass(Packages.leaf.plugin.util.Base64);
function attDownloadUtil(response,filePath,fileName) {
try {
var result = new attDownload().downloadUitl(response,filePath,fileName);
var dl=new com.hand.attDownload.attDownload();
var result = dl.downloadUitl(response,filePath,fileName);
return result;
} catch (e) {
println(e);
return false;
}
}attDownload
\ No newline at end of file
}
\ No newline at end of file
......@@ -98,7 +98,7 @@
params: {
record_id: record_id
},
height: 350,
height: 420,
width: 420
});
}
......@@ -115,7 +115,7 @@
params: {
record_id: record_id
},
height: 350,
height: 420,
width: 420
});
}
......
......@@ -8,50 +8,58 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<a:link id="efile1020_generated_save_link" url="${/request/@context_path}/modules/efile/EFILE1020/efile_generated_save_selected.lsc"/>
<script type="text/javascript"><![CDATA[
function efile1020_query(){
$('archives_pool_list_ds').query();
}
//重置按钮
function efile1020_reset() {
$('archives_post_list_query').reset();
}
<script type="text/javascript"><![CDATA[
function efile1020_query(){
$('archives_pool_list_ds').query();
}
//重置按钮
function efile1020_reset() {
$('archives_post_list_query').reset();
}
function efile1020_generated(){
var datas = [];
var records = $('archives_pool_list_ds').getSelected();
for (var i=0;i<records.length;i++){
var record = records[i];
datas.push(record.data);
}
var param = {};
param['details'] = datas;
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认生成电子档案?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('efile1020_generated_save_link').getUrl(),
para: datas,
success: function (res) {
Leaf.SideBar.show({
msg: '生成成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('archives_pool_list_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, null);
}
function efile1020_generated(){
var datas = [];
var records = $('archives_pool_list_ds').getSelected();
]]></script>
for (var i=0;i<records.length;i++){
if(records[i].get('done_flag') == 'GENERATED'){
Leaf.showMessage('${l:PROMPT}', '已经生成电子档案的数据不能重复生成');
return;
}
}
for (var i=0;i<records.length;i++){
var record = records[i];
datas.push(record.data);
}
var param = {};
param['details'] = datas;
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认生成电子档案?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('efile1020_generated_save_link').getUrl(),
para: datas,
success: function (res) {
Leaf.SideBar.show({
msg: '生成成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('archives_pool_list_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, null);
}
]]></script>
<a:dataSets>
<a:dataSet id="archive_type_ds" lookupCode="DATA_CLASSIFICATION"/>
<a:dataSet id="done_flag_ds" lookupCode="DONE_FLAG_STATUS"/>
......@@ -62,10 +70,12 @@
<a:field name="archive_type_desc" displayField="code_value_name" options="archive_type_ds" returnField="archive_type" valueField="code_value"/>
<a:field name="done_flag"/>
<a:field name="done_flag_desc" displayField="code_value_name" options="done_flag_ds" returnField="done_flag" valueField="code_value"/>
<a:field name="creation_date_from"/>
<a:field name="creation_date_to"/>
</a:fields>
</a:dataSet>
<a:dataSet id="archives_pool_list_ds" autoQuery="true" model="efile.EFILE1020.archives_post_list" queryDataSet="archives_post_list_query" selectable="true">
</a:dataSet>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -73,21 +83,24 @@
<a:gridButton click="efile1020_query" text="HLS.QUERY"/>
<a:gridButton click="efile1020_reset" text="HLS.RESET"/>
<a:gridButton click="efile1020_generated" text="生成电子档案"/>
</a:screenTopToolbar>
<a:form column="4" marginWidth="200" title="查询条件">
<a:comboBox name="archive_type_desc" bindTarget="archives_post_list_query" prompt="资料类型"/>
<a:textField name="document_info" bindTarget="archives_post_list_query" prompt="资料来源"/>
<a:comboBox name="done_flag_desc" bindTarget="archives_post_list_query" prompt="生成状态"/>
</a:screenTopToolbar>
<a:form column="3" marginWidth="200" title="查询条件">
<a:comboBox name="archive_type_desc" bindTarget="archives_post_list_query" prompt="资料类型"/>
<a:textField name="document_info" bindTarget="archives_post_list_query" prompt="资料来源"/>
<a:comboBox name="done_flag_desc" bindTarget="archives_post_list_query" prompt="生成状态"/>
<a:datePicker name="creation_date_from" bindTarget="archives_post_list_query" prompt="创建时间从"/>
<a:datePicker name="creation_date_to" bindTarget="archives_post_list_query" prompt="创建时间到"/>
</a:form>
<a:grid id="archives_pool_list_ds_id" bindTarget="archives_pool_list_ds" marginHeight="200" marginWidth="200" navBar="true">
<a:columns>
<a:column name="archive_type_desc" prompt="资料类型" width="150"/>
<a:column name="document_info" prompt="资料来源" width="500"/>
<a:column name="done_flag_desc" prompt="生成状态" width="100"/>
<a:column name="error_message" prompt="日志" width="150"/>
<a:column name="last_update_date" renderer="Leaf.formatDate" prompt="最后更新时间" width="150"/>
<a:column name="archive_type_desc" prompt="资料类型" width="150"/>
<a:column name="document_info" prompt="资料来源" width="500"/>
<a:column name="done_flag_desc" prompt="生成状态" width="100"/>
<a:column name="error_message" prompt="日志" width="150"/>
<a:column name="creation_date" renderer="Leaf.formatDate" prompt="创建时间" width="150"/>
<a:column name="last_update_date" renderer="Leaf.formatDate" prompt="最后更新时间" width="150"/>
</a:columns>
</a:grid>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="att_downloadUtil.js"><![CDATA[
<s:server-script ><![CDATA[
importPackage(java.util.zip);
importPackage(java.io);
importPackage(java.net);
importPackage(Packages.com.hand.attDownload);
var logger = $logger('server-script');
$ctx["__request_type__"] = 'file';
......@@ -23,7 +24,9 @@
"attachment; filename=\"" + java.net.URLEncoder.encode(filename, "UTF-8"));
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
attDownloadUtil(resp,filepath,filename);
var dl=new com.hand.attDownload.attDownload();
var result = dl.downloadUitl(resp,filepath,filename);
// attDownloadUtil(resp,filepath,filename);
}
]]></s:server-script>
</a:init-procedure>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-delete model="efile.EFILE1030.create_pool_temp" />
<batch-apply sourcePath="/parameter/details">
<a:model-insert model="efile.EFILE1030.create_pool_temp" />
</batch-apply>
<a:model-execute model="efile.EFILE1030.create_pool_temp" />
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -6,35 +6,54 @@
$Purpose:电子档池定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure>
<!-- <a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv" rootPath="user_name_path"/> -->
<a:model-query fetchAll="true" model="efile.EFILE1030.e_archive_pool_batch_query" rootPath="pool_data"/>
</a:init-procedure>
<a:view>
<a:link id="att_link_id" url="${/request/@context_path}/modules/efile/EFILE1030/efile_att_json_lov.lview"/>
<a:link id="post_stru_link_id" url="${/request/@context_path}/modules/efile/EFILE1030/efile_post_stru_json_lov.lview"/>
<a:link id="doc_post_link" url="${/request/@context_path}/modules/efile/EFILE1040/efile_doc_import.svc"/>
<a:link id="doc_post_link" url="${/request/@context_path}/modules/efile/EFILE1040/efile_doc_import.lsc"/>
<a:link id="efile_create_pool_temp_link" url="${/request/@context_path}/modules/efile/EFILE1030/create_pool_temp.lsc"/>
<a:link id="elec_file_save_link" model="efile.EFILE1010.elec_file_type" modelaction="batch_update"/>
<a:link id="elec_file_delete_link" model="efile.EFILE1010.elec_file_type" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
function efile_archive_pool_batch_trans() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('doc_post_link').getUrl(),
para: {
batch_flag :'Y'
},
success: function() {
Leaf.Masker.unmask(Ext.getBody());
Leaf.showMessage('提示','传输成功',function(){
$('efile_archive_pool_ds').query();
var records=$('pool_temp_ds').getAll();
var saveData = [];
var param = {};
Leaf.showConfirm('${l:PROMPT}', '是否确定批量传输?', function() {
var detail_mask = Ext.getBody();
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
for (var i = 0;i < records.length;i++) {
var record = records[i];
saveData.push({
'document_id': record.get('pool_id'),
'_status': 'insert'
});
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
}
param['details'] = saveData;
Leaf.request({
url: $('efile_create_pool_temp_link').getUrl(),
para: param,
success: function() {
Leaf.Masker.unmask(detail_mask);
Leaf.showMessage('提示','传输成功',function(){
$('efile_archive_pool_ds').query();
});
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
});
}
......@@ -46,10 +65,14 @@
return;
}
for (var i = 0; i < record.length; i++) {
if(record[i].get('monthly_closed_flag')=='N'){
if(record[i].get('monthly_closed_flag')=='0'){
Leaf.showMessage('提示','资料期间对应的会计期间必须是关账状态!');
return;
}
if(record[i].get('post_status')=='POST_SUCCESS'){
Leaf.showMessage('提示','已传输成功不可重复传输!');
return;
}
}
var records = new Array();
......@@ -82,8 +105,7 @@
}
function efile_archive_pool_reset() {
$('for_query_ds').reset();
}
function efile_archive_pool_query() {
......@@ -91,9 +113,10 @@
}
function att_update_renderer(value, record, name) {
if(name=='att'){
return '<a href="javascript:efile_archive_att_list(\'' + record.get('pool_id') + '\')">附件</a>';
}
if(name=='att'){
return '<a href="javascript:efile_archive_att_list(\'' + record.get('pool_id') + '\')">附件</a>';
}
if(name=='post_stru_data'){
return '<a href="javascript:efile_archive_post_stru_data_list(\'' + record.get('pool_id') + '\')">结构化数据</a>';
}
......@@ -109,9 +132,9 @@
id: 'att_id_winid',
url: url,
params: {
record_id: record_id
pool_id: record_id
},
height: 200,
height: 480,
width: 1100
});
}
......@@ -126,7 +149,7 @@
id: 'post_stru_id_winid',
url: url,
params: {
record_id: record_id
pool_id: record_id
},
height: 550,
width: 800
......@@ -140,13 +163,18 @@
}
]]></script>
<a:dataSets>
<a:dataSet id="pool_temp_ds">
<a:datas dataSource="/model/pool_data"/>
</a:dataSet>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="data_cf_ds" lookupCode="DATA_CLASSIFICATION"/>
<a:dataSet id="post_status_ds" lookupCode="POST_STATUS_DESC"/>
<a:dataSet id="for_query_ds" autoCreate="true">
<a:fields>
<a:field name="internal_period_num_from" />
<a:field name="internal_period_num_to" />
<a:field name="internal_period_num" />
<a:field name="post_batch_num" />
<a:field name="hly_req_number" />
<a:field name="primary_field" />
<a:field name="document_info" />
<a:field name="post_status" />
......@@ -161,6 +189,7 @@
<a:fields>
<a:field name="monthly_closed_flag" />
<a:field name="post_message" readOnly="true" />
<a:field name="post_status_desc" displayField="code_value_name" options="post_status_ds" returnField="post_status" valueField="code_value"/>
</a:fields>
</a:dataSet>
</a:dataSets>
......@@ -173,13 +202,14 @@
<a:gridButton click="efile_archive_pool_manual_trans" text="手动传输"/>
</a:screenTopToolbar>
<a:form column="4" marginWidth="30" title="查询条件">
<a:textField name="internal_period_num" bindTarget="for_query_ds" prompt="资料期间"/>
<a:textField name="internal_period_num_from" bindTarget="for_query_ds" prompt="资料期间从"/>
<a:textField name="internal_period_num_to" bindTarget="for_query_ds" prompt="资料期间到"/>
<a:comboBox name="archive_type_desc" bindTarget="for_query_ds" prompt="资料类型"/>
<a:textField name="primary_field" bindTarget="for_query_ds" prompt="主键"/>
<a:comboBox name="suppl_trans_flag_desc" bindTarget="for_query_ds" prompt="是否补传"/>
<a:textField name="document_info" bindTarget="for_query_ds" prompt="原始资料号"/>
<a:comboBox name="post_status_desc" bindTarget="for_query_ds" prompt="传输状态"/>
<a:textField name="post_batch_num" bindTarget="for_query_ds" prompt="传输批次号"/>
<a:textField name="hly_req_number" bindTarget="for_query_ds" prompt="传输批次号"/>
</a:form>
<a:grid id="efile_archive_pool_ds_id" bindTarget="efile_archive_pool_ds" marginHeight="200" marginWidth="30" navBar="true">
<a:columns>
......@@ -190,9 +220,9 @@
<a:column name="post_stru_data" prompt="结构化数据" renderer="att_update_renderer" width="110"/>
<a:column name="att" align="center" prompt="附件" renderer="att_update_renderer"/>
<a:column name="suppl_trans_flag_desc" align="center" width="120" prompt="是否补传"/>
<a:column name="post_status" align="center" width="120" prompt="传输状态"/>
<a:column name="post_message" align="center" editor="textarea_id" width="180" prompt="传输结果"/>
<a:column name="post_batch_num" align="center" width="120" prompt="传输批次号"/>
<a:column name="post_status_desc" align="center" width="120" prompt="传输状态"/>
<a:column name="post_message" align="center" editor="textarea_id" width="180" prompt="传输结果"/>
<a:column name="hly_req_number" align="center" width="120" prompt="传输批次号"/>
</a:columns>
<a:editors>
<a:textField id="text_ed"/>
......
......@@ -9,7 +9,7 @@
<a:init-procedure>
<s:server-script><![CDATA[
function newMap(name) {
return new CompositeMap("a", 'http://www.aurora-framework.org/application',
return new CompositeMap("a", 'http://www.leaf-framework.org/application',
name);
}
var para = $ctx.current_parameter || $ctx.parameter;
......@@ -93,7 +93,7 @@
<a:screenBody>
<a:grid id="att_para_ds_id" bindTarget="att_json_ds" height="180" width="1050" navBar="true">
<a:columns>
<a:column name="action_type" prompt="附件类型" width="150"/>
<a:column name="archive_type_desc" prompt="附件类型" width="150"/>
<a:column name="code_value" prompt="附件地址" width="650"/>
<a:column name="code_value_name" prompt="附件名称" width="250"/>
</a:columns>
......
......@@ -9,7 +9,7 @@
<a:init-procedure>
<s:server-script><![CDATA[
function newMap(name) {
return new CompositeMap("a", 'http://www.aurora-framework.org/application',
return new CompositeMap("a", 'http://www.leaf-framework.org/application',
name);
}
var para = $ctx.current_parameter || $ctx.parameter;
......@@ -29,12 +29,12 @@
}else{
obj='';
}
var config = $config();
var config = $config();
var dataSets = CompositeUtil.findChild(config, 'dataSets');
var dataSet = CompositeUtil.findChild(dataSets, 'dataSet', 'id', dataSet_id);
if (!dataSet) {
dataSet = newMap("dataSet");
dataSet.id = dataSet_id;
dataSet.id = 'post_stur_json_ds';
dataSet.autocreate = 'true';
dataSets.addChild(dataSet.getData());
var datas = newMap("datas");
......@@ -76,11 +76,14 @@
<a:dataSets >
</a:dataSets>
<a:screenBody>
<a:grid id="post_stru_para_ds_id" bindTarget="post_stur_json_ds" marginHeight="480" width="740" navBar="true">
<a:grid id="post_stru_para_ds_id" bindTarget="post_stur_json_ds" height="480" width="740" navBar="true">
<a:columns>
<a:column name="code_value" prompt="字段代码" width="150"/>
<a:column name="code_value_name" prompt="值内容" width="589"/>
<a:column name="code_value_name" editor="textarea1_id" prompt="值内容" width="589" />
</a:columns>
<a:editors>
<a:textArea id="textarea1_id"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
......
......@@ -2,7 +2,7 @@
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="con_print_path.js"><![CDATA[
set_parameter_file_path();
set_pdf_parameter_file_path();
]]></s:server-script>
<s:server-script><![CDATA[
importPackage(java.io);
......@@ -65,6 +65,7 @@
} catch (e) {
raise_app_error(e);
}
logger.info(to_file_path.toString());
word_to_pdf_sign(record_data.content_id,to_file_path.toString());
//得到生成的pdf文件的大小
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment