凭证列表优化
This commit is contained in:
parent
60549128bd
commit
112e42111f
@ -298,6 +298,32 @@
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="VOUCHER_LIST" label="凭证列表" keyAttributes="">
|
||||
<attributes>
|
||||
<attribute name="SORT_NO" label="排序" type="int" length="32"/>
|
||||
<attribute name="F3" label="凭证编号" type="STRING" length="32"/>
|
||||
<attribute name="MODULE_NAME" label="凭证名称" type="STRING" length="200"/>
|
||||
<attribute name="CONTRACT_NUMBER" label="合同编号" type="STRING" length="60"/>
|
||||
<attribute name="F5" label="摘要" type="STRING" length="200"/>
|
||||
<attribute name="F1" label="记账日期" type="STRING" length="32"/>
|
||||
<attribute name="F15" label="到账日期" type="STRING" length="32"/>
|
||||
<attribute name="MONEYS" label="金额" type="STRING" length="32"/>
|
||||
<attribute name="NC_FLAG" label="NC传输状态" type="STRING" length="32"/>
|
||||
<attribute name="NC_BATCH" label="NC传输批次号" type="STRING" length="32"/>
|
||||
<attribute name="NC_DATE" label="NC传输日期" type="STRING" length="32"/>
|
||||
<attribute name="GENERATE_DATE" label="生成时间" type="STRING" length="32"/>
|
||||
<attribute name="F48" label="账套" type="STRING" length="50"/>
|
||||
<attribute name="F50" label="主体名称" type="STRING" length="260"/>
|
||||
<attribute name="F51" label="会计年" type="STRING" length="10"/>
|
||||
<attribute name="F52" label="会计月" type="STRING" length="10"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="VOUCHER_LIST" />
|
||||
<property name="createKey" value="false" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
</package>
|
||||
|
||||
</jbo>
|
||||
|
||||
80
src_jbo/jbo/voucher/VOUCHER_LIST.java
Normal file
80
src_jbo/jbo/voucher/VOUCHER_LIST.java
Normal file
@ -0,0 +1,80 @@
|
||||
package jbo.voucher;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* 凭证列表 - JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface VOUCHER_LIST{
|
||||
/**
|
||||
* 凭证列表<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.voucher.VOUCHER_LIST";
|
||||
/**
|
||||
* 排序 INT(32)<br>
|
||||
*/
|
||||
public static final String SORT_NO = "SORT_NO";
|
||||
/**
|
||||
* 凭证编号 STRING(32)<br>
|
||||
*/
|
||||
public static final String F3 = "F3";
|
||||
/**
|
||||
* 凭证名称 STRING(200)<br>
|
||||
*/
|
||||
public static final String MODULE_NAME = "MODULE_NAME";
|
||||
/**
|
||||
* 合同编号 STRING(60)<br>
|
||||
*/
|
||||
public static final String CONTRACT_NUMBER = "CONTRACT_NUMBER";
|
||||
/**
|
||||
* 摘要 STRING(200)<br>
|
||||
*/
|
||||
public static final String F5 = "F5";
|
||||
/**
|
||||
* 记账日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String F1 = "F1";
|
||||
/**
|
||||
* 到账日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String F15 = "F15";
|
||||
/**
|
||||
* 金额 STRING(32)<br>
|
||||
*/
|
||||
public static final String MONEYS = "MONEYS";
|
||||
/**
|
||||
* NC传输状态 STRING(32)<br>
|
||||
*/
|
||||
public static final String NC_FLAG = "NC_FLAG";
|
||||
/**
|
||||
* NC传输批次号 STRING(32)<br>
|
||||
*/
|
||||
public static final String NC_BATCH = "NC_BATCH";
|
||||
/**
|
||||
* NC传输日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String NC_DATE = "NC_DATE";
|
||||
/**
|
||||
* 生成时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String GENERATE_DATE = "GENERATE_DATE";
|
||||
/**
|
||||
* 账套 STRING(50)<br>
|
||||
*/
|
||||
public static final String F48 = "F48";
|
||||
/**
|
||||
* 主体名称 STRING(260)<br>
|
||||
*/
|
||||
public static final String F50 = "F50";
|
||||
/**
|
||||
* 会计年 STRING(10)<br>
|
||||
*/
|
||||
public static final String F51 = "F51";
|
||||
/**
|
||||
* 会计月 STRING(10)<br>
|
||||
*/
|
||||
public static final String F52 = "F52";
|
||||
}
|
||||
21
src_sql/预投SQL/v20220627/xzw20220627.sql
Normal file
21
src_sql/预投SQL/v20220627/xzw20220627.sql
Normal file
@ -0,0 +1,21 @@
|
||||
-- 新增模板VOUCHER_V8_LIST
|
||||
DELETE FROM AWE_DO_CATALOG WHERE DONO='VOUCHER_V8_LIST';
|
||||
DELETE FROM AWE_DO_LIBRARY WHERE DONO='VOUCHER_V8_LIST';
|
||||
|
||||
INSERT INTO apzl.awe_do_catalog (dono, doname, dodescribe, dotype, doclass, isinuse, colcount, modeid, jboclass, jbofrom, jbowhere, jbogroup, jboorder, businessprocess, exportflag, inputuser, inputtime, updateuser, updatetime, remark, isvalidate, parent) VALUES ('VOUCHER_V8_LIST', 'V8凭证表', null, '30250', null, '1', '1', 'default', 'jbo.voucher.VOUCHER_LIST', 'O', '', '', 'SORT_NO desc', '', null, 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '', '1', '');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1040', '1040', '1', 'O', 'f1', 'f1', 'String', '', '记账日期', '', '1', 'Date', '1', '1', '', '', '', '20', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '0', '', '1', '', '', '', 'Like');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1045', '1045', '1', 'O', 'f15', 'f15', 'String', '', '到账日期', '', '1', 'Text', '1', '1', '', '', '', '20', '1', '0', '0', '1', '0', 1, '0', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '', '', '1', '', '', '', '');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1046', '1046', '1', 'O', 'MONEYS', 'MONEYS', 'Number', '', '金额', '', '1', 'Text', '2', '1', '', '', '', '20', '1', '0', '0', '1', '0', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '', '', '1', '', '', '', '');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1060', '1010', '1', 'O', 'f3', 'f3', 'String', '', '凭证号', '', '1', 'Text', '1', '1', '', '', '', '20', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '0', '', '1', '', '', '', 'Like');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1076', '1076', '1', 'O', 'NC_FLAG', 'NC_FLAG', 'String', '', 'NC传输状态', '', '1', 'Text', '1', '1', '', '', '', '20', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:35', '0', '', '1', '', '', '', 'Like');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1077', '1077', '1', 'O', 'NC_BATCH', 'NC_BATCH', 'String', '', 'NC传输批次号', '', '1', 'Text', '1', '1', '', '', '', '20', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:35', '0', '', '1', '', '', '', 'Like');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1078', '1078', '1', 'O', 'NC_DATE', 'NC_DATE', 'String', '', 'NC传输日期', '', '1', 'Text', '1', '1', '', '', '', '20', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:35', '0', '', '1', '', '', '', 'Like');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1275', '1015', '1', 'O', 'contract_number', 'contract_number', 'String', '', '合同编号', '', '1', 'Text', '1', '1', '', '', '', '32', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '0', '', '1', '', '', '', 'Like');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1280', '1016', '1', 'O', 'f5', 'f5', 'String', '', '摘要', '', '1', 'Text', '1', '1', '', '', '', '900', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '0', '', '1', '', '', '', 'Equals,Like');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1300', '1085', '1', 'O', 'GENERATE_DATE', 'GENERATE_DATE', 'String', '', '生成日期', '', '1', 'Date', '3', '1', '', '', '', '20', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:35', '0', '', '1', '', '', '', 'BigEqualsThan,Area');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1360', '1360', '1', 'O', 'f48', 'f48', 'String', '', '账套', '', '1', 'Text', '1', '1', '', '', '', '20', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:35', '0', '', '1', '', '', '', 'Like,Equals');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1380', '1380', '1', 'O', 'f50', 'f50', 'String', '', '主体名称', '', '1', 'Text', '1', '1', '', '', '', '20', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:35', '0', '', '1', '', '', '', 'Like,Equals');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '1970', '1011', '1', 'O', 'module_name', 'module_name', 'String', '', '凭证名称', '', '1', 'Text', '1', '1', '', '', '', '500', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '0', '', '1', '', '', '', 'Like');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '2110', '1072', '1', '', '''''', 'detail', 'String', '', '明细', '', '1', 'Text', '1', '1', '', '', '', null, '1', '0', '0', '0', '0', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:34', '', '', '1', '', '', '', '');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '2120', '2120', '1', 'O', 'f51', 'f51', 'String', '', '会计年', '', '1', 'Text', '1', '1', '', '', '', '30', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:35', '0', '', '1', '', '', '', 'Like,Equals');
|
||||
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('VOUCHER_V8_LIST', '2130', '2130', '1', 'O', 'f52', 'f52', 'String', '', '会计月', '', '1', 'Text', '1', '1', '', '', '', '30', '1', '0', '0', '1', '1', 0, '', '', '', 'SYS_Designer', '2022/06/27 13:15:54', 'SYS_Designer', '2022/06/27 13:19:35', '0', '', '1', '', '', '', 'Like,Equals');
|
||||
@ -5,8 +5,11 @@ import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.sql.Connection;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.base.util.QuartzUtil;
|
||||
|
||||
import org.quartz.DisallowConcurrentExecution;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
@ -19,6 +22,7 @@ import java.sql.CallableStatement;
|
||||
* @author: À½Ü
|
||||
* @create: 2021-11-03 15:38
|
||||
*/
|
||||
@DisallowConcurrentExecution
|
||||
public class GenerateVoucherSumJob implements Job {
|
||||
|
||||
@Override
|
||||
@ -32,19 +36,42 @@ public class GenerateVoucherSumJob implements Job {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
tran = Transaction.createTransaction(tx);
|
||||
|
||||
// »ñÈ¡µ±Ç°ÈÕÆÚ
|
||||
// String todayDateStr = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy/MM/dd"));
|
||||
|
||||
Connection connection = tran.getConnection(tran);
|
||||
CallableStatement callableStatement = connection.prepareCall("{call PROC_CALC_VOUCHER_SUM()}");
|
||||
callableStatement.execute();
|
||||
callableStatement.close();
|
||||
/**
|
||||
* 将所有未插入中间表的凭证插入中间表
|
||||
*/
|
||||
String sql="INSERT INTO VOUCHER_LIST( F3, MODULE_NAME, CONTRACT_NUMBER, F5, F1, F15, MONEYS, NC_FLAG, NC_BATCH, NC_DATE, GENERATE_DATE, F48, F50, F51, F52) SELECT V8.F3, MAX(V8.MODULE_NAME) AS MODULE_NAME, MAX(V8.F47) AS CONTRACT_NUMBER, MAX(V8.F5) AS F5, MAX(V8.F1) AS F1, MAX(V8.F15) AS F15, SUM(IFNULL(V8.F7,0))+SUM(IFNULL(V8.F8,0)) AS MONEYS, (SELECT CASE IFNULL(MAX(FLAG),'2') WHEN '1' THEN '传输成功' WHEN '2' THEN '未传输' ELSE '传输失败' END FROM NCXML_DETAIL_RECORDS O WHERE O.XML_TYPE='voucher' AND O.TABLE_NUM=V8.F3) AS NC_FLAG, (SELECT MAX(BATCH) FROM NCXML_DETAIL_RECORDS O WHERE O.XML_TYPE='voucher' AND O.TABLE_NUM=V8.F3) AS NC_BATCH, (SELECT MAX(O.CREATE_TIME) FROM NCXML_DETAIL_RECORDS O WHERE O.XML_TYPE='voucher' AND O.TABLE_NUM=V8.F3) AS NC_DATE, MAX(LEFT(V8.GENERATE_DATE,19)) AS GENERATE_DATE, MAX(V8.F48) AS F48, MAX(V8.F50) AS F50, MAX(V8.F51) AS F51, MAX(V8.F52) AS F52 FROM VOUCHER_V8 V8 WHERE V8.F9 IS NULL GROUP BY V8.F3 ORDER BY MAX(LEFT(V8.GENERATE_DATE,19))";
|
||||
int con = tran.executeSQL(new SqlObject(sql));
|
||||
System.out.println("插入凭证列表: "+con+"条!!!");
|
||||
System.out.println("插入凭证列表: "+con+"条!!!");
|
||||
System.out.println("插入凭证列表: "+con+"条!!!");
|
||||
/**
|
||||
* 将所有已插入中间表的凭证, 变更状态
|
||||
*/
|
||||
sql="UPDATE VOUCHER_V8 V8,VOUCHER_LIST VL SET V8.F9='Y' WHERE V8.F9 IS NULL AND V8.F3=VL.F3";
|
||||
con = tran.executeSQL(new SqlObject(sql));
|
||||
System.out.println("更新凭证明细是否入中间表: "+con+"条!!!");
|
||||
System.out.println("更新凭证明细是否入中间表: "+con+"条!!!");
|
||||
System.out.println("更新凭证明细是否入中间表: "+con+"条!!!");
|
||||
|
||||
/**
|
||||
* 更新传输状态
|
||||
*/
|
||||
sql="UPDATE VOUCHER_LIST VL,NCXML_DETAIL_RECORDS NDR SET VL.NC_FLAG=CASE IFNULL(NDR.FLAG,'2') WHEN '1' THEN '传输成功' WHEN '2' THEN '未传输' ELSE '传输失败' END, VL.NC_BATCH=NDR.BATCH,VL.NC_DATE=DATE_FORMAT(NDR.CREATE_TIME,'%Y/%m/%d') WHERE NDR.XML_TYPE='voucher' AND NDR.TABLE_NUM=VL.F3 AND VL.NC_FLAG<>'传输成功'";
|
||||
con = tran.executeSQL(new SqlObject(sql));
|
||||
System.out.println("更新凭证列表传输状态: "+con+"条!!!");
|
||||
System.out.println("更新凭证列表传输状态: "+con+"条!!!");
|
||||
System.out.println("更新凭证列表传输状态: "+con+"条!!!");
|
||||
|
||||
/*Connection connection = tran.getConnection(tran);
|
||||
CallableStatement callableStatement = connection.prepareCall("{call PROC_CALC_VOUCHER_SUM()}");
|
||||
callableStatement.execute();
|
||||
callableStatement.close();
|
||||
*/
|
||||
tran.commit();
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CalcPenaltyJob", "success", "³É¹¦", curUserId);
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.GenerateVoucherSumJob", "success", "成功", curUserId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CalcPenaltyJob", "error", "ʧ°Ü", curUserId);
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.GenerateVoucherSumJob", "error", "失败", curUserId);
|
||||
try {
|
||||
if (tran != null) {
|
||||
tran.rollback();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user