Commit e15a6efb authored by niminmin's avatar niminmin

Merge branch 'develop'

# Conflicts:
#	src/main/webapp/modules/cont/CON505/con_contract_modify.lview
#	src/main/webapp/modules/cont/CON_ET001/con_early_termination_et_detail.lview
parents fcbcd7f1 871d986f
......@@ -25,6 +25,11 @@ overlays/
# common config rename
uncertain.local.xml
config.properties
pom.xml
atm_upload.svc
atm_upload_unUseSubFolder.svc
!/src/main/webapp/WEB-INF/uncertain.local.xml
src/main/webapp/WEB-INF/uncertain.local.xml
src/main/webapp/WEB-INF/uncertain.local.xml
src/main/java/leaf/presentation/component/std/Grid.java
......@@ -159,6 +159,13 @@
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/jodconverter-2.2.2.jar</systemPath>
</dependency>
<dependency>
<groupId>com.gson</groupId>
<artifactId>sys-gson</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/gson-2.6.2.jar</systemPath>
</dependency>
<!--end -->
......
......@@ -61,7 +61,7 @@ public class ExcelFormatUtil {
Font font1 = wb.createFont();
font1.setFontName("黑体");
style1.setFont(font1);
//style1.setWrapText(true);
style1.setWrapText(true);
style1.setAlignment(HorizontalAlignment.LEFT);
style1.setVerticalAlignment(VerticalAlignment.CENTER);
return style1;
......@@ -117,7 +117,7 @@ public class ExcelFormatUtil {
//设置每一列的字段名
cell.setCellValue(title);
cell.setCellStyle(header);
CellRangeAddress region = new CellRangeAddress(firstRow, firstRow+1, firstrCol, 9);
CellRangeAddress region = new CellRangeAddress(firstRow, firstRow+1, firstrCol, 7);
sheet.addMergedRegion(region);
}
......@@ -130,7 +130,7 @@ public class ExcelFormatUtil {
//设置每一列的字段名
cell.setCellValue(content);
cell.setCellStyle(contentType);
CellRangeAddress region = new CellRangeAddress(firstRow, firstRow, firstrCol, 9);
CellRangeAddress region = new CellRangeAddress(firstRow, firstRow, firstrCol, 7);//删除最后一列
sheet.addMergedRegion(region);
}
......@@ -139,11 +139,11 @@ public class ExcelFormatUtil {
SXSSFRow row = sheet.createRow(firstRow);
for(int j = 1;j<=title.length; j++) {
SXSSFCell cell = row.createCell(j);
SXSSFCell cell = row.createCell(j-1);
//设置每一列的字段名
cell.setCellValue(title[j-1]);
cell.setCellStyle(contentTable);
sheet.setColumnWidth(j, titleLength[j-1]);
sheet.setColumnWidth(j-1, titleLength[j-1]);
}
}
......
package com.hand.hls.hlcm.importexcel.controllers;
import com.hand.hap.core.IRequest;
import com.hand.hap.system.controllers.BaseController;
import com.hand.hap.system.dto.ResponseData;
import com.hand.hls.hlcm.importexcel.service.ImportExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
* Copyright (C) Hand Business Consulting Services
* AllRights Reserved
*
* @Author: administrator
* @Date: 2021/4/29 11:11
* @Description:建机模板导入二开
*/
@Controller
public class ImportExcelController extends BaseController {
@Autowired
ImportExcelService importExcelService;
@RequestMapping(value = "/hls/importExcel/import")
@ResponseBody
public ResponseData importExcel(@RequestParam Map <String,String> map,@RequestParam(value = "content",required = false) MultipartFile importFile, HttpServletRequest request) throws Exception{
ResponseData responseData = new ResponseData();
String template_code=request.getParameter("template_code");
Assert.notNull(template_code,"templateCode为空");
IRequest requestContext = createRequestContext(request);
requestContext.setAttribute("template_code",template_code);
responseData=importExcelService.importExcel(requestContext,importFile);
return responseData;
}
}
package com.hand.hls.hlcm.importexcel.mapper;
import com.hand.hap.mybatis.common.BaseMapper;
import java.util.List;
import java.util.Map;
/**
* Copyright (C) Hand Business Consulting Services
* AllRights Reserved
*
* @Author: administrator
* @Date: 2021/4/30 11:26
* @Description:导入表
*/
public interface ImportExcelMapper {
/**
* 新增行表
* @param fieldValues
*/
void insertInterfaceLine(Map<String, List<Object>> fieldValues);
/**
* 新增头表
* @param map
*/
void insertInterfaceHead(Map map);
/**
* 获取headId
* @return
*/
Long getHeadId();
/**
* 更新数据
* @param map
*/
void updateJournalData(Map map);
}
package com.hand.hls.hlcm.importexcel.service;
import com.hand.hap.core.IRequest;
import com.hand.hap.system.dto.ResponseData;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
/**
* Copyright (C) Hand Business Consulting Services
* AllRights Reserved
*
* @Author: administrator
* @Date: 2021/4/29 13:19
* @Description:
*/
public interface ImportExcelService {
/**
*导入excel等文件
* @param iRequest
* @param file
* @return
* @throws Exception
*/
ResponseData importExcel(IRequest iRequest, MultipartFile file) throws Exception;
}
package com.hand.hls.hlcm.importexcel.service.impl;
import com.hand.hap.core.IRequest;
import com.hand.hap.system.dto.ResponseData;
import com.hand.hls.hlcm.importexcel.mapper.ImportExcelMapper;
import com.hand.hls.hlcm.importexcel.service.ImportExcelService;
import leaf.plugin.dataimport.ImportExcel;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Copyright (C) Hand Business Consulting Services
* AllRights Reserved
*
* @Author: administrator
* @Date: 2021/4/29 13:24
* @Description:
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class ImportExcelServiceImpl implements ImportExcelService {
public static final int TOTAL_CELL = 7;
FormulaEvaluator evaluator;
/**
* //public static final String XLS_KEY = ".xls";
* // public static final String XLSX_KEY = ".xlsx";
* //public static final String CSV_KEY = ".csv";
* //public static final String TXT_KEY = ".txt";
*/
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
ImportExcelMapper importExcelMapper;
@Override
public ResponseData importExcel(IRequest iRequest, MultipartFile file) throws Exception {
ResponseData responseData = new ResponseData();
String fileName;
fileName = file.getOriginalFilename();
logger.info(fileName);
String suffix = fileName.substring(fileName.lastIndexOf("."));
Workbook wb = null;
if (ImportExcel.XLS_KEY.equalsIgnoreCase(suffix)) {
wb = new HSSFWorkbook(file.getInputStream());
} else if (ImportExcel.XLSX_KEY.equalsIgnoreCase(suffix)) {
wb = new XSSFWorkbook(file.getInputStream());
}
if (wb != null) {
evaluator = wb.getCreationHelper().createFormulaEvaluator();
}
Sheet sheet = null;
Row row;
Cell cell;
if (wb != null && wb.getNumberOfSheets() > 1) {
responseData.setSuccess(false);
responseData.setMessage("sheet页数大于1,请检查模板!");
return responseData;
}
if (wb != null) {
sheet = wb.getSheetAt(0);
}
assert sheet != null;
int checkRow = sheet.getRow(0).getPhysicalNumberOfCells();
if (checkRow != TOTAL_CELL) {
responseData.setSuccess(false);
responseData.setMessage("模板列数不匹配,请检查模板!");
return responseData;
}
//获取头id
Long headId = importExcelMapper.getHeadId();
Map<String, Object> headMap = new HashMap<>(16);
headMap.put("headId", headId);
headMap.put("templateCode",iRequest.getAttribute("template_code"));
headMap.put("jobId", null);
headMap.put("status", "NEW");
headMap.put("userId", iRequest.getUserId());
headMap.put("attribute_5", "N");
headMap.put("file_name", fileName);
importExcelMapper.insertInterfaceHead(headMap);
//获取行
for (int i = 0; i <= sheet.getLastRowNum(); i++) {
Map<String, List<Object>> fieldValues = new HashMap<>(16);
List<Object> fields = new ArrayList<>();
List<Object> values = new ArrayList<>();
fields.add("HEADER_ID");
fields.add("LINE_NUMBER");
fields.add("CREATED_BY");
fields.add("CREATION_DATE");
fields.add("LAST_UPDATED_BY");
fields.add("LAST_UPDATE_DATE");
values.add(headId);
values.add(i);
values.add(iRequest.getUserId());
values.add(new Date());
values.add(iRequest.getUserId());
values.add(new Date());
row = sheet.getRow(i);
for (int j = 0; j < row.getLastCellNum(); j++) {
//获取列
cell = row.getCell(j);
fields.add("ATTRIBUTE_" + (j + 1));
String value;
if (cell != null) {
value = resetValue(cell);
values.add(value);
}
}
fieldValues.put("columns", fields);
fieldValues.put("values", values);
importExcelMapper.insertInterfaceLine(fieldValues);
}
Map<String, Object> journalMap = new HashMap<>(16);
journalMap.put("headId", headId);
journalMap.put("userId", iRequest.getUserId());
importExcelMapper.updateJournalData(journalMap);
responseData.setSuccess(true);
return responseData;
}
public String resetValue(Cell cell) {
CellValue cellValue = evaluator.evaluate(cell);
String value = null;
if (cellValue != null) {
switch (cellValue.getCellTypeEnum()) {
case BOOLEAN:
value = Boolean.toString(cellValue
.getBooleanValue());
break;
case NUMERIC:
if (DateUtil.isCellDateFormatted(cell)) {
if (cell.getDateCellValue() != null) {
value = df.format(cell.getDateCellValue());
}
} else {
value = BigDecimal
.valueOf(cellValue.getNumberValue())
.stripTrailingZeros().toPlainString();
}
break;
case STRING:
value = cellValue.getStringValue();
break;
case BLANK:
case ERROR:
case FORMULA:
break;
default:
}
}
if (value != null && !"".equalsIgnoreCase(value)) {
return value;
} else {
return "";
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hand.hls.hlcm.importexcel.mapper.ImportExcelMapper">
<sql id="values">
<foreach item="item" collection="values" separator="," >
#{item}
</foreach>
</sql>
<insert id="insertInterfaceLine" parameterType="Map" >
insert into fnd_interface_lines (line_id,
<foreach collection="columns" item="listItem" separator=",">
${listItem}
</foreach>
)
values (fnd_interface_lines_s.nextval,<include refid="values"/> )
</insert>
<insert id="insertInterfaceHead" parameterType="Map" >
insert into fnd_interface_headers
(header_id,
template_code,
job_id,
status,
created_by,
creation_date,
last_updated_by,
last_update_date,
attribute_1,
attribute_2,
attribute_3,
attribute_4,
attribute_5,
file_name)
values
(#{headId},
#{templateCode},
#{jobId},
#{status},
#{userId},
sysdate,
#{userId},
sysdate,
#{attribute_1},
#{attribute_2},
#{attribute_3},
#{attribute_4},
#{attribute_5},
#{file_name})
</insert>
<select id="getHeadId" resultType="java.lang.Long">
select
fnd_interface_headers_s.nextval
from dual
</select>
<select id="updateJournalData" parameterType="Map" statementType="CALLABLE">
call hl_sbo_inf_pkg.update_hls_sbo_num(p_header_id => #{headId,mode=IN},p_user_id => #{userId,mode=IN})
</select>
</mapper>
\ No newline at end of file
......@@ -9,7 +9,7 @@ redis.sentinel=\
redis.useSentinel=false
redis.ip=localhost
redis.port=7777
redis.port=6379
redis.db=10
#db.jndiName=java:comp/env/jdbc/hap_dev
......@@ -19,7 +19,7 @@ redis.db=10
db.type=oracle
db.driverClassName=oracle.jdbc.driver.OracleDriver
db.url=jdbc:oracle:thin:@10.200.17.100:1521/HLS
db.url=jdbc:oracle:thin:@10.200.17.70:1521/HLS.orcl
db.username=hl_cm_dev
db.password=hl_cm_dev
db.maxPoolSize=100
......@@ -122,6 +122,8 @@ hls.interface.log=/u01/logs
#Leaf frame version
leaf.version=1.0
leaf.logDebuggerModel=true
session.filter.excludePattern=
......
......@@ -9,8 +9,8 @@ redis.sentinel=\
redis.useSentinel=false
redis.ip=localhost
redis.port=7777
redis.db=2
redis.port=6379
redis.db=10
#db.jndiName=java:comp/env/jdbc/hap_dev
......@@ -19,7 +19,7 @@ redis.db=2
db.type=oracle
db.driverClassName=oracle.jdbc.driver.OracleDriver
db.url=jdbc:oracle:thin:@10.200.17.100:1521/HLS
db.url=jdbc:oracle:thin:@10.200.17.70:1521/HLS.orcl
db.username=hl_cm_dev
db.password=hl_cm_dev
db.maxPoolSize=100
......@@ -119,14 +119,17 @@ icbc.submitUrl=
#Generic log storage address
hls.interface.log=/u01/logs
#Leaf frame version
leaf.version=1.0
# session.filter.excludePattern=
layout.gridButtonIgnoreReadModel=true
leaf.logDebuggerModel=true
session.filter.excludePattern=
leaf.logDebuggerModel=true
\ No newline at end of file
#layout config
layout.gridButtonIgnoreReadModel=false
#emay dev
emay.appId=EUCP-EMY-SMS0-JBZOQ
emay.secretKey=3E6BA3366DCF8959
emay.host=bjmtn.b2m.cn:80
......@@ -3,6 +3,7 @@
<bm:fields>
<bm:field name="bp_code" displayWidth="200" forDisplay="true" forQuery="true" prompt="代理店编码"/>
<bm:field name="value_name" displayWidth="200" forDisplay="true" forQuery="true" prompt="代理店名称"/>
<bm:field name="value_code"/>
</bm:fields>
<bm:operations>
......
......@@ -36,6 +36,8 @@
<bm:field name="billing_object_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="cf_status" 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:fields>
<bm:operations>
......@@ -91,14 +93,21 @@
where i.cf_item = t.cf_item) as cf_item_desc,
'融资租赁费' as product_name,
con.contract_status contract_status,
cf.cf_status cf_status
cf.cf_status cf_status,
t.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 = t.invoice_kind_type) invoice_kind_type_n
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf
con_contract_cashflow_all_v cf,
hls_bp_master t1
where t.session_id = ${/session/@session_id}
and t.contract_id = con.contract_id
and t.cashflow_id = cf.cashflow_id
order by con.contract_id,cf.times,t.cf_item
and t1.bp_id = t.bp_id
order by con.bp_id_agent_level1,t1.bp_id,con.contract_number,cf.times
]]></bm:query-sql>
</bm:operation>
......@@ -107,6 +116,7 @@
begin
ACR_INVOICE_PKG.invoiceTmp_update(p_record_id => ${@record_id},
p_invoice_kind => ${@invoice_kind},
p_invoice_kind_type => ${@invoice_kind_type},
p_billing_amount => ${@billing_amount},
p_product_name => ${@product_name},
p_user_id => ${/session/@user_id});
......
......@@ -36,6 +36,8 @@
<bm:field name="exchange_rate_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_TYPE" prompt="HLS.EXCHANGE_RATE_TYPE"/>
<bm:field name="exchange_rate_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_TYPE_DESC" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<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:fields>
<bm:operations>
......@@ -86,11 +88,17 @@
t.cf_item,
t.tax_amount,
'违约金' cf_item_desc,
'融资租赁费' AS product_name
FROM acr_invoice_create_tmp t, con_contract_v con
'融资租赁费' AS product_name,
t.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 = t.invoice_kind_type) invoice_kind_type_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
ORDER BY con.contract_id, t.cf_item
and t1.bp_id = t.bp_id
ORDER BY con.bp_id_agent_level1,t.bp_id,con.contract_number,t.times
]]></bm:query-sql>
</bm:operation>
......@@ -99,6 +107,7 @@
begin
ACR_INVOICE_PKG.invoiceTmp_update(p_record_id => ${@record_id},
p_invoice_kind => ${@invoice_kind},
p_invoice_kind_type => ${@invoice_kind_type},
p_tax_amount => ${@tax_amount},
p_billing_amount => ${@billing_amount},
p_product_name => ${@product_name},
......
......@@ -52,7 +52,10 @@
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id
t1.spv_company_id,
t1.invoice_type,
t1.invoice_kind_type,
t1.invoice_kind_type_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
......@@ -109,9 +112,12 @@
-->
<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-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;CONFIRMING&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
<bm:data-filter enforceOperations="query" expression="not exists (select 1 from acr_invoice_hd_wfl ah where ah.invoice_hd_id = t1.invoice_hd_id and ah.invoice_status = &apos;CONFIRMING&apos;)"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 下午06:07:55
$Author: Leauan
$Date: 20201106
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="execute">
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_change(p_invoice_hd=> ${@invoice_hd_ids},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
begin
acr_invoice_wfl_pkg.acr_invoice_apply_insert(p_invoice_apply_id => ${@invoice_apply_id},
p_invoice_hd_id_rec => ${@invoice_hd_ids},
p_note => ${@note},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id},
p_apply_mode => ${@apply_mode},
p_invoice_apply_num=> ${@invoice_apply_num});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="invoice_apply_id" dataType="java.lang.Long" input="false" output="true" outputPath="/parameter/@invoice_apply_id"/>
<bm:parameter name="invoice_apply_num" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@invoice_apply_num"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_reject(p_invoice_hd_id=> ${@invoice_hd_id},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
begin
acr_invoice_wfl_pkg.acr_invoice_wfl_insert(p_invoice_apply_id => ${../../@invoice_apply_id},
p_invoice_hd_id => ${@invoice_hd_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: DJ
$Date: 2013-4-13 下午03:08:40
$Revision: 1.0
$Purpose: session中的信息
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="today" datatype="java.util.Date"/>
<bm:field name="current_year" datatype="java.lang.Long"/>
<bm:field name="current_month" datatype="java.lang.Long"/>
<bm:field name="current_day" datatype="java.lang.Long"/>
<bm:field name="never_date" datatype="java.util.Date"/>
<bm:field name="company_id" datatype="java.lang.Long"/>
<bm:field name="company_code" datatype="java.lang.String"/>
<bm:field name="company_short_name" datatype="java.lang.String"/>
<bm:field name="company_full_name" datatype="java.lang.String"/>
<bm:field name="role_id" datatype="java.lang.Long"/>
<bm:field name="role_name" datatype="java.lang.String"/>
<bm:field name="role_code" datatype="java.lang.String"/>
<bm:field name="country_id" datatype="java.lang.Long"/>
<bm:field name="country_name" datatype="java.lang.String"/>
<bm:field name="lease_channel" datatype="java.lang.String"/>
<bm:field name="lease_channel_desc" datatype="java.lang.String"/>
<bm:field name="division" datatype="java.lang.String"/>
<bm:field name="division_desc" datatype="java.lang.String"/>
<bm:field name="lease_organization" datatype="java.lang.String"/>
<bm:field name="lease_organization_desc" datatype="java.lang.String"/>
<bm:field name="currency_code" datatype="java.lang.String"/>
<bm:field name="currency_name" datatype="java.lang.String"/>
<bm:field name="user_name" datatype="java.lang.String"/>
<bm:field name="user_desc" datatype="java.lang.String"/>
<bm:field name="bp_category" datatype="java.lang.String"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select to_char(sysdate, 'yyyy-mm-dd') as today,
to_char(sysdate, 'yyyy') as current_year,
to_number(to_char(sysdate, 'mm')) as current_month,
to_number(to_char(sysdate, 'dd')) as current_day,
'3000-01-01' as never_date,
t1.company_id,
t1.company_code,
t1.company_short_name,
t1.company_full_name,
t2.role_id,
t2.role_name,
t2.role_code,
t3.country_id,
t3.description as country_name,
t4.lease_channel,
t4.description as lease_channel_desc,
t5.division,
t5.description as division_desc,
t6.lease_organization,
t6.description as lease_organization_desc,
t7.currency_code,
t7.currency_name,
t8.user_name,
t8.description as user_desc,
t8.bp_category
from dual t
left join fnd_companies_vl t1
on t1.company_id = ${/session/@company_id}
and t1.enabled_flag = 'Y'
left join sys_role_vl t2
on t2.role_id = ${/session/@role_id}
and t2.enabled_flag = 'Y'
left join fnd_country t3
on t3.country_code = 'CHN'
and t3.enabled_flag='Y'
left join hls_lease_channel t4
on t4.lease_channel = ${/session/@lease_channel}
and t4.enabled_flag='Y'
left join hls_division t5
on t5.division = ${/session/@division}
and t5.enabled_flag='Y'
left join hls_lease_organization t6
on t6.lease_organization = ${/session/@lease_organization}
and t6.enabled_flag='Y'
left join gld_currency_vl t7
on t7.currency_code='CNY'
and t7.enabled_flag='Y'
left join sys_user t8
on t8.user_id = ${/session/@user_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -20,6 +20,17 @@
insert into ACR_INTERFACE_TMP(session_id,invoice_hd_id) values(${/session/@session_id},${@invoice_hd_id})
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
acr_invoice_wfl_pkg.check_invoice_select_num(p_invoice_apply_id => ${@invoice_apply_id},
p_select_count => ${@select_count},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
......
......@@ -2,7 +2,52 @@
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[select *
<bm:query-sql><![CDATA[select
l.invoice_hd_id,
l.bp_code,
l.description,
l.vat_red_notice_num,
l.ref_vat_invoice_code,
l.ref_invoice_number,
l.created_by_name,
l.confirmed_by_name,
l.received_by_name,
l.invoice_kind_n,
l.invoice_title,
l.invoice_bp_address_phone_num,
l.document_number,
l.invoice_date,
l.invoice_number,
l.bp_name,
l.bp_tax_registry_num,
l.bp_address_phone_num,
replace(l.bp_bank_account,' ','')bp_bank_account,
l.product_name,
l.product_code,
l.specification,
l.uom,
l.quantity,
l.price,
l.tax_type_rate,
l.tax_amount,
l.total_amount,
l.discount_amount,
l.dicount_tax_amount,
l.discount_rate,
l.rec_man,
l.rec_man_tax_num,
l.del_man,
l.del_man_tax_num,
l.place_of_sending,
l.car_type_num,
l.car_ship_tonnage,
l.product_info,
l.code_version,
l.tax_type_code,
l.preferential_policy_flag,
l.preferential_policy_content,
l.zero_tax_rate_flag,
l.reduce_amount
from acr_invoice_interface_lv l
where l.invoice_hd_id in
(select t.invoice_hd_id
......
......@@ -14,5 +14,18 @@
<bm:parameter inputPath="/session/@user_id"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
hls_vat_import_pkg.update_vat_tmp_file_name (
p_session_id => ${/session/@session_id},
p_vat_code =>${@vat_code},
p_vat_number =>${@vat_number},
p_file_name =>${@file_name}
);
END;
]]></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">
<bm:fields>
<bm:field name="base_temp_dir"/>
<bm:field name="year"/>
<bm:field name="month"/>
<bm:field name="base_ele_dir"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select sys_parameter_pkg.value('ELE_ACR_TEMP_DIR') base_temp_dir,
sys_parameter_pkg.value('ELE_ACR_DIR') base_ele_dir,
to_char(sysdate,'yyyy') year,
to_char(sysdate,'mm') month
from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -15,5 +15,16 @@
<bm:parameter inputPath="/session/@user_id"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update" >
<bm:update-sql><![CDATA[
BEGIN
hls_vat_import_pkg.init_acr_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>
......@@ -44,6 +44,8 @@
<bm:field name="segment33"/>
<bm:field name="segment34"/>
<bm:field name="segment35" datatype="java.lang.Double"/>
<bm:field name="segment36"/>
<bm:field name="ele_unique_file_name"/>
<bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="HLS_VAT_IMPORT_TMP.STATUS"/>
</bm:fields>
<bm:features>
......
<?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="execute">
<bm:update-sql><![CDATA[
BEGIN
hls_vat_import_pkg.import_check (
p_vat_doc_number =>${@vat_doc_number},
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" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t.file_name,t.file_path
FROM (SELECT fa.file_name, fa.file_path
FROM fnd_atm_attachment fa, fnd_atm_attachment_multi m
WHERE m.attachment_id = fa.attachment_id
AND fa.source_type_code = 'fnd_atm_attachment_multi'
AND fa.source_pk_value = m.record_id
AND m.table_name = 'ACR_INVOICE_HD'
AND m.table_pk_value = ${@invoice_hd_id}) t
WHERE rownum = 1
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.send_invoice_mail(
p_file_name => ${@file_name},
p_file_path => ${@file_path} ,
p_file_size => ${@file_size},
p_user_id => ${/session/@user_id},
p_bp_id => ${@bp_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
</bm:fields>
</bm:model>
\ No newline at end of file
<?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 hb.bp_name from hls_bp_master hb where hb.bp_id = ${@bp_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME"/>
</bm:fields>
</bm:model>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT confirmed_by_name,
select t1.* from( SELECT confirmed_by_name,
create_je_flag,
document_type_desc,
vat_interface_status,
......@@ -128,9 +128,14 @@
reversed_flag,
claim_status,
ref_n02,
vat_interface_status_desc
invoice_apply_num,
ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id)csh_transaction_flag,
decode(ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id),'NOT','未收款','PARTIAL','部分收款','FULL','完全收款')csh_transaction_flag_desc,
invoice_type,
invoice_kind_type,
invoice_kind_type_n
FROM acr_invoice_hd_v t1
FROM acr_invoice_hd_v t) t1
#WHERE_CLAUSE#
ORDER BY t1.invoice_date desc , t1.document_number desc
]]></bm:query-sql>
......@@ -151,18 +156,21 @@
<bm:query-field name="invoice_status_desc" queryExpression="t1.invoice_status_desc = ${@invoice_status_desc}"/>
<bm:query-field name="claim_status" queryExpression="t1.claim_status = ${@claim_status}"/>
<bm:query-field name="claim_status_n" queryExpression="t1.claim_status_n = ${@claim_status_n}"/>
<bm:query-field name="csh_transaction_flag" queryExpression="t1.csh_transaction_flag = ${@csh_transaction_flag}"/>
<bm:query-field name="cf_item_desc" queryExpression="t1.cf_item_desc = ${@cf_item_desc}"/>
<bm:query-field name="document_number" queryExpression="t1.document_number like ${@document_number}"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number like ${@contract_number}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="invoice_apply_num" queryExpression="t1.invoice_apply_num like ${@invoice_apply_num}"/>
<bm:query-field name="invoice_code" queryExpression="t1.invoice_code like ${@invoice_code}"/>
<bm:query-field name="vat_invoice_code" queryExpression="t1.vat_invoice_code like ${@vat_invoice_code}"/>
<bm:query-field name="invoice_number" queryExpression="t1.invoice_number like ${@invoice_number}"/>
<bm:query-field name="invoice_date_from" queryExpression=" to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_to" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_to},&apos;yyyy-mm-dd&apos;)"/>
<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:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>-->
......
......@@ -5,7 +5,7 @@
$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" alias="t1" baseTable="SYS_USER">
<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="SYS_USER" needAccessControl="false">
<bm:fields>
<bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="SYS_USER.USER_ID"/>
<bm:field name="user_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="USER_NAME" prompt="SYS_USER.USER_NAME"/>
......
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.
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