Commit 1cd37a91 authored by panhong18943's avatar panhong18943

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into develop

parents d0adfad2 601509ba
......@@ -216,6 +216,47 @@
<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>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>2.0.23</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.5</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<finalName>hlcm</finalName>
......
......@@ -25,6 +25,12 @@ values ('CONTRACT', 'CON_CONTRACT_CCR_Q_LV', 'VIEW', -1, sysdate, -1, sysdate);
insert into HLS_DOC_CATEGORY_DB_OBJECT (DOCUMENT_CATEGORY, OBJECT_NAME, OBJECT_TYPE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE)
values ('CONTRACT', 'con_contract_history_lv', 'VIEW', -1, sysdate, -1, sysdate);
insert into HLS_DOC_CATEGORY_DB_OBJECT (DOCUMENT_CATEGORY, OBJECT_NAME, OBJECT_TYPE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE)
values ('CONTRACT', 'con_contract_con733_lv', 'VIEW', -1, sysdate, -1, sysdate);
insert into HLS_DOC_CATEGORY_DB_OBJECT (DOCUMENT_CATEGORY, OBJECT_NAME, OBJECT_TYPE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE)
values ('CONTRACT', 'CON_CONTRACT_LEASE_ITEM_CCR_LV', 'VIEW', -1, sysdate, -1, sysdate);
end;
/
commit;
......
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool REGISTER_ACP522.log
set feedback off
set define off
begin
--页面注册
sys_function_assign_pkg.service_load('modules/cont/CON731/hls_before_sign_change_detail.lview','签约前合同变更',1,1,0);
--功能定义
--分配页面
sys_function_assign_pkg.func_service_load('CON733','modules/cont/CON731/hls_before_sign_change_detail.lview');
sys_function_assign_pkg.func_service_load('CON736','modules/cont/CON731/hls_before_sign_change_detail.lview');
sys_function_assign_pkg.func_service_load('ZJWFL5110','modules/cont/CON731/hls_before_sign_change_detail.lview');
sys_function_assign_pkg.func_service_load('CON733','modules/hls/HLS500N/hls_fin_calculator_update_n.lview');
sys_function_assign_pkg.func_service_load('CON736','modules/hls/HLS500N/hls_fin_calculator_update_n.lview');
sys_function_assign_pkg.func_service_load('ZJWFL5110','modules/hls/HLS500N/hls_fin_calculator_update_n.lview');
--分配bm
sys_function_assign_pkg.func_bm_load('CON733','check_after_save_bm.check_change_con_lease_item');
sys_function_assign_pkg.func_bm_load('CON736','check_after_save_bm.check_change_con_lease_item');
sys_function_assign_pkg.func_bm_load('ZJWFL5110','check_after_save_bm.check_change_con_lease_item');
end;
/
commit;
set feedback on
set define on
spool off
exit
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.MultipartRequestEntity;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.web.client.RestTemplate;
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
/**
* description
*
* @author Administrator 2023/01/03 15:07
*/
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" +
"}";
}
}
public static String UploadFile(String url, Map<String, String> param, File file, String token, String tokentype ) throws Exception {
try {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append( url)
.append("?");
int i=1;
Set<Map.Entry<String, String>> set = param.entrySet();
Iterator<Map.Entry<String, String>> it = set.iterator();
while (it.hasNext()) {
Map.Entry<String, String> entry = (Map.Entry<String, String>) it.next();
if(i==1){
stringBuffer.append(entry.getKey()+"="+entry.getValue());
i++;
}else{
stringBuffer.append("&"+entry.getKey()+"="+entry.getValue());
}
}
String post_url = stringBuffer.toString();
System.out.println(post_url);
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(post_url);
MultipartEntityBuilder builder=MultipartEntityBuilder.create();
builder.addBinaryBody("file",file);
HttpEntity httpEntity=(HttpEntity)builder.build();
httpPost.setHeader("Authorization", tokentype+" "+token);
httpPost.setEntity(httpEntity);//设置请求参数
HttpResponse response = httpClient.execute(httpPost);
HttpEntity responseEntity = response.getEntity();
String result = EntityUtils.toString(responseEntity, java.nio.charset.Charset.forName("UTF-8"));
return result;
} catch (Exception ex) {
return ex.getMessage() ;
}
}
public static void main(String[] args) throws Exception {
//String resPonse=httpPostAttImport("http://apistage.huilianyi.com/gateway/e-archives/api/open/v1/import/document","[{\"companyCode\":\"0001\",\"particularYear\":\"2022\",\"documentTypeCode\":\"DT002002\",\"originalNumber\":\"1234567890\",\"primaryField\":\"SAP_TEST0000001\",\"isPaper\":\"true\",\"documentSource\":\"SAP\",\"attachmentList\":[{\"fileURL\":\"https://gss0.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/314e251f95cad1c8ea88af74793e6709c93d51b5.jpg\",\"fileName\":\"314e251f95cad1c8ea88af74793e6709c93d51b5.jpg\",\"attachmentOID\":\"\"},{\"fileURL\":\"https://gss0.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/314e251f95cad1c8ea88af74793e6709c93d51b5.jpg\",\"fileName\":\"314e251f95cad1c8ea88af74793e6709c93d51b5.jpg\",\"attachmentOID\":\"\",\"attachTypeCode\":\"0\"}],\"ruleOID\":\"684fb42f-1df4-4710-8ac7-ea0146786a05\",\"securityLevelCode\":\"CONFIDENTIAL\",\"fieldValueList\":[{\"fieldCode\":\"AMOUNT\",\"value\":\"13\"},{\"fieldCode\":\"COMPANY\",\"value\":\"阳光照明\"},{\"fieldCode\":\"DOC_NAME\",\"value\":\"日常报销单\"},{\"fieldCode\":\"CURRENCY\",\"value\":\"CNY\"},{\"fieldCode\":\"CREATED_DATE\",\"value\":\"2021-01-01 12:00:00\"},{\"fieldCode\":\"CREATION_NAME\",\"value\":\"张三\"},{\"fieldCode\":\"REMARK\",\"value\":\"去年的报销\"}]}]","4557fa35-d2da-479a-be68-323b6be619d9","Bearer");
File file=new File("D:\\aurora_reference.pdf");
HashMap mmp = new HashMap();
mmp.put("documentTypeCode", "workflow_QC01");
mmp.put("primaryField", "CF-4252CE7A665C4562BF8E8AC3AD79BF1D");
mmp.put("documentSource", "CF");
mmp.put("companyCode", "HL");
//String resPonse1=doPostFile1("http://apistage.huilianyi.com/gateway/e-archives/api/open/v1/attachment/upload",mmp,file,"4557fa35-d2da-479a-be68-323b6be619d9","Bearer");
String resPonse2=UploadFile("http://apistage.huilianyi.com/gateway/e-archives/api/open/v1/attachment/upload",mmp,file,"4557fa35-d2da-479a-be68-323b6be619d9","Bearer");
System.out.println(resPonse2);
}
}
package com.hand.attDownload;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
public class attDownload {
public static void downloadFile(HttpServletRequest request, HttpServletResponse response,String filePath,String fileName)
throws IOException {
// 本地文件地址,文件名称,我是在本机运行,如果是服务器的话,地址可能是 ../fileServer/file/deploy2.sh
// String filePath = "D:\\project\\hl_leasing\\file\\2023\\02\\8DAA574FA8714BE9B22B861A6F55AE01";
// String fileName = "8DAA574FA8714BE9B22B861A6F55AE01";
// 获取浏览器的信息
String agent = request.getHeader("USER-AGENT");
if (agent != null && agent.toLowerCase().indexOf("FIRE_FOX") > 0) {
//火狐浏览器自己会对URL进行一次URL转码所以区别处理
response.setHeader("Content-Disposition",
"attachment; filename=" + new String(fileName.getBytes("GB2312"), "ISO-8859-1"));
} else if (agent.toLowerCase().indexOf("SAFARI") > 0) {
//苹果浏览器需要用ISO 而且文件名得用UTF-8
response.setHeader("Content-Disposition",
"attachment; filename=" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1"));
} else {
//其他的浏览器
response.setHeader("Content-Disposition",
"attachment; filename=\"" + java.net.URLEncoder.encode(fileName, "UTF-8"));
}
response.setContentType("charset=utf-8");
String result = "{\"statusCode\":\"00000\",\"message\":\"success\"}";
// 返回数据
response.getWriter().print(result);
File file = new File(filePath);
FileInputStream fileInputStream = new FileInputStream(file);
byte[] fileByte = new byte[(int) file.length()];
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] bytes = new byte[1024];
int len;
while ((len = fileInputStream.read(bytes, 0, bytes.length)) != -1) {
byteArrayOutputStream.write(bytes, 0, len);
}
byteArrayOutputStream.close();
fileByte = byteArrayOutputStream.toByteArray();
OutputStream outputStream = null;
outputStream = response.getOutputStream();
outputStream.write(fileByte);
outputStream.flush();
outputStream.close();
}
public static void downloadUitl(HttpServletResponse response,String filePath,String fileName)
throws IOException {
// 本地文件地址,文件名称,我是在本机运行,如果是服务器的话,地址可能是 ../fileServer/file/deploy2.sh
// String filePath = "D:\\project\\hl_leasing\\file\\2023\\02\\8DAA574FA8714BE9B22B861A6F55AE01";
// String fileName = "8DAA574FA8714BE9B22B861A6F55AE01";
File file = new File(filePath);
FileInputStream fileInputStream = new FileInputStream(file);
byte[] fileByte = new byte[(int) file.length()];
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] bytes = new byte[1024];
int len;
while ((len = fileInputStream.read(bytes, 0, bytes.length)) != -1) {
byteArrayOutputStream.write(bytes, 0, len);
}
byteArrayOutputStream.close();
fileByte = byteArrayOutputStream.toByteArray();
OutputStream outputStream = null;
outputStream = response.getOutputStream();
outputStream.write(fileByte);
outputStream.flush();
outputStream.close();
}
public static void main(String[] args) throws Exception {
File file=new File("D:\\aurora_reference.pdf");
String filePath = "D:\\project\\hl_leasing\\file\\2023\\02\\8DAA574FA8714BE9B22B861A6F55AE01";
String fileName = "8DAA574FA8714BE9B22B861A6F55AE01";
}
}
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.hand.hl;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
public class DoloadFileByUrl {
public DoloadFileByUrl() {
}
public static void main(String[] args) {}
public static Boolean downloadFile(String urlPath, String downloadDir, String fileName) {
File file = null;
BufferedInputStream bin = null;
OutputStream out = null;
Boolean flag = true;
try {
String path = downloadDir + File.separatorChar + fileName;
int len = 0;
byte[] buf = new byte[1024];
int size;
URL url = new URL(urlPath);
URLConnection urlConnection = url.openConnection();
HttpURLConnection httpURLConnection = (HttpURLConnection) urlConnection;
httpURLConnection.setRequestMethod("GET");
httpURLConnection.setRequestProperty("Charset", "UTF-8");
httpURLConnection.connect();
int fileLength = httpURLConnection.getContentLength();
URLConnection con = url.openConnection();
bin = new BufferedInputStream(httpURLConnection.getInputStream());
file = new File(path);
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
out = new FileOutputStream(file);
while ((size = bin.read(buf)) != -1) {
len += size;
out.write(buf, 0, size);
}
} catch (MalformedURLException var15) {
var15.printStackTrace();
flag = false;
} catch (IOException var16) {
var16.printStackTrace();
flag = false;
} finally {
try {
if (bin != null) {
bin.close();
}
if (out != null) {
out.close();
}
} catch (IOException e) {
e.printStackTrace();
flag = false;
}
}
return flag;
}
}
package com.hand.hl;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.commons.httpclient.methods.StringRequestEntity;
/**
* description
*
* @author lcl 2023/02/15 15:07
*/
public class HttpPostUtilNew {
public HttpPostUtilNew() {
}
public static String httpPostDocImport(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);
entity = new StringRequestEntity(data, "application/json", "UTF-8");
postMethod.setRequestEntity(entity);
System.out.println(data);
httpClient.executeMethod(postMethod);
String result = postMethod.getResponseBodyAsString();
return result;
} catch (Exception var9) {
return "{\n \"error\": \"interError\",\n \"message\": \"请求接口失败\",\n \"path\": \"/oauth/token\"\n}";
}
}
public static void main(String[] args) throws Exception {
String resPonse = httpPostDocImport("http://apistage.huilianyi.com/gateway/e-archives/api/open/v1/import/document", "[{\"companyCode\":\"0001\",\"particularYear\":\"2022\",\"documentTypeCode\":\"DT002002\",\"originalNumber\":\"1234567890\",\"primaryField\":\"SAP_TEST0000001\",\"isPaper\":\"true\",\"documentSource\":\"SAP\",\"attachmentList\":[{\"fileURL\":\"https://gss0.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/314e251f95cad1c8ea88af74793e6709c93d51b5.jpg\",\"fileName\":\"314e251f95cad1c8ea88af74793e6709c93d51b5.jpg\",\"attachmentOID\":\"\"},{\"fileURL\":\"https://gss0.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/314e251f95cad1c8ea88af74793e6709c93d51b5.jpg\",\"fileName\":\"314e251f95cad1c8ea88af74793e6709c93d51b5.jpg\",\"attachmentOID\":\"\",\"attachTypeCode\":\"0\"}],\"ruleOID\":\"684fb42f-1df4-4710-8ac7-ea0146786a05\",\"securityLevelCode\":\"CONFIDENTIAL\",\"fieldValueList\":[{\"fieldCode\":\"AMOUNT\",\"value\":\"13\"},{\"fieldCode\":\"COMPANY\",\"value\":\"阳光照明\"},{\"fieldCode\":\"DOC_NAME\",\"value\":\"日常报销单\"},{\"fieldCode\":\"CURRENCY\",\"value\":\"CNY\"},{\"fieldCode\":\"CREATED_DATE\",\"value\":\"2021-01-01 12:00:00\"},{\"fieldCode\":\"CREATION_NAME\",\"value\":\"张三\"},{\"fieldCode\":\"REMARK\",\"value\":\"去年的报销\"}]}]", "4557fa35-d2da-479a-be68-323b6be619d9", "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 java.util.Base64;
/**
* description
*
* @author Administrator 2023/01/03 15:07
*/
public class HttpPostUtil {
public static String httpPostGetToken(String postUrl,String appId,String appSecret){
try {
PostMethod postMethod = null;
postMethod = new PostMethod(postUrl) ;
postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") ;
postMethod.setRequestHeader("Authorization", "Basic "+ Base64.getUrlEncoder().encodeToString((appId + ":" + appSecret).getBytes())) ;
//参数设置,需要注意的就是里边不能传NULL,要传空字符串
NameValuePair[] data = {
new NameValuePair("grant_type","client_credentials"),
new NameValuePair("scope","write")
};
postMethod.setRequestBody(data);
HttpClient httpClient = new HttpClient();
// 执行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" +
"}";
}
}
public static void main(String[] args) throws Exception {
String resPonse=httpPostGetToken("http://apistage.huilianyi.com/gateway/oauth/token","a92074ce-ff45-409e-8ff9-3516415d8f82","NTY4ZmUyY2QtOTc3YS00MTU0LWIxNTEtYmZiNjQ5M2ZjYjY0");
System.out.println(resPonse);
}
}
......@@ -107,9 +107,11 @@ public class WordToPdf {
*
* @param inFilePath
* @param outFilePath
* @param fitToPagesTall 所有行为一页
* @param fitToPagesWide 所有列为一页
* @return
*/
public static boolean excel2pdf(String inFilePath, String outFilePath) {
public static boolean excel2pdf(String inFilePath, String outFilePath,Object fitToPagesTall,Object fitToPagesWide) {
ActiveXComponent activeXComponent = new ActiveXComponent("Excel.Application");
activeXComponent.setProperty("Visible", false);
......@@ -117,6 +119,13 @@ public class WordToPdf {
Dispatch excels = activeXComponent.getProperty("Workbooks").toDispatch();
Dispatch excel = Dispatch.call(excels, "Open", inFilePath, false, true).toDispatch();
Dispatch currentSheet = Dispatch.get((Dispatch) excel,
"ActiveSheet").toDispatch();
Dispatch pageSetup = Dispatch.get(currentSheet, "PageSetup")
.toDispatch();
//Dispatch.put(pageSetup, "Zoom", 50);
Dispatch.put(pageSetup, "FitToPagesTall", fitToPagesTall);
Dispatch.put(pageSetup, "FitToPagesWide", fitToPagesWide);
Dispatch.call(excel, "ExportAsFixedFormat", 0, outFilePath);
Dispatch.call(excel, "Close", false);
activeXComponent.invoke("Quit");
......@@ -144,6 +153,7 @@ public class WordToPdf {
Dispatch pageSetup = Dispatch.get(currentSheet, "PageSetup")
.toDispatch();
Dispatch.put(pageSetup, "Orientation", new Variant(2));
//设置缩放,值为100或false
Dispatch.call(excel, "ExportAsFixedFormat", 0, outFilePath);
Dispatch.call(excel, "Close", false);
......@@ -175,14 +185,13 @@ public class WordToPdf {
public static void main(String[] args) throws Exception {
// String jacobDllPath = "D:\\ideaProjects\\leaf-hlcm\\src\\main\\webapp\\WEB-INF\\server-script\\jacob\\jacob-1.18-x64.dll";
// System.setProperty("jacob.dll.path", jacobDllPath);
// System.setProperty("com.jacob.debug", "true");
String jacobDllPath = "E:\\idea_workspace\\leaf-hlcm\\src\\main\\webapp\\WEB-INF\\server-script\\jacob\\jacob-1.19-x64.dll";
System.setProperty("jacob.dll.path", jacobDllPath);
System.setProperty("com.jacob.debug", "true");
// word2pdf("D:\\u01\\hls_file\\excel\\8F5D12B0B1504518928FDD193C67A0A5con28168",
// "D:\\hand-Prpjects\\融资租赁合同文本-4pdf.pdf");
// cutPdf("D:\\\\hand-Prpjects\\\\付款请求书打印.pdf");
// excel2pdf("D:\\work\\leafProjects\\YondaTl\\src\\test.xlsx",
// "D:\\work\\leafProjects\\YondaTl\\src\\付款通知书NEW.pdf");
excel2pdf("C:\\Users\\Administrator\\Desktop\\对账单(白云BJJ22120045).xlsx", "C:\\Users\\Administrator\\Desktop\\c.pdf",1,1);
// excel2pdfOrientation("D:\\work\\leafProjects\\YondaTl\\src\\test.xlsx",
// "D:\\work\\leafProjects\\YondaTl\\src\\付款通知书NEW.pdf");
}
......
......@@ -124,7 +124,10 @@
FROM sys_code_values_v v
WHERE v.code = 'DIVISION'
AND v.code_value = cc.division
AND v.code_enabled_flag = 'Y') division_n
AND v.code_enabled_flag = 'Y') division_n,
hbm.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = hbm.full_elec_invoice_flag) full_elec_invoice_flag_n
from con_contract cc, hls_bp_master hbm, CUS_ACR_INVOICE_V t2
where cc.contract_id = t2.contract_id
and hbm.bp_wfl_status = 'APPROVED'
......@@ -338,7 +341,8 @@
<bm:query-field name="invoice_type" queryExpression="vv.invoice_type = ${@invoice_type}"/>
<bm:query-field name="rl_flag" queryExpression="vv.rl_flag = ${@rl_flag}"/>
<bm:query-field name="billing_status" queryExpression="vv.billing_status = ${@billing_status}"/>
</bm:query-fields>
<bm:query-field name="full_elec_invoice_flag" queryExpression="vv.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="vv.contract_status not in ('CANCEL')"/>
<!--<bm:data-filter enforceOperations="query" expression="t1.contract_id = vv.contract_id"/>-->
......
......@@ -40,6 +40,8 @@
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="rl_flag"/>
<bm:field name="full_elec_invoice_flag"/>
<bm:field name="full_elec_invoice_flag_n"/>
<bm:field name="business_type" />
</bm:fields>
<bm:operations>
......@@ -114,7 +116,10 @@
else
''
end rl_flag,
con.business_type
con.business_type,
t.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf,
......
......@@ -38,7 +38,8 @@
<bm:field name="billing_object_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="full_elec_invoice_flag"/>
<bm:field name="full_elec_invoice_flag_n"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -93,8 +94,10 @@
(select v.code_value_name
from sys_code_values_v v
where v.code = 'ACR512_INVOICE_KIND_TYPE'
and v.code_value = t.invoice_kind_type) invoice_kind_type_n
FROM acr_invoice_create_tmp t, con_contract_v con,hls_bp_master t1
and v.code_value = t.invoice_kind_type) invoice_kind_type_n,
t.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n
FROM acr_invoice_create_tmp t, con_contract_v con,hls_bp_master t1
WHERE t.session_id = ${/session/@session_id}
AND t.contract_id = con.contract_id
and t1.bp_id = t.bp_id
......
......@@ -30,6 +30,7 @@
p_exchange_rate_type => ${@exchange_rate_type},
p_exchange_rate_quotation => ${@exchange_rate_quotation},
p_exchange_rate => ${@exchange_rate},
p_full_elec_invoice_flag => ${@full_elec_invoice_flag},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
......@@ -53,6 +54,7 @@ begin
p_exchange_rate_type => ${@exchange_rate_type},
p_exchange_rate_quotation => ${@exchange_rate_quotation},
p_exchange_rate => ${@exchange_rate},
p_full_elec_invoice_flag => ${@full_elec_invoice_flag},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
......
......@@ -55,7 +55,9 @@
t1.spv_company_id,
t1.invoice_type,
t1.invoice_kind_type,
t1.invoice_kind_type_n
t1.invoice_kind_type_n,
t1.full_elec_invoice_flag,
t1.full_elec_invoice_flag_n
FROM acr_invoice_hd_v t1
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
......@@ -113,6 +115,7 @@
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
</bm:query-fields>
<bm:data-filters>
......
......@@ -116,6 +116,8 @@
<bm:field name="invoice_apply_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type" prompt="发票种类"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type_n" prompt="发票种类"/>
<bm:field name="full_elec_invoice_flag" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="full_elec_invoice_flag_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
......@@ -146,6 +148,7 @@
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="invoice_apply_num" queryExpression="( exists(select 1 from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'APPLY' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.invoice_hd_id and ap.invoice_apply_num=${@invoice_apply_num}) or exists(select ap.invoice_apply_num from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'REVERSE' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.source_invoice_header_id and ap.invoice_apply_num=${@invoice_apply_num}) )"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
</bm:query-fields>
<bm:data-filters>
......
......@@ -135,7 +135,9 @@
invoice_type,
invoice_kind_type,
invoice_kind_type_n,
bp_id_agent_level1
bp_id_agent_level1,
full_elec_invoice_flag,
full_elec_invoice_flag_n
FROM acr_invoice_hd_v t) t1
#WHERE_CLAUSE#
......@@ -173,7 +175,8 @@
<bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
</bm:query-fields>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="nvl(t1.reversed_flag ,'N')= &apos;N&apos;"/>
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
......
......@@ -134,8 +134,9 @@
invoice_type,
invoice_kind_type,
invoice_kind_type_n,
bp_id_agent_level1
bp_id_agent_level1,
full_elec_invoice_flag,
full_elec_invoice_flag_n
FROM acr_invoice_hd_v t) t1
#WHERE_CLAUSE#
ORDER BY t1.invoice_date desc , t1.document_number desc
......@@ -172,6 +173,7 @@
<bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
</bm:query-fields>
<bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>-->
......
......@@ -37,7 +37,12 @@
From sys_code_values_v v
Where v.code = 'ACR510_AR_INVOICE_STATUS'
And v.code_value = h.invoice_status) invoice_status_n,
(Select ahd.vat_interface_status
h.invoice_kind_type,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'ACR512_INVOICE_KIND_TYPE'
And v.code_value = h.invoice_kind_type) invoice_kind_type_n,
(Select ahd.vat_interface_status
From acr_invoice_hd ahd
Where ahd.invoice_hd_id=h.invoice_hd_id) vat_interface_status,
(Select v.code_value_name
......
......@@ -40,6 +40,6 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.enabled_flag=&apos;Y&apos;)"/>
<bm:data-filter name="query" expression="(t1.bp_category in ('TENANT','AGENT') or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.bp_category in('TENANT','AGENT') and br.bp_type in('TENANT','AGENT')))"/>
<bm:data-filter name="query" expression="(t1.bp_category in ('TENANT','AGENT') or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.enabled_flag = 'Y' and br.bp_category in('TENANT','AGENT') and br.bp_type in('TENANT','AGENT')))"/>
</bm:data-filters>
</bm:model>
......@@ -26,7 +26,7 @@
WHERE t.user_id = ${/session/@user_id}
AND unit_code NOT IN ('9998')
and PARENT_UNIT_ID = 1544
AND v.code_value IN ('10', '20', '30', '40'))
AND v.code_value IN ('10', '20', '30', '40','91'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
......@@ -37,14 +37,14 @@
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
and PARENT_UNIT_ID <> 1544
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90'))
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'DIVISION'
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90')
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91')
AND NOT EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei
$Date: 2022-12_06 上午11:00:06
$Revision: 3.0
$Purpose:合同变更租赁物保存校验
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_contract_workflow_pkg.check_change_con_lease_item(
p_contract_id =>${@contract_id},
p_machine_number =>${@machine_number},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022-06-10
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select nvl(sum(cp.due_amount),0) all_amount from CON_CONTRACT_PENALTY_INFO_LV cp
where cp.copy_contract_id = ${@copy_contract_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="all_amount"></bm:field>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT * FROM ( SELECT cr.record_id,
cr.penalty_batch_number, --批次号
(SELECT t1.contract_number
FROM con_contract t1
WHERE t1.contract_id = t.contract_id) contract_number,
(SELECT hbm.extra_nam
FROM hls_bp_master hbm
WHERE hbm.bp_id =
(SELECT t1.bp_id_agent_level1
FROM con_contract t1
WHERE t1.contract_id = t.contract_id)) bp_name_agent,
(SELECT bp_name
FROM hls_bp_master hbm
WHERE hbm.bp_id =
(SELECT bp_id_tenant
FROM con_contract t1
WHERE t1.contract_id = t.contract_id)) bp_name_tenant,
t.breach_type,
(SELECT scv.code_value_name
FROM sys_code_values_v scv
WHERE scv.code = 'BREACH_TYPE'
AND scv.code_value = t.breach_type) breach_type_n, --违约金类型
to_char(nvl(t.base_date, sysdate),'yyyy-mm-dd') base_date, --基准日
t.reduce_amount_total, --减免总金额
(select t1.description
from sys_user t1
where t1.user_id = cr.created_by) created_by_n, --创建人
cr.creation_date,
cr.status,
(SELECT v.code_value_name value_name
FROM sys_code_values_v v
WHERE v.code = 'CASE_STATUS'
AND v.code_value = cr.status) status_n
FROM con_contract_case_record cr, con_contract_penalty_reduce t
WHERE cr.document_table = 'CON_CONTRACT_PENALTY_REDUCE'
and cr.record_id = t.record_id
)t
where (t.penalty_batch_number = ${/parameter/@penalty_batch_number} or ${/parameter/@penalty_batch_number} = 'undefined' or ${/parameter/@penalty_batch_number} is null)
and (t.created_by_n = ${/parameter/@created_by_n} or ${/parameter/@created_by_n} = 'undefined' or ${/parameter/@created_by_n} is null)
and (t.status = ${/parameter/@status} or ${/parameter/@status} = 'undefined' or ${/parameter/@status} is null)
and (trunc(t.creation_date) >= to_date(${/parameter/@creationdate_from}, 'yyyy-mm-dd') or ${/parameter/@creationdate_from} = 'undefined' or to_date(${/parameter/@creationdate_from},'yyyy-mm-dd') is null)
and (trunc(t.creation_date) <= to_date(${/parameter/@creationdate_to},'yyyy-mm-dd') or ${/parameter/@creationdate_to} = 'undefined' or to_date(${/parameter/@creationdate_to},'yyyy-mm-dd') is null)
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzk
$Date: 2022年12月8日 17:13:08
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select et.employee_type_code
from exp_employees ee, exp_employee_types et, sys_user su
where ee.employee_id = su.employee_id
and ee.employee_type_id = et.employee_type_id
and su.user_id = ${/session/@user_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select nvl((select ep.employee_type_code
from exp_employees e, exp_employee_types_vl ep
where e.employee_id = su.employee_id
and e.employee_type_id = ep.employee_type_id),'NULL') employee_type_code
from sys_user su
where su.user_id = ${/session/@user_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
con_contract_workflow_pkg.insert_into_attachment_bmp(
p_file_path =>${@p_file_path},
p_file_name =>${@p_file_name},
p_file_size =>${@p_file_size},
p_user_id =>${@p_user_id},
p_check_id =>${@p_check_id}
);
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: shenyamin
$Date: 2018-11_03 上午11:00:06
$Revision: 3.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT cr.req_status sign_contract_status
From con_contract_change_req cr
Where cr.change_req_id= ${@change_req_id}
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="sign_contract_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="sign_contract_status"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:parameters>
<bm:parameter name="same_flag" dataType="java.lang.String" input="false" output="true"/>
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
cus_con_change_req_pkg.con_guarantor_comparison( p_change_req_id=>${@change_req_id},
p_same_flag =>${@same_flag});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -114,6 +114,7 @@
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="(t1.returned_flag = 'NOT')"/>
<bm:data-filter name="query" expression="(t1.source_csh_trx_id is null)"/>
<bm:data-filter name="query" expression="(t1.recoi_status is null OR t1.recoi_status!='APPROVED')"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
......@@ -87,7 +87,8 @@
v.amount_tenant,
v.write_off_date,
v.write_off_amount,
v.division
v.division,
v.finance_amount
FROM (SELECT t.contract_id,
(SELECT hbbc.bank_account_id
FROM hls_bp_master_bank_account hbbc
......@@ -218,6 +219,7 @@
nvl((select sum(cwo.write_off_due_amount) write_off_amount
from csh_write_off cwo
where cwo.write_off_type='DEPOSIT_ENTRY' and cwo.contract_id=t.contract_id),0) write_off_amount,
t.finance_amount,
t.division
FROM con_contract_cashflow f
join con_contract t
......
......@@ -123,7 +123,7 @@
<bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/>
<bm:query-field field="bp_bank_account_name" queryOperator="like"/>
<bm:query-field field="receipt_type" queryOperator="="/>
<bm:query-field name="confirmed" queryExpression="((${@confirmed} = 'Y' and t1.confirmed_flag in ('ACCAUDITED','ACCAUDITING')) or (${@confirmed} = 'N' and t1.confirmed_flag in ('NEW','CT_REJECTED','ACCAUDITING','ACCAUDITED')))"/>
<bm:query-field name="confirmed" queryExpression="((${@confirmed} = 'Y' and t1.confirmed_flag in ('ACCAUDITED','ACCAUDITING')) or (${@confirmed} = 'N' and t1.confirmed_flag in ('NEW','CT_REJECTED','ACCAUDITING','ACCAUDITED','ACCAUDITED_RECOI')))"/>
<bm:query-field field="opposite_band_na" queryOperator="="/>
<bm:query-field name="transaction_num" queryExpression="t1.transaction_num like ${@transaction_num}"/>
<bm:query-field name="transaction_num_from" queryExpression="t1.transaction_num &gt;= ${@transaction_num_from}"/>
......
......@@ -32,7 +32,8 @@
t.ref_d04,
t.ref_d05,
t.wfl_instance_id,
t.approval_status
t.approval_status,
nvl(t.ignore_invoice_check_flag,'N') ignore_invoice_check_flag
From csh_transaction_wfl t #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022年6月14日
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<!-- <bm:parameters>-->
<!-- <bm:parameter name="con_check_flag" datatype="java.lang.String" input="false" output="true"/>-->
<!-- </bm:parameters>-->
<bm:update-sql><![CDATA[
begin
csh_transaction_wfl_pkg.check_contract_invoice(
p_transaction_wfl_id => ${../../@transaction_wfl_id},
p_write_off_id => ${@write_off_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
csh_transaction_wfl_pkg.save_check_invoice_flag(
p_transaction_wfl_id =>${@transaction_wfl_id},
p_check_flag =>${@check_flag},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: likun
$Date: 2011-8-18 下午03:25:19
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.instance_id, t1.workflow_id, t1.workflow_code, t1.current_seq
from zj_wfl_workflow_instance_v t1,csh_transaction_wfl t2
#WHERE_CLAUSE#
and t1.instance_id = t2.wfl_instance_id
order by t1.instance_id desc
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="instance_id" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="false"/>
<bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="false"/>
<bm:field name="workflow_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="80" forDisplay="true" forQuery="true" />
<bm:field name="current_seq" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="false"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-24 下午2:19:04
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT (select count(1)
from exp_org_position_vl ep, exp_employee_assigns ea
where ea.employee_id = t.employee_id
and ea.position_id = ep.POSITION_ID
and ep.POSITION_CODE = '012') position_012_flag,
(select zi.current_seq
from zj_wfl_workflow_instance zi, csh_transaction_return cr
where zi.instance_id = cr.wfl_instance_id
and cr.return_id =${/parameter/@return_id}) current_seq
FROM sys_user t
where t.user_id = ${/session/@user_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -101,7 +101,7 @@
<bm:field name="acc_confirmed_by"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from csh_write_off cw, hls_journal_header h where cw.write_off_type = 'REFUND_ENTRY' and cw.csh_transaction_id = h.source_id and h.source_table = 'CSH_TRANSACTION' and t1.source_doc_type = cw.write_off_type and t1.source_doc_id = cw.write_off_id and exists (select 1 from hls_journal_detail d where h.journal_header_id = d.journal_header_id and cw.write_off_id = d.cashflow_id))"/>
<bm:field name="receipt_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from csh_write_off cw, hls_journal_header h where cw.write_off_type in ('REFUND_ENTRY','RECEIPT_ADVANCE_RECEIPT') and cw.csh_transaction_id = h.source_id and h.source_table = 'CSH_TRANSACTION' and t1.source_doc_type = cw.write_off_type and t1.source_doc_id = cw.write_off_id and exists (select 1 from hls_journal_detail d where h.journal_header_id = d.journal_header_id and cw.write_off_id = d.cashflow_id))"/>
<bm:field name="return_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from hls_journal_header h,csh_transaction ct where h.source_table = 'CSH_TRANSACTION' and h.source_id = ct.transaction_id and ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
<bm:field name="tenant_account_id" forInsert="false" forUpdate="false" expression="(select cc.bank_account_id from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="tenant_account_num" forInsert="false" forUpdate="false" expression="(select ha.bank_account_num from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
......@@ -117,9 +117,10 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.transaction_category='BUSINESS')"/>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} and t1.posted_flag=&apos;Y&apos; and t1.reversed_flag=&apos;N&apos; and returned_flag not in ( &apos;RETURN&apos;) and t1.transaction_type in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;) and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)&lt;=t1.transaction_amount)) "/>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} and t1.posted_flag=&apos;Y&apos; and t1.reversed_flag=&apos;N&apos; and returned_flag not in ( &apos;RETURN&apos;) and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)&lt;=t1.transaction_amount)) "/>
<!-- <bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;) and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>-->
<bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;))"/>
<bm:data-filter name="query" expression="((t1.transaction_type = &apos;ADVANCE_RECEIPT&apos;) or ((t1.transaction_type =&apos;RECEIPT&apos;) and t1.collection_classes = &apos;REFUND&apos; and t1.source_csh_trx_id is not null))"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sc
$Date: 2022年12月2日11:26:37
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
cm_sh_transaction_reverse_pkg.csh_bank_recoin_submit(
p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -15,15 +15,30 @@
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
declare
v_transaction_num varchar2(100)
begin
if ${@flag} = 'SUBMIT' then
update CSH_TRANSACTION
set confirmed_flag = 'WF_APPROVING'
where transaction_id = ${@transaction_id};
elsif ${@flag} = 'RETURN' then
select ct.transaction_num
into v_transaction_num
from csh_transaction ct where ct.transaction_id=${@transaction_id};
update CSH_TRANSACTION
set confirmed_flag = 'WF_REJECTED'
where transaction_id = ${@transaction_id};
elec_wfl_pkg.func_archives_post_list(p_document_id => ${@transaction_id},
p_archive_type=>'COLLECTION_RELATED_PROC',--收款相关
p_document_number=>v_transaction_num,
p_user_id => p_user_id,
p_status=>-1,
p_instance_desc=>v_transaction_num||'-核销确认'
);
end if;
end;
]]></bm:update-sql>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_WRITE_OFF_INTERFACE" defaultOrderBy="contract_number asc,write_off_times asc,write_off_cf_item asc">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_WRITE_OFF_INTERFACE" defaultOrderBy="write_off_interface_id">
<bm:operations>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
......
......@@ -112,6 +112,7 @@
<bm:data-filter name="query" expression="(nvl(t1.reversed_flag,'N') = 'N')"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag not in('ACCAUDITING','NEW','CT_REJECTED'))"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="(t1.recoi_status is null OR t1.recoi_status!='APPROVED')"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
......@@ -135,6 +135,7 @@
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null)"/>
<bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="(t1.returned_flag not in ('RETURN'))"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
......@@ -55,13 +55,26 @@
(select a.bp_name
from hls_bp_master a
where a.bp_id = ct.bp_id) bp_agent_name,
nvl(cr.left_amount, 0) as left_amount
nvl(cr.left_amount, 0) as left_amount,
cr.finance_flag,
--cr.left_amount - cr.return_amount remain_amount,
(nvl(ct.transaction_amount,0)-nvl(ct.write_off_amount,0)-nvl(ct.returned_amount,0)) -cr.return_amount remain_amount,
cr.bp_bank_branch_name
from csh_transaction ct, csh_transaction_return cr
where ct.transaction_id = cr.transaction_id
) v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
update csh_transaction_return cr
set cr.finance_flag = ${@finance_flag}
where cr.return_id = ${@return_id};
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="return_id" queryExpression="v.return_id=${@return_id}"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false" >
<bm:fields>
<bm:field name="bp_id"/>
<bm:field name="return_bp_type"/>
<bm:field name="return_bp_type_n" displayWidth="80" forDisplay="true" forQuery="true" prompt="对方类型"/>
<bm:field name="bp_code" displayWidth="80" forDisplay="true" forQuery="true" prompt="商业伙伴编号"/>
<bm:field name="bp_name" displayWidth="160" forDisplay="true" forQuery="true" prompt="HLS.BP_NAME"/>
<bm:field name="bank_account_name" displayWidth="130" forDisplay="true" prompt="对方账户户名"/>
<bm:field name="bank_account_num" displayWidth="130" forDisplay="true" prompt="对方账户账号"/>
<bm:field name="bank_full_name" displayWidth="130" forDisplay="true" prompt="对方银行名称"/>
<bm:field name="bank_branch_name" displayWidth="130" forDisplay="true" prompt="对方分行名称"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from ( select hb.bp_id,
hb.bp_code,
hb.bp_name,
hb.bp_category return_bp_type,
(select hc.description
from hls_bp_category hc
where hc.bp_category = hb.bp_category) return_bp_type_n,
ha.bank_account_name ,
ha.bank_account_num ,
ha.bank_full_name ,
ha.bank_branch_name
from hls_bp_master_bank_account ha, hls_bp_master hb
where ha.bp_id(+) = hb.bp_id
and ha.enabled_flag(+) = 'Y'
and hb.enabled_flag = 'Y'
and hb.bp_category in ('TENANT', 'AGENT', 'THIRD_PARTY'))t #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<!-- <bm:data-filters>-->
<!-- <bm:data-filter name="query" expression="t.return_id = ${@return_id}"/>-->
<!-- </bm:data-filters>-->
<bm:query-fields>
<bm:query-field field="return_bp_type_n" queryOperator="="/>
<bm:query-field field="bp_id" queryOperator="="/>
<bm:query-field field="bp_code" queryOperator="like"/>
<bm:query-field field="bp_name" queryExpression="t.bp_name like &apos;%&apos;||${@bp_name}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -13,6 +13,7 @@
p_bp_bank_account_name =>${@bp_bank_account_name},
p_opposite_band_na =>${@opposite_band_na},
p_bp_bank_account_num =>${@bp_bank_account_num},
p_bp_bank_branch_name =>${@bp_bank_branch_name},
p_description =>${@description},
p_csh_return_atm_id =>${@csh_return_atm_id},
p_csh_return_bp_id =>${@csh_return_bp_id},
......
......@@ -124,9 +124,16 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<!--<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>-->
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null)"/>
<!-- <bm:data-filter name="query" expression="(t1.ref_contract_id is not null)"/>-->
<bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="(t1.source_type is not null)"/>
<!-- <bm:data-filter name="query" expression="(t1.source_type is not null)"/>-->
<bm:data-filter name="query" expression="((t1.ref_contract_id is not null and t1.source_type is not null) or
exists (select hm.bp_id
from hls_bp_master hm
where hm.bp_code = 'D00010012'
and hm.bp_id = t1.bp_id
and t1.collection_classes = 'DEPOSIT'
and t1.paid_byother_flag = 'F'))"/>
<bm:data-filter name="query" expression="(exists (
(select 1
from exp_emp_assign_e_v ee
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023年2月7日 09点13分
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" needAccessControl="false">
<bm:fields>
<bm:field name="is_valid" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select token_post_pkg.check_token_valid is_valid from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhangxing5129
$Date: 2014-7-14 下午03:09:37
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:o="leaf.database.local.oracle" 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 t.access_token
FROM (SELECT v.record_id, v.access_token
FROM token_record_info v
where v.start_time <= sysdate
and v.over_time >= sysdate
order by v.record_id desc) t
where rownum = 1
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
token_post_pkg.insert_token_recode(p_system_source =>${@system_source},
p_expires_in =>${@expires_in},
p_access_token =>${@access_token},
p_user_id => ${/session/@user_id}
);
end;]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
insert into token_response_logs
(
log_id,
response_json,
status,
created_by,
creation_date,
last_updated_by,
last_update_date
) values
(token_response_logs_s.nextval,
${@json},
${@status},
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
commit;
end;]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="access_token"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-07 下午2:03:31
$Revision: 1.0
$Purpose: 结构化字段bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="E_ARCHIVES_DEFINE_DATA" defaultOrderBy="cloumn_code" needAccessControl="false" >
<bm:fields>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="sture_data_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="STURE_DATA_ID" />
<bm:field name="cloumn_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLOUMN_CODE" />
<bm:field name="cloumn_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLOUMN_NAME" />
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.base_archive_id,
t1.sture_data_id,
t1.cloumn_code,
t1.cloumn_name
from E_ARCHIVES_DEFINE_DATA t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_update(
p_sql_type =>'INSERT',
p_sture_data_id => ${@sture_data_id},
p_base_archive_id => ${@base_archive_id},
p_cloumn_code => ${@cloumn_code},
p_cloumn_name => ${@cloumn_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_update(
p_sql_type =>'UPDATE',
p_sture_data_id => ${@sture_data_id},
p_base_archive_id => ${@base_archive_id},
p_cloumn_code => ${@cloumn_code},
p_cloumn_name => ${@cloumn_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_delete(
p_sture_data_id => ${@sture_data_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="base_archive_id" enforceOperations="query" expression="base_archive_id=${@base_archive_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-07 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案类型定义bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="E_ARCHIVES_DEFINE" defaultOrderBy="base_archive_code">
<bm:fields>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<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="post_stru_data_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POST_STRU_DATA_FLAG" />
<bm:field name="stru_data_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STRU_DATA_SQL" />
<bm:field name="is_workflow" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IS_WORKFLOW" />
<bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.String" physicalName="WORKFLOW_ID" />
<bm:field name="post_atm_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POST_ATM_FLAG" />
<bm:field name="atm_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATM_SQL" />
<bm:field name="je_check_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_CHECK_FLAG" />
<bm:field name="je_source_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_SOURCE_SQL" />
<bm:field name="workflow_desc" forInsert="false" expression="(SELECT c.workflow_desc FROM zj_wfl_workflow c where c.workflow_id= t1.workflow_id)" forUpdate="false"/>
<bm:field name="archive_type_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;DATA_CLASSIFICATION&apos; and c.code_value = t1.archive_type)" forUpdate="false" />
<bm:field name="is_workflow_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.is_workflow)" forUpdate="false" />
<bm:field name="post_stru_data_flag_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.post_stru_data_flag)" forUpdate="false"/>
<bm:field name="post_atm_flag_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.post_atm_flag)" forUpdate="false" />
<bm:field name="je_check_flag_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.je_check_flag)" forUpdate="false"/>
</bm:fields>
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_update(
p_sql_type =>'INSERT',
p_base_archive_id => ${@base_archive_id},
p_base_archive_code => ${@base_archive_code},
p_archive_type => ${@archive_type},
p_post_stru_data_flag => ${@post_stru_data_flag},
p_stru_data_sql => ${@stru_data_sql},
p_is_workflow => ${@is_workflow},
p_workflow_id => ${@workflow_id},
p_post_atm_flag => ${@post_atm_flag},
p_atm_sql => ${@atm_sql},
p_je_check_flag => ${@je_check_flag},
p_je_source_sql => ${@je_source_sql},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_update(
p_sql_type => 'UPDATE',
p_base_archive_id => ${@base_archive_id},
p_base_archive_code => ${@base_archive_code},
p_archive_type => ${@archive_type},
p_post_stru_data_flag => ${@post_stru_data_flag},
p_stru_data_sql => ${@stru_data_sql},
p_is_workflow => ${@is_workflow},
p_workflow_id => ${@workflow_id},
p_post_atm_flag => ${@post_atm_flag},
p_atm_sql => ${@atm_sql},
p_je_check_flag => ${@je_check_flag},
p_je_source_sql => ${@je_source_sql},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_delete(
p_base_archive_id => ${@base_archive_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field field="archive_type" queryExpression="t1.archive_type =${@archive_type}"/>
<bm:query-field field="is_workflow" queryExpression="t1.is_workflow =${@is_workflow}"/>
<bm:query-field field="post_atm_flag" queryExpression="t1.post_atm_flag =${@post_atm_flag}"/>
<bm:query-field field="je_check_flag" queryExpression="t1.je_check_flag =${@je_check_flag}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-07 下午3:03:31
$Revision: 1.0
$Purpose: 凭证模板bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="E_ARCHIVES_DEFINE_JE" defaultOrderBy="je_template_code">
<bm:fields>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="je_id" databaseType="NUMBER" datatype="java.lang.String" physicalName="JE_ID" />
<bm:field name="je_template_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_TEMPLATE_CODE" />
<bm:field name="je_template_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_TEMPLATE_NAME" />
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.base_archive_id,
t1.je_id,
t1.je_template_code,
t1.je_template_name
from E_ARCHIVES_DEFINE_JE t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.je_template_update(
p_sql_type =>'INSERT',
p_je_id => ${@je_id},
p_base_archive_id => ${@base_archive_id},
p_je_template_code => ${@je_template_code},
p_je_template_name => ${@je_template_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.je_template_update(
p_sql_type =>'UPDATE',
p_je_id => ${@je_id},
p_base_archive_id => ${@base_archive_id},
p_je_template_code => ${@je_template_code},
p_je_template_name => ${@je_template_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.je_template_delete(
p_je_id => ${@je_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="base_archive_id" enforceOperations="query" expression="base_archive_id=${@base_archive_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" defaultOrderBy="workflow_id desc" extend="zjwfl.zj_wfl_workflow" >
<ns1:fields>
<ns1:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<ns1:field name="workflow_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="流程代码"/>
<ns1:field name="workflow_desc" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="流程描述"/>
<ns1:field name="workflow_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_TYPE_ID"/>
<ns1:field name="sub_category"/>
<ns1:field name="enabled_flag"/>
</ns1:fields>
<ns1:query-fields>
<ns1:field field="workflow_code" queryOperator="like"/>
<ns1:field field="workflow_desc" queryOperator="like"/>
<ns1:field field="sub_category" queryExpression="t1.sub_category = ${/parameter/@sub_category}"/>
<ns1:field field="workflow_type_id" queryExpression="t1.workflow_type_id = ${/parameter/@workflow_type_id}"/>
</ns1:query-fields>
<ns1:data-filters>
<ns1:data-filter enforceOperations="query" expression="t1.enabled_flag = &apos;Y&apos;"/>
</ns1:data-filters>
</ns1:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select
t.e_archives_id,
t.base_archive_code,
t.archive_type,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'ELEC_FILE_TYPE'
and v.code_value = t.archive_type) archive_type_desc,
t.document_id,
t.document_number,
t.document_info,
t.done_flag,
(select v.code_value_name value_name
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
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_id" queryExpression="t.document_id=${@document_id}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" >
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
fam.table_name,
fam.table_pk_value,
fam.record_id,
faa.attachment_id,
faa.file_name,
faa.file_type_code,
faa.file_path
FROM
fnd_atm_attachment_multi fam,
fnd_atm_attachment faa
WHERE
fam.attachment_id = ${@attachment_id} AND
faa.rowid =${@rowid} AND
fam.attachment_id = faa.attachment_id
]]></bm:query-sql>
<bm:parameters>
<bm:parameter name="attachment_id"/>
<bm:parameter name="rowid"/>
</bm:parameters>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME" required="true"/>
<bm:field name="table_pk_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_PK_VALUE" required="true"/>
<bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" required="true"/>
<bm:field name="attachment_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTACHMENT_ID" required="true"/>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_TYPE_CODE"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" >
<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,
(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 as post_batch_num,
t1.post_message
FROM hl_e_archives_pool t1
where t1.creation_date>=sysdate-30)
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<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>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" >
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
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,
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 ,
(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 as post_batch_num,
t1.post_message
FROM hl_e_archives_pool t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_update(
p_sql_type =>'INSERT',
p_base_archive_id => ${@base_archive_id},
p_base_archive_code => ${@base_archive_code},
p_archive_type => ${@archive_type},
p_post_stru_data_flag => ${@post_stru_data_flag},
p_stru_data_sql => ${@stru_data_sql},
p_is_workflow => ${@is_workflow},
p_workflow_id => ${@workflow_id},
p_post_atm_flag => ${@post_atm_flag},
p_atm_sql => ${@atm_sql},
p_je_check_flag => ${@je_check_flag},
p_je_source_sql => ${@je_source_sql},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_update(
p_sql_type => 'UPDATE',
p_base_archive_id => ${@base_archive_id},
p_base_archive_code => ${@base_archive_code},
p_archive_type => ${@archive_type},
p_post_stru_data_flag => ${@post_stru_data_flag},
p_stru_data_sql => ${@stru_data_sql},
p_is_workflow => ${@is_workflow},
p_workflow_id => ${@workflow_id},
p_post_atm_flag => ${@post_atm_flag},
p_atm_sql => ${@atm_sql},
p_je_check_flag => ${@je_check_flag},
p_je_source_sql => ${@je_source_sql},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_delete(
p_base_archive_id => ${@base_archive_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</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="primary_field" queryExpression="t1.primary_field =${@primary_field}"/>
<bm:query-field name="document_info" queryExpression="t1.document_info =${@document_info}"/>
<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="suppl_trans_flag" queryExpression="t1.suppl_trans_flag =${@suppl_trans_flag}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" >
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select '{'||pt.atm_data_json||'}' sql_content
from hl_e_archives_pool_data pt
where pt.pool_id = ${@pool_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="sql_content" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SQL"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" >
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select '{'||pt.stru_data_json||'}' sql_content
from hl_e_archives_pool_data pt
where pt.pool_id = ${@pool_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="sql_content" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SQL"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" >
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
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,
(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,
(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,
t1.hly_req_number as post_batch_num,
t1.post_message
FROM hl_e_archives_pool t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.doc_import_return(
p_primary_field =>${@primary_field},
p_post_status =>${@post_status},
p_post_message =>${@post_message},
p_hly_req_number =>${@hly_req_number},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_update(
p_sql_type => 'UPDATE',
p_base_archive_id => ${@base_archive_id},
p_base_archive_code => ${@base_archive_code},
p_archive_type => ${@archive_type},
p_post_stru_data_flag => ${@post_stru_data_flag},
p_stru_data_sql => ${@stru_data_sql},
p_is_workflow => ${@is_workflow},
p_workflow_id => ${@workflow_id},
p_post_atm_flag => ${@post_atm_flag},
p_atm_sql => ${@atm_sql},
p_je_check_flag => ${@je_check_flag},
p_je_source_sql => ${@je_source_sql},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_delete(
p_base_archive_id => ${@base_archive_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</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="primary_field" queryExpression="t1.primary_field =${@primary_field}"/>
<bm:query-field name="document_info" queryExpression="t1.document_info like ${@document_info}"/>
<bm:query-field name="post_status_desc" queryExpression="t1.post_status_desc =${@post_status_desc}"/>
<bm:query-field name="post_batch_num" queryExpression="t1.post_batch_num =${@post_batch_num}"/>
<bm:query-field name="suppl_trans_flag" queryExpression="t1.suppl_trans_flag =${@suppl_trans_flag}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" >
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select pt.atm_data_json attachmentList,pt.stru_data_json as fieldValueList
from hl_e_archives_pool_data pt
where pt.pool_id = ${@pool_id}
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="fieldValueList"/>
<bm:field name="attachmentList"/>
</bm:fields>
</bm:model>
......@@ -36,7 +36,10 @@
<bm:field name="required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQUIRED_FLAG"/>
<bm:field name="doc_require" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOC_REQUIRE"/>
<bm:field name="amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AMOUNT"/>
<bm:field name="doc_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOC_TYPE"/>
<bm:field name="is_archive" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IS_ARCHIVE"/>
<bm:field name="is_archive_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.is_archive)" forUpdate="false"/>
<bm:field name="archive_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ARCHIVE_TYPE" />
<bm:field name="archive_type_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;ARCHIVE_TYPE&apos; and c.code_value = t1.archive_type)" forUpdate="false"/>
<bm:field name="app_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APP_CODE"/>
</bm:fields>
<bm:features>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[begin
hls_journal_import_pkg.delete_hls_journal_tmp(
p_batch_id => ${/session/@session_id});
end;]]></bm:update-sql>
<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2022-12-22 下午1:05:40
$Revision: 1.0
$Purpose: 批量刪除
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.delete_hls_journal_import( p_journal_header_id =>${@journal_header_id}, p_user_id =>${/session/@user_id} );
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lixi
$Date: 2011-8-1 上午10:21:39
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select fnd_interface_headers_s.nextval header_id from dual
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.reverse_hls_journal_import( p_journal_header_id =>${@journal_header_id}, p_user_id =>${/session/@user_id} );
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2022-12-6 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.journal_header_id,
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
t1.total_amount_dr,
t1.total_amount_cr,
(select c.company_short_name
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
to_char(t1.journal_date,'yyyy-mm-dd') journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = t1.currency_code) currency_desc,
t1.total_amount_fuc_dr,
(SELECT d.je_transaction_desc
FROM gld_je_transaction d
WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc,
t1.description,
(SELECT COUNT(1)
FROM hls_journal_detail_imp t
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n,
t1.reverse_wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_num = t1.journal_num) post_gl_status
FROM hls_journal_header_imp t1
#WHERE_CLAUSE#
order by t1.journal_header_id desc
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="t1.reversed_journal_header_id is null "/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="journal_num" queryExpression="t1.journal_num like ${@journal_num}"/>
<bm:query-field name="journal_date_from" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/>
<bm:query-field name="journal_date_to" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &lt;= to_date(${@journal_date_to},'yyyy-mm-dd')"/>
<bm:query-field name="total_amount_dr_from" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &gt;= ${@total_amount_dr_from}"/>
<bm:query-field name="total_amount_dr_to" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &lt;= ${@total_amount_dr_to}"/>
<bm:query-field name="journal_submit_batch_id" queryExpression="t1.journal_submit_batch_id = ${@journal_submit_batch_id}"/>
<bm:query-field name="description" queryExpression="t1.description like ${@description}"/>
<bm:query-field name="wfl_status" queryExpression="t1.wfl_status=${@wfl_status}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2022-12-6 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.journal_header_id,
t1.journal_submit_batch_id,
t1.journal_reverse_batch_id,
t1.journal_num,
t1.error_message,
t1.total_amount_dr,
t1.total_amount_cr,
(select c.company_short_name
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
to_char(t1.journal_date,'yyyy-mm-dd') journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = t1.currency_code) currency_desc,
t1.total_amount_fuc_dr,
(SELECT d.je_transaction_desc
FROM gld_je_transaction d
WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc,
t1.description,
(SELECT COUNT(1)
FROM hls_journal_detail_imp t
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n,
t1.reverse_wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_num = t1.journal_num) post_gl_status
FROM hls_journal_header_imp t1
#WHERE_CLAUSE#
order by t1.journal_header_id desc
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="journal_num" queryExpression="t1.journal_num like ${@journal_num}"/>
<bm:query-field name="journal_date_from" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/>
<bm:query-field name="journal_date_to" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &lt;= to_date(${@journal_date_to},'yyyy-mm-dd')"/>
<bm:query-field name="total_amount_dr_from" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &gt;= ${@total_amount_dr_from}"/>
<bm:query-field name="total_amount_dr_to" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &lt;= ${@total_amount_dr_to}"/>
<bm:query-field name="journal_reverse_batch_id" queryExpression="t1.journal_reverse_batch_id = ${@journal_submit_batch_id}"/>
<bm:query-field name="description" queryExpression="t1.description like ${@description}"/>
<bm:query-field name="wfl_status" queryExpression="t1.wfl_status=${@wfl_status}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select ep.position_code
From exp_employees e, exp_employee_assigns ea, exp_org_position ep
Where e.employee_id = ea.employee_id
And ea.position_id = ep.position_id
And nvl(e.enabled_flag, 'N') = 'Y'
And nvl(ea.enabled_flag, 'N') = 'Y'
And nvl(ep.enabled_flag, 'N') = 'Y'
And nvl(ea.primary_position_flag, 'N') = 'Y'
And e.employee_id = (Select t.employee_id
From sys_user t
Where t.user_id = ${/session/@user_id})
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.insert_hls_journal_tmp(p_user_id => ${/session/@user_id},
p_header_id => ${/model/header/record/@header_id},
p_company_id => ${/session/@company_id},
p_template_type=>${@template_type}
);
END;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter inputPath="/session/@user_id"/>
<bm:parameter inputPath="/session/@session_id"/>
<bm:parameter inputPath="/session/@template_type"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update" >
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.init_journal_atm(p_document_number =>${@document_number},
p_file_path =>${@file_path},
p_file_name =>${@file_name},
p_file_length =>${@file_length},
p_user_id =>${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="insert">
<bm:parameters>
<bm:parameter name="journal_submit_batch_id" output="true" outputPath="@journal_submit_batch_id"/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
declare
v_journal_submit_batch_id hls_journal_submit_batch.journal_submit_batch_id%TYPE := hls_journal_submit_batch_s.nextval;
begin
${@journal_submit_batch_id} := v_journal_submit_batch_id;
insert into hls_journal_submit_batch
(journal_submit_batch_id,
instance_id,
wfl_status,
wfl_type,
created_by,
creation_date,
last_updated_by,
last_update_date)
values
(v_journal_submit_batch_id,
null,
'NEW',
'',
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql>
<![CDATA[
begin
update hls_journal_header_imp hjhi
set hjhi.reverse_wfl_status = 'APPROVING',
hjhi.journal_reverse_batch_id = ${/parameter/@journal_submit_batch_id},
hjhi.last_updated_by = ${/session/@user_id},
hjhi.last_update_date = sysdate
where hjhi.journal_header_id = ${@journal_header_id};
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql>
<![CDATA[
begin
hls_journal_import_pkg.submit_hls_journal_reverse(
p_journal_submit_batch_id => ${/parameter/@journal_submit_batch_id},
p_user_id => ${/session/@user_id},
p_company_id => ${/session/@company_id}
);
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="insert">
<bm:parameters>
<bm:parameter name="journal_submit_batch_id" output="true" outputPath="@journal_submit_batch_id"/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
declare
v_journal_submit_batch_id hls_journal_submit_batch.journal_submit_batch_id%TYPE := hls_journal_submit_batch_s.nextval;
begin
${@journal_submit_batch_id} := v_journal_submit_batch_id;
insert into hls_journal_submit_batch
(journal_submit_batch_id,
instance_id,
wfl_status,
wfl_type,
created_by,
creation_date,
last_updated_by,
last_update_date)
values
(v_journal_submit_batch_id,
null,
null,
${@wfl_type},
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql>
<![CDATA[
update hls_journal_header_imp hjhi
set
hjhi.journal_submit_batch_id = ${/parameter/@journal_submit_batch_id},
hjhi.last_updated_by = ${/session/@user_id},
hjhi.last_update_date = sysdate
where hjhi.journal_header_id = ${@journal_header_id}
]]>
</bm:update-sql>
<!--<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>-->
</bm:operation>
<bm:operation name="execute">
<bm:update-sql>
<![CDATA[
begin
hls_journal_import_pkg.submit_hls_journal_tmp(
p_journal_submit_batch_id => ${/parameter/@journal_submit_batch_id},
p_user_id => ${/session/@user_id},
p_company_id => ${/session/@company_id}
);
end;
]]>
</bm:update-sql>
<!--<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>-->
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022年6月14日
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="wfl_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WFL_COUNT"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT count(1) wfl_count
FROM con_monthly_statement t
where t.history_flag='N'
and t.status_name ='APPROVING'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="wfl_count"></bm:field>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022-10-9 14:14:34
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<!-- <bm:fields>-->
<!-- <bm:field name="sbo_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTACH_FILE_NAME" prompt="HLS.ATTACH_FILE_NAME"/>-->
<!-- <bm:field name="business_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTACH_FILE_NAME" prompt="HLS.ATTACH_FILE_NAME"/>-->
<!-- </bm:fields>-->
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t.* ,
(SELECT sv.code_value_name
FROM sys_code_values_v sv
WHERE sv.code = 'HLS_REPORT_NAME'
and sv.code_value = t.report_name
and sv.code_enabled_flag = 'Y') report_name_desc,
hls_sys_upload_pkg.get_atm_file_names(p_table_pk_value => t.tab_id,
p_source_type => 'SBO_REPORT',
p_user_id => 10423) AS sbo_file_name,
hls_sys_upload_pkg.get_atm_file_names(p_table_pk_value => t.tab_id,
p_source_type => 'BUSINESS_REPORT',
p_user_id => 10423) AS business_file_name
FROM con_monthly_statement t
where t.monthly_date = (${@year}||${@month})
and t.history_flag = 'N'
order by t.tab_id asc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_monthly_statement_pkg.create_monthly_statement(p_user_id =>${/session/@user_id},
p_date =>${@date});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022-10-9 14:14:34
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t.* ,
(SELECT sv.code_value_name
FROM sys_code_values_v sv
WHERE sv.code = 'HLS_REPORT_NAME'
and sv.code_value = t.report_name
and sv.code_enabled_flag = 'Y') report_name_desc,
hls_sys_upload_pkg.get_atm_file_names(p_table_pk_value => t.tab_id,
p_source_type => 'SBO_REPORT',
p_user_id => 10423) AS sbo_file_name,
hls_sys_upload_pkg.get_atm_file_names(p_table_pk_value => t.tab_id,
p_source_type => 'BUSINESS_REPORT',
p_user_id => 10423) AS business_file_name
FROM con_monthly_statement t
where t.monthly_date = ${@month_date}
and t.batch_number=${@batch_num}
order by t.tab_id asc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_monthly_statement_pkg.monthly_wfl_start(p_user_id =>${/session/@user_id},
p_date =>${@date});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022年6月14日
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT count(1) wfl_count
FROM con_monthly_statement t
where t.monthly_date = ${@date}
and t.status_name ='APPROVED'
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_monthly_statement_pkg.reset_monthly_statement(p_user_id =>${/session/@user_id},
p_date =>${@date});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="wfl_count"></bm:field>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 34291
$Date: 2022-10-17 11:26:43
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CON_MONTHLY_ATTACHMENT_LIST">
<bm:fields>
<bm:field name="list_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LIST_ID" prompt="CON_MONTHLY_ATTACHMENT_LIST.LIST_ID"/>
<bm:field name="report_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REPORT_NAME" prompt="CON_MONTHLY_ATTACHMENT_LIST.REPORT_NAME"/>
</bm:fields>
<bm:features>
<o:sequence-pk sequenceName="con_monthly_attachment_list_s"/>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="list_id"/>
</bm:primary-key>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_TAX_ACT_CONFIRM" needAccessControl="false">
<bm:fields>
<bm:field name="instance_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INSTANCE_ID"/>
<bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_ID"/>
<bm:field name="workflow_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WORKFLOW_CODE"/>
<bm:field name="workflow_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WORKFLOW_DESC"/>
<bm:field name="current_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CURRENT_SEQ"/>
<bm:field name="current_node_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENT_NODE_DESC"/>
<bm:field name="last_approve_date" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAST_APPROVE_DATE"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID"/>
<bm:field name="company_info" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="instance_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="instance_status_desc" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="approve_user_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVE_USER_CODE"/>
<bm:field name="approve_user_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVE_USER_NAME"/>
<bm:field name="created_by"/>
<bm:field name="submitted_by"/>
<bm:field name="document_info"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[select t1.instance_id,
t1.workflow_id,
t1.workflow_code,
t1.workflow_desc,
t1.current_seq,
t1.created_by,
t1.submitted_by,
t1.instance_status,
t1.instance_status_desc,
t1.current_node_desc,
t1.last_approve_date,
t1.company_id,
t1.company_info,
--t1.approve_user_code,
--t1.approve_user_name,
(select t.approve_user_code from zj_wfl_workflow_instance_v t where t.instance_id=t1.instance_id and rownum=1 AND exists (select 1 from sys_user sy where sy.user_id=${/session/@user_id} and sy.bp_category<>'AGENT'))approve_user_code,
(select t.approve_user_name from zj_wfl_workflow_instance_v t where t.instance_id=t1.instance_id and rownum=1 AND exists (select 1 from sys_user sy where sy.user_id=${/session/@user_id} and sy.bp_category<>'AGENT'))approve_user_name,
t1.document_info
from zj_wfl_workflow_instance_v t1
where t1.workflow_code = 'HLS_MONTHLY_SETTLEMENT_WFL'
and t1.instance_id in (select c.wfl_instance_id from con_monthly_statement c where c.monthly_date =${@date})
order by t1.instance_id desc
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select prj_project_check_pkg.get_prj_record(${/parameter/@project_id}) as residual_value from dual
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年11月23日20:40:09
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t1.*
FROM (SELECT li.line_id,
li.error_message,
li.status,
li.header_id,
li.line_number,
hd.created_by,
li.source_table,
li.attribute_1,
li.attribute_2,
li.attribute_3,
li.attribute_4,
li.attribute_5,
li.attribute_6,
li.attribute_7,
li.attribute_8,
li.attribute_9,
li.attribute_10,
li.attribute_11,
li.attribute_12,
li.attribute_13,
li.attribute_14,
li.attribute_15,
li.attribute_16,
li.attribute_17,
li.attribute_18,
li.attribute_19,
li.attribute_20,
li.attribute_21,
li.attribute_22,
li.attribute_23,
li.attribute_24,
li.attribute_25,
li.attribute_26
FROM fnd_interface_headers hd,
fnd_interface_lines li
WHERE hd.header_id = li.header_id
AND hd.template_code = 'PRJ_LEASE'
AND li.line_number >0
AND HD.CREATED_BY = ${/session/@user_id}
) t1
#WHERE_CLAUSE#
order by t1.line_number
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.prj_lease_item_list_import(p_header_id =>${/parameter/@header_id},
p_user_id =>${/session/@user_id},
p_lease_item_id=>${@lease_item_id},
p_project_lease_item_id=>${@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.prj_lease_item_import_check(p_header_id => ${/model/header/record/@header_id},
p_user_id => ${/session/@user_id},
p_project_lease_item_id=>${/parameter/@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="header_id" queryExpression="t1.header_id=${@header_id}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年11月23日20:40:09
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.insert_lease_temp(p_header_id =>${@header_id},
p_session_id=>${/session/@session_id},
p_set_number=>${@set_number},
p_lease_item_id=>${@lease_item_id},
p_user_id=>${/session/@user_id},
p_project_lease_item_id=>${@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.insert_lease_item_list(
p_project_lease_item_id=>${@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.update_lease_item_data_temp(
p_prj_lease_item_list_id=>${@prj_lease_item_list_id},
p_asset_name=>${@asset_name},
p_specification=>${@specification},
p_asset_num=>${@asset_num},
p_asset_type=>${@asset_type},
p_posted_date=>${@posted_date},
p_price=>${@price},
p_manufacturer=>${@manufacturer},
p_set_number=>${@set_number},
p_lease_num=>${@lease_num}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年12月6日19:08:18
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.delete_lease_success_after(
p_project_lease_item_id=>${@project_lease_item_id},
p_count =>${@count}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年12月6日19:08:18
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.delete_lease_item_data_temp(
p_prj_lease_item_list_id=>${@prj_lease_item_list_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -7,13 +7,34 @@
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT COUNT(1) v_count
FROM (SELECT p.project_id
FROM prj_project p, prj_project_lease_item v
WHERE p.project_id = v.project_id
AND (v.machine_number_70 = ${@machine_number} or v.machine_number = ${@machine_number})
AND p.project_status <> 'CLOSED'
AND nvl(p.secondary_lease, 'NO') = 'NO'
and p.project_id <> nvl(${@project_id},1)
UNION
SELECT c.project_id
FROM con_contract c, con_contract_lease_item h
WHERE c.contract_id = h.contract_id
AND (h.machine_number_70 = ${@machine_number} or h.machine_number = ${@machine_number})
AND c.contract_status <> 'CANCEL'
AND nvl(c.secondary_lease, 'NO') = 'NO'
AND c.data_class = 'NORMAL'
and c.project_id != nvl(${@project_id},1))
]]>
</bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_pkg.project_submit(
p_project_id =>${@project_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
......@@ -22,6 +43,7 @@
<bm:update-sql><![CDATA[
begin
prj_project_check_pkg.check_prj_lease_item(
p_project_id =>${@project_id},
p_machine_number =>${@machine_number},
p_user_id => ${/session/@user_id}
......@@ -30,4 +52,7 @@
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="v_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="v_count"/>
</bm:fields>
</bm:model>
......@@ -24,7 +24,7 @@
t.bp_id_agent_level1) agent_extra_name,
to_char(t.lease_start_date,
'yyyy-mm-dd') lease_start_date,
ccli.machine_number,
nvl(ccli.machine_number,ccli.machine_number_70) machine_number,
ccli.modelcd,
(CASE
WHEN ccc.cf_item = 8 THEN
......
......@@ -25,7 +25,7 @@
FROM con_contract_lease_item ccli
WHERE ccli.contract_id = ct.contract_id) modelcd,
--机型
(SELECT i.machine_number
(SELECT nvl(i.machine_number,i.machine_number_70)
FROM con_contract_lease_item i
WHERE i.contract_id = ct.contract_id
AND i.equipment_type = 'MAIN') machine_number,
......
......@@ -69,7 +69,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num=to_number(${@base_period})
AND (h.je_transaction_code= 'LEASE_INCEPT')
......@@ -270,7 +270,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num=to_number(${@base_period})
And (h.je_transaction_code ='HL_SALES_TAX_ACT_NEW' )
......@@ -313,6 +313,7 @@ SELECT h.period_year,
(select d.amount_cr
from hls_journal_detail d
where d.journal_header_id = h.journal_header_id
and d.reference3=l.reference3
and exists
(select 1
from gld_accounts g
......@@ -320,9 +321,10 @@ SELECT h.period_year,
and g.account_code in ('6041001000'))
and rownum = 1)
else
(select d.amount_dr
(select nvl(d.amount_dr,d.amount_cr)
from hls_journal_detail d
where d.journal_header_id = h.journal_header_id
and d.reference3=l.reference3
and exists
(select 1
from gld_accounts g
......@@ -335,6 +337,7 @@ SELECT h.period_year,
(select d.amount_cr
from hls_journal_detail d
where d.journal_header_id = h.journal_header_id
and d.reference3=l.reference3
and exists
(select 1
from gld_accounts g
......@@ -342,9 +345,10 @@ SELECT h.period_year,
and g.account_code in ('6041001000'))
and rownum = 1)
else
(select d.amount_dr
(select nvl(d.amount_dr,d.amount_cr)
from hls_journal_detail d
where d.journal_header_id = h.journal_header_id
and d.reference3=l.reference3
and exists
(select 1
from gld_accounts g
......@@ -376,7 +380,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr != 0
and ga.account_id = l.account_id
and ga.account_code in ('2221001020', '2221001023')
and ga.account_code in ('2221001020', '2221001023','2221001024')
and h.reversed_flag = 'N'
and h.internal_period_num = to_number(${@base_period})
And (h.je_transaction_code =
......@@ -472,7 +476,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num=to_number(${@base_period})
And exists (selEct 1
......@@ -537,7 +541,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num=to_number(${@base_period})
AND not EXISTS (SELECT 1
......@@ -640,7 +644,7 @@ SELECT h.period_year,
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and l.line_description like '%留购金%'
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num=to_number(${@base_period})
And exists (selEct 1
......@@ -660,7 +664,7 @@ SELECT h.period_year,
and ccc.cf_direction='INFLOW'
and ccc.billing_status!='FULL' )
union
SELECT h.period_year,
SELECT h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date,
......@@ -740,7 +744,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num = to_number(${@base_period})
and exists(select 1 from gld_je_template_hds hd
......
......@@ -70,7 +70,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num<to_number(${@base_period})
AND (h.je_transaction_code= 'LEASE_INCEPT')
......@@ -279,7 +279,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num<to_number(${@base_period})
AND (h.je_transaction_code= 'HL_SALES_TAX_ACT_NEW')
......@@ -341,6 +341,7 @@ SELECT h.period_year,
(select d.amount_cr
from hls_journal_detail d
where d.journal_header_id = h.journal_header_id
and d.reference3=l.reference3
and exists
(select 1
from gld_accounts g
......@@ -348,9 +349,10 @@ SELECT h.period_year,
and g.account_code in ('6041001000'))
and rownum = 1)
else
(select d.amount_dr
(select nvl(d.amount_dr,d.amount_cr)
from hls_journal_detail d
where d.journal_header_id = h.journal_header_id
and d.reference3=l.reference3
and exists
(select 1
from gld_accounts g
......@@ -363,6 +365,7 @@ SELECT h.period_year,
(select d.amount_cr
from hls_journal_detail d
where d.journal_header_id = h.journal_header_id
and d.reference3=l.reference3
and exists
(select 1
from gld_accounts g
......@@ -370,9 +373,10 @@ SELECT h.period_year,
and g.account_code in ('6041001000'))
and rownum = 1)
else
(select d.amount_dr
(select nvl(d.amount_dr,d.amount_cr)
from hls_journal_detail d
where d.journal_header_id = h.journal_header_id
and d.reference3=l.reference3
and exists
(select 1
from gld_accounts g
......@@ -405,7 +409,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr != 0
and ga.account_id = l.account_id
and ga.account_code in ('2221001020', '2221001023')
and ga.account_code in ('2221001020', '2221001023','2221001024')
and h.reversed_flag = 'N'
and h.internal_period_num < to_number(${@base_period})
And (h.je_transaction_code =
......@@ -507,7 +511,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num<to_number(${@base_period})
And exists (selEct 1
......@@ -591,7 +595,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num<to_number(${@base_period})
And exists (selEct 1
......@@ -696,7 +700,7 @@ SELECT h.period_year,
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and l.line_description like '%留购金%'
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num<to_number(${@base_period})
And exists (selEct 1
......@@ -819,7 +823,7 @@ SELECT h.period_year,
and h.sbo_num is not null
and h.total_amount_dr!=0
and ga.account_id=l.account_id
and ga.account_code in('2221001020','2221001023')
and ga.account_code in('2221001020','2221001023','2221001024')
and h.reversed_flag='N'
and h.internal_period_num <to_number(${@base_period})
and exists(select 1 from gld_je_template_hds hd
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[select scv.code_value_name, scv.code_value
from sys_code_values_v scv
where scv.code = 'REPORT_FORM'
and scv.code_value_enabled_flag = 'Y']]></bm:query-sql>
and scv.code_value_enabled_flag = 'Y'
order by scv.order_seq]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
......
......@@ -18,7 +18,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 4)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 4,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'third_year' as year,
......@@ -26,7 +26,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 3)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 3,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'second_year' as year,
......@@ -34,7 +34,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 2)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 2,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'first_year' as year,
......@@ -42,7 +42,7 @@
'Y' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 1)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 1,${/parameter/@project_id})
......
......@@ -15,7 +15,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 4)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 4,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'third_year' as year,
......@@ -23,7 +23,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 3)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 3,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'second_year' as year,
......@@ -31,7 +31,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 2)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 2,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'first_year' as year,
......@@ -39,7 +39,7 @@
'Y' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 1)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 1,${/parameter/@project_id})
......
......@@ -15,7 +15,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 4)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 4,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'third_year' as year,
......@@ -23,7 +23,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 3)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 3,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'second_year' as year,
......@@ -31,7 +31,7 @@
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 2)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 2,${/parameter/@project_id})
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'first_year' as year,
......@@ -39,7 +39,7 @@
'Y' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 1)
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${/parameter/@bp_id}, 1,${/parameter/@project_id})
......
......@@ -12,19 +12,19 @@
select (select t.fiscal_year || '年' || t.fiscal_month || '月'
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 1)) first_fiscal_year,
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 1,${@project_id})) first_fiscal_year,
(select t.fiscal_year || '年' || t.fiscal_month || '月'
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2)) second_fiscal_year,
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2,${@project_id})) second_fiscal_year,
(select t.fiscal_year || '年' || t.fiscal_month || '月'
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3))third_fiscal_year,
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3,${@project_id}))third_fiscal_year,
(select t.fiscal_year || '年' || t.fiscal_month || '月'
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4)) fourth_fiscal_year
rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4,${@project_id})) fourth_fiscal_year
from dual
]]></bm:query-sql>
......
......@@ -19,7 +19,8 @@
p_fin_statement_templet_id=>${@fin_statement_templet_id},
p_company_id =>${/session/@company_id},
p_bp_id=>${@bp_id},
p_user_id=>${/session/@user_id}
p_user_id=>${/session/@user_id},
p_project_id=>${@project_id}
);
end;]]></bm:update-sql>
</bm:operation>
......
......@@ -32,74 +32,57 @@
'left' column_align
FROM
dual
UNION ALL
select 'first_year_value' column_name,
fiscal_year || '年' || fiscal_month || '月' field_description,
100 field_width,
'right' column_align
from rsc_fin_indicator_hds t
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 1)
union all
select 'second_year_value' column_name,
union all
select 'fourth_year_value' column_name,
fiscal_year || '年' || fiscal_month || '月' field_description,
100 field_width,
'right' column_align
from rsc_fin_indicator_hds t
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2)
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4,${@project_id})
union all
select 'second_year_change_rate' column_name,
select 'fourth_year_change_rate' column_name,
'变化率' field_description,
100 field_width,
'right' column_align
from rsc_fin_indicator_hds t
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2)
union all
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4,${@project_id})
union all
select 'third_year_value' column_name,
fiscal_year || '年' || fiscal_month || '月' field_description,
100 field_width,
'right' column_align
from rsc_fin_indicator_hds t
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3)
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3,${@project_id})
union all
select 'third_year_change_rate' column_name,
'变化率' field_description,
100 field_width,
'right' column_align
from rsc_fin_indicator_hds t
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3)
union all
select 'fourth_year_value' column_name,
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3,${@project_id})
union all
select 'second_year_value' column_name,
fiscal_year || '年' || fiscal_month || '月' field_description,
100 field_width,
'right' column_align
from rsc_fin_indicator_hds t
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4)
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2,${@project_id})
union all
select 'fourth_year_change_rate' column_name,
select 'second_year_change_rate' column_name,
'变化率' field_description,
100 field_width,
'right' column_align
from rsc_fin_indicator_hds t
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4)
UNION ALL
SELECT
'reference_results' column_name,
'参考结果' field_description,
100 field_width ,
'left' column_align
FROM
dual
UNION ALL
SELECT
'description' column_name,
'备注' field_description,
150 field_width ,
'left' column_align
FROM
dual
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2,${@project_id})
UNION ALL
select 'first_year_value' column_name,
fiscal_year || '年' || fiscal_month || '月' field_description,
100 field_width,
'right' column_align
from rsc_fin_indicator_hds t
where t.fin_statement_id = rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 1,${@project_id})
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -27,31 +27,31 @@
year_3.indicator_line_id third_year_indicator_line_id,
year_4.indicator_line_id fourth_year_indicator_line_id,
year_1.description,
f.reference_results
f.reference_results,
f.ref_v04
from rsc_fin_indicator_formula f,
(select l.*
from rsc_fin_indicator_lns l, rsc_fin_indicator_hds h
where h.fin_indicator_id = l.fin_indicator_id
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 1)) year_1,
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 1,${@project_id})) year_1,
(select l.*
from rsc_fin_indicator_lns l, rsc_fin_indicator_hds h
where h.fin_indicator_id = l.fin_indicator_id
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2)) year_2,
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2,${@project_id})) year_2,
(select l.*
from rsc_fin_indicator_lns l, rsc_fin_indicator_hds h
where h.fin_indicator_id = l.fin_indicator_id
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3)) year_3,
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3,${@project_id})) year_3,
(select l.*
from rsc_fin_indicator_lns l, rsc_fin_indicator_hds h
where h.fin_indicator_id = l.fin_indicator_id
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4)) year_4
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4,${@project_id})) year_4
where f.fin_statement_templet_id = ${@fin_statement_templet_id}
and f.indicator_code = year_1.indicator_code(+)
and f.indicator_code = year_2.indicator_code(+)
and f.indicator_code = year_3.indicator_code(+)
and f.indicator_code = year_4.indicator_code(+)
and decode(${@five_class_flag},null,'1',f.five_class_flag) = NVL(${@five_class_flag},'1')
order by f.line_number
]]></bm:update-sql>
</bm:operation>
......
......@@ -24,19 +24,19 @@
(select l.*
from rsc_fin_indicator_lns l, rsc_fin_indicator_hds h
where h.fin_indicator_id = l.fin_indicator_id
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 1)) year_1,
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 1,${@project_id})) year_1,
(select l.*
from rsc_fin_indicator_lns l, rsc_fin_indicator_hds h
where h.fin_indicator_id = l.fin_indicator_id
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2)) year_2,
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 2,${@project_id})) year_2,
(select l.*
from rsc_fin_indicator_lns l, rsc_fin_indicator_hds h
where h.fin_indicator_id = l.fin_indicator_id
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3)) year_3,
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 3,${@project_id})) year_3,
(select l.*
from rsc_fin_indicator_lns l, rsc_fin_indicator_hds h
where h.fin_indicator_id = l.fin_indicator_id
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4)) year_4
and h.fin_statement_id =rsc_fin_statement_prj_pkg.get_fin_statement_id(${@fin_statement_templet_id}, ${/session/@company_id}, ${@bp_id}, 4,${@project_id})) year_4
where f.fin_statement_templet_id = ${@fin_statement_templet_id}
and f.indicator_code = year_1.indicator_code(+)
and f.indicator_code = year_2.indicator_code(+)
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="fin_statement_templet_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_CODE" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.FIN_STATEMENT_TEMPLET_CODE"/>
<bm:field name="fin_statement_templet_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.FIN_STATEMENT_TEMPLET_NAME"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.BP_NAME"/>
<bm:field name="fiscal_date" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select bp_name, fin_statement_templet_code, fin_statement_templet_name
, (fiscal_year || '年' || fiscal_month || '月') as fiscal_date from rsc_fin_statement_prj_hds_v r
where exists (select 1 from fin_statement_templet_tmp f
where f.fin_statement_id = r.fin_statement_id
and f.session_id = ${/session/@session_id})
order by fiscal_year desc,fiscal_month desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
delete from fin_statement_templet_tmp where session_id = ${/session/@session_id}
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
insert into fin_statement_templet_tmp(session_id,fin_statement_id) values(${/session/@session_id},${@fin_statement_id})
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</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" needAccessControl="false">-->
<!-- <bm:fields>-->
<!-- <bm:field name="fin_statement_templet_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_CODE" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.FIN_STATEMENT_TEMPLET_CODE"/>-->
<!-- <bm:field name="fin_statement_templet_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIN_STATEMENT_TEMPLET_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.FIN_STATEMENT_TEMPLET_NAME"/>-->
<!-- <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="RSC_FIN_STATEMENT_PRJ_HDS_V.BP_NAME"/>-->
<!-- <bm:field name="fiscal_date" databaseType="VARCHAR2" datatype="java.lang.String"/>-->
<!-- </bm:fields>-->
<!-- <bm:operations>-->
<!-- <bm:operation name="query">-->
<!-- <bm:query-sql><![CDATA[-->
<!-- select bp_name, fin_statement_templet_code, fin_statement_templet_name-->
<!-- , (fiscal_year || '年' || fiscal_month || '月') as fiscal_date from rsc_fin_statement_prj_hds_v r-->
<!-- where exists (select 1 from fin_statement_templet_tmp f-->
<!-- where f.fin_statement_id = r.fin_statement_id-->
<!-- and f.session_id = ${/session/@session_id})-->
<!-- order by fiscal_year desc,fiscal_month desc-->
<!-- ]]></bm:query-sql>-->
<!-- </bm:operation>-->
<!-- <bm:operation name="delete">-->
<!-- <bm:update-sql><![CDATA[-->
<!-- -->
<!-- delete from fin_statement_templet_tmp where session_id = ${/session/@session_id}-->
<!-- -->
<!-- ]]></bm:update-sql>-->
<!-- </bm:operation>-->
<!-- <bm:operation name="insert">-->
<!-- <bm:update-sql><![CDATA[-->
<!-- -->
<!-- insert into fin_statement_templet_tmp(session_id,fin_statement_id) values(${/session/@session_id},${@fin_statement_id})-->
<!-- -->
<!-- ]]></bm:update-sql>-->
<!-- </bm:operation>-->
<!-- </bm:operations>-->
<!--</bm:model>-->
<!--&gt;>>>>>> 32b0a4d... 财报改造20220310批量提交上线-->
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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