From 6bd20155caf036d0885c9aec8630c7a83d2e8da6 Mon Sep 17 00:00:00 2001 From: maliang Date: Thu, 24 Jun 2021 09:56:13 +0800 Subject: [PATCH 01/51] =?UTF-8?q?fix:=E4=BB=98=E6=AC=BE=E7=94=B3=E8=AF=B7-?= =?UTF-8?q?=E4=B8=80=E8=BD=A6=E5=A4=9A=E5=90=88=E5=90=8C=E7=9B=B8=E5=85=B3?= =?UTF-8?q?sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src_sql/预投SQL/v20210831/maliang20210831.sql | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 src_sql/预投SQL/v20210831/maliang20210831.sql diff --git a/src_sql/预投SQL/v20210831/maliang20210831.sql b/src_sql/预投SQL/v20210831/maliang20210831.sql new file mode 100644 index 000000000..bc8dde4e1 --- /dev/null +++ b/src_sql/预投SQL/v20210831/maliang20210831.sql @@ -0,0 +1,96 @@ +һͬ೵Ʊص +1)LB_INVOICE_INFO_TEMP ֶequipment_id +2)Ӧform +SELECT * FROM `apzl`.`awe_do_catalog` WHERE dono='LbInvoiceTemp'; +SELECT * FROM `apzl`.`awe_do_library` WHERE dono='LbInvoiceTemp'; + +SELECT * FROM `apzl`.`awe_do_catalog` WHERE dono='LBInvoiceList'; +SELECT * FROM `apzl`.`awe_do_library` WHERE dono='LBInvoiceList'; + + +ALTER TABLE `apzl`.`lb_invoice_info_temp` ADD COLUMN `equipment_id` varchar(32) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT 'Ϣid' AFTER `Invoice_money_total`; +ALTER TABLE `apzl`.`lb_invoice_info` ADD COLUMN `equipment_id` varchar(32) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT 'Ϣid' AFTER `Invoice_money_total`; + +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 ('LbInvoiceTemp', 'ƱϢʱ2', NULL, '30', NULL, '1', '2', 'default', 'jbo.com.tenwa.entity.comm.invoice.LB_INVOICE_INFO_TEMP', 'O left join jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR lec on O.contract_id=lec.contract_id and lec.id=O.equipment_id', 'O.contract_id=:id and O.equipment_id=:equipment_id', '', '', 'com.amarsoft.awe.dw.handler.impl.CommonHandler', '', 'SYS_Designer', '2020/03/16 11:42:16', 'SYS_Designer', '2020/03/16 18:07:11', '', '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 ('LbInvoiceTemp', '1000', '1000', '1', 'O', 'id', 'id', 'String', '', 'Ψһʶ', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '0', '', '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 ('LbInvoiceTemp', '1005', '1005', '1', 'lec', 'FRAME_NUMBER', 'FRAME_NUMBER', 'String', '', 'ܺ', '', '1', 'Text', '1', '1', '', '', '', '100', '1', '1', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1006', '1006', '1', 'lec', 'ENGINE_NUMBER', 'ENGINE_NUMBER', 'String', '', '', '', '1', 'Text', '1', '1', '', '', '', '100', '1', '1', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1010', '1010', '1', 'O', 'project_id', 'project_id', 'String', '', 'Ŀid', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1020', '1020', '1', 'O', 'contract_id', 'contract_id', 'String', '', 'ͬid', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1025', '1025', '1', 'O', 'equipment_id', 'equipment_id', 'String', '', 'Ϣid', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1030', '1030', '1', 'O', 'Invoice_code', 'Invoice_code', 'String', '', 'Ʊ', '', '1', 'Text', '1', '1', '', '', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '0', '', '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 ('LbInvoiceTemp', '1040', '1040', '1', 'O', 'Invoice_number', 'Invoice_number', 'String', '', 'Ʊ', '', '1', 'Text', '1', '1', '', '', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '0', '', '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 ('LbInvoiceTemp', '1050', '1050', '1', 'O', 'Invoice_date', 'Invoice_date', 'String', '', 'Ʊ', '', '1', 'Date', '3', '2', '', '', '', '100', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '0', '', '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 ('LbInvoiceTemp', '1060', '1060', '1', 'O', 'Invoice_money', 'Invoice_money', 'String', '', 'Ʊ', '', '1', 'Text', '2', '1', '', '', '', '20', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '0', '', '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 ('LbInvoiceTemp', '1065', '1065', '1', 'O', 'tax_rate', 'tax_rate', 'Number', '13', '˰', '', '1', 'Text', '2', '1', '', '', '', '20', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '0', '', '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 ('LbInvoiceTemp', '1070', '1070', '1', 'O', 'tax_due', 'tax_due', 'String', '', '˰', '', '1', 'Text', '2', '1', '', '', '', '20', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '0', '', '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 ('LbInvoiceTemp', '1080', '1080', '1', 'O', 'flow_unid', 'flow_unid', 'String', '', 'id', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1110', '1110', '1', 'O', 'inputuserid', 'inputuserid', 'String', '', 'Ǽ', '', '1', 'Text', '1', '1', '', '', '', '100', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1120', '1120', '1', 'O', 'inputorgid', 'inputorgid', 'String', '', 'ǼDz', '', '1', 'Text', '1', '1', '', '', '', '100', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1130', '1130', '1', 'O', 'inputtime', 'inputtime', 'String', '', 'Ǽʱ', '', '1', 'Date', '3', '2', '', '', '', '100', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1140', '1140', '1', 'O', 'updateuserid', 'updateuserid', 'String', '', '', '', '1', 'Text', '1', '1', '', '', '', '100', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1150', '1150', '1', 'O', 'updateorgid', 'updateorgid', 'String', '', '²', '', '1', 'Text', '1', '1', '', '', '', '100', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '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 ('LbInvoiceTemp', '1160', '1160', '1', 'O', 'updatetime', 'updatetime', 'String', '', 'ʱ', '', '1', 'Date', '3', '2', '', '', '', '100', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', '8009011U00000032', '2021/06/23 13:49:13', '', '', '1', '', '', '', ''); +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 ('LBInvoiceList', 'ƱϢб', NULL, '30', NULL, '1', '1', 'default', 'jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR', 'O left join jbo.com.tenwa.entity.comm.invoice.LB_INVOICE_INFO_TEMP lec on O.contract_id=lec.contract_id and O.id=lec.equipment_id', 'O.contract_id=:contractId ', '', 'inputtime', '', '', 'SYS_Designer', '2020/09/11 10:00:58', 'SYS_Designer', '2021/06/15 11:08:12', '', '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 ('LBInvoiceList', '1040', '1040', '1', '', '\'\'', 'opinion', 'String', '', '', '', '1', 'Text', '1', '1', '', '', '', '32', '1', '0', '0', '1', '0', 0, '', '', '', 'SYS_Designer', '2019/07/15 17:05:47', 'SYS_Designer', '2021/06/15 11:08:12', '0', '', '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 ('LBInvoiceList', '1050', '1050', '1', 'O', 'BRAND', 'BRAND', 'String', '', 'Ʒ', '', '1', 'Text', '1', '1', '', '', '', '30', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', 'SYS_Designer', '2021/06/15 11:08:12', '', '', '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 ('LBInvoiceList', '1055', '1055', '1', 'O', 'car_series', 'car_series', 'String', '', 'ϵ', '', '1', 'Text', '1', '1', '', '', '', '80', '1', '0', '0', '1', '0', 0, '', '', '', 'SYS_Designer', '2020/09/11 10:37:42', 'SYS_Designer', '2021/06/15 11:08:12', '', '', '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 ('LBInvoiceList', '1060', '1060', '1', 'O', 'MODEL', 'MODEL', 'String', '', 'ͺż', '', '1', 'Text', '1', '1', '', '', '', '200', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', 'SYS_Designer', '2021/06/15 11:08:12', '', '', '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 ('LBInvoiceList', '1065', '1065', '1', 'O', 'FRAME_NUMBER', 'FRAME_NUMBER', 'String', '', 'ܺ', '', '1', 'Text', '1', '1', '', '', '', '100', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', 'SYS_Designer', '2021/06/15 11:08:12', '', '', '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 ('LBInvoiceList', '1070', '1070', '1', 'O', 'ENGINE_NUMBER', 'ENGINE_NUMBER', 'String', '', '', '', '1', 'Text', '1', '1', '', '', '', '100', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', 'SYS_Designer', '2021/06/15 11:08:12', '', '', '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 ('LBInvoiceList', '1071', '1071', '1', 'O', 'EQUIP_PRICE', 'EQUIP_PRICE', 'String', '', '׼۸', '', '1', 'Text', '1', '1', '', '', '', '100', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', 'SYS_Designer', '2021/06/15 11:08:12', '', '', '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 ('LBInvoiceList', '1075', '1075', '1', 'lec', 'Invoice_code', 'Invoice_code', 'String', '', 'Ʊ', '', '1', 'Text', '1', '1', '', '', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', 'SYS_Designer', '2021/06/15 11:08:12', '0', '', '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 ('LBInvoiceList', '1080', '1080', '1', 'lec', 'INVOICE_MONEY', 'INVOICE_MONEY', 'Number', '', 'Ʊ', '', '2', 'Text', '2', '3', '', '', '', '20', '1', '0', '0', '1', '1', 0, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', 'SYS_Designer', '2021/06/15 15:21:57', '0', '', '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 ('LBInvoiceList', '1085', '1085', '1', 'lec', 'tax_due', 'tax_due', 'Number', '', '˰', '', '2', 'Text', '2', '3', '', '', '', NULL, '1', '1', '0', '1', '0', 0, '', '', '', 'SYS_Designer', '2018/08/15 14:15:59', 'SYS_Designer', '2021/06/15 11:08:12', '0', '', '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 ('LBInvoiceList', '1090', '1090', '1', 'lec', 'equipment_id', 'equipment_id', 'String', '', 'Ϣid', '', '1', 'Text', '1', '1', '', '', '', '20', '0', '1', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/03/16 11:42:17', 'SYS_Designer', '2021/06/15 11:08:12', '0', '', '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 ('LBInvoiceList', '1110', '1110', '1', 'O', 'id', 'id', 'String', '', 'Ϣid', '', '1', 'Text', '1', '1', '', '', '', '30', '0', '1', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', 'SYS_Designer', '2021/06/15 11:08:12', '', '', '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 ('LBInvoiceList', '1130', '1130', '1', 'O', 'contract_id', 'contract_id', 'String', '', 'ƱϢid', '', '1', 'Text', '1', '1', '', '', '', '30', '0', '1', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2020/09/11 10:00:58', 'SYS_Designer', '2021/06/15 11:24:09', '0', '', '1', '', '', '', ''); + + +2.һͬ೵ͬģ + +select * from BF_LABLECONFIG where tagname like '%zc_%'; + +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3005', 'zc005', 'zc_carinfo1', 'гϢ1', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 0,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3006', 'zc006', 'zc_carinfo2', 'гϢ2', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 1,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3007', 'zc007', 'zc_carinfo3', 'гϢ3', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 2,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3008', 'zc008', 'zc_carinfo4', 'гϢ4', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 3,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3009', 'zc009', 'zc_carinfo5', 'гϢ5', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 4,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3010', 'zc010', 'zc_carinfo6', 'гϢ6', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 5,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3011', 'zc011', 'zc_carinfo7', 'гϢ7', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 6,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3012', 'zc012', 'zc_carinfo8', 'гϢ8', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 7,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3013', 'zc013', 'zc_carinfo9', 'гϢ9', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 8,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3014', 'zc014', 'zc_carinfo10', 'гϢ10', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 9,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3015', 'zc015', 'zc_carinfo11', 'гϢ11', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 10,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3016', 'zc016', 'zc_carinfo12', 'гϢ12', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 11,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3017', 'zc017', 'zc_carinfo13', 'гϢ13', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 12,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3018', 'zc018', 'zc_carinfo14', 'гϢ14', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 13,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3019', 'zc019', 'zc_carinfo15', 'гϢ15', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 14,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3020', 'zc020', 'zc_carinfo16', 'гϢ16', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 15,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3021', 'zc021', 'zc_carinfo17', 'гϢ17', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 16,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3022', 'zc022', 'zc_carinfo18', 'гϢ18', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 17,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3023', 'zc023', 'zc_carinfo19', 'гϢ19', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 18,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); +INSERT INTO `apzl`.`bf_lableconfig`(`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) VALUES ('6466f88f96b6e93442587d3024', 'zc024', 'zc_carinfo20', 'гϢ20', 'tag_type2', 'value_type3', 'MODEL,FRAME_NUMBER,EQUIP_PRICE,DEVICE_TYPE2,MODEL2,PLATE_NUMBER2,FRAME_NUMBER2', 'SELECT \r\n MODEL,\r\n FRAME_NUMBER,\r\n EQUIP_PRICE,\r\n \r\n DEVICE_TYPE DEVICE_TYPE2,\r\n MODEL MODEL2,\r\n LICENSE_PLATE_NUMBER PLATE_NUMBER2,\r\n FRAME_NUMBER FRAME_NUMBER2\r\nFROM\r\n LB_EQUIPMENT_CAR_TEMP lec\r\nWHERE lec.FlowUnid =:{FLOW_UNID} limit 19,1', '', 'N', '', '', '', '', '', '', '', 'word_default_class'); + +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('1f876eec2d5341d494065fabc3fc456e', '6466f88f96b6e93442587d3005', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('9c0f29bee1a7442d93bda25d003579f6', '6466f88f96b6e93442587d3006', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('21128a024d824d2fac7aa6af5555e120', '6466f88f96b6e93442587d3007', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('423451ab76e04afbaf1eda7e3caefdab', '6466f88f96b6e93442587d3008', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('5f785f593ddb4091b996fe2c9498e754', '6466f88f96b6e93442587d3009', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('eb62e3afd76f4e379c60bdd56b118029', '6466f88f96b6e93442587d3010', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('209d60c0fb1b43b8a0a16dc6383b33cd', '6466f88f96b6e93442587d3011', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('40f93a4d187f4431a90c4d5abf131839', '6466f88f96b6e93442587d3012', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('123ce3b6aea44a24ae77dc83cc1fb4b7', '6466f88f96b6e93442587d3013', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('996d23d8fe21413abed181154ab6db02', '6466f88f96b6e93442587d3014', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('09eea7aa47424b978ef2e1abf7dd6830', '6466f88f96b6e93442587d3015', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('fa1985f7d08940fcaa8be408e37edae2', '6466f88f96b6e93442587d3016', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('643f45aa39cc410cbe8c72aaaa615339', '6466f88f96b6e93442587d3017', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('1d76e8aef07f4a32b13d188e13f88d1e', '6466f88f96b6e93442587d3018', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('80c41dd4488a44438fe2746d57843e67', '6466f88f96b6e93442587d3019', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('78ce98a4bd114e34a6250a529af30b6c', '6466f88f96b6e93442587d3020', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('2d84d577e216405f820f57e92ab167f8', '6466f88f96b6e93442587d3021', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('647d987a44c945638d9cf8e1c9b43358', '6466f88f96b6e93442587d3022', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('d791b1564fb94b3e9010f3d21a352c8b', '6466f88f96b6e93442587d3023', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `apzl`.`bf_templatelable`(`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('79fbf1ffbb5b4955806da4c24fe41048', '6466f88f96b6e93442587d3024', 'a37a3bc1919c4ba39d8ba6348fb1962e', NULL, NULL, NULL, NULL, NULL, NULL); + + From 816f873d1566b196e36798533c0b87ca3b98e90a Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Thu, 24 Jun 2021 14:39:10 +0800 Subject: [PATCH 02/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9D=9E=E5=BF=85?= =?UTF-8?q?=E5=A1=AB=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Comm/LBEquipment_Car/LBEquipmentInfo.jsp | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp index bb385059a..702000a00 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp @@ -199,6 +199,8 @@ setItemRequired(0,"FRAME_NUMBER",true); setItemRequired(0,"CAR_COLOUR",true); setItemRequired(0,"ENGINE_NUMBER",true); + setItemRequired(0,"EQUIP_PRICE",false); + setItemRequired(0,"head_name",false); setItemReadOnly(0,0,"MEMO",false); setItemReadOnly(0,0,"DEVICE_TYPE",true); setItemReadOnly(0,0,"gears",true); @@ -338,11 +340,15 @@ } setItemValue(0,0,"project_id",projectId);//Ŀid } - var equipPrice = getItemValue(0,getRow(0),"EQUIP_PRICE"); - if(equipPrice <= 0){ - alert("ȷ׼ۣ"); - return ; + + var equipPrice = getItemValue(0,getRow(0),"EQUIP_PRICE"); + if(!("ͬ"=="<%=flowName%>"||"ͬ"=="<%=flowName%>")){ + if(equipPrice <= 0){ + alert("ȷ׼ۣ"); + return ; + } } + if("SYC"==carTypea){//ó׼۸ֵ³ָ setItemValue(0,0,"NOW_TOTAL", equipPrice ); } @@ -768,9 +774,12 @@ function changeHeadInfo(){ var carAttribute=getItemValue(0,getRow(0),"car_attribute"); if("tail"==carAttribute){ - showItem(0,"head_name",''); - setItemRequired(0,"head_name",true); - setItemRequired(0,"ENGINE_NUMBER",false); + showItem(0,"head_name",''); + setItemRequired(0,"head_name",true); + setItemRequired(0,"ENGINE_NUMBER",false); + if("ͬ"=="<%=flowName%>"||"ͬ"=="<%=flowName%>"){ + setItemRequired(0,"head_name",false); + } }else{ showItem(0,"head_name",'none'); setItemRequired(0,"head_name",false); From 10a8ba5c72091636d96613986105fd97c8d9a41a Mon Sep 17 00:00:00 2001 From: tangft <32189@windows10.microdone.cn> Date: Mon, 28 Jun 2021 15:35:09 +0800 Subject: [PATCH 03/51] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=9E=E7=9B=98?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E6=9B=B4=E6=96=B0=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tenwa/collectaudit/cache/CollectAuditInfoCache.java | 6 ++++++ .../tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java index f02ad38be..bf470c5a0 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java @@ -1010,6 +1010,9 @@ public class CollectAuditInfoCache { for (int i = 1; i <= snArray.length; i++) { Map map = querySingleBatchCollect(tx, bo, query_sn, snArray[(i-1)]); + if(map == null ) { + continue; + } if (snArray.length == 1) { if (map.containsKey("RET_CODE") && "0000".equals(map.get("RET_CODE"))) { // @@ -1222,6 +1225,9 @@ public class CollectAuditInfoCache { // queryBatchXML(req_sn, query_sn, sn); //Ӧ String strResp = cp.CollectAuditPayReq(strbuff,file.getAbsolutePath(), batch_title); + if(strResp==null || strResp.isEmpty()) { + return null; + } Map map = getRetAndCode(strResp); //ɴ̡ļ savaFile(tx, strResp,batch_title,bo); diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java index 6f6d317c3..16c5e87dc 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java @@ -1008,6 +1008,9 @@ public class CollectAuditInfoCacheTj { for (int i = 1; i <= snArray.length; i++) { Map map = querySingleBatchCollect(tx, bo, query_sn, snArray[(i-1)]); + if(map == null ) { + continue; + } if (snArray.length == 1) { if (map.containsKey("RET_CODE") && "0000".equals(map.get("RET_CODE"))) { // @@ -1220,6 +1223,9 @@ public class CollectAuditInfoCacheTj { // queryBatchXML(req_sn, query_sn, sn); //Ӧ String strResp = cp.CollectAuditPayReq(strbuff,file.getAbsolutePath(), batch_title); + if(strResp==null || strResp.isEmpty()) { + return null; + } Map map = getRetAndCode(strResp); //ɴ̡ļ savaFile(tx, strResp,batch_title,bo); From da93ba3cb60109ce8cebf261291434fafa816dd1 Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Tue, 29 Jun 2021 18:43:37 +0800 Subject: [PATCH 04/51] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E9=85=8D?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/amarsoft/app/flow/FlowAction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/amarsoft/app/flow/FlowAction.java b/src/com/amarsoft/app/flow/FlowAction.java index 494cbb258..04587d97f 100644 --- a/src/com/amarsoft/app/flow/FlowAction.java +++ b/src/com/amarsoft/app/flow/FlowAction.java @@ -691,7 +691,7 @@ public class FlowAction { sql.setOriginalSql(sql.getOriginalSql().replaceAll("", ":")); sql.setRunSql(sql.getRunSql().replaceAll("", ":")); tran.executeSQL(sql); - sql = new SqlObject("update user_task_info set task_number = nvl(task_number, 0) + 1 " + sql = new SqlObject("update user_task_info set task_number = task_number + 1 " + " where userid = '" + AssignmentId + "' and roleid = '" + curRole + "'"); tran.executeSQL(sql); } else { @@ -703,8 +703,8 @@ public class FlowAction { sql.setOriginalSql(sql.getOriginalSql().replaceAll("", ":")); sql.setRunSql(sql.getRunSql().replaceAll("", ":")); tran.executeSQL(sql); - sql = new SqlObject("update user_task_info set task_number = nvl(task_number, 0) - 1 " - + " where userid = '" + userID + "' and roleid = '" + curRole + "'"); + sql = new SqlObject("update user_task_info set task_number = task_number - 1 " + + " where userid = '" + userID + "' and roleid = '" + curRole + "' and task_number >=1 "); tran.executeSQL(sql); } } From 9b4365d228bcee83565fcbc9cf1dc6fd19071ad1 Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Wed, 30 Jun 2021 17:45:06 +0800 Subject: [PATCH 05/51] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cache/InterFaceFileCreate.java | 108 +++++++----------- 1 file changed, 43 insertions(+), 65 deletions(-) diff --git a/src_tenwa/com/tenwa/collectaudit/cache/InterFaceFileCreate.java b/src_tenwa/com/tenwa/collectaudit/cache/InterFaceFileCreate.java index a629eadb9..a51d3f4fd 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/InterFaceFileCreate.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/InterFaceFileCreate.java @@ -1,80 +1,58 @@ package com.tenwa.collectaudit.cache; -import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.Scanner; public class InterFaceFileCreate { - - /** - * ļ - * @param sendData - * @param fileSavePath - * @param fileName - */ - public static void sendDiscFileCreate(String sendData,String fileSavePath,String fileName) { - try { - File file = new File(fileSavePath); - System.out.println(file.getAbsolutePath()); - if(!file.exists()){//Ŀ¼ֱӴ - file.mkdirs(); - } - String filePath = file.getAbsolutePath(); - FileWriter fileWriter = new FileWriter(filePath+"/"+fileName+".txt"); + + /** + * ļ + * + * @param sendData + * @param fileSavePath + * @param fileName + */ + public static void sendDiscFileCreate(String sendData, String fileSavePath, String fileName) { + try { + File file = new File(fileSavePath); + if (!file.exists()) {//Ŀ¼ֱӴ + file.mkdirs(); + } + String filePath = file.getAbsolutePath(); + FileWriter fileWriter = new FileWriter(filePath + "/" + fileName + ".txt"); String ss = sendData; - fileWriter.write(ss); + fileWriter.write(ss); fileWriter.flush(); fileWriter.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } - FileReader fileReader = new FileReader(filePath+"/"+fileName+".txt"); - BufferedReader br = new BufferedReader(fileReader); - String s; - while ((s = br.readLine()) != null) { - System.out.println(s); + /** + * ɻļ + * + * @param replyData + * @param fileSavePath + * @param fileName + */ + public static void replyDiscFileCreate(String replyData, String fileSavePath, String fileName) { + try { + File file = new File(fileSavePath); + if (!file.exists()) {//Ŀ¼ֱӴ + file.mkdirs(); } - fileReader.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * ɻļ - * @param replyData - * @param fileSavePath - * @param fileName - */ - public static void replyDiscFileCreate(String replyData,String fileSavePath,String fileName) { - try { - File file = new File(fileSavePath); - System.out.println(file.getAbsolutePath()); - if(!file.exists()){//Ŀ¼ֱӴ - file.mkdirs(); - } - String filePath = file.getAbsolutePath(); - FileWriter fileWriter = new FileWriter(filePath+"/"+fileName+".rnt"); - String ss = replyData; - fileWriter.write(ss); - fileWriter.flush(); - fileWriter.close(); - - FileReader fileReader = new FileReader(filePath+"/"+fileName+".rnt"); - BufferedReader br = new BufferedReader(fileReader); - String s; - while ((s = br.readLine()) != null) { - System.out.println(s); - } - fileReader.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } + String filePath = file.getAbsolutePath(); + FileWriter fileWriter = new FileWriter(filePath + "/" + fileName + ".rnt"); + String ss = replyData; + fileWriter.write(ss); + fileWriter.flush(); + fileWriter.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } } \ No newline at end of file From 86485fd4698480402a18d3fafa0cf16856e7ef2b Mon Sep 17 00:00:00 2001 From: xiezhiwen Date: Fri, 2 Jul 2021 10:10:47 +0800 Subject: [PATCH 06/51] =?UTF-8?q?=E9=80=9A=E8=81=94=E5=8D=A1=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InsertVoucherRentIncome.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertVoucherRentIncome.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertVoucherRentIncome.java index 5932f132f..b5692d07e 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertVoucherRentIncome.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertVoucherRentIncome.java @@ -39,16 +39,16 @@ public class InsertVoucherRentIncome { * ѯ, жǷҪִвм */ // ѯǷеµ, δƾ֤() - String sqls1="SELECT lri.RENT FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m')"; + String sqls1="SELECT lri.RENT FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m')"; // ѯµ, δƾ֤() - String sqls2="SELECT lri.RENT FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m')"; + String sqls2="SELECT lri.RENT FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m')"; // ѯǰǷϢ() - String sqls3="SELECT lri.PENALTY FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_penalty_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_PENALTY_PLAN GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay') AND lri.penalty > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d')"; + String sqls3="SELECT lri.PENALTY FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_penalty_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_PENALTY_PLAN GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.penalty > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d')"; // - String sqls4="SELECT lri.RENT,LRI.ID AS F56 FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV1 ON LV1.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT F58,F56 FROM VOUCHER_V8 WHERE MODULE_NAME LIKE '%-յ%' AND (F56 IS NOT NULL AND F56 <> '' AND F58 IS NOT NULL AND F58 <> '') GROUP BY F58,F56) V8 ON V8.F58 = LRI.PLAN_ID AND V8.F56 = LRI.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXUnionPay') AND lri.rent > 0 AND (LV1.INCOME_ID IS NOT NULL OR LV2.INCOME_ID IS NOT NULL) AND V8.F58 IS NULL AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d')"; + String sqls4="SELECT lri.RENT,LRI.ID AS F56 FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV1 ON LV1.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT F58,F56 FROM VOUCHER_V8 WHERE MODULE_NAME LIKE '%-յ%' AND (F56 IS NOT NULL AND F56 <> '' AND F58 IS NOT NULL AND F58 <> '') GROUP BY F58,F56) V8 ON V8.F58 = LRI.PLAN_ID AND V8.F56 = LRI.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXUnionPay','TLCollect') AND lri.rent > 0 AND (LV1.INCOME_ID IS NOT NULL OR LV2.INCOME_ID IS NOT NULL) AND V8.F58 IS NULL AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d')"; // Ϣ - String slqs5="SELECT lri.PENALTY,LRI.ID AS F56 FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV1 ON LV1.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT F58,F56 FROM VOUCHER_V8 WHERE MODULE_NAME LIKE '%-Ϣ%' AND (F56 IS NOT NULL AND F56 <> '' AND F58 IS NOT NULL AND F58 <> '') GROUP BY F58,F56) V8 ON V8.F58 = LRI.PLAN_ID AND V8.F56 = LRI.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXUnionPay') AND lri.PENALTY > 0 AND (LV1.INCOME_ID IS NOT NULL OR LV2.INCOME_ID IS NOT NULL) AND V8.F58 IS NULL AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') "; + String slqs5="SELECT lri.PENALTY,LRI.ID AS F56 FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV1 ON LV1.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT F58,F56 FROM VOUCHER_V8 WHERE MODULE_NAME LIKE '%-Ϣ%' AND (F56 IS NOT NULL AND F56 <> '' AND F58 IS NOT NULL AND F58 <> '') GROUP BY F58,F56) V8 ON V8.F58 = LRI.PLAN_ID AND V8.F56 = LRI.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXUnionPay','TLCollect') AND lri.PENALTY > 0 AND (LV1.INCOME_ID IS NOT NULL OR LV2.INCOME_ID IS NOT NULL) AND V8.F58 IS NULL AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') "; // ΢ţ String sqls6="SELECT lri.RENT,LRI.ID AS F56 FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV1 ON LV1.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT F58,F56 FROM VOUCHER_V8 WHERE MODULE_NAME LIKE '%-յ%' AND (F56 IS NOT NULL AND F56 <> '' AND F58 IS NOT NULL AND F58 <> '') GROUP BY F58,F56) V8 ON V8.F58 = LRI.PLAN_ID AND V8.F56 = LRI.ID WHERE LRI.CHARGE_WAY IN ('WXPay') AND lri.rent > 0 AND (LV1.INCOME_ID IS NOT NULL OR LV2.INCOME_ID IS NOT NULL) AND V8.F58 IS NULL AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d')"; // Ϣ΢ţ @@ -66,11 +66,11 @@ public class InsertVoucherRentIncome { * ݲмSQL */ // δڼδ() - String sql1="INSERT INTO lv_rent_income (SELECT REPLACE(UUID(), '-', ''),CONCAT('k', getSerialNumber ('ƾ֤')),cif.customer_num,cif.customername,lci.id,lci.contract_number,lrp.id,lri.HIRE_DATE,lrp.plan_list,lri.RENT,lri.CORPUS,lri.INTEREST,0.00,lri.OWN_BANK,lri.OWN_ACCOUNT,lri.OWN_NUMBER,lri.EBANK_NUMBER,lri.CARDDEDUCT_ID,lri.ACCOUNTING_DATE,LRI.CHARGE_WAY AS COLLECT_STATUS,LCI.BUSINESSTYPE,LCI.LEAS_FORM,LRI.ID FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m'))"; + String sql1="INSERT INTO lv_rent_income (SELECT REPLACE(UUID(), '-', ''),CONCAT('k', getSerialNumber ('ƾ֤')),cif.customer_num,cif.customername,lci.id,lci.contract_number,lrp.id,lri.HIRE_DATE,lrp.plan_list,lri.RENT,lri.CORPUS,lri.INTEREST,0.00,lri.OWN_BANK,lri.OWN_ACCOUNT,lri.OWN_NUMBER,lri.EBANK_NUMBER,lri.CARDDEDUCT_ID,lri.ACCOUNTING_DATE,LRI.CHARGE_WAY AS COLLECT_STATUS,LCI.BUSINESSTYPE,LCI.LEAS_FORM,LRI.ID FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m'))"; // ڹ() - String sql2="INSERT INTO lv_rent_income2 (SELECT REPLACE(UUID(), '-', ''),CONCAT('k', getSerialNumber ('ƾ֤')),cif.customer_num,cif.customername,lci.id,lci.contract_number,lrp.id,lri.HIRE_DATE,lrp.plan_list,lri.RENT,lri.CORPUS,lri.INTEREST,0.00,lri.OWN_BANK,lri.OWN_ACCOUNT,lri.OWN_NUMBER,lri.EBANK_NUMBER,lri.CARDDEDUCT_ID,lri.ACCOUNTING_DATE,LRI.CHARGE_WAY AS COLLECT_STATUS,LCI.BUSINESSTYPE,LCI.LEAS_FORM,LRI.ID FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m'))"; + String sql2="INSERT INTO lv_rent_income2 (SELECT REPLACE(UUID(), '-', ''),CONCAT('k', getSerialNumber ('ƾ֤')),cif.customer_num,cif.customername,lci.id,lci.contract_number,lrp.id,lri.HIRE_DATE,lrp.plan_list,lri.RENT,lri.CORPUS,lri.INTEREST,0.00,lri.OWN_BANK,lri.OWN_ACCOUNT,lri.OWN_NUMBER,lri.EBANK_NUMBER,lri.CARDDEDUCT_ID,lri.ACCOUNTING_DATE,LRI.CHARGE_WAY AS COLLECT_STATUS,LCI.BUSINESSTYPE,LCI.LEAS_FORM,LRI.ID FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m'))"; // Ϣ() - String sql3="INSERT INTO lv_penalty_income (SELECT REPLACE(UUID(), '-', ''),CONCAT('k', getSerialNumber ('ƾ֤')),cif.customer_num,cif.customername,lci.id,lci.contract_number,lrp.id,lri.HIRE_DATE,lrp.plan_list,0.00,0.00,0.00,lri.PENALTY,lri.OWN_BANK,lri.OWN_ACCOUNT,lri.OWN_NUMBER,lri.EBANK_NUMBER,lri.CARDDEDUCT_ID,lri.ACCOUNTING_DATE,LRI.CHARGE_WAY AS COLLECT_STATUS,LCI.BUSINESSTYPE,LCI.LEAS_FORM,LRI.ID FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_penalty_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_PENALTY_PLAN GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay') AND lri.penalty > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d'))"; + String sql3="INSERT INTO lv_penalty_income (SELECT REPLACE(UUID(), '-', ''),CONCAT('k', getSerialNumber ('ƾ֤')),cif.customer_num,cif.customername,lci.id,lci.contract_number,lrp.id,lri.HIRE_DATE,lrp.plan_list,0.00,0.00,0.00,lri.PENALTY,lri.OWN_BANK,lri.OWN_ACCOUNT,lri.OWN_NUMBER,lri.EBANK_NUMBER,lri.CARDDEDUCT_ID,lri.ACCOUNTING_DATE,LRI.CHARGE_WAY AS COLLECT_STATUS,LCI.BUSINESSTYPE,LCI.LEAS_FORM,LRI.ID FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_penalty_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_PENALTY_PLAN GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.penalty > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d'))"; /** * ݲѯж, ִֵвSQL */ From 668f2d29976751b65a2504443015681465d9e8eb Mon Sep 17 00:00:00 2001 From: xiezhiwen Date: Fri, 2 Jul 2021 11:31:56 +0800 Subject: [PATCH 07/51] =?UTF-8?q?=E9=80=9A=E8=81=94=E5=8D=A1=E6=89=A3?= =?UTF-8?q?=E5=87=AD=E8=AF=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InsertVoucherRentIncome.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertVoucherRentIncome.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertVoucherRentIncome.java index b5692d07e..0f6ae4480 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertVoucherRentIncome.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertVoucherRentIncome.java @@ -40,7 +40,7 @@ public class InsertVoucherRentIncome { */ // ѯǷеµ, δƾ֤() String sqls1="SELECT lri.RENT FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m')"; - // ѯµ, δƾ֤() + // ѯµ, δƾ֤W() String sqls2="SELECT lri.RENT FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT income_id,LRI_ID FROM lv_rent_income2 GROUP BY INCOME_ID,LRI_ID) LV2 ON LV2.INCOME_ID = LRI.PLAN_ID AND LV2.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.rent > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m')"; // ѯǰǷϢ() String sqls3="SELECT lri.PENALTY FROM lc_rent_income lri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lri.contract_id AND lrp.plan_list = lri.plan_list LEFT JOIN lb_contract_info lci ON lci.id = lrp.contract_id LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN (SELECT income_id,LRI_ID FROM lv_penalty_income GROUP BY INCOME_ID,LRI_ID) LV1 ON LV1.INCOME_ID = LRI.PLAN_ID AND LV1.LRI_ID = LRI.ID LEFT JOIN (SELECT INCOME_ID FROM LV_PENALTY_PLAN GROUP BY INCOME_ID) LV2 ON LV2.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN GROUP BY INCOME_ID) LV3 ON LV3.INCOME_ID = LRP.ID LEFT JOIN (SELECT INCOME_ID FROM LV_RENT_PLAN2 GROUP BY INCOME_ID) LV4 ON LV4.INCOME_ID = LRP.ID WHERE LRI.CHARGE_WAY IN ('AutoBuckle','WXPay','WXUnionPay','TLCollect') AND lri.penalty > 0 AND (LV1.INCOME_ID IS NULL AND LV2.INCOME_ID IS NULL AND LV3.INCOME_ID IS NULL AND LV4.INCOME_ID IS NULL) AND lul.is_main = 'Y' AND DATE_FORMAT(LRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d')"; @@ -155,20 +155,20 @@ public class InsertVoucherRentIncome { * - */ // µ()-() - String sqlqh1="SELECT lvri.RENT,lvri.income_id AS F58 FROM lv_rent_income lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT F58,F56 FROM VOUCHER_V8 WHERE module_name LIKE '%-յ()%' AND F58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle') AND lvri.rent > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '02' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m')"; + String sqlqh1="SELECT lvri.RENT,lvri.income_id AS F58 FROM lv_rent_income lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT F58,F56 FROM VOUCHER_V8 WHERE module_name LIKE '%-յ()%' AND F58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle','TLCollect') AND lvri.rent > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '02' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m')"; // ǰ()-() - String sqlqh2="SELECT lvri.RENT,lvri.income_id AS F58 FROM lv_rent_income2 lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle') AND lvri.rent > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '02' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m') "; + String sqlqh2="SELECT lvri.RENT,lvri.income_id AS F58 FROM lv_rent_income2 lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle','TLCollect') AND lvri.rent > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '02' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m') "; // Ϣ()-() - String sqlqh3="SELECT lvri.PENALTY,lvri.income_id AS F58 FROM lv_penalty_income lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%յϢ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle') AND lvri.PENALTY > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '02' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') "; + String sqlqh3="SELECT lvri.PENALTY,lvri.income_id AS F58 FROM lv_penalty_income lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%յϢ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle','TLCollect') AND lvri.PENALTY > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '02' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') "; /** * ֱ- */ // µ()-(ֱ) - String sqlqz1="SELECT lvri.RENT,lvri.income_id AS F58 FROM lv_rent_income lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle') AND lvri.rent > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '01' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m')"; + String sqlqz1="SELECT lvri.RENT,lvri.income_id AS F58 FROM lv_rent_income lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle','TLCollect') AND lvri.rent > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '01' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT(lrp.plan_date, '%Y-%m')"; // ǰ()-(ֱ) - String sqlqz2="SELECT lvri.RENT,lvri.income_id AS F58 FROM lv_rent_income2 lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle') AND lvri.rent > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '01' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m')"; + String sqlqz2="SELECT lvri.RENT,lvri.income_id AS F58 FROM lv_rent_income2 lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle','TLCollect') AND lvri.rent > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '01' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') AND DATE_FORMAT(NOW(),'%Y-%m')<> DATE_FORMAT(lrp.plan_date, '%Y-%m')"; // Ϣ()-(ֱ) - String sqlqz3="SELECT lvri.PENALTY,lvri.income_id AS F58 FROM lv_penalty_income lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%յϢ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle') AND lvri.PENALTY > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '01' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d')"; + String sqlqz3="SELECT lvri.PENALTY,lvri.income_id AS F58 FROM lv_penalty_income lvri LEFT JOIN lc_rent_plan lrp ON lrp.contract_id = lvri.contract_id AND lrp.id = lvri.income_id LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%յϢ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56) V8 ON V8.F58 = LVRI.INCOME_ID AND V8.F56 = LVRI.LRI_ID WHERE lvri.collect_status IN ('AutoBuckle','TLCollect') AND lvri.PENALTY > 0 AND LVRI.BUSINESSTYPE = '1' AND LVRI.LEAS_FORM = '01' AND V8.F58 IS NULL AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d')"; /** * -΢ */ @@ -218,20 +218,20 @@ public class InsertVoucherRentIncome { * -- */ // յ---µ-() - String sql_whereqh1 = "INSERT INTO voucher_v8 (id,evidence_message,periodyear,f15,f2,f3,f5,f6,f7,f8,f12,f1,f49,f50,f51,f52,F56,f59,f60,f61,f62,f65,f73,f74,f75,f76,v8_status,generate_date,v8_flag,module_name,entrydc,inputuserid,f58,f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յ--',LVRI.PLAN_LIST) ELSE 'յ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.rent WHEN LV.sort_number = '2' THEN LVRI.INTEREST ELSE 0.00 END f7,CASE WHEN lv.sort_number = '3' THEN lvri.corpus WHEN lv.sort_number = '4' THEN lvri.interest WHEN lv.sort_number = '5' THEN ROUND(lvri.interest / getTax (lci.leas_form,'Ϣ',lcct.start_date),2) WHEN lv.sort_number = '6' THEN (lvri.interest - ROUND(lvri.interest / getTax (lci.leas_form,'Ϣ',lcct.start_date),2)) ELSE 0.00 END f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID,lv.sort_number AS f59,CASE WHEN lv.sort_number = '1' OR lv.sort_number = '6' THEN '' ELSE lci.contract_number END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' WHEN lv.sort_number = '6' THEN '' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' WHEN lv.sort_number = '6' THEN '' ELSE lvri.cust_id END AS f65,CASE WHEN lv.sort_number = '5' THEN '0604' ELSE '' END AS f73,'' AS f74,'' AS f75,CASE WHEN lv.sort_number = '6' THEN (SELECT TAX_CODES FROM tax_code WHERE TAX_NUMBER = ROUND((getTax (lci.LEAS_FORM,'Ϣ',LCCT.START_DATE) - 1) * 100,0)) ELSE '' END AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_rent_income lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.SUBJECTS_CODE FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.LOAN_SUBJECT WHERE lvc.voucher_no IN ('PZ2018082100000142')) lv ON lv.proj_type = lci.LEAS_FORM LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM='02' AND V8.F58 IS NULL AND lvri.rent > 0 AND lvri.collect_status IN ('AutoBuckle') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; + String sql_whereqh1 = "INSERT INTO voucher_v8 (id,evidence_message,periodyear,f15,f2,f3,f5,f6,f7,f8,f12,f1,f49,f50,f51,f52,F56,f59,f60,f61,f62,f65,f73,f74,f75,f76,v8_status,generate_date,v8_flag,module_name,entrydc,inputuserid,f58,f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յ--',LVRI.PLAN_LIST) ELSE 'յ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.rent WHEN LV.sort_number = '2' THEN LVRI.INTEREST ELSE 0.00 END f7,CASE WHEN lv.sort_number = '3' THEN lvri.corpus WHEN lv.sort_number = '4' THEN lvri.interest WHEN lv.sort_number = '5' THEN ROUND(lvri.interest / getTax (lci.leas_form,'Ϣ',lcct.start_date),2) WHEN lv.sort_number = '6' THEN (lvri.interest - ROUND(lvri.interest / getTax (lci.leas_form,'Ϣ',lcct.start_date),2)) ELSE 0.00 END f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID,lv.sort_number AS f59,CASE WHEN lv.sort_number = '1' OR lv.sort_number = '6' THEN '' ELSE lci.contract_number END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' WHEN lv.sort_number = '6' THEN '' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' WHEN lv.sort_number = '6' THEN '' ELSE lvri.cust_id END AS f65,CASE WHEN lv.sort_number = '5' THEN '0604' ELSE '' END AS f73,'' AS f74,'' AS f75,CASE WHEN lv.sort_number = '6' THEN (SELECT TAX_CODES FROM tax_code WHERE TAX_NUMBER = ROUND((getTax (lci.LEAS_FORM,'Ϣ',LCCT.START_DATE) - 1) * 100,0)) ELSE '' END AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_rent_income lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.SUBJECTS_CODE FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.LOAN_SUBJECT WHERE lvc.voucher_no IN ('PZ2018082100000142')) lv ON lv.proj_type = lci.LEAS_FORM LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM='02' AND V8.F58 IS NULL AND lvri.rent > 0 AND lvri.collect_status IN ('AutoBuckle','TLCollect') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; // յ---µ-() - String sql_whereqh2 = "INSERT INTO voucher_v8 (id,evidence_message,periodyear,f15,F2,f3,f5,f6,f7,f8,f12,f1,f49,f50,f51,f52,F56,f59,f60,f61,f62,f65,f73,f74,f75,f76,v8_status,generate_date,v8_flag,module_name,entrydc,inputuserid,f58,f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յ--',LVRI.PLAN_LIST) ELSE 'յ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.rent ELSE 0.00 END f7,CASE WHEN lv.sort_number = '2' THEN lvri.corpus WHEN lv.sort_number = '3' THEN lvri.interest ELSE 0.00 END f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID AS F56,lv.sort_number AS f59,CASE WHEN lv.sort_number = '1' THEN '' ELSE lci.contract_number END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' ELSE lvri.cust_id END AS f65,'' AS f73,'' AS f74,'' AS f75,'' AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_rent_income2 lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.SUBJECTS_CODE FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.LOAN_SUBJECT WHERE lvc.voucher_no IN ('PZ2018082100000143')) lv ON lv.proj_type = lci.leas_form LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM='02' AND V8.F58 IS NULL AND lvri.rent > 0 AND lvri.collect_status IN ('AutoBuckle') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; + String sql_whereqh2 = "INSERT INTO voucher_v8 (id,evidence_message,periodyear,f15,F2,f3,f5,f6,f7,f8,f12,f1,f49,f50,f51,f52,F56,f59,f60,f61,f62,f65,f73,f74,f75,f76,v8_status,generate_date,v8_flag,module_name,entrydc,inputuserid,f58,f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յ--',LVRI.PLAN_LIST) ELSE 'յ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.rent ELSE 0.00 END f7,CASE WHEN lv.sort_number = '2' THEN lvri.corpus WHEN lv.sort_number = '3' THEN lvri.interest ELSE 0.00 END f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE='') THEN DATE_FORMAT(NOW(),'%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID AS F56,lv.sort_number AS f59,CASE WHEN lv.sort_number = '1' THEN '' ELSE lci.contract_number END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' ELSE lvri.cust_id END AS f65,'' AS f73,'' AS f74,'' AS f75,'' AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_rent_income2 lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.SUBJECTS_CODE FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.LOAN_SUBJECT WHERE lvc.voucher_no IN ('PZ2018082100000143')) lv ON lv.proj_type = lci.leas_form LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM='02' AND V8.F58 IS NULL AND lvri.rent > 0 AND lvri.collect_status IN ('AutoBuckle','TLCollect') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; //յϢ---() - String sql_whereqh3 = "INSERT INTO voucher_v8 ( id, evidence_message, periodyear, f15, f2, f3, f5, f6, f7, f8, f12, f1, f49, f50, f51, f52,F56, f59, f60, f61, f62, f65, f73, f74, f75,f76, v8_status, generate_date, v8_flag, module_name, entrydc, inputuserid, f58, f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE, '%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE AS f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յϢ--',LVRI.PLAN_LIST) ELSE 'յϢ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.penalty ELSE 0.00 END AS f7,CASE WHEN lv.sort_number = '2' THEN ROUND(lvri.penalty / getTax (LCI.LEAS_FORM,'Ϣ',lcct.start_date),2) WHEN lv.sort_number = '3' THEN lvri.penalty - (ROUND(lvri.penalty /getTax (LCI.LEAS_FORM,'Ϣ',lcct.start_date),2)) ELSE 0.00 END AS f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE, '%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE, '%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE, '%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID AS F56,lv.sort_number AS f59,CASE WHEN lv.sort_number = '2' THEN lci.contract_number ELSE '' END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' WHEN lv.sort_number = '3' THEN '' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' WHEN lv.sort_number = '3' THEN '' ELSE lvri.cust_id END AS f65,CASE WHEN lv.sort_number = '2' THEN '0603' ELSE '' END AS f73,'' AS f74,'' AS f75,CASE WHEN lv.sort_number = '3' THEN (SELECT TAX_CODES FROM tax_code WHERE TAX_NUMBER = ROUND((getTax (lci.LEAS_FORM,'Ϣ',LCCT.START_DATE) - 1) * 100,0)) ELSE '' END AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_penalty_income lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.subjects_code FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.loan_subject WHERE lvc.voucher_no IN ('PZ2018082100000144')) lv ON lv.proj_type = lci.leas_form LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%յϢ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM='02' AND V8.F58 IS NULL AND lvri.penalty > 0 AND lvri.collect_status IN ('AutoBuckle') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; + String sql_whereqh3 = "INSERT INTO voucher_v8 ( id, evidence_message, periodyear, f15, f2, f3, f5, f6, f7, f8, f12, f1, f49, f50, f51, f52,F56, f59, f60, f61, f62, f65, f73, f74, f75,f76, v8_status, generate_date, v8_flag, module_name, entrydc, inputuserid, f58, f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE, '%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE AS f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յϢ--',LVRI.PLAN_LIST) ELSE 'յϢ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.penalty ELSE 0.00 END AS f7,CASE WHEN lv.sort_number = '2' THEN ROUND(lvri.penalty / getTax (LCI.LEAS_FORM,'Ϣ',lcct.start_date),2) WHEN lv.sort_number = '3' THEN lvri.penalty - (ROUND(lvri.penalty /getTax (LCI.LEAS_FORM,'Ϣ',lcct.start_date),2)) ELSE 0.00 END AS f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE, '%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE, '%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE, '%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID AS F56,lv.sort_number AS f59,CASE WHEN lv.sort_number = '2' THEN lci.contract_number ELSE '' END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' WHEN lv.sort_number = '3' THEN '' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' WHEN lv.sort_number = '3' THEN '' ELSE lvri.cust_id END AS f65,CASE WHEN lv.sort_number = '2' THEN '0603' ELSE '' END AS f73,'' AS f74,'' AS f75,CASE WHEN lv.sort_number = '3' THEN (SELECT TAX_CODES FROM tax_code WHERE TAX_NUMBER = ROUND((getTax (lci.LEAS_FORM,'Ϣ',LCCT.START_DATE) - 1) * 100,0)) ELSE '' END AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_penalty_income lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.subjects_code FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.loan_subject WHERE lvc.voucher_no IN ('PZ2018082100000144')) lv ON lv.proj_type = lci.leas_form LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%յϢ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM='02' AND V8.F58 IS NULL AND lvri.penalty > 0 AND lvri.collect_status IN ('AutoBuckle','TLCollect') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; /** * -ֱ- */ // յ---µ-(ֱ) - String sql_whereqz1 = "INSERT INTO voucher_v8 (id,evidence_message,periodyear,f15,f2,f3,f5,f6,f7,f8,f12,f1,f49,f50,f51,f52,F56,f59,f60,f61,f62,f65,f73,f74,f75,f76,v8_status,generate_date,v8_flag,module_name,entrydc,inputuserid,f58,f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յ--',LVRI.PLAN_LIST) ELSE 'յ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN LV.sort_number = '1' THEN LVRI.RENT WHEN LV.sort_number = '2' THEN LVRI.INTEREST WHEN LV.sort_number = '3' THEN (LVRI.CORPUS-ROUND(LVRI.CORPUS / getTax (LCI.LEAS_FORM,'',LCCT.START_DATE),2)) ELSE 0.00 END f7,CASE WHEN lv.sort_number = '4' THEN lvri.corpus WHEN lv.sort_number = '5' THEN lvri.interest WHEN lv.sort_number = '6' THEN ROUND(lvri.interest / getTax (lci.leas_form,'Ϣ',lcct.start_date),2) WHEN lv.sort_number = '7' THEN ((LVRI.CORPUS - ROUND(LVRI.CORPUS /getTax(LCI.LEAS_FORM,'',LCCT.START_DATE),2))+(lvri.interest - ROUND(lvri.interest /getTax(LCI.LEAS_FORM,'Ϣ',LCCT.START_DATE),2))) ELSE 0.00 END f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID AS F56,lv.sort_number AS f59,CASE WHEN lv.sort_number = '1' OR lv.sort_number = '7' THEN '' ELSE lci.contract_number END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' WHEN lv.sort_number = '7' THEN '' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' WHEN lv.sort_number = '7' THEN '' ELSE lvri.cust_id END AS f65,CASE WHEN lv.sort_number = '6' THEN '0604' ELSE '' END AS f73,'' AS f74,'' AS f75,CASE WHEN lv.sort_number = '7' THEN (SELECT TAX_CODES FROM tax_code WHERE TAX_NUMBER = ROUND((getTax(lci.LEAS_FORM,'Ϣ',LCCT.START_DATE) - 1) * 100,0)) ELSE '' END AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_rent_income lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.SUBJECTS_CODE FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.LOAN_SUBJECT WHERE lvc.voucher_no IN ('PZ2019070100000008')) lv ON lv.proj_type = lci.LEAS_FORM LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM = '01' AND V8.F58 IS NULL AND lvri.rent > 0 AND lvri.collect_status IN ('AutoBuckle') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; + String sql_whereqz1 = "INSERT INTO voucher_v8 (id,evidence_message,periodyear,f15,f2,f3,f5,f6,f7,f8,f12,f1,f49,f50,f51,f52,F56,f59,f60,f61,f62,f65,f73,f74,f75,f76,v8_status,generate_date,v8_flag,module_name,entrydc,inputuserid,f58,f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յ--',LVRI.PLAN_LIST) ELSE 'յ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN LV.sort_number = '1' THEN LVRI.RENT WHEN LV.sort_number = '2' THEN LVRI.INTEREST WHEN LV.sort_number = '3' THEN (LVRI.CORPUS-ROUND(LVRI.CORPUS / getTax (LCI.LEAS_FORM,'',LCCT.START_DATE),2)) ELSE 0.00 END f7,CASE WHEN lv.sort_number = '4' THEN lvri.corpus WHEN lv.sort_number = '5' THEN lvri.interest WHEN lv.sort_number = '6' THEN ROUND(lvri.interest / getTax (lci.leas_form,'Ϣ',lcct.start_date),2) WHEN lv.sort_number = '7' THEN ((LVRI.CORPUS - ROUND(LVRI.CORPUS /getTax(LCI.LEAS_FORM,'',LCCT.START_DATE),2))+(lvri.interest - ROUND(lvri.interest /getTax(LCI.LEAS_FORM,'Ϣ',LCCT.START_DATE),2))) ELSE 0.00 END f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID AS F56,lv.sort_number AS f59,CASE WHEN lv.sort_number = '1' OR lv.sort_number = '7' THEN '' ELSE lci.contract_number END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' WHEN lv.sort_number = '7' THEN '' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' WHEN lv.sort_number = '7' THEN '' ELSE lvri.cust_id END AS f65,CASE WHEN lv.sort_number = '6' THEN '0604' ELSE '' END AS f73,'' AS f74,'' AS f75,CASE WHEN lv.sort_number = '7' THEN (SELECT TAX_CODES FROM tax_code WHERE TAX_NUMBER = ROUND((getTax(lci.LEAS_FORM,'Ϣ',LCCT.START_DATE) - 1) * 100,0)) ELSE '' END AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_rent_income lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.SUBJECTS_CODE FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.LOAN_SUBJECT WHERE lvc.voucher_no IN ('PZ2019070100000008')) lv ON lv.proj_type = lci.LEAS_FORM LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM = '01' AND V8.F58 IS NULL AND lvri.rent > 0 AND lvri.collect_status IN ('AutoBuckle','TLCollect') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; // յ---µ-(ֱ) - String sql_whereqz2 = "INSERT INTO voucher_v8 (id,evidence_message,periodyear,f15,F2,f3,f5,f6,f7,f8,f12,f1,f49,f50,f51,f52,F56,f59,f60,f61,f62,f65,f73,f74,f75,f76,v8_status,generate_date,v8_flag,module_name,entrydc,inputuserid,f58,f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յ--',LVRI.PLAN_LIST) ELSE 'յ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.rent ELSE 0.00 END f7,CASE WHEN lv.sort_number = '2' THEN lvri.corpus WHEN lv.sort_number = '3' THEN lvri.interest ELSE 0.00 END f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID AS F56,lv.sort_number AS f59,CASE WHEN lv.sort_number = '1' THEN '' ELSE lci.contract_number END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' ELSE lvri.cust_id END AS f65,'' AS f73,'' AS f74,'' AS f75,'' AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_rent_income2 lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.SUBJECTS_CODE FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.LOAN_SUBJECT WHERE lvc.voucher_no IN ('PZ2019070100000009')) lv ON lv.proj_type = lci.leas_form LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM = '01' AND V8.F58 IS NULL AND lvri.rent > 0 AND lvri.collect_status IN ('AutoBuckle') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; + String sql_whereqz2 = "INSERT INTO voucher_v8 (id,evidence_message,periodyear,f15,F2,f3,f5,f6,f7,f8,f12,f1,f49,f50,f51,f52,F56,f59,f60,f61,f62,f65,f73,f74,f75,f76,v8_status,generate_date,v8_flag,module_name,entrydc,inputuserid,f58,f67,F47,F48) SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յ--',LVRI.PLAN_LIST) ELSE 'յ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.rent ELSE 0.00 END f7,CASE WHEN lv.sort_number = '2' THEN lvri.corpus WHEN lv.sort_number = '3' THEN lvri.interest ELSE 0.00 END f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID AS F56,lv.sort_number AS f59,CASE WHEN lv.sort_number = '1' THEN '' ELSE lci.contract_number END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' ELSE lvri.cust_id END AS f65,'' AS f73,'' AS f74,'' AS f75,'' AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_rent_income2 lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.SUBJECTS_CODE FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.LOAN_SUBJECT WHERE lvc.voucher_no IN ('PZ2019070100000009')) lv ON lv.proj_type = lci.leas_form LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%-յ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM = '01' AND V8.F58 IS NULL AND lvri.rent > 0 AND lvri.collect_status IN ('AutoBuckle','TLCollect') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; //յϢ---(ֱ) - String sql_whereqz3 = "INSERT INTO voucher_v8 ( id, evidence_message, periodyear, f15, f2, f3, f5, f6, f7, f8, f12, f1, f49, f50, f51, f52,F56, f59, f60, f61, f62, f65, f73, f74, f75,f76, v8_status, generate_date, v8_flag, module_name, entrydc, inputuserid, f58, f67,F47,F48)SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE AS f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յϢ--',LVRI.PLAN_LIST) ELSE 'յϢ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.penalty ELSE 0.00 END AS f7,CASE WHEN lv.sort_number = '2' THEN ROUND(lvri.penalty / getTax (LCI.LEAS_FORM,'Ϣ',lcct.start_date),2) WHEN lv.sort_number = '3' THEN lvri.penalty - (ROUND(lvri.penalty / getTax (LCI.LEAS_FORM,'Ϣ',lcct.start_date),2)) ELSE 0.00 END AS f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID,lv.sort_number AS f59,CASE WHEN lv.sort_number = '2' THEN lci.contract_number ELSE '' END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' WHEN lv.sort_number = '3' THEN '' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' WHEN lv.sort_number = '3' THEN '' ELSE lvri.cust_id END AS f65,CASE WHEN lv.sort_number = '2' THEN '0603' ELSE '' END AS f73,'' AS f74,'' AS f75,CASE WHEN lv.sort_number = '3' THEN (SELECT TAX_CODES FROM tax_code WHERE TAX_NUMBER = ROUND((getTax (lci.LEAS_FORM,'Ϣ',LCCT.START_DATE) - 1) * 100,0)) ELSE '' END AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_penalty_income lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.subjects_code FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.loan_subject WHERE lvc.voucher_no IN ('PZ2019070100000007')) lv ON lv.proj_type = lci.leas_form LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%յϢ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM = '01' AND V8.F58 IS NULL AND lvri.penalty > 0 AND lvri.collect_status IN ('AutoBuckle') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; + String sql_whereqz3 = "INSERT INTO voucher_v8 ( id, evidence_message, periodyear, f15, f2, f3, f5, f6, f7, f8, f12, f1, f49, f50, f51, f52,F56, f59, f60, f61, f62, f65, f73, f74, f75,f76, v8_status, generate_date, v8_flag, module_name, entrydc, inputuserid, f58, f67,F47,F48)SELECT REPLACE (UUID(), '-', '') id,'ƾ֤' evidence_message,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) periodyear,lvri.HIRE_DATE AS f15,lv.SUBJECTS_CODE AS f2,lvri.voucher_f3 AS f3,CASE WHEN LVRI.PLAN_LIST IS NOT NULL THEN CONCAT('յϢ--',LVRI.PLAN_LIST) ELSE 'յϢ-' END AS f5,lv.LOAN_SUBJECT AS f6,CASE WHEN lv.sort_number = '1' THEN lvri.penalty ELSE 0.00 END AS f7,CASE WHEN lv.sort_number = '2' THEN ROUND(lvri.penalty / getTax (LCI.LEAS_FORM,'Ϣ',lcct.start_date),2) WHEN lv.sort_number = '3' THEN lvri.penalty - (ROUND(lvri.penalty / getTax (LCI.LEAS_FORM,'Ϣ',lcct.start_date),2)) ELSE 0.00 END AS f8,'ʱ-ÿʵƾ֤' AS f12,CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END AS f1,LCI.SUBJECTID AS f49,LCI.SUBJECTNAME AS f50,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,1,4) AS f51,SUBSTR(CASE WHEN (lvri.ACCOUNTING_DATE IS NULL OR lvri.ACCOUNTING_DATE = '') THEN DATE_FORMAT(NOW(), '%Y/%m/%d') ELSE DATE_FORMAT(lvri.ACCOUNTING_DATE,'%Y/%m/%d') END,6,2) AS f52,LVRI.LRI_ID,lv.sort_number AS f59,CASE WHEN lv.sort_number = '2' THEN lci.contract_number ELSE '' END AS f60,CASE WHEN lv.sort_number = '1' THEN 'C˴ͻ' WHEN lv.sort_number = '3' THEN '' ELSE lvri.cust_name END AS f61,lv.LOAN_SUBJECT AS f62,CASE WHEN lv.sort_number = '1' THEN 'APZL00000000DC' WHEN lv.sort_number = '3' THEN '' ELSE lvri.cust_id END AS f65,CASE WHEN lv.sort_number = '2' THEN '0603' ELSE '' END AS f73,'' AS f74,'' AS f75,CASE WHEN lv.sort_number = '3' THEN (SELECT TAX_CODES FROM tax_code WHERE TAX_NUMBER = ROUND((getTax (lci.LEAS_FORM,'Ϣ',LCCT.START_DATE) - 1) * 100,0)) ELSE '' END AS f76,'' AS v8_status,DATE_FORMAT(NOW(), '%Y/%m/%d %H:%i:%s') AS generate_date,'0' AS v8_flag,lv.modular_number AS module_name,CASE WHEN lv.loan_direction = '1' THEN '1' ELSE '-1' END AS entrydc,'admin' AS inputuserid,lvri.income_id AS f58,lci.leas_form AS f67,LCI.CONTRACT_NUMBER,OI.OWN_NUMBER FROM lv_penalty_income lvri LEFT JOIN lb_contract_info lci ON lci.id = lvri.contract_id LEFT JOIN lc_calc_condition lcct ON lcct.contract_id = lci.id LEFT JOIN (SELECT OWN_NUMBER,MAX(OWN_NAME) AS OWN_NAME FROM OWN_INFO GROUP BY OWN_NUMBER) OI ON OI.OWN_NAME=LCI.SUBJECTNAME LEFT JOIN (SELECT lvc.PROJ_TYPE,lvl.id,lvl.LOAN_DIRECTION,lvc.OWNED_COMPANY,lvl.sort_number,lvl.loan_subject,lvc.modular_number,lsc.subjects_code FROM lv_voucher_config lvc LEFT JOIN lv_voucher_loan lvl ON lvl.VOUCHER_ID = lvc.id LEFT JOIN lv_stacts_config lsc ON lsc.id = lvl.loan_subject WHERE lvc.voucher_no IN ('PZ2019070100000007')) lv ON lv.proj_type = lci.leas_form LEFT JOIN (SELECT f58,F56 FROM voucher_v8 WHERE module_name LIKE '%յϢ()%' AND f58 IS NOT NULL AND F56 IS NOT NULL GROUP BY F58,F56)V8 ON V8.F58=LVRI.INCOME_ID AND V8.F56=LVRI.LRI_ID WHERE LCI.BUSINESSTYPE = '1' AND LCI.LEAS_FORM = '01' AND V8.F58 IS NULL AND lvri.penalty > 0 AND lvri.collect_status IN ('AutoBuckle','TLCollect') AND DATE_FORMAT(LVRI.HIRE_DATE, '%Y/%m/%d') >= DATE_FORMAT('2020/05/01', '%Y/%m/%d') ORDER BY lvri.voucher_f3 "; /** * --΢ */ From e3feac87a3eefaf7f986a4b6c72fc386b8894276 Mon Sep 17 00:00:00 2001 From: xiezhiwen Date: Mon, 5 Jul 2021 15:10:00 +0800 Subject: [PATCH 08/51] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=A1=E5=8F=A3?= =?UTF-8?q?=E5=88=B0=E8=B4=A6=E5=87=AD=E8=AF=81=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionAudit/VERIFICATIONSPARE.jsp | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/VERIFICATIONSPARE.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/VERIFICATIONSPARE.jsp index d6a117895..7fabd0162 100644 --- a/WebContent/Tenwa/Lease/Flow/CollectionAudit/VERIFICATIONSPARE.jsp +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/VERIFICATIONSPARE.jsp @@ -166,20 +166,24 @@ if(!confirm("Ϊ0ǷȷϺ")){return;} } if(confirm("κźͺϢ޸ģǷȷϺ")){ - as_save("myiframe0","parent.AsDialog.ClosePage()"); - var SPARE_BATCH_NO = getItemValue(0, 0, "SPARE_BATCH_NO"); // κ - var OWN_NUMBER = getItemValue(0, 0, "OWN_NUMBER"); // ˺ - var CHARGEBACK_DATE_S = getItemValue(0, 0, "CHARGEBACK_DATE_S"); // ۿɹ - var CHARGEBACK_MONEY_S = getItemValue(0, 0, "CHARGEBACK_MONEY_S"); // ۿɹ - var ACHIEVED_MONEY = getItemValue(0, 0, "ACHIEVED_MONEY"); // е˽ - var ACHIEVED_DATE = getItemValue(0, 0, "ACHIEVED_DATE"); // е - var ACC_TITLE = getItemValue(0, 0, "ACC_TITLE"); // пĿ - var SEREVICE_CHARGE = getItemValue(0, 0, "SEREVICE_CHARGE"); // - var CHARGEBACK_BALANCE = getItemValue(0, 0, "CHARGEBACK_BALANCE"); // - var sparam = "SPARE_BATCH_NO="+SPARE_BATCH_NO+",ACHIEVED_MONEY="+ACHIEVED_MONEY+",SEREVICE_CHARGE="+SEREVICE_CHARGE+",CHARGEBACK_BALANCE="+CHARGEBACK_BALANCE+",CHARGEBACK_MONEY_S="+CHARGEBACK_MONEY_S+",ACHIEVED_DATE="+ACHIEVED_DATE+",OWN_NUMBER="+OWN_NUMBER+",ACC_TITLE="+ACC_TITLE+",userId="+"<%=CurUser.getUserID()%>"; - // ɿۻƾ֤ - var result = RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.CreateVoucherForCardSummarizing","createCardSummarizingVoucher",sparam); - } + as_save("myiframe0","createVoucher()"); + } + } + + function createVoucher(){ + var SPARE_BATCH_NO = getItemValue(0, 0, "SPARE_BATCH_NO"); // κ + var OWN_NUMBER = getItemValue(0, 0, "OWN_NUMBER"); // ˺ + var CHARGEBACK_DATE_S = getItemValue(0, 0, "CHARGEBACK_DATE_S"); // ۿɹ + var CHARGEBACK_MONEY_S = getItemValue(0, 0, "CHARGEBACK_MONEY_S"); // ۿɹ + var ACHIEVED_MONEY = getItemValue(0, 0, "ACHIEVED_MONEY"); // е˽ + var ACHIEVED_DATE = getItemValue(0, 0, "ACHIEVED_DATE"); // е + var ACC_TITLE = getItemValue(0, 0, "ACC_TITLE"); // пĿ + var SEREVICE_CHARGE = getItemValue(0, 0, "SEREVICE_CHARGE"); // + var CHARGEBACK_BALANCE = getItemValue(0, 0, "CHARGEBACK_BALANCE"); // + var sparam = "SPARE_BATCH_NO="+SPARE_BATCH_NO+",ACHIEVED_MONEY="+ACHIEVED_MONEY+",SEREVICE_CHARGE="+SEREVICE_CHARGE+",CHARGEBACK_BALANCE="+CHARGEBACK_BALANCE+",CHARGEBACK_MONEY_S="+CHARGEBACK_MONEY_S+",ACHIEVED_DATE="+ACHIEVED_DATE+",OWN_NUMBER="+OWN_NUMBER+",ACC_TITLE="+ACC_TITLE+",userId="+"<%=CurUser.getUserID()%>"; + // ɿۻƾ֤ + var result = RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.CreateVoucherForCardSummarizing","createCardSummarizingVoucher",sparam); + parent.AsDialog.ClosePage(); } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file From e979996c8b591722e96d9f9237c8928cce2ffbf2 Mon Sep 17 00:00:00 2001 From: tangft <32189@windows10.microdone.cn> Date: Tue, 20 Jul 2021 16:18:15 +0800 Subject: [PATCH 09/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=9E=8D=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LoanBasicInfo.jsp | 43 ++++++++- .../LoanSimulation/lbSubsectionTempList.jsp | 44 +++++++++ WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 29 ++++++ .../reckon/executor/ManageSubsectionData.java | 66 +++++++++++++ .../tenwa/calc/LB_SUBSECTION_INFO_TEMP.java | 92 +++++++++++++++++++ 5 files changed, 273 insertions(+), 1 deletion(-) create mode 100644 WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp create mode 100644 calc/com/tenwa/reckon/executor/ManageSubsectionData.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 9c23a310f..78b172d26 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -18,6 +18,7 @@ <%@ include file="/Frame/resources/include/include_begin_info.jspf"%> <% /*ȡ*/ + String flowNo = CurPage.getParameter("FlowNo"); String flowunid = CurPage.getParameter("FlowUnid"); String plannumber=CurPage.getParameter("plannumber"); String productId=CurPage.getParameter("ProductId"); @@ -149,6 +150,8 @@ doTemp.setHtmlEvent("FIRST_PLAN_DATE", "onchange", "changeFistPlanDate");//һڼƻ doTemp.setHtmlEvent("CORPUS_RATIO", "onchange", "changeCorpusRatio");//ڱ doTemp.setHtmlEvent("EQUIP_AMT", "onchange", "changgeCompare");// + doTemp.setHtmlEvent("is_subsection", "onchange", "isSubsection");//Ƿֶ + doTemp.setHtmlEvent("subsection_num", "onchange", "subsectionNum");//Ƿֶ /*ֶ¼*/ /*ģ*/ @@ -180,6 +183,7 @@ doTemp.setDefaultValue(planCName, plannumber); doTemp.setDefaultValue("flowunid", flowunid); doTemp.setDefaultValue("PRODUCT_NAME", productName); + doTemp.setDefaultValue("is_subsection", "no"); doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'"); /* if(null!=ishistory&&ishistory.equals("true")){ --Dz뵽ʷеÿһݡ doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcCondtionInfoArachiveShow");//ʷʾʷ @@ -224,6 +228,8 @@ dwTemp.replaceColumn("condition_plan", "", CurPage.getObjectWindowOutput()); //dwTemp.replaceColumn("even_subsection", "", CurPage.getObjectWindowOutput()); //dwTemp.replaceColumn("knowing_config", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("subsection_info", "", CurPage.getObjectWindowOutput()); + String businessDate = DateHelper.getBusinessDate(); //ȡӦָ @@ -303,7 +309,11 @@ $(function(){ } var nominalPrice = "<%=nominalPrice%>" ; var carNum = parseInt("<%=carNum%>"); - setItemValue( 0, 0, 'NOMINAL_PRICE', Number(nominalPrice)*carNum ); + var flowNo = "<%=flowNo%>"; + if( "BusinessApplyFlow"==flowNo || "BusinessChangeFlow" == flowNo ){ + setItemValue( 0, 0, 'NOMINAL_PRICE', Number(nominalPrice)*carNum ); + } + isSubsection(); }); @@ -1557,5 +1567,36 @@ jQuery.validator.prototype.showLabel = function(element,message){ } fundError[id]=message; }; + + function isSubsection(){ + var isSubsection = getItemValue(0,getRow(),"is_subsection"); + if("yes" == isSubsection){ + showItem(0,"subsection_num",''); + showItem(0,"subsection_config",''); + setItemRequired(0,"subsection_num",true); + setItemRequired(0,"subsection_config",true); + var subsectionNum = getItemValue(0,getRow(),"subsection_num"); + if(typeof(subsectionNum) == "undefined" || subsectionNum.length == 0 ){ + subsectionNum = "0"; + } + $("#A_Group_0020").attr("style","display:block;");//ʾ + subsection_list.window.saveData(subsectionNum); + }else{ + showItem(0,"subsection_num",'none'); + showItem(0,"subsection_config",'none'); + setItemRequired(0,"subsection_num",false); + setItemRequired(0,"subsection_config",false); + $("#A_Group_0020").attr("style","display:none;");// + } + } + function subsectionNum(){ + var subsectionNum = getItemValue(0,getRow(),"subsection_num"); + if(typeof(subsectionNum) == "undefined" || subsectionNum.length == 0 ){ + subsectionNum = "0"; + } + subsection_list.window.saveData(subsectionNum); + } + + <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp b/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp new file mode 100644 index 000000000..bd40cb7b3 --- /dev/null +++ b/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2021-07-20 + Content: + History Log: + */ + String flowunid = CurPage.getParameter("flowunid"); + String projectId = CurPage.getParameter("projectId"); + ASObjectModel doTemp = new ASObjectModel("lbSubsectionTempList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--ΪGrid-- + dwTemp.ReadOnly = "0"; //ֻģʽ + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(flowunid); + + //0Ƿչʾ 1 Ȩ޿ 2 չʾ 3ťʾ 4ť 5ť¼ 6 7 8 9ͼ꣬CSSʽ 10 + String sButtons[][] = { + {"false","All","Button","","","newRecord()","","","","btn_icon_add",""}, + {"false","","Button","","","viewAndEdit()","","","","btn_icon_detail",""}, + {"false","","Button","ɾ","ɾ","if(confirm('ȷʵҪɾ?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 9d22dcaed..a9780c454 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4628,5 +4628,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/calc/com/tenwa/reckon/executor/ManageSubsectionData.java b/calc/com/tenwa/reckon/executor/ManageSubsectionData.java new file mode 100644 index 000000000..a48fd77bf --- /dev/null +++ b/calc/com/tenwa/reckon/executor/ManageSubsectionData.java @@ -0,0 +1,66 @@ +package com.tenwa.reckon.executor; + +import java.util.List; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; + +import jbo.app.tenwa.calc.LB_SUBSECTION_INFO_TEMP; + +public class ManageSubsectionData { + + private String subsectionNumber; + private String projectId; + private String flowunid; + + public String getSubsectionNumber() { + return subsectionNumber; + } + public void setSubsectionNumber(String subsectionNumber) { + this.subsectionNumber = subsectionNumber; + } + public String getProjectId() { + return projectId; + } + public void setProjectId(String projectId) { + this.projectId = projectId; + } + public String getFlowunid() { + return flowunid; + } + public void setFlowunid(String flowunid) { + this.flowunid = flowunid; + } + + public String saveSubsection(JBOTransaction tx) throws Exception { + Integer sn = new Integer(subsectionNumber); + BizObjectManager lsitManger = JBOFactory.getBizObjectManager(LB_SUBSECTION_INFO_TEMP.CLASS_NAME, tx); + List lsitList = lsitManger.createQuery(" flowunid=:flowunid ").setParameter("flowunid", flowunid).getResultList(false); + if( sn >= 0 ) { + if(lsitList.size()==0 || sn > lsitList.size()) { + int i = ( lsitList.size()+1 ) ; + for( ; i<=sn ; i++ ) { + BizObject lsit = lsitManger.newObject(); + lsit.setAttributeValue("subsection_number", i); + lsit.setAttributeValue("projectid", projectId); + lsit.setAttributeValue("flowunid", flowunid); + lsitManger.saveObject(lsit); + } + }else if( sn < lsitList.size()){ + int i = (sn +1); + for( ; i<= lsitList.size() ; i++ ) { + BizObject lsit = lsitManger.createQuery("flowunid =:flowunid and subsection_number =:subsectionNumber").setParameter("flowunid", flowunid).setParameter("subsectionNumber", i).getSingleResult(true); + if(lsit!=null ) { + lsitManger.deleteObject(lsit); + } + } + } + } + return "success"; + } + + + +} diff --git a/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java new file mode 100644 index 000000000..dd6aa7433 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java @@ -0,0 +1,92 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LB_SUBSECTION_INFO_TEMP{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LB_SUBSECTION_INFO_TEMP"; + /** + * STRING(32)
+ */ + public static final String id = "id"; + /** + * ֶ STRING(32)
+ */ + public static final String subsection_number = "subsection_number"; + /** + * ʶ STRING(32)
+ */ + public static final String clean_lease_ratio = "clean_lease_ratio"; + /** + * ʶ STRING(10)
+ */ + public static final String clean_lease_money = "clean_lease_money"; + /** + * ׼ʣϢǰʣ STRING(18)
+ */ + public static final String standard_ratio = "standard_ratio"; + /** + * ƷʣϢʣ STRING(10)
+ */ + public static final String product_ratio = "product_ratio"; + /** + * ʣͻʣ STRING(10)
+ */ + public static final String clean_lease_rate = "clean_lease_rate"; + /** + * ڴ STRING(10)
+ */ + public static final String income_number = "income_number"; + /** + * Ϣ STRING(20)
+ */ + public static final String discount_interest = "discount_interest"; + /** + * Ϣؿڴ STRING(32)
+ */ + public static final String discount_interest_number = "discount_interest_number"; + /** + * Ŀid STRING(32)
+ */ + public static final String projectid = "projectid"; + /** + * ͬid STRING(32)
+ */ + public static final String contract_id = "contract_id"; + /** + * ̱ STRING(32)
+ */ + public static final String flowunid = "flowunid"; + /** + * Ǽ STRING(32)
+ */ + public static final String inputuserid = "inputuserid"; + /** + * Ǽǻ STRING(32)
+ */ + public static final String inputorgid = "inputorgid"; + /** + * Ǽʱ STRING(32)
+ */ + public static final String inputtime = "inputtime"; + /** + * STRING(32)
+ */ + public static final String updateuserid = "updateuserid"; + /** + * » STRING(32)
+ */ + public static final String updateorgid = "updateorgid"; + /** + * ʱ STRING(32)
+ */ + public static final String updatetime = "updatetime"; +} \ No newline at end of file From fccae3de339f3f0d50477c87d84161812d37f26f Mon Sep 17 00:00:00 2001 From: tangft <32189@windows10.microdone.cn> Date: Thu, 22 Jul 2021 11:02:22 +0800 Subject: [PATCH 10/51] =?UTF-8?q?=E8=B5=B7=E7=A7=9F=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=89=A3=E6=AC=BE=E5=8D=A1=E4=BF=A1=E6=81=AF=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E6=B7=B1=E5=9C=B3=E4=B8=BB=E4=BD=93=E7=9A=84=E6=89=A3=E6=AC=BE?= =?UTF-8?q?=E6=B8=A0=E9=81=93=E7=BB=9F=E4=B8=80=E4=B8=BA=E5=B9=BF=E5=B7=9E?= =?UTF-8?q?=E9=93=B6=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LBDebitCard/AccountChangeFlowDebitCardInfo.jsp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp index 0a86b1829..f90dcb7aa 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp @@ -157,7 +157,11 @@ setItemValue(0,0,'bank_code',res[0]); setItemValue(0,0,'bank_type',res[1]); setItemValue(0,0,"bank_name",res[1]); - setItemValue(0,0,"collect_type",res[2]); + if("<%=subjectId%>"=="aa740e4111c111eaaa0000163e0e11e6"){//嶼ǹ + setItemValue(0,0,"collect_type","YLcollect"); + }else{ + setItemValue(0,0,"collect_type",res[2]); + } bool = false; } @@ -181,7 +185,11 @@ setItemValue(0,0,'bank_code',sReturn[0]); setItemValue(0,0,'bank_type',sReturn[1]); setItemValue(0,0,"bank_name",sReturn[1]); - setItemValue(0,0,"collect_type",sReturn[2]); + if("<%=subjectId%>"=="aa740e4111c111eaaa0000163e0e11e6"){//嶼ǹ + setItemValue(0,0,"collect_type","YLcollect"); + }else{ + setItemValue(0,0,"collect_type",sReturn[2]); + } },"ѡ"); } From a0a9fa89fb5edd1bbcce151a68236f2b88263d3d Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Fri, 23 Jul 2021 09:06:53 +0800 Subject: [PATCH 11/51] =?UTF-8?q?=E5=B9=BF=E5=8F=91=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 5 +++++ WebContent/WEB-INF/etc/jbo/jbo_lease.xml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index a9780c454..56093ba88 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -3409,7 +3409,12 @@ + + + + + diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml index 45e493c66..a96e9e2fa 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml @@ -3862,7 +3862,7 @@ - + From 48d8e9cbf1b1487abf9909d4ff3275c2fba74152 Mon Sep 17 00:00:00 2001 From: zhulh Date: Fri, 23 Jul 2021 17:43:55 +0800 Subject: [PATCH 12/51] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=88=86=E6=AE=B5=E8=9E=8D=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCCalcSubsectionInfoTempList.jsp | 117 + .../LoanSimulation/LoanBasicInfo.jsp | 209 +- .../LoanSimulation/lbSubsectionTempList.jsp | 44 - .../page/jspf/include/jsp_head_res_dw.jspf | 3 +- .../etc/app/component/component-config.xml | 2118 ++++++++--------- .../component/component-parameter-config.xml | 398 ++-- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 240 +- WebContent/js/decimal/decimal.min.js | 2 + WebContent/js/decimal/decimal.min.js.map | 1 + .../executor/CreateTransactionExecutor.java | 63 +- .../reckon/executor/ManageSubsectionData.java | 132 +- .../reckon/product/ProductCondition.java | 168 +- .../tenwa/calc/LB_SUBSECTION_INFO_TEMP.java | 92 - 13 files changed, 1891 insertions(+), 1696 deletions(-) create mode 100644 WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp delete mode 100644 WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp create mode 100644 WebContent/js/decimal/decimal.min.js create mode 100644 WebContent/js/decimal/decimal.min.js.map delete mode 100644 src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp new file mode 100644 index 000000000..d341e3d87 --- /dev/null +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -0,0 +1,117 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2021-07-20 + Content: + History Log: + */ + String flowunid = CurPage.getParameter("flowunid"); + String projectId = CurPage.getParameter("projectId"); + ASObjectModel doTemp = new ASObjectModel("LCCalcSubsectionInfoTemp"); + doTemp.setHtmlEvent( "DISCOUNT", "onblur", "changeDiscount" ); + doTemp.setHtmlEvent( "DISCOUNT_RATE", "onblur", "changeDiscountRate" ); + doTemp.setHtmlEvent( "CLEAN_LEASE_RATIO", "onblur", "changeCleanLeaseRatio" ); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--ΪGrid-- + dwTemp.ReadOnly = "0"; //ֻģʽ + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(flowunid); + + //0Ƿչʾ 1 Ȩ޿ 2 չʾ 3ťʾ 4ť 5ť¼ 6 7 8 9ͼ꣬CSSʽ 10 + String sButtons[][] = { + {"true","All","Button","","","save()","","","","btn_icon_save",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 78b172d26..a21918983 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -41,7 +41,7 @@ } TabCalBean tcb=TbBeanTools.getTabInfo(calType); String planCName=tcb.getPlanCName(); - // + // if(plannumber==null){ if("pay_process".equals(calType)||"onHire_process".equals(calType)){ BizObject condtion=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid and PAYMENT_NUMBER is not null and length(PAYMENT_NUMBER)>0 ").setParameter("flowunid", flowunid).getSingleResult(false); @@ -87,8 +87,8 @@ String carTypea = Sqlca.getString( "SELECT car_typea FROM lb_equipment_car_temp WHERE flowunid='" + flowunid + "' LIMIT 1 " ); //ȡƷõۿ String nominalPrice= ProductParamUtil.getProductParameterValue( productId, "PRD0315", "NOMINAL_PRICE", "CostType08" ) ; - - + + ASObjectModel doTemp = new ASObjectModel(templateNo); Map> productRates = ProductParamUtil.getProductComponentType(productId, "PRD0350"); @@ -108,7 +108,7 @@ } if("02".equals(termType)){ doTemp.setColumnAttribute("INCOME_NUMBER", "coleditstyle", "1"); - + } if("N".equals(isFixedRate)){ doTemp.setReadOnly("YEAR_RATE", false); @@ -123,7 +123,7 @@ doTemp.setHtmlEvent( "YEAR_RATE", "onchange", "changeYearRate" ); // ¼ doTemp.setHtmlEvent( "RENT_VALUE", "onchange", "changeRentValue" ); // Ԥ¼ doTemp.setDefaultValue( "GPS_DIFFERENCE", ProductParamUtil.getProductParameterValue( productId, "PRD0390", "GPSDifference", "GPSDifference" ) ); - + Map> ProductRevenue = ProductParamUtil.getProductComponentType(productId, "PRD0390"); Map bondAndPayments = ProductRevenue.get("bondAndPayments"); bondAndPaymentsMin = bondAndPayments.get("bondAndPayments-MIN"); @@ -150,8 +150,7 @@ doTemp.setHtmlEvent("FIRST_PLAN_DATE", "onchange", "changeFistPlanDate");//һڼƻ doTemp.setHtmlEvent("CORPUS_RATIO", "onchange", "changeCorpusRatio");//ڱ doTemp.setHtmlEvent("EQUIP_AMT", "onchange", "changgeCompare");// - doTemp.setHtmlEvent("is_subsection", "onchange", "isSubsection");//Ƿֶ - doTemp.setHtmlEvent("subsection_num", "onchange", "subsectionNum");//Ƿֶ + doTemp.setHtmlEvent("SUBSECTION_CONFIG", "onchange", "changeSubsectionConfig");// /*ֶ¼*/ /*ģ*/ @@ -159,13 +158,13 @@ //ù ProductCondition pc=new ProductCondition(); pc.getProductFundRules(doTemp, productId); - String calcRules=pc.getProductRules(doTemp, productId,vali); - + String calcRules=pc.getProductRules(doTemp, productId, vali, flowunid ); + //ȡƷ BizObject bo = JBOFactory.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,"typeno=:productID") .setParameter("productID", productId).getSingleResult(false); String productName = (bo==null)?"":bo.getAttribute("typename").getString(); - + //dzƷʶɱ༭ String productType = Sqlca.getString(new SqlObject("select attribute2 from business_type where typeno='"+productId+"'")); if("car_product".equals(productType)){ @@ -174,7 +173,7 @@ // doTemp.setVisible("CORPUS_RATIO", true); // doTemp.setVisible("CORPUS", true); // doTemp.setRequired("CORPUS_RATIO", true); - } + } if("quoted_price".equals(calType)){//ͻ ̺Ŵǿͻ doTemp.setDefaultValue("cust_id", flowunid); } @@ -183,33 +182,32 @@ doTemp.setDefaultValue(planCName, plannumber); doTemp.setDefaultValue("flowunid", flowunid); doTemp.setDefaultValue("PRODUCT_NAME", productName); - doTemp.setDefaultValue("is_subsection", "no"); doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'"); /* if(null!=ishistory&&ishistory.equals("true")){ --Dz뵽ʷеÿһݡ doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcCondtionInfoArachiveShow");//ʷʾʷ } */ /*ģ*/ - + /*ҳ*/ CurPage.getCurComp().setAttribute("RightType", null); Parameter p=new Parameter("plannumber",plannumber); Vector v=CurPage.parameterList; v.add(p); - /*ҳ*/ + /*ҳ*/ boolean flag=CurUser.hasRole("401"); if(CurUser.hasRole("401")){ doTemp.setVisible("CAUTION_MONEY_METHOD",false); doTemp.setVisible("DISCOUNT", false); // doTemp.setColumnAttribute("DISCOUNT","colvisible","0"); - } + } if(CurUser.hasRole("800R00000013")||CurUser.hasRole("800R00000014")||CurUser.hasRole("800R00000015")){ doTemp.setVisible("YEAR_RATE", true); doTemp.setVisible("RENT_RATIO",true); } - + ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request); - - + + dwTemp.Style = "2";//freeform if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ dwTemp.ReadOnly = "1";//ֻģʽ @@ -223,15 +221,15 @@ dwTemp.setAttr("showRatio", true); dwTemp.genHTMLObjectWindow(flowunid); CurPage.getCurComp().setAttribute("RightType", RightType); - + String compClientID = request.getParameter("CompClientID"); - dwTemp.replaceColumn("condition_plan", "", CurPage.getObjectWindowOutput()); - //dwTemp.replaceColumn("even_subsection", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("condition_plan", "", CurPage.getObjectWindowOutput()); + //dwTemp.replaceColumn("even_subsection", "", CurPage.getObjectWindowOutput()); //dwTemp.replaceColumn("knowing_config", "", CurPage.getObjectWindowOutput()); - dwTemp.replaceColumn("subsection_info", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("subsection_info", "", CurPage.getObjectWindowOutput()); String businessDate = DateHelper.getBusinessDate(); - + //ȡӦָ BizObject bo1 = JBOFactory.createBizObjectQuery(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME,"PROJECT_ID=:projectId") .setParameter("projectId",projectId).getSingleResult(false); @@ -259,7 +257,7 @@ $(function(){ rentOrRateOption=$("#RENT_OR_RATE").children(); incomeNumberYear=$("#INCOME_NUMBER_YEAR").children(); adjustType=$("#ADJUST_TYPE").children(); - + incomeNumber=$("#INCOME_NUMBER").children(); var fundRules=calcRules["fund"]; for(var key in fundRules){ @@ -294,11 +292,11 @@ $(function(){ if(inco[value]==1){ $("#INCOME_NUMBER").append(this); } - }); + }); $("#INCOME_NUMBER").val(inerNumber); - + count++; - }else{ + }else{ changeSettleMethod3(); } // getRatioByMoney(getObj(0, "EQUIP_AMT")); @@ -313,10 +311,21 @@ $(function(){ if( "BusinessApplyFlow"==flowNo || "BusinessChangeFlow" == flowNo ){ setItemValue( 0, 0, 'NOMINAL_PRICE', Number(nominalPrice)*carNum ); } - isSubsection(); - }); +function changeSubsectionConfig() { + var settleMethod = getItemValue( 0, 0, 'SETTLE_METHOD' ); + var subsectionConfig = getItemValue( 0, 0, 'SUBSECTION_CONFIG' ); + if ( 'segmented_financing' === settleMethod && '' !== subsectionConfig ) { + var equipAmt = getItemValue( 0, 0, 'EQUIP_AMT' ); + var cleanLeaseMoney = getItemValue( 0, 0, 'CLEAN_LEASE_MONEY' ); + var result = RunJavaMethodTrans( 'com.tenwa.reckon.executor.CreateTransactionExecutor', 'resetSubsection', 'flowunid=<%=flowunid%>,equipAmt=' + equipAmt + ',cleanLeasemoney=' + cleanLeaseMoney + ',subsectionConfig=' + subsectionConfig ); + if ( result === 'SUCCESS' ) { + subsection_list.window.reloadSelf(); + } + } +} + function changeYearRate() { if ( getItemValue( 0, 0, 'YEAR_RATE' ) !== '' ) { setItemValue( 0, 0, 'RENT_VALUE', '0.00' ); @@ -370,7 +379,7 @@ function importCustomerQuot(){ var param2="FlowUnid=<%=flowunid%>&calType=<%=calType%>&plannumber=<%=plannumber%>"; AsControl.OpenView("/Accounting/LoanSimulation/LoanBasicInfo.jsp",param2, "_self"); },"ѡͻ",''); - + } @@ -481,7 +490,7 @@ CalcControl.InitSecondPlanDate=function(){ var firstPlanDate=getItemValue(0,0,"FIRST_PLAN_DATE"); if(!firstPlanDate)return; setItemValue(0,0,"SECOND_PLAN_DATE",dateAdd('m',incomenumberyear,new Date(firstPlanDate)).format('yyyy\/MM\/dd')); - + } @@ -562,7 +571,7 @@ CalcControl.SettleMethodView=function(){ } var ids="RENT_OR_RATE,INCOME_NUMBER_YEAR,INCOME_INTERVAL_MONTH,INCOME_NUMBER,PERIOD_TYPE,GRACE,RATE_FLOAT_TYPE,BASE_RATE,RATE_FLOAT_AMT,YEAR_RATE,RENT_VALUE,FIRST_PLAN_DATE,SECOND_PLAN_DATE"; if(method == 'irregular_rent'||method=="even_subsection"){ - + setDisable(ids); var showIds="RATE_FLOAT_DAY,FIRST_PLAN_DATE,SECOND_PLAN_DATE,PERIOD_TYPE,GRACE"; if(method == 'irregular_rent'){ @@ -582,7 +591,7 @@ CalcControl.SettleMethodView=function(){ CalcControl.RentOrRateView(); setItemRequired(0,"YEAR_RATE",true); } - + // //ƻ var plan = ""; @@ -670,8 +679,13 @@ CalcControl.SettleMethodView=function(){ setItemRequired(0,"RATE",false); setItemRequired(0,"ADDITIONAL_RATE",false); } + + if ( 'segmented_financing' === method ) { + setItemRequired( 0, 'YEAR_RATE', false ); + } + var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>&ProductId=<%=productId%>&method="+method; - AsControl.OpenView("/Accounting/LoanSimulation/condition_plan.jsp",param, "frame_list"); + AsControl.OpenView("/Accounting/LoanSimulation/condition_plan.jsp",param, "frame_list"); } CalcControl.SettleMethodInit=function(){ var method=getItemValue(0,getRow(),"SETTLE_METHOD"); @@ -710,7 +724,7 @@ CalcControl.SettleMethodInit=function(){ setItemValue(0,0,"ADDITIONAL_RATE",calcRules['method'][method]["AdditionalRate"]); setItemValue(0,0,"INTEREST_DAY_TYPE",calcRules['method'][method]["InterestDayType"]); } - + } CalcControl.RentOrRateView=function(){ var rentOrRate = getItemValue(0,getRow(),"RENT_OR_RATE");//㷽ʽ @@ -721,22 +735,22 @@ CalcControl.RentOrRateView=function(){ setItemRequired(0,"RENT_VALUE",false); if(rentOrRate == 'rate'){// if(method=="irregular_rent"||method=="even_subsection"){ - + }else{ setEnable(ids); setEnable(ids2); CalcControl.RateFloatTypeView(); setItemRequired(0,"YEAR_RATE",true); } - - }else if(rentOrRate == 'rent'){// + + }else if(rentOrRate == 'rent'){// setDisable(ids); setEnable(ids2); setEnable('RENT_VALUE'); setEnable('INCOME_NUMBER'); setItemRequired(0,"YEAR_RATE",false); setItemRequired(0,"RENT_VALUE",true); - }else if(rentOrRate == 'knowing_rent'){//֪ ̶ֻܹ + }else if(rentOrRate == 'knowing_rent'){//֪ ̶ֻܹ setDisable(ids); setEnable(ids2); setItemRequired(0,"YEAR_RATE",false); @@ -809,19 +823,18 @@ CalcControl.RentOrRateInit=function(){ setItemValue(0,0,"FIRST_PLAN_DATE",""); setItemValue(0,0,"SECOND_PLAN_DATE",""); } - + } //ı㷽ʽ function changeSettleMethod(){ CalcControl.SettleMethodInit(); changeSettleMethod2(); CalcControl.SettleMethodView(); - if(count > 0){ - AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runDeleSubsection","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,planCName=<%=planCName%>,calType=<%=calType%>"); - - } + <%--if(count > 0){--%> + <%-- AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runDeleSubsection","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,planCName=<%=planCName%>,calType=<%=calType%>");--%> + <%--}--%> rentOrRateChange(); - + } @@ -841,8 +854,9 @@ function changeSettleMethod2(){ a["even_rent_day"]={"rate":1,"rent":1,"knowing_rent":1,"rent_period":1,"rent_period_360":1}; a["even_subsection"]={"rate":1}; a["irregular_rent"]={"rate":1}; + a["segmented_financing"]={"rate":1}; a[""]={}; - + //***********㷽 var settleMethod=getItemValue(0,0,"SETTLE_METHOD"); @@ -884,7 +898,16 @@ function changeSettleMethod2(){ }); $("#INCOME_NUMBER_YEAR").val(incomeValue); } - + + document.all( 'A_Group_0020' ).style.display = 'none'; + if ( settleMethod === 'segmented_financing' ) { + document.all( 'A_Group_0020' ).style.display = 'block'; + var param = 'CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>'; + AsControl.OpenView( '/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp', param, 'subsection_list' ); + setItemRequired( 0, 'SUBSECTION_CONFIG', true ); + setItemRequired( 0, 'INCOME_NUMBER', false ); + setItemRequired( 0, 'YEAR_RATE', false ); + } } function changeRateType(){ @@ -893,10 +916,10 @@ function changeRateType(){ a["base"]={"fixed":1,"add":1}; a["proportion"]={"fixed":1,"calculation":1,"add":1}; a["add"]={"fixed":1,"calculation":1,"add":1}; - + var RATE_FLOAT_TYPE=getItemValue(0,0,"RATE_FLOAT_TYPE"); var adjustTypeValue=getItemValue(0,0,"ADJUST_TYPE"); - + $("#ADJUST_TYPE").empty(); $(adjustType).each(function(){ var value=$(this).attr("value"); @@ -919,7 +942,7 @@ function getRatioByMoney(e){ var cleanLeaseMoney=getItemValue(0,0,"CLEAN_LEASE_MONEY");//ʶ var allMoney = 0; var fundRules=calcRules["fund"]; - + for(var key in fundRules) { var fundMoney = getItemValue(0,0,key);// if(typeof(fundRules[key]["financing"]) != "undefined" && fundRules[key]["financing"] == "true") { @@ -954,11 +977,11 @@ function getRatioByMoney(e){ cleanLeaseMoney = equipAmt - firstPayment + Number(allMoney); setItemValue(0, 0, "CLEAN_LEASE_MONEY", cleanLeaseMoney + ""); allMoney = eval(allMoney + "+" + equipAmt); - + for(var key in fundRules){ var fundMoney=getItemValue(0,0,key);// var fundRatio=getItemValue(0,0,key+"_RATIO");// - + var money=0; if(fundRules[key]["ratioFee"]=="EquipEndAmt"&&key!="FIRST_PAYMENT"){// money=cleanLeaseMoney; @@ -967,7 +990,7 @@ function getRatioByMoney(e){ }else{ money=equipAmt; } - + if(fundRules[key]["ratioType"]=="InputMode03"){// if(e.id==key){ if(Number(equipAmt)!=0){ @@ -991,7 +1014,7 @@ function getRatioByMoney(e){ } fundRatio=Number(fundMoney/money*100).toFixed(6); }else{ - fundRatio=Number(0).toFixed(6); + fundRatio=Number(0).toFixed(6); } setValue(key+"_RATIO",fundRatio); if(fundRules[key]["isShowRatio"]!="false"){ @@ -1104,7 +1127,7 @@ function saveRecord(sPostEvents){ alert('0 '); return ; } - + var termMin = parseInt("<%=termMin%>"); var termMax = parseInt("<%=termMax%>"); var incomeNumber = parseInt(getItemValue(0,0,"INCOME_NUMBER")); @@ -1169,7 +1192,7 @@ function saveRecord(sPostEvents){ alert("һƻڲСգ"); return ; } - + //֪֪жϱͱǷʶƥ䣿 var rentOrRate = getItemValue(0,getRow(),"RENT_OR_RATE"); var cleanLeaseMoney = getItemValue(0,getRow(),"CLEAN_LEASE_MONEY"); @@ -1204,16 +1227,16 @@ function saveRecord(sPostEvents){ alert("֤׸ͲڲƷõֵڣ"); return; } - + } // DzĻô񱨼ۡ var settleMethod = getItemValue(0,getRow(),"SETTLE_METHOD"); if(settleMethod == 'irregular_rent'){ - as_save("myiframe0"); + as_save("myiframe0"); }else{ as_save("myiframe0","run()"); - + } } function run() @@ -1233,15 +1256,15 @@ function run() function dateAdd(strInterval, num, date){ date = arguments[2] || new Date(); switch (strInterval) { - case 's' :return new Date(date.getTime() + (1000 * num)); - case 'n' :return new Date(date.getTime() + (60000 * num)); - case 'h' :return new Date(date.getTime() + (3600000 * num)); - case 'd' :return new Date(date.getTime() + (86400000 * num)); - case 'w' :return new Date(date.getTime() + ((86400000 * 7) * num)); - case 'm' :return new Date(date.getFullYear(), (date.getMonth()) + num, date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()); - case 'y' :return new Date((date.getFullYear() + num), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()); - } -} + case 's' :return new Date(date.getTime() + (1000 * num)); + case 'n' :return new Date(date.getTime() + (60000 * num)); + case 'h' :return new Date(date.getTime() + (3600000 * num)); + case 'd' :return new Date(date.getTime() + (86400000 * num)); + case 'w' :return new Date(date.getTime() + ((86400000 * 7) * num)); + case 'm' :return new Date(date.getFullYear(), (date.getMonth()) + num, date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()); + case 'y' :return new Date((date.getFullYear() + num), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()); + } +} //inputñ function setItemRatio(fieldName,unit){ var dwname=0; @@ -1374,13 +1397,12 @@ function changeFistPlanDate(){ function rentOrRateChange(){ CalcControl.RentOrRateInit(); CalcControl.RentOrRateView(); - - //document.all("frame_list_knowing").src = document.all("frame_list_knowing").src; - - if(count > 0){ - AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runDelteKnowing","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,planCName=<%=planCName%>,calType=<%=calType%>"); - } + //document.all("frame_list_knowing").src = document.all("frame_list_knowing").src; + + <%--if(count > 0){--%> + <%-- AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runDelteKnowing","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,planCName=<%=planCName%>,calType=<%=calType%>");--%> + <%--}--%> } @@ -1394,10 +1416,10 @@ function changeSettleMethod3(){ } <%-- var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>&method="+method; AsControl.OpenView("/Accounting/LoanSimulation/condition_plan.jsp",param, "frame_list"); --%> - + var rentOrRate ="<%=dwTemp.getData().get("RENT_OR_RATE")%>";//㷽ʽ // document.all("A_Group_calc_config").style.display="none"; - if(rentOrRate == 'knowing_rent'){//֪ ̶ֻܹ + if(rentOrRate == 'knowing_rent'){//֪ ̶ֻܹ document.all("A_Group_calc_config").style.display="block"; var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>"; AsControl.OpenView("/Accounting/LoanSimulation/KnowConfigList.jsp",param,"frame_list_knowing"); @@ -1530,7 +1552,7 @@ var fundError={}; var ele_error = document.createElement("li"); var errmsg = fundError[list[ii].element.getAttribute('name')];; ele_error.innerHTML = "" + errmsg + ""; - + if(ii>=iExtCount){ document.getElementById("ul_error_1").appendChild(ele_error); }else{ @@ -1557,7 +1579,7 @@ var fundError={}; } catch(e){} } -} +} jQuery.validator.prototype.showLabel = function(element,message){ var id=element.getAttribute('id'); @@ -1567,36 +1589,5 @@ jQuery.validator.prototype.showLabel = function(element,message){ } fundError[id]=message; }; - - function isSubsection(){ - var isSubsection = getItemValue(0,getRow(),"is_subsection"); - if("yes" == isSubsection){ - showItem(0,"subsection_num",''); - showItem(0,"subsection_config",''); - setItemRequired(0,"subsection_num",true); - setItemRequired(0,"subsection_config",true); - var subsectionNum = getItemValue(0,getRow(),"subsection_num"); - if(typeof(subsectionNum) == "undefined" || subsectionNum.length == 0 ){ - subsectionNum = "0"; - } - $("#A_Group_0020").attr("style","display:block;");//ʾ - subsection_list.window.saveData(subsectionNum); - }else{ - showItem(0,"subsection_num",'none'); - showItem(0,"subsection_config",'none'); - setItemRequired(0,"subsection_num",false); - setItemRequired(0,"subsection_config",false); - $("#A_Group_0020").attr("style","display:none;");// - } - } - function subsectionNum(){ - var subsectionNum = getItemValue(0,getRow(),"subsection_num"); - if(typeof(subsectionNum) == "undefined" || subsectionNum.length == 0 ){ - subsectionNum = "0"; - } - subsection_list.window.saveData(subsectionNum); - } - - <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp b/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp deleted file mode 100644 index bd40cb7b3..000000000 --- a/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%@ page contentType="text/html; charset=GBK"%> -<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% - /* - Author: undefined 2021-07-20 - Content: - History Log: - */ - String flowunid = CurPage.getParameter("flowunid"); - String projectId = CurPage.getParameter("projectId"); - ASObjectModel doTemp = new ASObjectModel("lbSubsectionTempList"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - dwTemp.Style="1"; //--ΪGrid-- - dwTemp.ReadOnly = "0"; //ֻģʽ - dwTemp.setPageSize(10); - dwTemp.genHTMLObjectWindow(flowunid); - - //0Ƿչʾ 1 Ȩ޿ 2 չʾ 3ťʾ 4ť 5ť¼ 6 7 8 9ͼ꣬CSSʽ 10 - String sButtons[][] = { - {"false","All","Button","","","newRecord()","","","","btn_icon_add",""}, - {"false","","Button","","","viewAndEdit()","","","","btn_icon_detail",""}, - {"false","","Button","ɾ","ɾ","if(confirm('ȷʵҪɾ?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""}, - }; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - -<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Frame/page/jspf/include/jsp_head_res_dw.jspf b/WebContent/Frame/page/jspf/include/jsp_head_res_dw.jspf index 9c9822217..33c380e93 100644 --- a/WebContent/Frame/page/jspf/include/jsp_head_res_dw.jspf +++ b/WebContent/Frame/page/jspf/include/jsp_head_res_dw.jspf @@ -2,5 +2,6 @@ + - \ No newline at end of file + diff --git a/WebContent/WEB-INF/etc/app/component/component-config.xml b/WebContent/WEB-INF/etc/app/component/component-config.xml index ed29faeb3..630aa8b74 100644 --- a/WebContent/WEB-INF/etc/app/component/component-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-config.xml @@ -1,434 +1,434 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index d723735bf..25ee0562e 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -1,199 +1,199 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 56093ba88..14aada50c 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -68,7 +68,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -385,7 +385,7 @@ - + @@ -487,7 +487,7 @@ - + @@ -541,7 +541,7 @@ - + @@ -592,7 +592,7 @@ - + @@ -1499,7 +1499,7 @@ - + @@ -1554,7 +1554,7 @@ - + @@ -1605,7 +1605,7 @@ - + @@ -1664,7 +1664,7 @@ - + @@ -1737,7 +1737,7 @@ - + @@ -1800,13 +1800,13 @@ - + @@ -1869,13 +1869,13 @@ - + @@ -2512,7 +2512,7 @@ - + @@ -2566,7 +2566,7 @@ - + @@ -2984,7 +2984,7 @@ - + @@ -3185,7 +3185,7 @@ - + @@ -3212,8 +3212,8 @@ - - + + @@ -3376,7 +3376,7 @@ - + @@ -3423,7 +3423,7 @@ - + @@ -3453,7 +3453,7 @@ - + @@ -3687,7 +3687,7 @@ - + @@ -4157,7 +4157,7 @@ - + @@ -4236,7 +4236,7 @@ - + @@ -4307,7 +4307,7 @@ - + @@ -4633,31 +4633,173 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebContent/js/decimal/decimal.min.js b/WebContent/js/decimal/decimal.min.js new file mode 100644 index 000000000..f3afe8a7a --- /dev/null +++ b/WebContent/js/decimal/decimal.min.js @@ -0,0 +1,2 @@ +/* decimal.js v10.2.0 https://github.com/MikeMcl/decimal.js/LICENCE */ +!function(n){"use strict";var h,R,e,o,u=9e15,g=1e9,m="0123456789abcdef",t="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",r="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-u,maxE:u,crypto:!1},N=!0,f="[DecimalError] ",w=f+"Invalid argument: ",s=f+"Precision limit exceeded",a=f+"crypto unavailable",L=Math.floor,v=Math.pow,l=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,d=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,p=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,b=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,T=1e7,U=7,E=t.length-1,x=r.length-1,y={name:"[object Decimal]"};function M(n){var e,i,t,r=n.length-1,s="",o=n[0];if(0i-1&&(void 0===s[t+1]&&(s[t+1]=0),s[t+1]+=s[t]/i|0,s[t]%=i)}return s.reverse()}y.absoluteValue=y.abs=function(){var n=new this.constructor(this);return n.s<0&&(n.s=1),_(n)},y.ceil=function(){return _(new this.constructor(this),this.e+1,2)},y.comparedTo=y.cmp=function(n){var e,i,t,r,s=this,o=s.d,u=(n=new s.constructor(n)).d,c=s.s,f=n.s;if(!o||!u)return c&&f?c!==f?c:o===u?0:!o^c<0?1:-1:NaN;if(!o[0]||!u[0])return o[0]?c:u[0]?-f:0;if(c!==f)return c;if(s.e!==n.e)return s.e>n.e^c<0?1:-1;for(e=0,i=(t=o.length)<(r=u.length)?t:r;eu[e]^c<0?1:-1;return t===r?0:rthis.d.length-2},y.isNaN=function(){return!this.s},y.isNegative=y.isNeg=function(){return this.s<0},y.isPositive=y.isPos=function(){return 0e&&(e=this.e+1)):e=NaN,e},y.round=function(){var n=this.constructor;return _(new n(this),this.e+1,n.rounding)},y.sine=y.sin=function(){var n,e,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(n=t.precision,e=t.rounding,t.precision=n+Math.max(i.e,i.sd())+U,t.rounding=1,i=function(n,e){var i,t=e.d.length;if(t<3)return W(n,2,e,e);i=16<(i=1.4*Math.sqrt(t))?16:0|i,e=e.times(1/J(5,i)),e=W(n,2,e,e);for(var r,s=new n(5),o=new n(16),u=new n(20);i--;)r=e.times(e),e=e.times(s.plus(r.times(o.times(r).minus(u))));return e}(t,z(t,i)),t.precision=n,t.rounding=e,_(2=n.d.length-1&&(i=f<0?-f:f)<=9007199254740991)return r=I(c,u,i,t),n.s<0?new c(1).div(r):_(r,t,s);if((o=u.s)<0){if(ec.maxE+1||e=r.toExpPos):(q(n,1,g),void 0===e?e=r.rounding:q(e,0,8),A(t=_(new r(t),n,e),n<=t.e||t.e<=r.toExpNeg,n)),t.isNeg()&&!t.isZero()?"-"+i:i},y.toSignificantDigits=y.toSD=function(n,e){var i=this.constructor;return void 0===n?(n=i.precision,e=i.rounding):(q(n,1,g),void 0===e?e=i.rounding:q(e,0,8)),_(new i(this),n,e)},y.toString=function(){var n=this,e=n.constructor,i=A(n,n.e<=e.toExpNeg||n.e>=e.toExpPos);return n.isNeg()&&!n.isZero()?"-"+i:i},y.truncated=y.trunc=function(){return _(new this.constructor(this),this.e+1,1)},y.valueOf=y.toJSON=function(){var n=this,e=n.constructor,i=A(n,n.e<=e.toExpNeg||n.e>=e.toExpPos);return n.isNeg()?"-"+i:i};var F=function(){function S(n,e,i){var t,r=0,s=n.length;for(n=n.slice();s--;)t=n[s]*e+r,n[s]=t%i|0,r=t/i|0;return r&&n.unshift(r),n}function Z(n,e,i,t){var r,s;if(i!=t)s=te[r]?1:-1;break}return s}function P(n,e,i,t){for(var r=0;i--;)n[i]-=r,r=n[i](F[c]||0)&&u--,null==i?(N=i=O.precision,t=O.rounding):N=r?i+(n.e-e.e)+1:i,N<0)g.push(1),h=!0;else{if(N=N/a+2|0,c=0,1==M){for(A=A[f=0],N++;(c=s/2&&++y;f=0,(o=Z(A,m,M,w))<0?(v=m[0],M!=w&&(v=v*s+(m[1]||0)),1<(f=v/y|0)?(s<=f&&(f=s-1),1==(o=Z(l=S(A,f,s),m,d=l.length,w=m.length))&&(f--,P(l,Md.maxE?(n.d=null,n.e=NaN):n.en.constructor.maxE?(n.d=null,n.e=NaN):n.er-1;)h[i]=0,i||(++s,h.unshift(1));for(c=h.length;!h[c-1];--c);for(o=0,a="";oc)for(s-=c;s--;)a+="0";else se)return n.length=e,!0}function Q(n){return new this(n).abs()}function X(n){return new this(n).acos()}function Y(n){return new this(n).acosh()}function nn(n,e){return new this(n).plus(e)}function en(n){return new this(n).asin()}function tn(n){return new this(n).asinh()}function rn(n){return new this(n).atan()}function sn(n){return new this(n).atanh()}function on(n,e){n=new this(n),e=new this(e);var i,t=this.precision,r=this.rounding,s=t+4;return n.s&&e.s?n.d||e.d?!e.d||n.isZero()?(i=e.s<0?P(this,t,r):new this(0)).s=n.s:!n.d||e.isZero()?(i=P(this,s,1).times(.5)).s=n.s:i=e.s<0?(this.precision=s,this.rounding=1,i=this.atan(F(n,e,s,1)),e=P(this,s,1),this.precision=t,this.rounding=r,n.s<0?i.minus(e):i.plus(e)):this.atan(F(n,e,s,1)):(i=P(this,s,1).times(0s.maxE?(r.e=NaN,r.d=null):n.e bos = bom.createQuery( "flowunid = :flowunid" ).setParameter( "flowunid", this.flowunid ).getResultList( true ); + for ( BizObject bo : bos ) { + String cleanLeaseRatio = bo.getAttribute( "CLEAN_LEASE_RATIO" ).toString(); + if ( !"".equals( cleanLeaseRatio ) ) { + BigDecimal cleanLeaseMoney; + if ( "CarPrice".equals( subsectionConfig ) ) { + cleanLeaseMoney = new BigDecimal( cleanLeaseRatio ).multiply( new BigDecimal( equipAmt ) ) + .divide( new BigDecimal( 100 ), 2, 4 ); + } else { + cleanLeaseMoney = new BigDecimal( cleanLeaseRatio ).multiply( new BigDecimal( cleanLeasemoney ) ) + .divide( new BigDecimal( 100 ), 2, 4 ); + } + bo.setAttributeValue( "CLEAN_LEASE_MONEY", cleanLeaseMoney.toString() ); + bom.saveObject( bo ); + } + } + } catch ( Exception e ) { + e.printStackTrace(); + tx.rollback(); + return "ERROR"; + } + return "SUCCESS"; } public void checkYearRate( ConditionBean cb, TabCalBean tcb, BigDecimal yearRate ) throws BusinessException { @@ -155,7 +198,7 @@ public class CreateTransactionExecutor implements Transaction { try { Map> productRevenues = ProductParamUtil.getProductComponentType( tcb.getProductId(), "PRD0390" ); tcb.setProductRevenues( productRevenues ); - + Map> productRates = ProductParamUtil.getProductComponentType(productId, "PRD0350"); Map productRate = productRates.get("product_rate"); String isFixedRate = productRate.get("isFixedRate"); @@ -326,19 +369,19 @@ public class CreateTransactionExecutor implements Transaction { } return "success"; } - + /** * ƻ * @param splittingRatio,Sqlca * @return - * @throws JBOException + * @throws JBOException * @throws Exception */ public void insertRentPlan_SP (String splittingRatio,com.amarsoft.awe.util.Transaction Sqlca,String splitType) throws Exception{ BizObjectManager BmLRP=JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME, Sqlca); BizObjectManager BmLCC=JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME, Sqlca); java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("yyyy/MM/dd"); - + List BoLRP = BmLRP.createQuery("payment_number=:payment_number order by plan_list").setParameter("payment_number", this.plannumber).getResultList(false); BizObject boLCC = BmLCC.createQuery("select IRR,CAUTION_MONEY,HANDLING_CHARGE_MONEY from O where payment_number=:payment_number").setParameter("payment_number", this.plannumber).getSingleResult(false); String irr = boLCC.getAttribute("IRR").toString(); @@ -392,8 +435,8 @@ public class CreateTransactionExecutor implements Transaction { } finally { if(ps != null) ps.close(); } - - + + } public String getSplitByProductId(JBOTransaction tx) { @@ -1372,7 +1415,7 @@ public class CreateTransactionExecutor implements Transaction { tx.commit(); return "Success"; } - + //УʽǷ񳬶 public String checkMoney()throws Exception{ BigDecimal sumMoney = new BigDecimal("0") ; @@ -1384,8 +1427,8 @@ public class CreateTransactionExecutor implements Transaction { sumMoney = sumMoney.setScale(2, BigDecimal.ROUND_HALF_UP); return sumMoney.toString(); } - - + + public String getCalType() { return calType; } diff --git a/calc/com/tenwa/reckon/executor/ManageSubsectionData.java b/calc/com/tenwa/reckon/executor/ManageSubsectionData.java index a48fd77bf..2f8d07c5f 100644 --- a/calc/com/tenwa/reckon/executor/ManageSubsectionData.java +++ b/calc/com/tenwa/reckon/executor/ManageSubsectionData.java @@ -1,66 +1,66 @@ -package com.tenwa.reckon.executor; - -import java.util.List; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; - -import jbo.app.tenwa.calc.LB_SUBSECTION_INFO_TEMP; - -public class ManageSubsectionData { - - private String subsectionNumber; - private String projectId; - private String flowunid; - - public String getSubsectionNumber() { - return subsectionNumber; - } - public void setSubsectionNumber(String subsectionNumber) { - this.subsectionNumber = subsectionNumber; - } - public String getProjectId() { - return projectId; - } - public void setProjectId(String projectId) { - this.projectId = projectId; - } - public String getFlowunid() { - return flowunid; - } - public void setFlowunid(String flowunid) { - this.flowunid = flowunid; - } - - public String saveSubsection(JBOTransaction tx) throws Exception { - Integer sn = new Integer(subsectionNumber); - BizObjectManager lsitManger = JBOFactory.getBizObjectManager(LB_SUBSECTION_INFO_TEMP.CLASS_NAME, tx); - List lsitList = lsitManger.createQuery(" flowunid=:flowunid ").setParameter("flowunid", flowunid).getResultList(false); - if( sn >= 0 ) { - if(lsitList.size()==0 || sn > lsitList.size()) { - int i = ( lsitList.size()+1 ) ; - for( ; i<=sn ; i++ ) { - BizObject lsit = lsitManger.newObject(); - lsit.setAttributeValue("subsection_number", i); - lsit.setAttributeValue("projectid", projectId); - lsit.setAttributeValue("flowunid", flowunid); - lsitManger.saveObject(lsit); - } - }else if( sn < lsitList.size()){ - int i = (sn +1); - for( ; i<= lsitList.size() ; i++ ) { - BizObject lsit = lsitManger.createQuery("flowunid =:flowunid and subsection_number =:subsectionNumber").setParameter("flowunid", flowunid).setParameter("subsectionNumber", i).getSingleResult(true); - if(lsit!=null ) { - lsitManger.deleteObject(lsit); - } - } - } - } - return "success"; - } - - - -} +//package com.tenwa.reckon.executor; +// +//import java.util.List; +// +//import com.amarsoft.are.jbo.BizObject; +//import com.amarsoft.are.jbo.BizObjectManager; +//import com.amarsoft.are.jbo.JBOFactory; +//import com.amarsoft.are.jbo.JBOTransaction; +// +//import jbo.app.tenwa.calc.LB_SUBSECTION_INFO_TEMP; +// +//public class ManageSubsectionData { +// +// private String subsectionNumber; +// private String projectId; +// private String flowunid; +// +// public String getSubsectionNumber() { +// return subsectionNumber; +// } +// public void setSubsectionNumber(String subsectionNumber) { +// this.subsectionNumber = subsectionNumber; +// } +// public String getProjectId() { +// return projectId; +// } +// public void setProjectId(String projectId) { +// this.projectId = projectId; +// } +// public String getFlowunid() { +// return flowunid; +// } +// public void setFlowunid(String flowunid) { +// this.flowunid = flowunid; +// } +// +// public String saveSubsection(JBOTransaction tx) throws Exception { +// Integer sn = new Integer(subsectionNumber); +// BizObjectManager lsitManger = JBOFactory.getBizObjectManager(LB_SUBSECTION_INFO_TEMP.CLASS_NAME, tx); +// List lsitList = lsitManger.createQuery(" flowunid=:flowunid ").setParameter("flowunid", flowunid).getResultList(false); +// if( sn >= 0 ) { +// if(lsitList.size()==0 || sn > lsitList.size()) { +// int i = ( lsitList.size()+1 ) ; +// for( ; i<=sn ; i++ ) { +// BizObject lsit = lsitManger.newObject(); +// lsit.setAttributeValue("subsection_number", i); +// lsit.setAttributeValue("projectid", projectId); +// lsit.setAttributeValue("flowunid", flowunid); +// lsitManger.saveObject(lsit); +// } +// }else if( sn < lsitList.size()){ +// int i = (sn +1); +// for( ; i<= lsitList.size() ; i++ ) { +// BizObject lsit = lsitManger.createQuery("flowunid =:flowunid and subsection_number =:subsectionNumber").setParameter("flowunid", flowunid).setParameter("subsectionNumber", i).getSingleResult(true); +// if(lsit!=null ) { +// lsitManger.deleteObject(lsit); +// } +// } +// } +// } +// return "success"; +// } +// +// +// +//} diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index 041967437..2f6161b84 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -7,6 +7,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Vector; +import com.amarsoft.are.jbo.BizObjectManager; import jbo.com.tenwa.lease.comm.CONFIGURATE; import jbo.prd.BUSINESS_TYPE; import jbo.sys.CODE_LIBRARY; @@ -32,13 +33,13 @@ public class ProductCondition { * @return * @throws Exception */ - public String getProductRules(ASObjectModel doTemp,String productId,Vector vali) throws Exception{ + public String getProductRules(ASObjectModel doTemp, String productId, Vector vali, String flowunid) throws Exception{ doTemp.setDefaultValue("LEASE_AMT_DATE", DateUtil.getToday()); StringBuilder sb=new StringBuilder(); sb.append("{"); sb.append("'fund':"+getProductFundRules(doTemp, productId,vali));//ʽ sb.append(",'grace':"+this.getProductGraceRules(doTemp, productId, vali));// - sb.append(",'method':"+this.getProductSettleRules(doTemp, productId));//㷽ʽ + sb.append(",'method':"+this.getProductSettleRules(doTemp, productId, flowunid));//㷽ʽ sb.append(",'incomeNumber':"+this.getIncomeNumber(productId)); sb.append("}"); setRentOrRate(doTemp, productId);//㷽 @@ -50,7 +51,7 @@ public class ProductCondition { this.getCautionRatio(doTemp, productId);//֤ return sb.toString(); } - + public String getProductRulesBusiness(ASObjectModel doTemp,String productId,Vector vali) throws Exception{ doTemp.setDefaultValue("LEASE_AMT_DATE", DateUtil.getToday()); StringBuilder sb=new StringBuilder(); @@ -68,7 +69,7 @@ public class ProductCondition { this.getCautionRatio(doTemp, productId);//֤ return sb.toString(); } - + public String getProductRulesApp(List> appList,String productId,Vector vali) throws Exception{ ProductBaseLoanTools.addAppList(appList, "LEASE_AMT_DATE", "coldefaultvalue", DateUtil.getToday()); StringBuilder sb=new StringBuilder(); @@ -86,12 +87,12 @@ public class ProductCondition { this.getCautionRatioApp(appList, productId);//֤ return sb.toString(); } - + /** * * @param doTemp * @param productId - * @throws Exception + * @throws Exception */ public void setDateRule(ASObjectModel doTemp,String productId) throws Exception{ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0340"); @@ -116,7 +117,7 @@ public class ProductCondition { doTemp.setColumnAttribute("PLAN_DATE_HOILDAY", "colvisible", "1"); doTemp.setColumnAttribute("PLAN_DATE_HOILDAY", "colrequired", "1"); } - + } } if(map.containsKey("InterestDate")){//Ϣ @@ -140,7 +141,7 @@ public class ProductCondition { doTemp.setColumnAttribute("INTEREST_DATE_HOLIDAY", "colvisible", "1"); doTemp.setColumnAttribute("INTEREST_DATE_HOLIDAY", "colrequired", "1"); } - + } } if(map.containsKey("RateInfo")){ @@ -148,7 +149,7 @@ public class ProductCondition { doTemp.setDefaultValue("ADDITIONAL_RATE", map.get("RateInfo").get("AdditionalRate")); } } - + public void setDateRuleApp(List> appList,String productId) throws Exception{ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0340"); Map PLAN_DATE_HOILDAY = new HashMap(); @@ -195,7 +196,7 @@ public class ProductCondition { } } } - + if(map.containsKey("InterestDate")){//Ϣ Map plandatemap=map.get("InterestDate"); if(plandatemap.containsKey("HolidayAdjust")){ @@ -208,7 +209,7 @@ public class ProductCondition { if(plandatemap.containsKey("date_proc")){ String s=plandatemap.get("date_proc"); if(s.indexOf("1")>=0){ - + FIRST_INTEREST_DATE.put("colvisible", "1"); FIRST_INTEREST_DATE.put("colrequired", "1"); appList.add(FIRST_INTEREST_DATE); @@ -223,7 +224,7 @@ public class ProductCondition { INTEREST_DATE_HOLIDAY.put("colrequired", "1"); appList.add(INTEREST_DATE_HOLIDAY); } - + } } if(map.containsKey("RateInfo")){ @@ -233,7 +234,7 @@ public class ProductCondition { appList.add(ADDITIONAL_RATE); } } - + /** * Ŀ ʶ ڳܼ Ƿʾ * @param doTemp @@ -267,12 +268,12 @@ public class ProductCondition { ProductBaseLoanTools.addAppList(appList, "FIRST_PAYMENT_TOTAL", "colvisible", "0"); } } - + /** * 㷽 ѡ * @param doTemp * @param productId - * @throws Exception + * @throws Exception */ public void setRentOrRate(ASObjectModel doTemp,String productId) throws Exception{ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0310"); @@ -287,10 +288,10 @@ public class ProductCondition { doTemp.setColumnAttribute("RENT_OR_RATE","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='rent_or_rate' and itemno in ("+s+") order by sortno"); } } - - + + } - + public void setRentOrRateApp(List> appList,String productId) throws Exception{ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0310"); if(map.containsKey("ROR01")){ @@ -305,10 +306,10 @@ public class ProductCondition { + "itemno,itemname,codeno='rent_or_rate' and itemno in ("+s+") order by sortno"); } } - - + + } - + /** * ȡƷõʽ * @param productId @@ -338,7 +339,7 @@ public class ProductCondition { } return list; } - + /** * ȡƷ ʽ ʾҳ * @param doTemp @@ -371,7 +372,7 @@ public class ProductCondition { if(!"".equals(cautionMoneymethod)&&cautionMoneymethod!=null){ doTemp.setDefaultValue("CAUTION_MONEY_METHOD",cautionMoneymethod); } - + if("Y".equals(fina)){ fina = "finatype02"; }else { @@ -420,7 +421,7 @@ public class ProductCondition { sb.append("}"); return sb.toString(); } - + @SuppressWarnings("unchecked") public String getProductFundRulesApp(List> appList,String productId,Vector vali) throws Exception{ StringBuilder sb=new StringBuilder(); @@ -442,7 +443,7 @@ public class ProductCondition { if(!"".equals(cautionMoneymethod)&&cautionMoneymethod!=null){ ProductBaseLoanTools.addAppList(appList, "CAUTION_MONEY_METHOD", "coldefaultvalue", cautionMoneymethod); } - + if("Y".equals(fina)){ fina = "finatype02"; }else { @@ -459,7 +460,7 @@ public class ProductCondition { ProductBaseLoanTools.addAppList(appList, col+"_FINA", "colvisible", "0"); } ProductBaseLoanTools.addAppList(appList, col, "colvisible", "0"); - + if(fee.getAttribute("itemno").getString().equals("feetype2")){ ProductBaseLoanTools.addAppList(appList, "CAUTION_DEDUCTION_MONEY", "colvisible", "0"); ProductBaseLoanTools.addAppList(appList, "CAUTION_MONEY_REMAIN", "colvisible", "0"); @@ -495,7 +496,7 @@ public class ProductCondition { sb.append("}"); return sb.toString(); } - + /** * ֵ * @param doTemp @@ -504,7 +505,7 @@ public class ProductCondition { * @throws Exception */ public String getProductGraceRules(ASObjectModel doTemp,String productId,Vector vali) throws Exception{ - + Map rule=new HashMap(); //ȡƷ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0311"); @@ -524,9 +525,9 @@ public class ProductCondition { } return FileOperatorUtil.getMapToJsonStr(rule); } - + public String getProductGraceRulesApp(List> appList,String productId,Vector vali) throws Exception{ - + Map rule=new HashMap(); //ȡƷ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0311"); @@ -549,10 +550,10 @@ public class ProductCondition { * һڻƻ ڶڻƻ ĩֵ Ƿʾ * @param doTemp * @param productId - * @throws Exception + * @throws Exception */ public void getOtherRule(ASObjectModel doTemp,String productId) throws Exception{ - + String[] param={"EQUIP_END_VALUE"}; //ȡƷ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0311"); @@ -562,11 +563,11 @@ public class ProductCondition { doTemp.setColumnAttribute(param[i], "colrequired", "1"); } } - + } - + public void getOtherRuleApp(List> appList,String productId) throws Exception{ - + String[] param={"EQUIP_END_VALUE"}; //ȡƷ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0311"); @@ -576,7 +577,7 @@ public class ProductCondition { ProductBaseLoanTools.addAppList(appList, param[i], "colrequired", "1"); } } - + } /** @@ -606,9 +607,9 @@ public class ProductCondition { if(attribute2!=""&&"car_product".equals(attribute2)){ day = (bo==null)?"":bo.getAttribute("ATTR_VALUE").getString(); } - + doTemp.setDefaultValue("FREE_DEFA_INTER_DAY", day); - + if(map.containsKey("PENALTY_RATE_DAY")){//Ϣ String rate=map.get("PENALTY_RATE_DAY").get("PENALTY_RATE_DAY"); if(rate.length()>0){ @@ -619,7 +620,7 @@ public class ProductCondition { } } } - + public void getProductPenaRulesApp(List> appList,String productId) throws Exception{ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0308"); /*if(map.containsKey("PFD01")){//ⷣϢ @@ -645,7 +646,7 @@ public class ProductCondition { } } } - + /** * õϢ * @param doTemp @@ -666,7 +667,7 @@ public class ProductCondition { doTemp.setColumnAttribute("ADJUST_STYLE","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='adjust_style' and itemno in ("+this.getSqlWhere(rule.get("adjust_style"))+") order by sortno"); //Ϣʽ doTemp.setColumnAttribute("ADJUST_TYPE","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='adjust_type' and itemno in ("+this.getSqlWhere(rule.get("rate_float_type"))+") order by sortno"); - + }*/ if(null != rule.get("rate_float_type") && null != rule.get("adjust_style")) { //Ϣʽ @@ -676,7 +677,7 @@ public class ProductCondition { } } } - + public void getProductAdjustRulesApp(List> appList,String productId) throws Exception{ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0320"); if(map.containsKey("ADJUST_INTEREST")){ @@ -696,21 +697,21 @@ public class ProductCondition { * @return * @throws Exception */ - public String getProductSettleRules(ASObjectModel doTemp,String productId) throws Exception{ + public String getProductSettleRules(ASObjectModel doTemp, String productId, String flowunid) throws Exception{ //㷽ʽ Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0301"); //ֶ Map> submap=ProductParamUtil.getProductComponentType(productId, "PRD0321"); String s=""; - + String sJson=""; for(Map.Entry> entry:map.entrySet()){ if(s.length()>0)s+=","; s+="'"+entry.getKey()+"'"; if(sJson.length()>0)sJson+=","; sJson+="'"+entry.getKey()+"':"+FileOperatorUtil.getMapToJsonStr(entry.getValue()); - + if(entry.getKey().equals( doTemp.getColumnAttribute("SETTLE_METHOD", "coldefaultvalue"))){ Map values=entry.getValue(); if(values.containsKey("HolidayAdjust")){ @@ -746,7 +747,7 @@ public class ProductCondition { if(s.length()>0)s+=","; s+="'even_subsection'"; } - + /*if(s.indexOf("even_rent") != -1) { s = "'even_rent'"; } else if(s.indexOf("even_corpus") != -1) { @@ -757,11 +758,44 @@ public class ProductCondition { // doTemp.setReadOnly("SETTLE_METHOD", true); doTemp.setColumnAttribute("SETTLE_METHOD","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='settle_method' and itemno in ("+s+") order by sortno"); doTemp.setDefaultValue("SETTLE_METHOD", s.replaceAll("'", "")); - - + + if ( "'segmented_financing'".equals( s ) ) { + BizObjectManager bom = JBOFactory.getBizObjectManager( "jbo.app.tenwa.calc.LC_CALC_SUBSECTION_INFO_TEMP" ); + List bos = bom.createQuery( "flowunid = :flowunid" ).setParameter( "flowunid", flowunid ).getResultList( false ); + if ( bos.size() == 0 ) { + Map>> configs = ProductParamUtil.getProductComponentDecisionTable( productId, "PRD0301", + "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ); + List> sf = configs.get( "segmented_financing" ); + int i = 1; + for ( Map f : sf ) { + String discountCalcMethod = f.get( "DiscountCalcMethod" ); + BizObject bo = bom.newObject(); + bo.setAttributeValue( "SUBSECTION_NUMBER", i ); + bo.setAttributeValue( "RATE", f.get( "Rate" ) ); + bo.setAttributeValue( "DISCOUNT_CALC_METHOD", f.get( "DiscountCalcMethod" ) ); + if ( "1".equals( discountCalcMethod ) ) { + bo.setAttributeValue( "DISCOUNT_RATE", f.get( "DiscountRate" ) ); + bo.setAttributeValue( "FINANCING_RATE", f.get( "DiscountRate" ) ); + } else { + bo.setAttributeValue( "DISCOUNT", f.get( "Discount" ) ); + } + String isBalanceLending = f.get( "IsBalanceLending" ); + bo.setAttributeValue( "IS_BALANCE_LENDING", isBalanceLending ); + if ( "Y".equals( isBalanceLending ) ) { + bo.setAttributeValue( "DISCOUNT_COLLECTION_PERIOD", "0" ); + } else { + bo.setAttributeValue( "DISCOUNT_COLLECTION_PERIOD", f.get( "DiscountCollectionPeriod" ) ); + } + bo.setAttributeValue( "MAXIMUM_DISCOUNT", f.get( "MaximumDiscount" ) ); + bo.setAttributeValue( "FLOWUNID", flowunid ); + bom.saveObject( bo ); + i ++; + } + } + } return "{"+sJson+"}"; } - + /** * ü㷽ʽ * @param doTemp @@ -776,14 +810,14 @@ public class ProductCondition { //ֶ Map> submap=ProductParamUtil.getProductComponentType(productId, "PRD0321"); String s=""; - + String sJson=""; for(Map.Entry> entry:map.entrySet()){ if(s.length()>0)s+=","; s+="'"+entry.getKey()+"'"; if(sJson.length()>0)sJson+=","; sJson+="'"+entry.getKey()+"':"+FileOperatorUtil.getMapToJsonStr(entry.getValue()); - + if(entry.getKey().equals( doTemp.getColumnAttribute("SETTLE_METHOD", "coldefaultvalue"))){ Map values=entry.getValue(); if(values.containsKey("HolidayAdjust")){ @@ -807,7 +841,7 @@ public class ProductCondition { if(s.length()>0)s+=","; s+="'even_subsection'"; } - + /*if(s.indexOf("even_rent") != -1) { s = "'even_rent'"; } else if(s.indexOf("even_corpus") != -1) { @@ -818,12 +852,12 @@ public class ProductCondition { // doTemp.setReadOnly("SETTLE_METHOD", true); doTemp.setColumnAttribute("SETTLE_METHOD","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='settle_method' and itemno in ("+s+") order by sortno"); doTemp.setDefaultValue("SETTLE_METHOD", s.replaceAll("'", "")); - - + + return "{"+sJson+"}"; } - - + + public String getProductSettleRulesApp(List> appList,String productId) throws Exception{ //㷽ʽ @@ -831,7 +865,7 @@ public class ProductCondition { //ֶ Map> submap=ProductParamUtil.getProductComponentType(productId, "PRD0321"); String s=""; - + String sJson=""; for(Map.Entry> entry:map.entrySet()){ if(s.length()>0)s+=","; @@ -884,10 +918,10 @@ public class ProductCondition { ProductBaseLoanTools.addAppList(appList, "SETTLE_METHOD", "colreadonly", "1"); ProductBaseLoanTools.addAppList(appList, "SETTLE_METHOD", "coleditsource", "jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='settle_method' and itemno in ("+s+") order by sortno"); ProductBaseLoanTools.addAppList(appList, "SETTLE_METHOD", "coldefaultvalue", s.replaceAll("'", "")); - + return "{"+sJson+"}"; } - + /** * ȡƷ ʽ * @param doTemp @@ -901,7 +935,7 @@ public class ProductCondition { Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0315"); for(String key:map.keySet()){ if(!("EQUIP_AMT".equals(key)||"FIRST_PAYMENT".equals(key))){//豸׸ - if("feetype_test".equals(key)){//Է + if("feetype_test".equals(key)){//Է doTemp.Columns.add(this.prodSer.createFeeCol(key, map.get(key))); doTemp.Columns.add(this.prodSer.createFeeColRatio(key, map.get(key))); } @@ -909,7 +943,7 @@ public class ProductCondition { } } /** - * + * * APP * ȡƷ ʽ * @param doTemp @@ -922,14 +956,14 @@ public class ProductCondition { Map> map=ProductParamUtil.getProductComponentType(productId, "PRD0315"); for(String key:map.keySet()){ if(!("EQUIP_AMT".equals(key)||"FIRST_PAYMENT".equals(key))){//豸׸ - if("feetype_test".equals(key)){//Է + if("feetype_test".equals(key)){//Է this.prodSer.createFeeColApp(appList, key, map.get(key)); this.prodSer.createFeeColRatioApp(appList, key, map.get(key)); } } } } - + public String getSqlWhere(String condition){ String[] conds=condition.split(","); String s=""; @@ -939,7 +973,7 @@ public class ProductCondition { } return s; } - + public String getIncomeNumber(String productId) throws Exception{ StringBuilder sb=new StringBuilder(); sb.append("{"); @@ -951,7 +985,7 @@ public class ProductCondition { sb.append("}"); return sb.toString(); } - + //ȡ public void getCautionRatio(ASObjectModel doTemp,String productId) throws Exception{ //ֶ @@ -965,7 +999,7 @@ public class ProductCondition { // doTemp.setDefaultValue("INCOME_NUMBER",incomeNumber); /*String periodType = productRate.get("begin_end") == null ? "period_type_0" : productRate.get("begin_end"); doTemp.setDefaultValue("PERIOD_TYPE",periodType)*/; - + String ProductType = productRate.get("ProductType") == null ? "0" : productRate.get("ProductType"); String isReadOnly = productRate.get("ProductRateReadOnly") == null ? "Y" : productRate.get("ProductRateReadOnly"); String YEAR_RATE = productRate.get("ProductRate") == null ? "0" : productRate.get("ProductRate"); @@ -979,7 +1013,7 @@ public class ProductCondition { doTemp.setDefaultValue("YEAR_RATE",YEAR_RATE); } } - + public void getCautionRatioApp(List> appList, String productId) throws Exception{ //ֶ Map> productRates = ProductParamUtil.getProductComponentType(productId, "PRD0350"); diff --git a/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java deleted file mode 100644 index dd6aa7433..000000000 --- a/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java +++ /dev/null @@ -1,92 +0,0 @@ -package jbo.app.tenwa.calc; - -import java.lang.String; - -/** -* - JBO

-* Note: This file is generated by ADE tools, dont modify it.
- -*/ -public interface LB_SUBSECTION_INFO_TEMP{ - /** - *

- * ӳBizObjectClass - */ - public static final String CLASS_NAME = "jbo.app.tenwa.calc.LB_SUBSECTION_INFO_TEMP"; - /** - * STRING(32)
- */ - public static final String id = "id"; - /** - * ֶ STRING(32)
- */ - public static final String subsection_number = "subsection_number"; - /** - * ʶ STRING(32)
- */ - public static final String clean_lease_ratio = "clean_lease_ratio"; - /** - * ʶ STRING(10)
- */ - public static final String clean_lease_money = "clean_lease_money"; - /** - * ׼ʣϢǰʣ STRING(18)
- */ - public static final String standard_ratio = "standard_ratio"; - /** - * ƷʣϢʣ STRING(10)
- */ - public static final String product_ratio = "product_ratio"; - /** - * ʣͻʣ STRING(10)
- */ - public static final String clean_lease_rate = "clean_lease_rate"; - /** - * ڴ STRING(10)
- */ - public static final String income_number = "income_number"; - /** - * Ϣ STRING(20)
- */ - public static final String discount_interest = "discount_interest"; - /** - * Ϣؿڴ STRING(32)
- */ - public static final String discount_interest_number = "discount_interest_number"; - /** - * Ŀid STRING(32)
- */ - public static final String projectid = "projectid"; - /** - * ͬid STRING(32)
- */ - public static final String contract_id = "contract_id"; - /** - * ̱ STRING(32)
- */ - public static final String flowunid = "flowunid"; - /** - * Ǽ STRING(32)
- */ - public static final String inputuserid = "inputuserid"; - /** - * Ǽǻ STRING(32)
- */ - public static final String inputorgid = "inputorgid"; - /** - * Ǽʱ STRING(32)
- */ - public static final String inputtime = "inputtime"; - /** - * STRING(32)
- */ - public static final String updateuserid = "updateuserid"; - /** - * » STRING(32)
- */ - public static final String updateorgid = "updateorgid"; - /** - * ʱ STRING(32)
- */ - public static final String updatetime = "updatetime"; -} \ No newline at end of file From 6e43fe14e74dff24a101c2661973b65e3264cf30 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Mon, 26 Jul 2021 18:42:28 +0800 Subject: [PATCH 13/51] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AC=E6=96=B9?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=A0=A1=E9=AA=8C=E5=92=8C=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E8=BD=A6=E5=9E=8B=E4=BF=AE=E6=94=B9=E6=8C=87=E5=AF=BC=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OwnConfig/BOwnAccount/BOwnAccount.jsp | 4 +-- .../reckon/copydata/CalcRentCompare.java | 2 +- .../handler/CommercialVehicleHandler.java | 26 +++++++++++++++++++ .../comm/handler/PassengerCarHandler.java | 26 +++++++++++++++++++ 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 src_tenwa/com/tenwa/flow/comm/handler/CommercialVehicleHandler.java create mode 100644 src_tenwa/com/tenwa/flow/comm/handler/PassengerCarHandler.java diff --git a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BOwnAccount/BOwnAccount.jsp b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BOwnAccount/BOwnAccount.jsp index c70f49fd3..f048cedd3 100644 --- a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BOwnAccount/BOwnAccount.jsp +++ b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BOwnAccount/BOwnAccount.jsp @@ -100,11 +100,11 @@ alert("տݲֱ֧"); return; } - if(state_="0010"){ + if(state=="0010"){ var sParams = "accountType="+accountType+",accType="+accType+",state="+state+",FbSdk="+FbSdk+",ownId="+ownId; var sReturn = RunJavaMethodTrans("com.tenwa.reckon.copydata.CalcRentCompare", "compare",sParams ); - if(id==null||id==""||accountPurpose!="default"||sReturn=="null"||sReturn==id){ + if(accountPurpose!="default" || sReturn=="null" || (id != "" && sReturn == id)){ as_save("myiframe0","parent.AsDialog.ClosePage()"); }else{ alert("ͬ͵˻ֻܴһ飨˺ ǷΪֱ˻;״ֶ̬Σ"); diff --git a/calc/com/tenwa/reckon/copydata/CalcRentCompare.java b/calc/com/tenwa/reckon/copydata/CalcRentCompare.java index 221321125..0eabd527f 100644 --- a/calc/com/tenwa/reckon/copydata/CalcRentCompare.java +++ b/calc/com/tenwa/reckon/copydata/CalcRentCompare.java @@ -93,7 +93,7 @@ public class CalcRentCompare implements BizObjectCompare{ } public String compare(JBOTransaction tx) throws JBOException{ - String sql ="select id from O where O.own_id='"+ownId+"' and O.state_='0010' and O.ACC_TYPE='0010' and O.FbSdk='Y' and (O.account_type='out_account' or O.account_type='inAndOut_account')"; + String sql ="select id from O where O.own_id='"+ownId+"' and O.state_='0010' and O.ACC_TYPE='0010' and O.FbSdk='Y' and (O.account_type='out_account' or O.account_type='inAndOut_account') and account_purpose='default' "; if("in_account".equals(accountType)){ sql ="select id from O where O.own_id='"+ownId+"' and O.state_='0010' and O.ACC_TYPE='0010' and (O.account_type='in_account' or O.account_type='inAndOut_account') and account_purpose='default'"; }else if("inAndOut_account".equals(accountType)){ diff --git a/src_tenwa/com/tenwa/flow/comm/handler/CommercialVehicleHandler.java b/src_tenwa/com/tenwa/flow/comm/handler/CommercialVehicleHandler.java new file mode 100644 index 000000000..825dcc43c --- /dev/null +++ b/src_tenwa/com/tenwa/flow/comm/handler/CommercialVehicleHandler.java @@ -0,0 +1,26 @@ +package com.tenwa.flow.comm.handler; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.dw.handler.impl.CommonHandler; +import jbo.com.tenwa.lease.carbrand.LB_CARDATA_MODEL; + +import java.math.BigDecimal; + +public class CommercialVehicleHandler extends CommonHandler { + @Override + protected void beforeUpdate(JBOTransaction tx, BizObject bo) throws Exception { + BizObjectManager lcmManage= JBOFactory.getBizObjectManager(LB_CARDATA_MODEL.CLASS_NAME, tx); + BizObject lcm = lcmManage.createQuery("brandname=:brandname AND seriesname=:seriesname AND modelname=:modelname ") + .setParameter("brandname", bo.getAttribute("BRAND").toString()) + .setParameter("seriesname", bo.getAttribute("CARS").toString()) + .setParameter("modelname", bo.getAttribute("MODELS").toString()).getSingleResult(true); + if(lcm != null){ + lcm.setAttributeValue("price" , new BigDecimal( bo.getAttribute("THE_GUIDED").toString()).divide(new BigDecimal("10000"))); + lcmManage.saveObject(lcm); + } + super.beforeUpdate(tx, bo); + } +} diff --git a/src_tenwa/com/tenwa/flow/comm/handler/PassengerCarHandler.java b/src_tenwa/com/tenwa/flow/comm/handler/PassengerCarHandler.java new file mode 100644 index 000000000..0a3f2bed7 --- /dev/null +++ b/src_tenwa/com/tenwa/flow/comm/handler/PassengerCarHandler.java @@ -0,0 +1,26 @@ +package com.tenwa.flow.comm.handler; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.dw.handler.impl.CommonHandler; +import jbo.app.tenwa.customer.LB_CARDATA_COMMERCIAL_MODEL; + +import java.math.BigDecimal; + +public class PassengerCarHandler extends CommonHandler { + @Override + protected void beforeUpdate(JBOTransaction tx, BizObject bo) throws Exception { + BizObjectManager lccmManage= JBOFactory.getBizObjectManager(LB_CARDATA_COMMERCIAL_MODEL.CLASS_NAME, tx); + BizObject lccm = lccmManage.createQuery(" brand_name=:brand_name AND series_name=:series_name AND model_name=:model_name ") + .setParameter("brand_name", bo.getAttribute("BRAND").toString()) + .setParameter("series_name", bo.getAttribute("CARS").toString()) + .setParameter("model_name", bo.getAttribute("MODELS").toString()).getSingleResult(true); + if(lccm != null){ + lccm.setAttributeValue("price" , new BigDecimal( bo.getAttribute("THE_GUIDED").toString()).divide(new BigDecimal("10000"))); + lccmManage.saveObject(lccm); + } + super.beforeUpdate(tx, bo); + } +} From 4ccaa7ecf5cfcb1c85b0071d3ec3cc60d4a0ec37 Mon Sep 17 00:00:00 2001 From: zhulh Date: Tue, 27 Jul 2021 15:15:21 +0800 Subject: [PATCH 14/51] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=9E=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LoanBasicInfo.jsp | 3 +- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 253 ++++++++++++++++++ .../executor/CreateTransactionExecutor.java | 2 + .../reckon/executor/FundFundPlanExecutor.java | 70 +++-- .../executor/SegmentedFinancingExecutor.java | 209 +++++++++++++++ .../reckon/help/CalcConditionCopyService.java | 214 ++++++++------- calc/com/tenwa/reckon/util/IrrTools.java | 166 ++++++------ 7 files changed, 712 insertions(+), 205 deletions(-) create mode 100644 calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index a21918983..94b26cd98 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -445,7 +445,7 @@ CalcControl.InitStartDate=function(){ break; } //ǰռֱӶȡǰ - if(calcRules["method"][methodName]["DefaultDueDay"] != "02") { + if( calcRules["method"][methodName]["DefaultDueDay"] && calcRules["method"][methodName]["DefaultDueDay"] != "02") { rentDay = calcRules["method"][methodName]["ActualDay"]; } @@ -1248,6 +1248,7 @@ function run() setItemValue(0,getRow(),p.toUpperCase(),result.info[p]); } } + subsection_list.window.reloadSelf(); if(result.message){ alert(result.message); } diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 14aada50c..c112d9eb2 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -1080,6 +1080,7 @@ + @@ -1423,6 +1424,7 @@ + @@ -2783,6 +2785,7 @@ + @@ -3368,6 +3371,7 @@ + @@ -4804,5 +4808,254 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java index dfdbc9e3b..b51bb2ecc 100644 --- a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java +++ b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java @@ -710,6 +710,8 @@ public class CreateTransactionExecutor implements Transaction { executor=new CarEvenInterestExecutor(tx,bean.getProductId());//Ϣ }else if(settleMethod.equals("car_even_rent")){ executor=new CarEvenRentExecutor(tx,bean.getProductId());// + } else if ( "segmented_financing".equals( settleMethod ) ) { + executor = new SegmentedFinancingExecutor( tx ); } else { executor = new EvenRentExecutor(tx); } diff --git a/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java b/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java index 934a69736..b3301fadd 100644 --- a/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java +++ b/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java @@ -29,7 +29,7 @@ import com.tenwa.reckon.bean.TabCalBean; import com.tenwa.reckon.util.UUIDUtil; public class FundFundPlanExecutor { - + public void run(ConditionBean cb , TabCalBean tcb,FundRentPlanBean rentPlan,JBOTransaction tx) throws Exception{ cb.setDocId(tcb.getDocId()); List fundPlanBeans=new ArrayList(); @@ -43,6 +43,36 @@ public class FundFundPlanExecutor { cb.setDeductionLastPlanDate(cb.getLastPlanDate());//ɱֿ֤ۼ˻ƻ } fundPlanBeans = this.create(tcb,fundPlanBeans,tx); + + // ϷֶϢƻ + if ( "segmented_financing".equals( cb.getSettleMethod() ) ) { + BizObjectManager bom = JBOFactory.getBizObjectManager( "jbo.app.tenwa.calc.LC_CALC_SUBSECTION_INFO_TEMP", tx ); + List bos = bom.createQuery( "flowunid = :flowunid" ).setParameter( "flowunid", tcb.getDocId() ).getResultList( false ); + for ( BizObject bo : bos ) { + String discount = bo.getAttribute( "DISCOUNT" ).getString(); + String subsectionNumber = bo.getAttribute( "SUBSECTION_NUMBER" ).getString(); + String isBalanceLending = bo.getAttribute( "IS_BALANCE_LENDING" ).getString(); + String discountCollectionPeriod = bo.getAttribute( "DISCOUNT_COLLECTION_PERIOD" ).getString(); + FundPlanBean fundPlanBean = new FundPlanBean(); + fundPlanBean.setFeeType( "feetype27" ); + fundPlanBean.setPlanList( subsectionNumber ); + fundPlanBean.setSettleMethod( "payfund6" ); + fundPlanBean.setPayType( "pay_type_in" ); + if ( "Y".equals( isBalanceLending ) ) { + fundPlanBean.setPlanDate( getPlanDate( "PaymentTime1", cb ) ); + } else { + if ( "0".equals( discountCollectionPeriod ) ) { + fundPlanBean.setPlanDate( getPlanDate( "PaymentTime1", cb ) ); + } else { + fundPlanBean.setPlanDate( rentPlan.getPlanDateList().get( Integer.parseInt( discountCollectionPeriod ) - 1 ) ); + } + } + fundPlanBean.setPlanMoney( discount ); + fundPlanBean.setPayCust( "" ); + fundPlanBeans.add( fundPlanBean ); + } + } + this.delete(tcb,tx); this.add(fundPlanBeans, tcb,tx); } @@ -110,7 +140,7 @@ public class FundFundPlanExecutor { if(Float.parseFloat(sdhandlingCharge)>0){ ffcp=new FundPlanBean(); ffcp.setId(UUID.randomUUID().toString().replaceAll("-", "")); - ffcp.setFeeType("feetype30");//̶ΥԼ + ffcp.setFeeType("feetype30");//̶ΥԼ ffcp.setPlanList("1"); ffcp.setSettleMethod("payfund6"); ffcp.setPayType("pay_type_in"); @@ -136,7 +166,7 @@ public class FundFundPlanExecutor { if(Float.parseFloat(otherIn)>0){ ffcp=new FundPlanBean(); ffcp.setId(UUID.randomUUID().toString().replaceAll("-", "")); - ffcp.setFeeType("feetype8");//Ӧ + ffcp.setFeeType("feetype8");//Ӧ ffcp.setPlanList("1"); ffcp.setSettleMethod("payfund6"); ffcp.setPayType("pay_type_in"); @@ -147,7 +177,7 @@ public class FundFundPlanExecutor { } return fundPlanBeans; } - + //ʽƻ private List create(TabCalBean tcb,List fundPlanBeans,JBOTransaction tx) throws Exception{ //ȡƷ @@ -167,7 +197,7 @@ public class FundFundPlanExecutor { if("quoted_price".equals(tcb.getCalType())){ custid=tcb.getDocId(); }else if(tcb.getUserId()==null||tcb.getUserId().equals("")){ - + } else{ String sql2="select customer_id from "+tcb.getUserId()+" where flowunid='"+tcb.getDocId()+"'"; List> list=DataOperatorUtil.getDataBySql(tx, sql2, null); @@ -175,10 +205,10 @@ public class FundFundPlanExecutor { custid=list.get(0).get("customer_id"); } } - + BizObject con=tcb.getCondition(); ConditionBean cb=tcb.getCb(); - + //String sql="select itemno from O where codeno='FeeType' and relativecode=:code"; Item[] items = CodeCache.getItems("FeeType"); for(Map.Entry> entry:map.entrySet()){ @@ -192,11 +222,11 @@ public class FundFundPlanExecutor { && "EQUIP_END_VALUE".equals(key)) { continue; } - + //ȡֵ BigDecimal temp = null; - - if("business_product".equals(tcb.getProductType()) + + if("business_product".equals(tcb.getProductType()) && "CLEAN_LEASE_MONEY".equals(key)) { temp = new BigDecimal(con.getAttribute("EQUIP_AMT").getDouble()); } else if("UNITE_MONEY_OUT".equals(key)){ @@ -204,7 +234,7 @@ public class FundFundPlanExecutor { }else{ temp = new BigDecimal(con.getAttribute(key).getDouble()); } - + Item item = null; for(Item it : items) { if(key.equals(it.getRelativeCode())) { @@ -212,7 +242,7 @@ public class FundFundPlanExecutor { break; } } - + //BizObject item=JBOFactory.createBizObjectQuery(CODE_LIBRARY.CLASS_NAME, sql).setParameter("code", entry.getKey()).getSingleResult(false); if (item!=null && temp.compareTo(BigDecimal.ZERO)>0) { FundPlanBean ffcp = new FundPlanBean(); @@ -224,7 +254,7 @@ public class FundFundPlanExecutor { ffcp.setId(boLFP.getAttribute("id").getString()); bomLFP.deleteObject(boLFP); } - + } ffcp.setFeeType(item.getItemNo());// ffcp.setPlanList("1"); @@ -283,7 +313,7 @@ public class FundFundPlanExecutor { BizObjectManager bm=JBOFactory.getBizObjectManager(tcb.getFundFundPlan_tb(), tx); bm.createQuery(sql).executeUpdate(); } - + //ʽƻ private void add(List fp,TabCalBean tcb,JBOTransaction tx) throws Exception{ com.amarsoft.awe.util.Transaction tran = com.amarsoft.awe.util.Transaction.createTransaction(tx); @@ -341,17 +371,17 @@ public class FundFundPlanExecutor { fundPlan.setAttributeValue("PAY_OBJ", fund.getPayObj()); fundPlan.setAttributeValue("SETTLE_METHOD",fund.getSettleMethod()); fundPlan.setAttributeValue("PAY_TYPE", fund.getPayType()); - + //Ϸʱ //BigDecimal unionRatio=new BigDecimal(tcb.getCb().getUnioRatio()); //fundPlan.setAttributeValue("plan_money_union",new BigDecimal(fundPlan.getAttribute("PLAN_MONEY").getString()).multiply(unionRatio).divide(new BigDecimal(100), 2,BigDecimal.ROUND_HALF_UP).toString()); //fundPlan.setAttributeValue("plan_money_company", new BigDecimal(fundPlan.getAttribute("PLAN_MONEY").getString()).subtract(new BigDecimal(fundPlan.getAttribute("plan_money_union").getString())).toString()); - + bm.saveObject(fundPlan); }*/ } - - //ɵֿ۱֤ ֤˻ ʽƻ + + //ɵֿ۱֤ ֤˻ ʽƻ private static List splitFundFundPlan(FundRentPlanBean planBean,ConditionBean cb,String custID,String remainType,String reduceType) throws Exception{ List planDates = planBean.getPlanDateList(); List rentPlans = planBean.getRentList(); @@ -410,8 +440,8 @@ public class FundFundPlanExecutor { } return newFundPlans; } - - //ɵֿ۱֤ ֤˻ ʽƻ + + //ɵֿ۱֤ ֤˻ ʽƻ private static List splitFundFundPlanList(FundRentPlanBean planBean,ConditionBean cb,String custID,String remainType,String reduceType) throws Exception{ List planDates = planBean.getPlanDateList(); List rentPlans = planBean.getRentList(); diff --git a/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java b/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java new file mode 100644 index 000000000..7a7813894 --- /dev/null +++ b/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java @@ -0,0 +1,209 @@ +package com.tenwa.reckon.executor; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.reckon.bean.ConditionBean; +import com.tenwa.reckon.bean.FundRentPlanBean; +import com.tenwa.reckon.bean.TabCalBean; +import com.tenwa.reckon.help.PlanDateServiceImpl; +import com.tenwa.reckon.util.IrrTools; +import com.tenwa.reckon.util.RentTools; +import org.apache.commons.lang3.StringUtils; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +public class SegmentedFinancingExecutor extends FundRentPlanExecutor { + + public SegmentedFinancingExecutor(JBOTransaction tx) { + super( tx ); + } + + @Override + public FundRentPlanBean create( TabCalBean tcb, Integer startList ) throws Exception { + this.deleteRentPlan( tcb.getRentPlan_tb(), tcb, startList ); + + // 껹 + String flowunid = tcb.getDocId(); + BigDecimal incomeNumberYear = new BigDecimal( tcb.getCb().getIncomeNumberYear() ); + BizObjectManager bom = JBOFactory.getBizObjectManager( "jbo.app.tenwa.calc.LC_CALC_SUBSECTION_INFO_TEMP", tx ); + BizObjectManager bomLSRPT = JBOFactory.getBizObjectManager( "jbo.app.tenwa.calc.LC_SUBSECTION_RENT_PLAN_TEMP", tx ); + bomLSRPT.createQuery( "delete from O where flowunid = :flowunid" ).setParameter( "flowunid", flowunid ).executeUpdate(); + // ֶڱ + List bos = bom.createQuery( "flowunid = :flowunid order by subsection_number" ).setParameter( "flowunid", flowunid ) + .getResultList( true ); + List dates = new ArrayList<>(); + List interests = new ArrayList<>(); + List corpuss = new ArrayList<>(); + List rents = new ArrayList<>(); + List overCorpuss = new ArrayList<>(); + PlanDateServiceImpl pdsi = new PlanDateServiceImpl( tx ); + ConditionBean cb = tcb.getCb(); + for ( BizObject bo : bos ) { + // ֶκ + String subsectionNumber = bo.getAttribute( "SUBSECTION_NUMBER" ).getString(); + // ʽ + BigDecimal cleanLeaseMoney = new BigDecimal( bo.getAttribute( "CLEAN_LEASE_MONEY" ).getString() ); + // ׼ + BigDecimal rate = new BigDecimal( bo.getAttribute( "RATE" ).getString() ).divide( new BigDecimal( 100 ), 20, 4 ); + // + BigDecimal preRate = rate.divide( incomeNumberYear, 20, 4 ); + // ڴ + BigDecimal incomeNumber = new BigDecimal( bo.getAttribute( "INCOME_NUMBER" ).getString() ); + cb.setIncomeNumber( incomeNumber.intValue() ); + List planDateList = pdsi.getPlanDateList( cb, null ); + if ( planDateList.size() > dates.size() ) { + dates = planDateList; + } + // Ϣ㷽ʽ + String discountCalcMethod = bo.getAttribute( "DISCOUNT_CALC_METHOD" ).getString(); + // + BigDecimal financingRate; + if ( "1".equals( discountCalcMethod ) ) { // ʼϢ + // Ϣ + BigDecimal discountRate = new BigDecimal( bo.getAttribute( "DISCOUNT_RATE" ).getString() ).divide( new BigDecimal( 100 ), 20, 4 ); + // + BigDecimal preDiscountRate = discountRate.divide( incomeNumberYear, 20, 4 ); + // ׼ʼ + String rent = RentTools.getPMT( preRate.toString(), incomeNumber.toString(), cleanLeaseMoney.negate().toString(), "0", "0" ); + // Ϣʼ + String afterDiscountRent = RentTools.getPMT( preDiscountRate.toString(), incomeNumber.toString(), cleanLeaseMoney.negate().toString(), "0", "0" ); + // Ϣ + BigDecimal discount = new BigDecimal( rent ).setScale( 2, 4 ).multiply( incomeNumber ).subtract( new BigDecimal( afterDiscountRent ).setScale( 2, 4 ).multiply( incomeNumber ) ); + bo.setAttributeValue( "DISCOUNT", discount ); + + String fr = bo.getAttribute( "FINANCING_RATE" ).getString(); + if ( StringUtils.isEmpty( fr ) ) { + financingRate = discountRate.divide( new BigDecimal( 100 ), 20, 4 ); + bo.setAttributeValue( "FINANCING_RATE", discountRate.toString() ); + } else { + financingRate = new BigDecimal( fr ).divide( new BigDecimal( 100 ), 20, 4 ); + } + bo.setAttributeValue( tcb.getPlanCName(), tcb.getPlanCValue() ); + bom.saveObject( bo ); + } else { + // Ϣ + BigDecimal discount = new BigDecimal( bo.getAttribute( "DISCOUNT" ).getString() ); + // ׼ʼ + String rent = RentTools.getPMT( preRate.toString(), incomeNumber.toString(), cleanLeaseMoney.negate().toString(), "0", "0" ); + // Ϣ + BigDecimal afterDiscountRent = new BigDecimal( rent ).setScale( 2, 4 ).multiply( incomeNumber ).subtract( discount ).divide( incomeNumber, 2, 4 ); + List cashFlow = new ArrayList<>(); + cashFlow.add( cleanLeaseMoney.negate() ); + for ( int i = 0; i < incomeNumber.intValue(); i ++ ) { + cashFlow.add( afterDiscountRent ); + } + BigDecimal discountRate = getIRR( cashFlow, incomeNumberYear ).setScale( 6, 4 ); + bo.setAttributeValue( "DISCOUNT_RATE", discountRate.toString() ); + String fr = bo.getAttribute( "FINANCING_RATE" ).getString(); + if ( StringUtils.isEmpty( fr ) ) { + financingRate = discountRate.divide( new BigDecimal( 100 ), 20, 4 ); + bo.setAttributeValue( "FINANCING_RATE", discountRate.toString() ); + } else { + financingRate = new BigDecimal( fr ).divide( new BigDecimal( 100 ), 20, 4 ); + } + bo.setAttributeValue( tcb.getPlanCName(), tcb.getPlanCValue() ); + bom.saveObject( bo ); + } + // + BigDecimal preFinancingRate = financingRate.divide( incomeNumberYear, 20, 4 ); + // ʵ + String rent = RentTools.getPMT( preFinancingRate.toString(), incomeNumber.toString(), cleanLeaseMoney.negate().toString(), "0", "0" ); + BigDecimal r = new BigDecimal( rent ).setScale( 2, 4 ); + for ( int i = 0; i < incomeNumber.intValue(); i ++ ) { + BigDecimal interest; + BigDecimal corpus; + if ( i == incomeNumber.intValue() - 1 ) { + corpus = cleanLeaseMoney; + if ( corpus.compareTo( r ) >= 0 ) { + r = corpus; + interest = BigDecimal.ZERO; + } else { + interest = r.subtract( corpus ); + } + cleanLeaseMoney = BigDecimal.ZERO; + } else { + interest = cleanLeaseMoney.multiply( preFinancingRate ).setScale( 2, 4 ); + corpus = r.subtract( interest ); + cleanLeaseMoney = cleanLeaseMoney.subtract( corpus ); + } + BizObject boLSRPT = bomLSRPT.newObject(); + boLSRPT.setAttributeValue( "FLOWUNID", flowunid ); + boLSRPT.setAttributeValue( tcb.getPlanCName(), tcb.getPlanCValue() ); + boLSRPT.setAttributeValue( "PLAN_LIST", i + 1 ); + boLSRPT.setAttributeValue( "PLAN_DATE", planDateList.get( i ) ); + boLSRPT.setAttributeValue( "INTEREST_DATE", planDateList.get( i ) ); + boLSRPT.setAttributeValue( "PLAN_STATUS", "δ" ); + boLSRPT.setAttributeValue( "RENT", r.toString() ); + boLSRPT.setAttributeValue( "CORPUS", corpus.toString() ); + boLSRPT.setAttributeValue( "INTEREST", interest.toString() ); + boLSRPT.setAttributeValue( "ALL_REMAIN_CORPUS", cleanLeaseMoney.toString() ); + boLSRPT.setAttributeValue( "CORPUS_BUSINESS", corpus.toString() ); + boLSRPT.setAttributeValue( "INTEREST_BUSINESS", interest.toString() ); + boLSRPT.setAttributeValue( "SUBSECTION_NUMBER", subsectionNumber ); + bomLSRPT.saveObject( boLSRPT ); + if ( interests.size() - 1 > i ) { + interests.set( i, new BigDecimal( interests.get( i ) ).add( interest ).toString() ); + corpuss.set( i, new BigDecimal( corpuss.get( i ) ).add( corpus ).toString() ); + overCorpuss.set( i, new BigDecimal( overCorpuss.get( i ) ).add( cleanLeaseMoney ).toString() ); + rents.set( i, new BigDecimal( rents.get( i ) ).add( r ).toString() ); + } else { + interests.add( interest.toString() ); + corpuss.add( corpus.toString() ); + overCorpuss.add( cleanLeaseMoney.toString() ); + rents.add( r.toString() ); + } + } + } + FundRentPlanBean fundRentPlanBean = new FundRentPlanBean(); + fundRentPlanBean.setCorpusOverageBusinessList( overCorpuss ); + fundRentPlanBean.setCorpusBusinessList( corpuss ); + fundRentPlanBean.setInterestBusinessList( interests ); + fundRentPlanBean.setPlanDateList( dates ); + fundRentPlanBean.setRentList( rents ); + + this.addRentPlan( fundRentPlanBean, tcb, startList ); + return fundRentPlanBean; + } + + public static BigDecimal getIRR( List cashFlows, BigDecimal incomeNumberYear ) { + List cashFlow = new ArrayList<>(); + for ( int o = 0; o < cashFlows.size(); o ++ ) { + Object obj = cashFlows.get( o ); + if ( obj instanceof BigDecimal ) { + cashFlow.add( ( BigDecimal ) obj ); + } else { + cashFlow.add( new BigDecimal( obj.toString() ) ); + } + } + BigDecimal up = BigDecimal.ONE; + BigDecimal down = BigDecimal.ZERO; + BigDecimal two = new BigDecimal( "2" ); + BigDecimal irr = new BigDecimal( "0.01" ); + BigDecimal accuracy = new BigDecimal( "0.0000001" ); + BigDecimal out; + + int i = 0; + while ( irr.abs().compareTo( accuracy ) > 0 && i < 200 ) { + out = cashFlow.get( 0 ); + for ( int j = 1; j < cashFlow.size(); j ++ ) { + out = out.add( cashFlow.get( j ).divide( new BigDecimal( Math.pow( BigDecimal.ONE.add( irr ).doubleValue(), j ) ), 20, 4 ) ); + } + + if ( out.compareTo( BigDecimal.ZERO ) > 0 ) { + down = irr; + irr = irr.add( up ).divide( two, 20, 4 ); + } else if ( out.compareTo( BigDecimal.ZERO ) < 0 ) { + up = irr; + irr = irr.add( down ).divide( two, 20, 4 ); + } + i ++; + } + irr = irr.multiply( incomeNumberYear ).multiply( new BigDecimal( 100 ) ); + + return irr; + } +} diff --git a/calc/com/tenwa/reckon/help/CalcConditionCopyService.java b/calc/com/tenwa/reckon/help/CalcConditionCopyService.java index c1672c2c7..b8b5a8de6 100644 --- a/calc/com/tenwa/reckon/help/CalcConditionCopyService.java +++ b/calc/com/tenwa/reckon/help/CalcConditionCopyService.java @@ -4,46 +4,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jbo.app.tenwa.calc.LC_CALC_CONDITION; -import jbo.app.tenwa.calc.LC_CALC_CONDITION_HIS; -import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP; -import jbo.app.tenwa.calc.LC_CALC_PERIOD; -import jbo.app.tenwa.calc.LC_CALC_PERIOD_TEMP; -import jbo.app.tenwa.calc.LC_CALC_RULES; -import jbo.app.tenwa.calc.LC_CALC_RULES_TEMP; -import jbo.app.tenwa.calc.LC_CALC_SUBSECTION; -import jbo.app.tenwa.calc.LC_CALC_SUBSECTION_TEMP; -import jbo.app.tenwa.calc.LC_CASH_FLOW; -import jbo.app.tenwa.calc.LC_CASH_FLOW_HIS; -import jbo.app.tenwa.calc.LC_CASH_FLOW_TEMP; -import jbo.app.tenwa.calc.LC_CONTRACT_CASH_FLOW; -import jbo.app.tenwa.calc.LC_CONTRACT_CONDITION; -import jbo.app.tenwa.calc.LC_CONTRACT_FUND_PLAN; -import jbo.app.tenwa.calc.LC_CONTRACT_PERIOD; -import jbo.app.tenwa.calc.LC_CONTRACT_RENT_PLAN; -import jbo.app.tenwa.calc.LC_CONTRACT_RULES; -import jbo.app.tenwa.calc.LC_CONTRACT_SUBSECTION; -import jbo.app.tenwa.calc.LC_CUSTOMER_CASH_FLOW; -import jbo.app.tenwa.calc.LC_CUSTOMER_CONDITION; -import jbo.app.tenwa.calc.LC_CUSTOMER_FUND_PLAN; -import jbo.app.tenwa.calc.LC_CUSTOMER_PERIOD; -import jbo.app.tenwa.calc.LC_CUSTOMER_RENT_PLAN; -import jbo.app.tenwa.calc.LC_CUSTOMER_RULES; -import jbo.app.tenwa.calc.LC_CUSTOMER_SUBSECTION; -import jbo.app.tenwa.calc.LC_FUND_PLAN; -import jbo.app.tenwa.calc.LC_FUND_PLAN_TEMP; -import jbo.app.tenwa.calc.LC_PAY_CASH_FLOW; -import jbo.app.tenwa.calc.LC_PAY_RENT_PLAN; -import jbo.app.tenwa.calc.LC_PROJ_CASH_FLOW; -import jbo.app.tenwa.calc.LC_PROJ_CONDITION; -import jbo.app.tenwa.calc.LC_PROJ_FUND_PLAN; -import jbo.app.tenwa.calc.LC_PROJ_PERIOD; -import jbo.app.tenwa.calc.LC_PROJ_RENT_PLAN; -import jbo.app.tenwa.calc.LC_PROJ_RULES; -import jbo.app.tenwa.calc.LC_PROJ_SUBSECTION; -import jbo.app.tenwa.calc.LC_RENT_PLAN; -import jbo.app.tenwa.calc.LC_RENT_PLAN_HIS; -import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP; +import jbo.app.tenwa.calc.*; import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP; import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO; @@ -70,14 +31,14 @@ public class CalcConditionCopyService { public void custToTemp(String flowunid,String quotid,String planCName,String planCValue,JBOTransaction tx) throws JBOException, RecordNotFoundException, Exception{ Map fromCondition=new HashMap(); fromCondition.put("quot_id", quotid); - + Map otherProperty=new HashMap(); otherProperty.put("FLOWUNID", flowunid); otherProperty.put(planCName, planCValue); - + Map toCondition=new HashMap(); toCondition.put(planCName, planCValue); - + // DataOperatorUtil.copyJBOSet(LC_CUSTOMER_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx); // @@ -93,22 +54,22 @@ public class CalcConditionCopyService { //ֶβ DataOperatorUtil.copyJBOSet(LC_CUSTOMER_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx); } - - - + + + //ʱĿ public void tempToProj(String flowunid,JBOTransaction tx) throws Exception{ - + BizObject flow=JBOFactory.createBizObjectQuery(FLOW_BUSSINESS_OBJECT.CLASS_NAME,"flow_unid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); - + String projid=flow.getAttribute("proj_id").getString(); - + Map fromCondition=new HashMap(); fromCondition.put("FLOWUNID", flowunid); - + Map toCondition=new HashMap(); toCondition.put("PROJECT_ID", projid); - + Map otherProperty=new HashMap(); otherProperty.put("project_id", projid); // @@ -126,15 +87,19 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_PROJ_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx); //ǰ DataOperatorUtil.copyJBOSet(LC_CONDITION_TEMP.CLASS_NAME, fromCondition, LC_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, fromCondition, LC_PROJ_SUBSECTION_INFO.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, fromCondition, LC_PROJ_SUBSECTION_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx); } - + //Ŀʱ public void porjToTemp(String flowunid,String projid,JBOTransaction tx) throws Exception{ - + Map fromCondition=new HashMap(); fromCondition.put("PROJECT_ID", projid); - - + + Map otherProperty=new HashMap(); otherProperty.put("FLOWUNID", flowunid); // @@ -153,39 +118,42 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_PROJ_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx); //ǰ DataOperatorUtil.copyJBOSet(LC_CONDITION.CLASS_NAME, fromCondition, LC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx); - + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_PROJ_SUBSECTION_INFO.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_PROJ_SUBSECTION_RENT_PLAN.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx); } //Ŀͬʱ public void projToContract(String flowunid,String projid,String contractid,JBOTransaction tx) throws Exception{ - - + + BizObject proj=JBOFactory.createBizObjectQuery(LB_PROJECT_INFO.CLASS_NAME,"id=:id").setParameter("id", projid).getSingleResult(false); String project_id=proj.getAttribute("project_no").getString();//Ŀ - - + + Map fromCondition=new HashMap(); fromCondition.put("PROJECT_ID", projid); List list=DataOperatorUtil.getSetJBO(LC_PROJ_CONDITION.CLASS_NAME, fromCondition, tx); - + Map otherProperty=new HashMap(); otherProperty.put("FLOWUNID", flowunid); - + for(BizObject bo:list){ - + String projPlanNumber=bo.getAttribute("PROJECT_PLAN_NUMBER").getString(); - + String contractPlanNumber=projPlanNumber.replace(project_id, contractid); - + fromCondition.clear(); fromCondition.put("PROJECT_ID", projid); fromCondition.put("PROJECT_PLAN_NUMBER", projPlanNumber); - + otherProperty.clear(); otherProperty.put("FLOWUNID", flowunid); otherProperty.put("CONTRACT_PLAN_NUMBER", contractPlanNumber); - + // DataOperatorUtil.copyJBOSet(LC_PROJ_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx); // @@ -200,28 +168,31 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_PROJ_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_PROJ_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_PROJ_SUBSECTION_INFO.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_PROJ_SUBSECTION_RENT_PLAN.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx); otherProperty.clear(); otherProperty.put("FLOWUNID", flowunid); otherProperty.put("PLAN_NUMBER", contractPlanNumber); //ǰ DataOperatorUtil.copyJBOSet(LC_PAY_CONDTION.CLASS_NAME, fromCondition, LC_PAY_CONDTION_TEMP.CLASS_NAME, null, otherProperty, null, tx); - } } //ͬ ʱ ʽ public void tempToContractOne(String flowunid,String contractid,JBOTransaction tx) throws Exception{ - + BizObject contract=JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO_TEMP.CLASS_NAME,"flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); - + String paymentNumber=SerialNumberUtil.getPlannumber(contract.getAttribute("CONTRACT_NO").getString(),"pay_process", tx); - - + + Map fromCondition=new HashMap(); fromCondition.put("FLOWUNID", flowunid); - + Map toCondition=new HashMap(); toCondition.put("contract_id", contractid); - + Map otherProperty=new HashMap(); otherProperty.put("contract_id", contractid); otherProperty.put("PAYMENT_NUMBER", paymentNumber); @@ -239,7 +210,10 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx); - + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_SUBSECTION_INFO.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_SUBSECTION_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx); // DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION_TEMP.CLASS_NAME, fromCondition,LC_CALC_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx); @@ -255,22 +229,27 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_CALC_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx); + //ǰ LeaseFlowBaseService service=new LeaseFlowBaseServiceImp(); service.copyOrLoadPayCondtionInfo(tx, fromCondition,toCondition,otherProperty, ServiceOperatorEnum.TempToFormal,null); - + HandlingApportionManager.setSingleHandlingApportion(flowunid,contractid,paymentNumber,tx); } - + //ͬ ʱ ʽ public void tempToContractMany(String flowunid,String contractid,JBOTransaction tx) throws Exception{ - + Map fromCondition=new HashMap(); fromCondition.put("FLOWUNID", flowunid); - + Map toCondition=new HashMap(); toCondition.put("contract_id", contractid); - + Map otherProperty=new HashMap(); otherProperty.put("contract_id", contractid); // @@ -287,17 +266,22 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_SUBSECTION_INFO.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_SUBSECTION_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx); + //ǰ LeaseFlowBaseService service=new LeaseFlowBaseServiceImp(); service.copyOrLoadPayCondtionInfo(tx, fromCondition,toCondition,otherProperty, ServiceOperatorEnum.TempToFormal,null); } - + //ͬʽʱ public void contractTotemp(String flowunid,String contractid,JBOTransaction tx) throws Exception{ - + Map fromCondition=new HashMap(); fromCondition.put("contract_id", contractid); - + Map otherProperty=new HashMap(); otherProperty.put("FLOWUNID", flowunid); // @@ -314,21 +298,26 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CONTRACT_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_CONTRACT_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CONTRACT_SUBSECTION_INFO.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_CONTRACT_SUBSECTION_RENT_PLAN.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx); + } - + //ʱͶ public void tempToPay(String flowunid,String paymentNumber,JBOTransaction tx) throws Exception{ - + BizObject flow=JBOFactory.createBizObjectQuery(FLOW_BUSSINESS_OBJECT.CLASS_NAME,"flow_unid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); - + String contractid=flow.getAttribute("contract_id").getString(); - + Map fromCondition=new HashMap(); fromCondition.put("PAYMENT_NUMBER", paymentNumber); fromCondition.put("flowunid", flowunid); Map toCondition=new HashMap(); toCondition.put("PAYMENT_NUMBER", paymentNumber); - + Map otherProperty=new HashMap(); otherProperty.put("contract_id", contractid); // @@ -345,15 +334,19 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_CALC_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx); - + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx); + HandlingApportionManager.setHandlingApportion(flowunid,contractid,paymentNumber,tx); } //Ͷŵʱ public void payToTemp(String flowunid,String paymentNumber,JBOTransaction tx) throws Exception{ - + Map fromCondition=new HashMap(); fromCondition.put("PAYMENT_NUMBER", paymentNumber); - + Map otherProperty=new HashMap(); otherProperty.put("FLOWUNID", flowunid); // @@ -370,21 +363,24 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx); - + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx); } //ʱ public void tempToOnhire(String flowunid,String paymentNumber,String contractid,JBOTransaction tx) throws Exception{ - + Map fromCondition=new HashMap(); fromCondition.put("FLOWUNID", flowunid); fromCondition.put("PAYMENT_NUMBER", paymentNumber); - + Map toCondition=new HashMap(); toCondition.put("PAYMENT_NUMBER", paymentNumber); - + Map otherProperty=new HashMap(); otherProperty.put("contract_id", contractid); - + CalcRentCompare com=new CalcRentCompare(); // DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION_TEMP.CLASS_NAME, fromCondition,LC_CALC_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx); @@ -394,14 +390,18 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_FUND_PLAN_TEMP.CLASS_NAME, fromCondition,LC_FUND_PLAN.CLASS_NAME, toCondition, otherProperty, com, tx); //ֽ DataOperatorUtil.copyJBOSet(LC_CASH_FLOW_TEMP.CLASS_NAME, fromCondition, LC_CASH_FLOW.CLASS_NAME, toCondition, otherProperty, null, tx); - + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO.CLASS_NAME, toCondition, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx); + //HandlingApportionManager.setHandlingApportion(flowunid,contractid,paymentNumber,tx); } //⵽ʱ public void onhireToTemp(String flowunid,String paymentNumber,JBOTransaction tx) throws Exception{ Map fromCondition=new HashMap(); fromCondition.put("PAYMENT_NUMBER", paymentNumber); - + Map otherProperty=new HashMap(); otherProperty.put("FLOWUNID", flowunid); // @@ -418,13 +418,17 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx); } - + //⵽ʱ public void onhireToTempList(String flowunid,String contractid,JBOTransaction tx) throws Exception{ Map fromCondition=new HashMap(); fromCondition.put("contract_id", contractid); - + Map otherProperty=new HashMap(); otherProperty.put("FLOWUNID", flowunid); // @@ -450,6 +454,10 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx); //ֶβ DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME, null, otherProperty, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx); } //ƻʷ public void onhireToHis(String flowunid,String paymentNumber,JBOTransaction tx) throws Exception{ @@ -463,6 +471,10 @@ public class CalcConditionCopyService { DataOperatorUtil.copyJBOSet(LC_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_HIS.CLASS_NAME, null, other, null, tx); //ֽ DataOperatorUtil.copyJBOSet(LC_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_HIS.CLASS_NAME, null, other, null, tx); + // ֶڵ + DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_INFO.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_INFO_HIS.CLASS_NAME, null, other, null, tx); + // ֶƻ + DataOperatorUtil.copyJBOSet(LC_SUBSECTION_RENT_PLAN.CLASS_NAME, fromCondition, LC_SUBSECTION_RENT_PLAN_HIS.CLASS_NAME, null, other, null, tx); } - + } diff --git a/calc/com/tenwa/reckon/util/IrrTools.java b/calc/com/tenwa/reckon/util/IrrTools.java index 1f8138c69..821279350 100644 --- a/calc/com/tenwa/reckon/util/IrrTools.java +++ b/calc/com/tenwa/reckon/util/IrrTools.java @@ -17,7 +17,7 @@ import com.tenwa.reckon.constant.Scale; import com.tenwa.reckon.exception.LeasingException; /** - * + * * @author SHIHONGFEI * @version 1.0 * @copyright (C) TENWA 2011 @@ -27,9 +27,9 @@ import com.tenwa.reckon.exception.LeasingException; public class IrrTools { /** - * + * * ( Ϣִֽ,ֽϢĿڴ˹ʱ޸) - * + * * @param cfgb_list * @param tcb * @return @@ -55,9 +55,9 @@ public class IrrTools { } /** - * + * * ( õȥظʱ伯ϣһһʱ䣬Ӧֽ𼯺ϵ±ļֵ ,簴substring(0, 7)账) - * + * * @param ccfbList * @return */ @@ -80,9 +80,9 @@ public class IrrTools { } /** - * + * * ( ʱõµֽ ) - * + * * @param ht_date ֽӦ * @param cdbList ֽ * @return @@ -106,10 +106,10 @@ public class IrrTools { String quot_id = "";// ۱ String contract_id = ""; // ͬ String plan_date = obj[i].toString();// - + String fund_in = "0"; // String fund_in_details = ""; // 嵥 - + String fund_out = "0"; // String fund_out_details = ""; // 嵥 @@ -152,7 +152,7 @@ public class IrrTools { /** * ֽ껹irr - * + * * @param l_inflow_pourֽ * @param chjg * @param zjjg @@ -235,7 +235,7 @@ public class IrrTools { /** * XIRR㹫ʽ 1 l_inflow_pour Ƕڵֽ,2l_date Ƕڵֽʱ Ҫһһ.
* 㷨ڵEXECLеXIRR㷨.ھȷյ IRR - * + * * @param l_inflow_pour * ֽList * @param l_date @@ -277,9 +277,9 @@ public class IrrTools { } /** - * + * * ( õֽֿ֤ϸ) - * + * * @param rent_list * @param caut_money * @return @@ -321,9 +321,9 @@ public class IrrTools { } /** - * + * * ֿ֤۽Сڱ֤ Ҫһ Ϊ֤ȥֿ֤۽) - * + * * @param cdbList * ֽ * @param caution_money @@ -352,9 +352,9 @@ public class IrrTools { } /** - * + * * ( õԤֽֿϸ) - * + * * @param rent_list * @param rentbefore_money * @return @@ -400,9 +400,9 @@ public class IrrTools { } /** - * + * * Ԥֿ۽СԤ Ҫһ ΪԤȥԤֿ۽) - * + * * @param cdbList * ֽ * @param Column_8 @@ -430,9 +430,9 @@ public class IrrTools { } /** - * + * * ( õԱֿ֤۵±ֵ) - * + * * @param cdbList * @param caut_money * @param d_total @@ -453,10 +453,10 @@ public class IrrTools { int_s = int_s.indexOf(",") > -1 ? int_s.substring(0, int_s.length() - 1) : int_s;// õԵֿ۵± return int_s; } - + /** - * + * * ( һֽϸ,бĿд˷) * * @param cdbList @@ -471,10 +471,10 @@ public class IrrTools { String planDate = cdb.getPlanDate(); // (ֻ) String income_number_year = cb.getIncomeNumberYear(); int onhire_id = cdb.getOnhire_id(); - + // ע: ڳ 1 ַ period_type_1 #ָ# ĩ 0 ַ period_type_0 String periodType = cb.getPeriodType(); - + // 룬ֵ ĩֵ if ( null != equip_end_value && !"".equals(equip_end_value) && Double.parseDouble(equip_end_value) > Double.parseDouble("0.00") ) {// ĩֵ0ʱ //ĩֵĩµͳһʽ:ֱӼһֽ @@ -484,53 +484,53 @@ public class IrrTools { cdb.setNetFlow(String.valueOf(Double.parseDouble(cdb.getNetFlow()) + Double.parseDouble(equip_end_value))); } } - + //ĩȨ¸˫¸· if (null != nominal_price && !"".equals(nominal_price) && Double.parseDouble(nominal_price) > Double.parseDouble("0.00") && !"income_1".equals(income_number_year) && !"income_2".equals(income_number_year) && !"6".equals(income_number_year) && !"12".equals(income_number_year) || ( "period_type_0".equals(periodType) || "0".equals(periodType) ) ) {// ĩȨԭ:ۡ0ʱ cdb.setFundIn(String.valueOf(Double.parseDouble(cdb.getFundIn()) + Double.parseDouble(nominal_price))); cdb.setFundInDetails(cdb.getFundInDetails() + "ĩȨ" + NumTools.formatNumberDouble(Double.parseDouble(NumTools.formatNumberDoubleScale(nominal_price, 2))) + ""); cdb.setNetFlow(String.valueOf(Double.parseDouble(cdb.getNetFlow()) + Double.parseDouble(nominal_price))); } - + // ôԪصֵ cdbList.set(cdbList.size() - 1, cdb); - + // ıֿ֤ ֿ֤۽Сڱ֤ Ҫһ Ϊ֤ȥֿ֤۽ cdbList = IrrTools.getRentDetailsByDeductOut(cdbList, cb.getCautionMoney(), cb.getCautionDeductionMoney()); - + List new_cdbList = new ArrayList(); for (CashDetailsBean obj : cdbList) { new_cdbList.add(obj); } - - - //TODO:sea ĩȨ¸£һڼһΪһ,£һڵ + + + //TODO:sea ĩȨ¸£һڼһΪһ,£һڵ //2014-06-11 ĩֵµĴ߼:ϡĩȨ¸/˫¸ǰ£ ڳġĩֵ롮ĩȨһ·һһΪһֽ if(null != nominal_price && !"".equals(nominal_price) && Double.parseDouble(nominal_price) > Double.parseDouble("0.00") && !Tools.isNullOrEmpty(planDate) && ( "income_1".equals(income_number_year) || "12".equals(income_number_year) || "income_2".equals(income_number_year) || "6".equals(income_number_year) ) && ("period_type_1".equals(periodType) || "1".equals(periodType)) ){//¸/˫¸ //ȡһֵ CashDetailsBean new_cdb = new CashDetailsBean();//cdbList.get(cdbList.size() - 1); planDate = planDate+"-01";//ڸʽ - //2014-01-01 ڼ1 + //2014-01-01 ڼ1 planDate = DateTools.getDateAdd(planDate, 1, "mm"); new_cdb.setPlanDate(planDate.substring(0, 7)+"-01"); new_cdb.setFundOut("0"); new_cdb.setFundOutDetails(""); - + new_cdb.setFundIn(String.valueOf(Double.parseDouble(nominal_price) + Double.parseDouble(equip_end_value))); new_cdb.setFundInDetails("ĩȨ" + NumTools.formatNumberDouble(Double.parseDouble(NumTools.formatNumberDoubleScale(nominal_price, 2))) + "ĩֵ" + NumTools.formatNumberDouble(Double.parseDouble(NumTools.formatNumberDoubleScale(equip_end_value, 2)))); new_cdb.setNetFlow( String.valueOf( Double.parseDouble(nominal_price) + Double.parseDouble(equip_end_value) ) ); - + new_cdb.setOnhire_id( onhire_id + 1 );//̶ֽʽ0£¸£ֱһα1ΪյĩȨ new_cdbList.add(new_cdb); }else{ - + //TODO:2014-06-11 ĩֵµĴ߼:ϡĩȨ¸ǰ£ ڳġĩֵ롮ĩȨһ·һһΪһֽ //TODO:ٴ¸磺£ĩֵDzDzֱһڼһ£Ǽһ޼Ǽһ£мҪ0 if( !Tools.isNullOrEmpty(planDate) && null != equip_end_value && !"".equals(equip_end_value) && Double.parseDouble(equip_end_value) > Double.parseDouble("0.00") && ("period_type_1".equals(periodType) || "1".equals(periodType)) ){// ڳ //ȡһֵ CashDetailsBean new_cdb = new CashDetailsBean();//cdbList.get(cdbList.size() - 1); planDate = planDate+"-01";//ڸʽ - //2014-01-01 ڼ1 + //2014-01-01 ڼ1 planDate = DateTools.getDateAdd(planDate, 1, "mm"); new_cdb.setPlanDate(planDate.substring(0, 7)+"-01"); new_cdb.setFundOut("0"); @@ -541,13 +541,13 @@ public class IrrTools { new_cdb.setOnhire_id( onhire_id + 1 );//̶ֽʽ0£¸£ֱһα1ΪյĩȨ new_cdbList.add(new_cdb); } - + } - + return new_cdbList; } - + /** *

һֽϸ,ĿΪVPҵ£ĩȨһֽС

* @author sea @@ -562,31 +562,31 @@ public class IrrTools { // 룬ֵ if (null != equip_end_value && !"".equals(equip_end_value) && Double.parseDouble(equip_end_value) > 0) {// ĩֵ0ʱ cdb.setFundIn(String.valueOf(Double.parseDouble(cdb.getFundIn()) + Double.parseDouble(equip_end_value))); - + cdb.setFundInDetails(cdb.getFundInDetails() + "ĩֵ" + NumTools.formatNumberDouble(Double.parseDouble(NumTools.formatNumberDoubleScale(equip_end_value, 2)))); - + cdb.setNetFlow(String.valueOf(Double.parseDouble(cdb.getNetFlow()) + Double.parseDouble(equip_end_value))); } - + if (null != nominal_price && !"".equals(nominal_price) && Double.parseDouble(nominal_price) > 0) {// ĩȨԭ:ۡ0ʱ cdb.setFundIn(String.valueOf(Double.parseDouble(cdb.getFundIn()) + Double.parseDouble(nominal_price))); //ĿΪVPҵ£ĩȨ cdb.setFundInDetails( cdb.getFundInDetails() ); cdb.setNetFlow( cdb.getNetFlow() ); } - + // ôԪصֵ cdbList.set(cdbList.size() - 1, cdb); - + // 2011-10-26 // ıֿ֤ ֿ֤۽Сڱ֤ Ҫһ Ϊ֤ȥֿ֤۽ cdbList = IrrTools.getRentDetailsByDeductOut(cdbList, cb.getCautionMoney(), cb.getCautionDeductionMoney()); - + return cdbList; - + } /** - * + * * ( ֽϸ) * ¼IRR * @param cdbList @@ -595,7 +595,7 @@ public class IrrTools { public static String getIrr(List cdbList) { // õб List rent_list = getRentListByCashDetails(cdbList); - /* + /* * Ϊ̶¼ * @param chjg ̶ֵ1 * @param zjjg ̶ֵ1 @@ -606,7 +606,7 @@ public class IrrTools { } /** - * + * * @Title: getIrr * @author zhangc * @Description: ţٷзXIRR @@ -624,7 +624,7 @@ public class IrrTools { return IrrTools.getXIRR(rent_list, planDate_list).toString(); //return IrrTools.getIRR(rent_list, "1","1","12"); } - + public static String getIrrNew( List netList,List dateList,String process) throws Exception { // õб //List rent_list = getRentListByCashDetails(cashlist,process); @@ -634,9 +634,9 @@ public class IrrTools { //return IrrTools.getIRR(rent_list, "1","1","12"); } /** - * + * * ( ֽϸ) - * + * * @param cdbList * @param cb * @return @@ -651,9 +651,9 @@ public class IrrTools { } /** - * + * * ( ֽϸ) - * + * * @param cdbList * @param cb * @return @@ -668,9 +668,9 @@ public class IrrTools { } /** - * + * * ( ֽϸõµбirrֵ) - * + * * @param cdbList */ private static List getRentListByCashDetails(List cdbList) { @@ -680,7 +680,7 @@ public class IrrTools { } return rent_list; } - + private static List getRentListByCashDetails(List cdbList,String process) throws Exception { List rent_list = new ArrayList(); for (Object cdb : cdbList) { @@ -691,12 +691,12 @@ public class IrrTools { }else{ rent_list.add(((ContractCashDetailTemp)cdb).getNetFlow().toString()); }*/ - + rent_list.add(((BizObject)cdb).getAttribute("NET_FLOW").getString()); } return rent_list; } - + private static List getRentListByCashDetailsPlanDate(List cdbList,String process) throws Exception { List rent_list = new ArrayList(); for (Object cdb : cdbList) { @@ -706,9 +706,9 @@ public class IrrTools { } /** - * + * * ( ϢµľϢбirr,䵱ʴڶ) - * + * * @param cb * ׽ṹbean * @param frpb @@ -734,7 +734,7 @@ public class IrrTools { } else { l_inflow_pour.add("-" + leasing_money); } - + for (int i = grace; i < rent_list.size(); i++) { l_inflow_pour.add(rent_list.get(i).toString()); } @@ -745,16 +745,16 @@ public class IrrTools { l_inflow_pour.set(l_inflow_pour.size()-1, new BigDecimal(l_inflow_pour.get(l_inflow_pour.size()-1)).add(new BigDecimal(cb.getEquipEndValue())).toString()); } } - + irr = IrrTools.getIRR(l_inflow_pour, String.valueOf(12 / Integer.parseInt(cb.getIncomeNumberYear())), String.valueOf(12 / Integer.parseInt(cb.getIncomeNumberYear())), cb.getIncomeNumberYear()); irr = Double.parseDouble(irr) + ""; return irr; } /** - * + * * (ֽöӦ) - * + * * @param alCash * ֽ HashMap keyΪnet_flow ÿڵֵ * @param income_number_year @@ -770,7 +770,7 @@ public class IrrTools { } return NumTools.formatNumberDoubleScale(Double.parseDouble(getIRR(alirr, "1", "1", income_number_year)) * 100 + "", 6); } - + /** *

ԭʼֽϰ̶ģʽ0ɶظʽֽ

* @author sea @@ -784,26 +784,26 @@ public class IrrTools { List list = new ArrayList(); List cashList = new ArrayList(); // ڳĩ֧ ע: ڳ 1 ַ period_type_1 #ָ# ĩ 0 ַ period_type_0 - String periodType = cb.getPeriodType(); + String periodType = cb.getPeriodType(); if (ccfbList != null && ccfbList.size() > 0 && ccfbList.size() > size) {//ֽijС2÷ãرڳ£ֻֽһ - + //0ֽ CashDetailsBean objFirst = new CashDetailsBean(); objFirst = ccfbList.get(0);//Ĭϵ0ڵֵԭʼֽĵ0 - - double firstIn = 0.00; - double firstOut = 0.00; + + double firstIn = 0.00; + double firstOut = 0.00; String firstFundInDetails = ""; String firstFundOutDetails = ""; for (int i = 0; i < size; i++) { CashDetailsBean oneObj = ccfbList.get(i); //i - firstIn = firstIn + NumberUtils.parseDouble( NumberUtils.nullToZero( oneObj.getFundIn() ) ); - firstOut = firstOut + NumberUtils.parseDouble( NumberUtils.nullToZero( oneObj.getFundOut() ) ); + firstIn = firstIn + NumberUtils.parseDouble( NumberUtils.nullToZero( oneObj.getFundIn() ) ); + firstOut = firstOut + NumberUtils.parseDouble( NumberUtils.nullToZero( oneObj.getFundOut() ) ); firstFundInDetails = firstFundInDetails +oneObj.getFundInDetails(); firstFundOutDetails = firstFundOutDetails+oneObj.getFundOutDetails(); } - + //ڳǰ:ϲ if("1".equals(periodType) || "period_type_1".equals(periodType)){ //װµĵ0 @@ -816,7 +816,7 @@ public class IrrTools { objFirst.setNetFlow(NumberUtils.doubleToString( firstIn + firstRent - firstOut ) ); objFirst.setOnhire_id(1000); cashList.add(objFirst); - + //װֽ int key = 2; int onhire_id = 1000; @@ -868,7 +868,7 @@ public class IrrTools { } return cashList; } - + /** *

̶ʽֽ0

* @author sea @@ -894,7 +894,7 @@ public class IrrTools { } return num; } - + /** *

ɲ0ֽ

* @author sea @@ -915,14 +915,14 @@ public class IrrTools { newObj.setOnhire_id(onhire_id); return newObj; } - - + + /** * ţٵIRR * @param cashList:ֽList * @return IRR */ - public BigDecimal getIRR(List cashList){ + public static BigDecimal getIRR(List cashList){ //long startTime = System.currentTimeMillis(); BigDecimal diff = BigDecimal.ONE; //ֵܱܺIJֵ BigDecimal irr = BigDecimal.ZERO; @@ -970,7 +970,7 @@ public class IrrTools { BigDecimal daoRate=BigDecimal.ZERO; // 1/(1+irr) BigDecimal netflowNow; //ֵ BigDecimal error = new BigDecimal("0.0000000001"); // - int size = cashList.size(); //ֽС + int size = cashList.size(); //ֽС int j = 0; // double k = 0; String startDate = ""; @@ -990,7 +990,7 @@ public class IrrTools { }catch(Exception e){ e.printStackTrace(); } - + } j++; irr = irr.subtract(diff.divide(derivative, 20, BigDecimal.ROUND_HALF_UP)); //ϵʽ From e12636dfca7aa739880fc91230ed35a8aa0dba9d Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Wed, 28 Jul 2021 08:59:38 +0800 Subject: [PATCH 15/51] =?UTF-8?q?=E6=8F=90=E4=BA=A4JBO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenwa/calc/LC_CALC_SUBSECTION_INFO.java | 112 ++++++++++ .../calc/LC_CALC_SUBSECTION_INFO_HIS.java | 112 ++++++++++ .../calc/LC_CALC_SUBSECTION_INFO_TEMP.java | 116 +++++++++++ .../calc/LC_CONTRACT_SUBSECTION_INFO.java | 112 ++++++++++ .../LC_CONTRACT_SUBSECTION_RENT_PLAN.java | 144 +++++++++++++ .../tenwa/calc/LC_PROJ_SUBSECTION_INFO.java | 112 ++++++++++ .../calc/LC_PROJ_SUBSECTION_RENT_PLAN.java | 144 +++++++++++++ .../tenwa/calc/LC_SUBSECTION_RENT_PLAN.java | 196 ++++++++++++++++++ .../calc/LC_SUBSECTION_RENT_PLAN_HIS.java | 196 ++++++++++++++++++ .../calc/LC_SUBSECTION_RENT_PLAN_TEMP.java | 196 ++++++++++++++++++ 10 files changed, 1440 insertions(+) create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_CONTRACT_SUBSECTION_INFO.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_CONTRACT_SUBSECTION_RENT_PLAN.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_PROJ_SUBSECTION_INFO.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_PROJ_SUBSECTION_RENT_PLAN.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN_HIS.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN_TEMP.java diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java new file mode 100644 index 000000000..ab23df4aa --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java @@ -0,0 +1,112 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_CALC_SUBSECTION_INFO{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_CALC_SUBSECTION_INFO"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ֶκ INT(10)
+ */ + public static final String SUBSECTION_NUMBER = "SUBSECTION_NUMBER"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_RATIO = "CLEAN_LEASE_RATIO"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_MONEY = "CLEAN_LEASE_MONEY"; + /** + * ׼ DOUBLE(18)
+ */ + public static final String RATE = "RATE"; + /** + * Ʒ DOUBLE(18)
+ */ + public static final String DISCOUNT_RATE = "DISCOUNT_RATE"; + /** + * DOUBLE(18)
+ */ + public static final String FINANCING_RATE = "FINANCING_RATE"; + /** + * ڴ INT(10)
+ */ + public static final String INCOME_NUMBER = "INCOME_NUMBER"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String DISCOUNT = "DISCOUNT"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String MAXIMUM_DISCOUNT = "MAXIMUM_DISCOUNT"; + /** + * Ϣؿڴ INT(10)
+ */ + public static final String DISCOUNT_COLLECTION_PERIOD = "DISCOUNT_COLLECTION_PERIOD"; + /** + * Ϣ㷽ʽ STRING(10)
+ */ + public static final String DISCOUNT_CALC_METHOD = "DISCOUNT_CALC_METHOD"; + /** + * Ƿſ STRING(10)
+ */ + public static final String IS_BALANCE_LENDING = "IS_BALANCE_LENDING"; + /** + * ¼ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ¼벿 STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * ¼ʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java new file mode 100644 index 000000000..f5ecf782f --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java @@ -0,0 +1,112 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_CALC_SUBSECTION_INFO_HIS{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_CALC_SUBSECTION_INFO_HIS"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ֶκ INT(10)
+ */ + public static final String SUBSECTION_NUMBER = "SUBSECTION_NUMBER"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_RATIO = "CLEAN_LEASE_RATIO"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_MONEY = "CLEAN_LEASE_MONEY"; + /** + * ׼ DOUBLE(18)
+ */ + public static final String RATE = "RATE"; + /** + * Ʒ DOUBLE(18)
+ */ + public static final String DISCOUNT_RATE = "DISCOUNT_RATE"; + /** + * DOUBLE(18)
+ */ + public static final String FINANCING_RATE = "FINANCING_RATE"; + /** + * ڴ INT(10)
+ */ + public static final String INCOME_NUMBER = "INCOME_NUMBER"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String DISCOUNT = "DISCOUNT"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String MAXIMUM_DISCOUNT = "MAXIMUM_DISCOUNT"; + /** + * Ϣؿڴ INT(10)
+ */ + public static final String DISCOUNT_COLLECTION_PERIOD = "DISCOUNT_COLLECTION_PERIOD"; + /** + * Ϣ㷽ʽ STRING(10)
+ */ + public static final String DISCOUNT_CALC_METHOD = "DISCOUNT_CALC_METHOD"; + /** + * Ƿſ STRING(10)
+ */ + public static final String IS_BALANCE_LENDING = "IS_BALANCE_LENDING"; + /** + * ¼ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ¼벿 STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * ¼ʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java new file mode 100644 index 000000000..841d4ee5c --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java @@ -0,0 +1,116 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_CALC_SUBSECTION_INFO_TEMP{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_CALC_SUBSECTION_INFO_TEMP"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ֶκ INT(10)
+ */ + public static final String SUBSECTION_NUMBER = "SUBSECTION_NUMBER"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_RATIO = "CLEAN_LEASE_RATIO"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_MONEY = "CLEAN_LEASE_MONEY"; + /** + * ׼ DOUBLE(18)
+ */ + public static final String RATE = "RATE"; + /** + * Ʒ DOUBLE(18)
+ */ + public static final String DISCOUNT_RATE = "DISCOUNT_RATE"; + /** + * DOUBLE(18)
+ */ + public static final String FINANCING_RATE = "FINANCING_RATE"; + /** + * ڴ INT(10)
+ */ + public static final String INCOME_NUMBER = "INCOME_NUMBER"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String DISCOUNT = "DISCOUNT"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String MAXIMUM_DISCOUNT = "MAXIMUM_DISCOUNT"; + /** + * Ϣؿڴ INT(10)
+ */ + public static final String DISCOUNT_COLLECTION_PERIOD = "DISCOUNT_COLLECTION_PERIOD"; + /** + * Ϣ㷽ʽ STRING(10)
+ */ + public static final String DISCOUNT_CALC_METHOD = "DISCOUNT_CALC_METHOD"; + /** + * Ƿſ STRING(10)
+ */ + public static final String IS_BALANCE_LENDING = "IS_BALANCE_LENDING"; + /** + * ¼ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ¼벿 STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * ¼ʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; + /** + * ̱ʶ STRING(32)
+ */ + public static final String FLOWUNID = "FLOWUNID"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CONTRACT_SUBSECTION_INFO.java b/src_jbo/jbo/app/tenwa/calc/LC_CONTRACT_SUBSECTION_INFO.java new file mode 100644 index 000000000..95dc01e37 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_CONTRACT_SUBSECTION_INFO.java @@ -0,0 +1,112 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_CONTRACT_SUBSECTION_INFO{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_CONTRACT_SUBSECTION_INFO"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ֶκ INT(10)
+ */ + public static final String SUBSECTION_NUMBER = "SUBSECTION_NUMBER"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_RATIO = "CLEAN_LEASE_RATIO"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_MONEY = "CLEAN_LEASE_MONEY"; + /** + * ׼ DOUBLE(18)
+ */ + public static final String RATE = "RATE"; + /** + * Ʒ DOUBLE(18)
+ */ + public static final String DISCOUNT_RATE = "DISCOUNT_RATE"; + /** + * DOUBLE(18)
+ */ + public static final String FINANCING_RATE = "FINANCING_RATE"; + /** + * ڴ INT(10)
+ */ + public static final String INCOME_NUMBER = "INCOME_NUMBER"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String DISCOUNT = "DISCOUNT"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String MAXIMUM_DISCOUNT = "MAXIMUM_DISCOUNT"; + /** + * Ϣؿڴ INT(10)
+ */ + public static final String DISCOUNT_COLLECTION_PERIOD = "DISCOUNT_COLLECTION_PERIOD"; + /** + * Ϣ㷽ʽ STRING(10)
+ */ + public static final String DISCOUNT_CALC_METHOD = "DISCOUNT_CALC_METHOD"; + /** + * Ƿſ STRING(10)
+ */ + public static final String IS_BALANCE_LENDING = "IS_BALANCE_LENDING"; + /** + * ¼ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ¼벿 STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * ¼ʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CONTRACT_SUBSECTION_RENT_PLAN.java b/src_jbo/jbo/app/tenwa/calc/LC_CONTRACT_SUBSECTION_RENT_PLAN.java new file mode 100644 index 000000000..ddeecd626 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_CONTRACT_SUBSECTION_RENT_PLAN.java @@ -0,0 +1,144 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_CONTRACT_SUBSECTION_RENT_PLAN{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_CONTRACT_SUBSECTION_RENT_PLAN"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * ۱ STRING(32)
+ */ + public static final String QUOT_ID = "QUOT_ID"; + /** + * ͻ STRING(32)
+ */ + public static final String CUST_ID = "CUST_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ڴ INT(10)
+ */ + public static final String PLAN_LIST = "PLAN_LIST"; + /** + * ƻ STRING(32)
+ */ + public static final String PLAN_DATE = "PLAN_DATE"; + /** + * ո״̬ STRING(32)
+ */ + public static final String PLAN_STATUS = "PLAN_STATUS"; + /** + * DOUBLE(18)
+ */ + public static final String RENT = "RENT"; + /** + * 񱾽 DOUBLE(18)
+ */ + public static final String CORPUS = "CORPUS"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String INTEREST = "INTEREST"; + /** + * ӦշϢ DOUBLE(18)
+ */ + public static final String PENALTY = "PENALTY"; + /** + * ҵ񱾽 DOUBLE(18)
+ */ + public static final String CORPUS_BUSINESS = "CORPUS_BUSINESS"; + /** + * ҵϢ DOUBLE(18)
+ */ + public static final String INTEREST_BUSINESS = "INTEREST_BUSINESS"; + /** + * ֵ DOUBLE(18)
+ */ + public static final String RENT_ADJUST = "RENT_ADJUST"; + /** + * ں󱾽 DOUBLE(18)
+ */ + public static final String ALL_REMAIN_CORPUS = "ALL_REMAIN_CORPUS"; + /** + * 㷽ʽ STRING(32)
+ */ + public static final String SETTLE_METHOD = "SETTLE_METHOD"; + /** + * STRING(32)
+ */ + public static final String COIN = "COIN"; + /** + * DOUBLE(18)
+ */ + public static final String YEAR_RATE = "YEAR_RATE"; + /** + * ע STRING(100)
+ */ + public static final String MEMO = "MEMO"; + /** + * ̱ STRING(32)
+ */ + public static final String FLOWUNID = "FLOWUNID"; + /** + * Ǽ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ǼDz STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * Ǽʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; + /** + * Ϣ STRING(32)
+ */ + public static final String INTEREST_DATE = "INTEREST_DATE"; + /** + * subsection_number INT(10)
+ */ + public static final String subsection_number = "subsection_number"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_PROJ_SUBSECTION_INFO.java b/src_jbo/jbo/app/tenwa/calc/LC_PROJ_SUBSECTION_INFO.java new file mode 100644 index 000000000..2656ff94b --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_PROJ_SUBSECTION_INFO.java @@ -0,0 +1,112 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_PROJ_SUBSECTION_INFO{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_PROJ_SUBSECTION_INFO"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ֶκ INT(10)
+ */ + public static final String SUBSECTION_NUMBER = "SUBSECTION_NUMBER"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_RATIO = "CLEAN_LEASE_RATIO"; + /** + * ʶ DOUBLE(18)
+ */ + public static final String CLEAN_LEASE_MONEY = "CLEAN_LEASE_MONEY"; + /** + * ׼ DOUBLE(18)
+ */ + public static final String RATE = "RATE"; + /** + * Ʒ DOUBLE(18)
+ */ + public static final String DISCOUNT_RATE = "DISCOUNT_RATE"; + /** + * DOUBLE(18)
+ */ + public static final String FINANCING_RATE = "FINANCING_RATE"; + /** + * ڴ INT(10)
+ */ + public static final String INCOME_NUMBER = "INCOME_NUMBER"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String DISCOUNT = "DISCOUNT"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String MAXIMUM_DISCOUNT = "MAXIMUM_DISCOUNT"; + /** + * Ϣؿڴ INT(10)
+ */ + public static final String DISCOUNT_COLLECTION_PERIOD = "DISCOUNT_COLLECTION_PERIOD"; + /** + * Ϣ㷽ʽ STRING(10)
+ */ + public static final String DISCOUNT_CALC_METHOD = "DISCOUNT_CALC_METHOD"; + /** + * Ƿſ STRING(10)
+ */ + public static final String IS_BALANCE_LENDING = "IS_BALANCE_LENDING"; + /** + * ¼ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ¼벿 STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * ¼ʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_PROJ_SUBSECTION_RENT_PLAN.java b/src_jbo/jbo/app/tenwa/calc/LC_PROJ_SUBSECTION_RENT_PLAN.java new file mode 100644 index 000000000..175781b13 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_PROJ_SUBSECTION_RENT_PLAN.java @@ -0,0 +1,144 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_PROJ_SUBSECTION_RENT_PLAN{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_PROJ_SUBSECTION_RENT_PLAN"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * ۱ STRING(32)
+ */ + public static final String QUOT_ID = "QUOT_ID"; + /** + * ͻ STRING(32)
+ */ + public static final String CUST_ID = "CUST_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ڴ INT(10)
+ */ + public static final String PLAN_LIST = "PLAN_LIST"; + /** + * ƻ STRING(32)
+ */ + public static final String PLAN_DATE = "PLAN_DATE"; + /** + * ո״̬ STRING(32)
+ */ + public static final String PLAN_STATUS = "PLAN_STATUS"; + /** + * DOUBLE(18)
+ */ + public static final String RENT = "RENT"; + /** + * 񱾽 DOUBLE(18)
+ */ + public static final String CORPUS = "CORPUS"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String INTEREST = "INTEREST"; + /** + * ӦշϢ DOUBLE(18)
+ */ + public static final String PENALTY = "PENALTY"; + /** + * ҵ񱾽 DOUBLE(18)
+ */ + public static final String CORPUS_BUSINESS = "CORPUS_BUSINESS"; + /** + * ҵϢ DOUBLE(18)
+ */ + public static final String INTEREST_BUSINESS = "INTEREST_BUSINESS"; + /** + * ֵ DOUBLE(18)
+ */ + public static final String RENT_ADJUST = "RENT_ADJUST"; + /** + * ں󱾽 DOUBLE(18)
+ */ + public static final String ALL_REMAIN_CORPUS = "ALL_REMAIN_CORPUS"; + /** + * 㷽ʽ STRING(32)
+ */ + public static final String SETTLE_METHOD = "SETTLE_METHOD"; + /** + * STRING(32)
+ */ + public static final String COIN = "COIN"; + /** + * DOUBLE(18)
+ */ + public static final String YEAR_RATE = "YEAR_RATE"; + /** + * ע STRING(100)
+ */ + public static final String MEMO = "MEMO"; + /** + * ̱ STRING(32)
+ */ + public static final String FLOWUNID = "FLOWUNID"; + /** + * Ǽ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ǼDz STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * Ǽʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; + /** + * Ϣ STRING(32)
+ */ + public static final String INTEREST_DATE = "INTEREST_DATE"; + /** + * subsection_number INT(10)
+ */ + public static final String subsection_number = "subsection_number"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN.java b/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN.java new file mode 100644 index 000000000..06534e98b --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN.java @@ -0,0 +1,196 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_SUBSECTION_RENT_PLAN{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_SUBSECTION_RENT_PLAN"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * ۱ STRING(32)
+ */ + public static final String QUOT_ID = "QUOT_ID"; + /** + * ͻ STRING(32)
+ */ + public static final String CUST_ID = "CUST_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ڴ INT(10)
+ */ + public static final String PLAN_LIST = "PLAN_LIST"; + /** + * ƻ STRING(32)
+ */ + public static final String PLAN_DATE = "PLAN_DATE"; + /** + * ո״̬ STRING(32)
+ */ + public static final String PLAN_STATUS = "PLAN_STATUS"; + /** + * DOUBLE(18)
+ */ + public static final String RENT = "RENT"; + /** + * 񱾽 DOUBLE(18)
+ */ + public static final String CORPUS = "CORPUS"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String INTEREST = "INTEREST"; + /** + * ӦշϢ DOUBLE(18)
+ */ + public static final String PENALTY = "PENALTY"; + /** + * ҵ񱾽 DOUBLE(18)
+ */ + public static final String CORPUS_BUSINESS = "CORPUS_BUSINESS"; + /** + * ҵϢ DOUBLE(18)
+ */ + public static final String INTEREST_BUSINESS = "INTEREST_BUSINESS"; + /** + * ֵ DOUBLE(18)
+ */ + public static final String RENT_ADJUST = "RENT_ADJUST"; + /** + * ں󱾽 DOUBLE(18)
+ */ + public static final String ALL_REMAIN_CORPUS = "ALL_REMAIN_CORPUS"; + /** + * 㷽ʽ STRING(32)
+ */ + public static final String SETTLE_METHOD = "SETTLE_METHOD"; + /** + * STRING(32)
+ */ + public static final String COIN = "COIN"; + /** + * DOUBLE(18)
+ */ + public static final String YEAR_RATE = "YEAR_RATE"; + /** + * ע STRING(100)
+ */ + public static final String MEMO = "MEMO"; + /** + * ̱ STRING(32)
+ */ + public static final String FLOWUNID = "FLOWUNID"; + /** + * Ǽ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ǼDz STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * Ǽʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; + /** + * Ϣ STRING(32)
+ */ + public static final String INTEREST_DATE = "INTEREST_DATE"; + /** + * ״̬ STRING(32)
+ */ + public static final String AUDIT_STATE = "AUDIT_STATE"; + /** + * տ״̬ STRING(32)
+ */ + public static final String COLLECT_STATUS = "COLLECT_STATUS"; + /** + * տ STRING(200)
+ */ + public static final String COLLECT_MSG = "COLLECT_MSG"; + /** + * ʧʱ STRING(200)
+ */ + public static final String FAILURE_TIME = "FAILURE_TIME"; + /** + * ʧԭ STRING(200)
+ */ + public static final String FAILURE_REASON = "FAILURE_REASON"; + /** + * ˮ,֣,ָ STRING(200)
+ */ + public static final String BATCH_NO = "BATCH_NO"; + /** + * ״̬ STRING(200)
+ */ + public static final String BATCH_STATUS = "BATCH_STATUS"; + /** + * batch_sn STRING(200)
+ */ + public static final String batch_sn = "batch_sn"; + /** + * SPARE_BATCH_NO STRING(32)
+ */ + public static final String SPARE_BATCH_NO = "SPARE_BATCH_NO"; + /** + * CORPUS_SP DOUBLE(18)
+ */ + public static final String CORPUS_SP = "CORPUS_SP"; + /** + * INTEREST_sp DOUBLE(18)
+ */ + public static final String INTEREST_sp = "INTEREST_sp"; + /** + * splitting_status STRING(2)
+ */ + public static final String splitting_status = "splitting_status"; + /** + * charge_way STRING(10)
+ */ + public static final String charge_way = "charge_way"; + /** + * subsection_number INT(10)
+ */ + public static final String subsection_number = "subsection_number"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN_HIS.java b/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN_HIS.java new file mode 100644 index 000000000..4ca77dfc0 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN_HIS.java @@ -0,0 +1,196 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_SUBSECTION_RENT_PLAN_HIS{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_SUBSECTION_RENT_PLAN_HIS"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * ۱ STRING(32)
+ */ + public static final String QUOT_ID = "QUOT_ID"; + /** + * ͻ STRING(32)
+ */ + public static final String CUST_ID = "CUST_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ڴ INT(10)
+ */ + public static final String PLAN_LIST = "PLAN_LIST"; + /** + * ƻ STRING(32)
+ */ + public static final String PLAN_DATE = "PLAN_DATE"; + /** + * ո״̬ STRING(32)
+ */ + public static final String PLAN_STATUS = "PLAN_STATUS"; + /** + * DOUBLE(18)
+ */ + public static final String RENT = "RENT"; + /** + * 񱾽 DOUBLE(18)
+ */ + public static final String CORPUS = "CORPUS"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String INTEREST = "INTEREST"; + /** + * ӦշϢ DOUBLE(18)
+ */ + public static final String PENALTY = "PENALTY"; + /** + * ҵ񱾽 DOUBLE(18)
+ */ + public static final String CORPUS_BUSINESS = "CORPUS_BUSINESS"; + /** + * ҵϢ DOUBLE(18)
+ */ + public static final String INTEREST_BUSINESS = "INTEREST_BUSINESS"; + /** + * ֵ DOUBLE(18)
+ */ + public static final String RENT_ADJUST = "RENT_ADJUST"; + /** + * ں󱾽 DOUBLE(18)
+ */ + public static final String ALL_REMAIN_CORPUS = "ALL_REMAIN_CORPUS"; + /** + * 㷽ʽ STRING(32)
+ */ + public static final String SETTLE_METHOD = "SETTLE_METHOD"; + /** + * STRING(32)
+ */ + public static final String COIN = "COIN"; + /** + * DOUBLE(18)
+ */ + public static final String YEAR_RATE = "YEAR_RATE"; + /** + * ע STRING(100)
+ */ + public static final String MEMO = "MEMO"; + /** + * ̱ STRING(32)
+ */ + public static final String FLOWUNID = "FLOWUNID"; + /** + * Ǽ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ǼDz STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * Ǽʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; + /** + * Ϣ STRING(32)
+ */ + public static final String INTEREST_DATE = "INTEREST_DATE"; + /** + * ״̬ STRING(32)
+ */ + public static final String AUDIT_STATE = "AUDIT_STATE"; + /** + * տ״̬ STRING(32)
+ */ + public static final String COLLECT_STATUS = "COLLECT_STATUS"; + /** + * տ STRING(200)
+ */ + public static final String COLLECT_MSG = "COLLECT_MSG"; + /** + * ʧʱ STRING(200)
+ */ + public static final String FAILURE_TIME = "FAILURE_TIME"; + /** + * ʧԭ STRING(200)
+ */ + public static final String FAILURE_REASON = "FAILURE_REASON"; + /** + * ˮ,֣,ָ STRING(200)
+ */ + public static final String BATCH_NO = "BATCH_NO"; + /** + * ״̬ STRING(200)
+ */ + public static final String BATCH_STATUS = "BATCH_STATUS"; + /** + * һˮSN STRING(200)
+ */ + public static final String BATCH_SN = "BATCH_SN"; + /** + * SPARE_BATCH_NO STRING(32)
+ */ + public static final String SPARE_BATCH_NO = "SPARE_BATCH_NO"; + /** + * CORPUS_SP DOUBLE(18)
+ */ + public static final String CORPUS_SP = "CORPUS_SP"; + /** + * INTEREST_sp DOUBLE(18)
+ */ + public static final String INTEREST_sp = "INTEREST_sp"; + /** + * splitting_status STRING(2)
+ */ + public static final String splitting_status = "splitting_status"; + /** + * charge_way STRING(10)
+ */ + public static final String charge_way = "charge_way"; + /** + * subsection_number INT(10)
+ */ + public static final String subsection_number = "subsection_number"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN_TEMP.java new file mode 100644 index 000000000..e530bc3aa --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_SUBSECTION_RENT_PLAN_TEMP.java @@ -0,0 +1,196 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_SUBSECTION_RENT_PLAN_TEMP{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_SUBSECTION_RENT_PLAN_TEMP"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * ۱ STRING(32)
+ */ + public static final String QUOT_ID = "QUOT_ID"; + /** + * ͻ STRING(32)
+ */ + public static final String CUST_ID = "CUST_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * Ŀ STRING(32)
+ */ + public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * ͬ STRING(32)
+ */ + public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER"; + /** + * Ͷű STRING(32)
+ */ + public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER"; + /** + * ڴ INT(10)
+ */ + public static final String PLAN_LIST = "PLAN_LIST"; + /** + * ƻ STRING(32)
+ */ + public static final String PLAN_DATE = "PLAN_DATE"; + /** + * ո״̬ STRING(32)
+ */ + public static final String PLAN_STATUS = "PLAN_STATUS"; + /** + * DOUBLE(18)
+ */ + public static final String RENT = "RENT"; + /** + * 񱾽 DOUBLE(18)
+ */ + public static final String CORPUS = "CORPUS"; + /** + * Ϣ DOUBLE(18)
+ */ + public static final String INTEREST = "INTEREST"; + /** + * ӦշϢ DOUBLE(18)
+ */ + public static final String PENALTY = "PENALTY"; + /** + * ҵ񱾽 DOUBLE(18)
+ */ + public static final String CORPUS_BUSINESS = "CORPUS_BUSINESS"; + /** + * ҵϢ DOUBLE(18)
+ */ + public static final String INTEREST_BUSINESS = "INTEREST_BUSINESS"; + /** + * ֵ DOUBLE(18)
+ */ + public static final String RENT_ADJUST = "RENT_ADJUST"; + /** + * ں󱾽 DOUBLE(18)
+ */ + public static final String ALL_REMAIN_CORPUS = "ALL_REMAIN_CORPUS"; + /** + * 㷽ʽ STRING(32)
+ */ + public static final String SETTLE_METHOD = "SETTLE_METHOD"; + /** + * STRING(32)
+ */ + public static final String COIN = "COIN"; + /** + * DOUBLE(18)
+ */ + public static final String YEAR_RATE = "YEAR_RATE"; + /** + * ע STRING(100)
+ */ + public static final String MEMO = "MEMO"; + /** + * ̱ STRING(32)
+ */ + public static final String FLOWUNID = "FLOWUNID"; + /** + * Ǽ STRING(32)
+ */ + public static final String INPUTUSERID = "INPUTUSERID"; + /** + * ǼDz STRING(32)
+ */ + public static final String INPUTORGID = "INPUTORGID"; + /** + * Ǽʱ STRING(32)
+ */ + public static final String INPUTTIME = "INPUTTIME"; + /** + * STRING(32)
+ */ + public static final String UPDATEUSERID = "UPDATEUSERID"; + /** + * ² STRING(32)
+ */ + public static final String UPDATEORGID = "UPDATEORGID"; + /** + * ʱ STRING(32)
+ */ + public static final String UPDATETIME = "UPDATETIME"; + /** + * Ϣ STRING(32)
+ */ + public static final String INTEREST_DATE = "INTEREST_DATE"; + /** + * ״̬ STRING(32)
+ */ + public static final String AUDIT_STATE = "AUDIT_STATE"; + /** + * տ״̬ STRING(32)
+ */ + public static final String COLLECT_STATUS = "COLLECT_STATUS"; + /** + * տ STRING(200)
+ */ + public static final String COLLECT_MSG = "COLLECT_MSG"; + /** + * ʧʱ STRING(200)
+ */ + public static final String FAILURE_TIME = "FAILURE_TIME"; + /** + * ʧԭ STRING(200)
+ */ + public static final String FAILURE_REASON = "FAILURE_REASON"; + /** + * ˮ,֣,ָ STRING(200)
+ */ + public static final String BATCH_NO = "BATCH_NO"; + /** + * ״̬ STRING(200)
+ */ + public static final String BATCH_STATUS = "BATCH_STATUS"; + /** + * һˮSN STRING(200)
+ */ + public static final String BATCH_SN = "BATCH_SN"; + /** + * SPARE_BATCH_NO STRING(32)
+ */ + public static final String SPARE_BATCH_NO = "SPARE_BATCH_NO"; + /** + * CORPUS_SP DOUBLE(18)
+ */ + public static final String CORPUS_SP = "CORPUS_SP"; + /** + * INTEREST_sp DOUBLE(18)
+ */ + public static final String INTEREST_sp = "INTEREST_sp"; + /** + * splitting_status STRING(2)
+ */ + public static final String splitting_status = "splitting_status"; + /** + * charge_way STRING(10)
+ */ + public static final String charge_way = "charge_way"; + /** + * subsection_number INT(10)
+ */ + public static final String subsection_number = "subsection_number"; +} \ No newline at end of file From fc377bde0ab1171d80eaf768f827fd9e17871a51 Mon Sep 17 00:00:00 2001 From: zhulh Date: Wed, 28 Jul 2021 16:06:28 +0800 Subject: [PATCH 16/51] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E7=AE=97?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java b/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java index 7a7813894..3591c6730 100644 --- a/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java +++ b/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java @@ -145,7 +145,7 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor { boLSRPT.setAttributeValue( "INTEREST_BUSINESS", interest.toString() ); boLSRPT.setAttributeValue( "SUBSECTION_NUMBER", subsectionNumber ); bomLSRPT.saveObject( boLSRPT ); - if ( interests.size() - 1 > i ) { + if ( interests.size() > i ) { interests.set( i, new BigDecimal( interests.get( i ) ).add( interest ).toString() ); corpuss.set( i, new BigDecimal( corpuss.get( i ) ).add( corpus ).toString() ); overCorpuss.set( i, new BigDecimal( overCorpuss.get( i ) ).add( cleanLeaseMoney ).toString() ); From 541923d92f26e5e743e5e405a82ef687947e8c72 Mon Sep 17 00:00:00 2001 From: zhulh Date: Wed, 28 Jul 2021 16:49:44 +0800 Subject: [PATCH 17/51] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=8D=E8=B5=B7=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 94b26cd98..250b77814 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -150,7 +150,7 @@ doTemp.setHtmlEvent("FIRST_PLAN_DATE", "onchange", "changeFistPlanDate");//һڼƻ doTemp.setHtmlEvent("CORPUS_RATIO", "onchange", "changeCorpusRatio");//ڱ doTemp.setHtmlEvent("EQUIP_AMT", "onchange", "changgeCompare");// - doTemp.setHtmlEvent("SUBSECTION_CONFIG", "onchange", "changeSubsectionConfig");// + doTemp.setHtmlEvent("SUBSECTION_CONDIG", "onchange", "changeSubsectionConfig");// /*ֶ¼*/ /*ģ*/ @@ -315,7 +315,7 @@ $(function(){ function changeSubsectionConfig() { var settleMethod = getItemValue( 0, 0, 'SETTLE_METHOD' ); - var subsectionConfig = getItemValue( 0, 0, 'SUBSECTION_CONFIG' ); + var subsectionConfig = getItemValue( 0, 0, 'SUBSECTION_CONDIG' ); if ( 'segmented_financing' === settleMethod && '' !== subsectionConfig ) { var equipAmt = getItemValue( 0, 0, 'EQUIP_AMT' ); var cleanLeaseMoney = getItemValue( 0, 0, 'CLEAN_LEASE_MONEY' ); From 8e3cb9094332cb063465e2309de678e31d2eabd9 Mon Sep 17 00:00:00 2001 From: zhulh Date: Wed, 28 Jul 2021 16:51:00 +0800 Subject: [PATCH 18/51] =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 250b77814..09c5d65d4 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -904,7 +904,7 @@ function changeSettleMethod2(){ document.all( 'A_Group_0020' ).style.display = 'block'; var param = 'CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>'; AsControl.OpenView( '/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp', param, 'subsection_list' ); - setItemRequired( 0, 'SUBSECTION_CONFIG', true ); + setItemRequired( 0, 'SUBSECTION_CONDIG', true ); setItemRequired( 0, 'INCOME_NUMBER', false ); setItemRequired( 0, 'YEAR_RATE', false ); } From f497953a2b21ad85bb2346d61f0e7e573161a4fd Mon Sep 17 00:00:00 2001 From: zhulh Date: Wed, 28 Jul 2021 17:15:19 +0800 Subject: [PATCH 19/51] =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index d341e3d87..58faea8e8 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -54,7 +54,7 @@ } function changeCleanLeaseRatio() { - var subsectionConfig = parent.getItemValue( 0, 0, 'SUBSECTION_CONFIG' ); + var subsectionConfig = parent.getItemValue( 0, 0, 'SUBSECTION_CONDIG' ); var equipAmt = parent.getItemValue( 0, 0, 'EQUIP_AMT' ); var cleanLeaseMoney = parent.getItemValue( 0, 0, 'CLEAN_LEASE_MONEY' ); var cleanLeaseRatio = getItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO' ); From 3e4f7302e1e26c0e4d2183fb9276d5105b875b67 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Wed, 28 Jul 2021 18:42:47 +0800 Subject: [PATCH 20/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=9E=8D=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF=E5=92=8C=E5=88=86?= =?UTF-8?q?=E6=AE=B5=E9=85=8D=E7=BD=AE=E6=A0=B9=E6=8D=AE=E7=A7=9F=E9=87=91?= =?UTF-8?q?=E6=B5=8B=E7=AE=97=E6=96=B9=E5=BC=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCCalcSubsectionInfoTempList.jsp | 21 +++++++++++ .../LCSubsectionRentPlanTempList.jsp | 37 +++++++++++++++++++ .../LoanSimulation/LoanBasicInfo.jsp | 2 + 3 files changed, 60 insertions(+) create mode 100644 WebContent/Accounting/LoanSimulation/LCSubsectionRentPlanTempList.jsp diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index 58faea8e8..69796348c 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -11,6 +11,7 @@ doTemp.setHtmlEvent( "DISCOUNT", "onblur", "changeDiscount" ); doTemp.setHtmlEvent( "DISCOUNT_RATE", "onblur", "changeDiscountRate" ); doTemp.setHtmlEvent( "CLEAN_LEASE_RATIO", "onblur", "changeCleanLeaseRatio" ); + doTemp.setHtmlEvent( "CLEAN_LEASE_MONEY", "onblur", "changeCleanLeaseMoney" ); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--ΪGrid-- dwTemp.ReadOnly = "0"; //ֻģʽ @@ -20,6 +21,7 @@ //0Ƿչʾ 1 Ȩ޿ 2 չʾ 3ťʾ 4ť 5ť¼ 6 7 8 9ͼ꣬CSSʽ 10 String sButtons[][] = { {"true","All","Button","","","save()","","","","btn_icon_save",""}, + {"true","All","Button","","","viewAndEdit()","","","","btn_icon_detail",""}, }; %><%@include file="/Frame/resources/include/ui/include_list.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Accounting/LoanSimulation/LCSubsectionRentPlanTempList.jsp b/WebContent/Accounting/LoanSimulation/LCSubsectionRentPlanTempList.jsp new file mode 100644 index 000000000..1e417548a --- /dev/null +++ b/WebContent/Accounting/LoanSimulation/LCSubsectionRentPlanTempList.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2021-07-28 + Content: + History Log: + */ + ASObjectModel doTemp = new ASObjectModel("LCSubsectionRentPlanTempList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--ΪGrid-- + dwTemp.ReadOnly = "1"; //ֻģʽ + dwTemp.setPageSize((pageSize==null||"undefined".equals(pageSize))?24:Integer.parseInt(pageSize)); + dwTemp.genHTMLObjectWindow(CurPage.getParameter("flowunid")); + + //0Ƿչʾ 1 Ȩ޿ 2 չʾ 3ťʾ 4ť 5ť¼ 6 7 8 9ͼ꣬CSSʽ 10 + String sButtons[][] = { + {"false","All","Button","","","newRecord()","","","","btn_icon_add",""}, + {"false","","Button","","","viewAndEdit()","","","","btn_icon_detail",""}, + {"false","","Button","ɾ","ɾ","if(confirm('ȷʵҪɾ?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 09c5d65d4..2a154c51f 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -900,7 +900,9 @@ function changeSettleMethod2(){ } document.all( 'A_Group_0020' ).style.display = 'none'; + showItem(0,"SUBSECTION_CONDIG",'none'); if ( settleMethod === 'segmented_financing' ) { + showItem(0,"SUBSECTION_CONDIG",'block'); document.all( 'A_Group_0020' ).style.display = 'block'; var param = 'CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>'; AsControl.OpenView( '/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp', param, 'subsection_list' ); From 17396c7fcebc33f0506bb26ea4be6a629c664131 Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Thu, 29 Jul 2021 10:23:49 +0800 Subject: [PATCH 21/51] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 5 +++++ WebContent/WEB-INF/etc/jbo/jbo_lease.xml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index c112d9eb2..084841b69 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -75,6 +75,7 @@ +
@@ -3393,6 +3394,10 @@ + + + + diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml index a96e9e2fa..6dbc0713b 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml @@ -3866,7 +3866,7 @@ - + From e2f9404a457c9ac0ca3232c2543fa5ef1f7c91a3 Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Thu, 29 Jul 2021 10:26:46 +0800 Subject: [PATCH 22/51] =?UTF-8?q?=E5=B9=BF=E5=8F=91=E9=93=B6=E4=BC=81?= =?UTF-8?q?=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ActualPaymentCarTempList.jsp | 94 ++++++++++--------- .../ActualPayment/LBActualPaymentInfoTemp.jsp | 27 +++++- .../sdk/controller/CmbToPayController.java | 55 +++-------- .../tenwa/comm/util/date/DateAssistant.java | 12 ++- .../fund/fundcollection/FundIncomeMethod.java | 73 ++++++-------- 5 files changed, 133 insertions(+), 128 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp index 28cbc5cc2..b50e2b2cc 100644 --- a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp @@ -8,33 +8,17 @@ String sFileSaveMode = CurConfig.getConfigure("FileSaveMode"); String sFileSavePath = CurConfig.getConfigure("FileSavePath"); String sFileNameType = CurConfig.getConfigure("FileNameType"); - String phaseNo = CurPage.getParameter("PhaseNo"); String rightType = CurComp.getParameter("RightType"); String flowunid = CurPage.getParameter("FlowUnid"); - String ishistory = CurPage.getParameter("IsHistory"); - String contract_id = CurPage.getParameter("contract_id"); - String projectId = CurPage.getParameter("ProjectId"); String payType = Sqlca.getString(new SqlObject("SELECT payType FROM LC_FUND_INCOME_TEMP_HXM WHERE flowunid='"+flowunid+"'")); - ASObjectModel doTemp = new ASObjectModel("ActualPaymentCarTempList"); -/* if(null!=ishistory&&ishistory.equals("true")){ - doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory"); - } */ - String customertype = null; - String customer_id = null; - String project_id = null; - String product_id = null; - String contract_number = null; - ASResultSet rs = Sqlca.getASResultSet(new SqlObject("select customertype,contract_number,customer_id,LC_FUND_INCOME_TEMP.project_id,Product_Id from LC_FUND_INCOME_TEMP left join LB_CONTRACT_INFO lpi on lpi.PROJECT_ID=LC_FUND_INCOME_TEMP.PROJECT_ID left join LB_UNION_LESSEE ul on LC_FUND_INCOME_TEMP.contract_id=ul.contract_id and ul.is_main='Y' left join CUSTOMER_INFO cu on ul.customer_id=cu.customerid where LC_FUND_INCOME_TEMP.contract_id = "+contract_id)); - if(rs.next()){ - customertype = rs.getString("customertype"); - customer_id = rs.getString("customer_id"); - project_id = rs.getString("project_id"); - product_id = rs.getString("Product_Id"); - contract_number = rs.getString("contract_number"); - }else{ - customertype = "gaoxiao"; - } + String payMode = Sqlca.getString(new SqlObject("SELECT pay_mode FROM LB_ACTUAL_PAYMENT_INFO_TEMP WHERE flowunid='"+flowunid+"'")); + + ASObjectModel doTemp = new ASObjectModel("ActualPaymentCarTempList"); + if("cgb".equals(payMode)){ + doTemp.setVisible("REQSTS",false); + doTemp.setVisible("RTNFLG",false); + } ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--ΪGrid-- dwTemp.MultiSelect = true; @@ -114,7 +98,7 @@ <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java b/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java index d5635a1b6..adcf44343 100644 --- a/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java +++ b/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java @@ -1,40 +1,24 @@ package com.tenwa.sdk.controller; -import java.math.BigDecimal; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.BizObjectQuery; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.jbo.*; import com.amarsoft.awe.Configure; import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.flow.action.comm.BaseFlowStartAction; -import com.tenwa.sdk.VO.SDKDcPayReqxVO; -import com.tenwa.sdk.VO.SDKInfoVO; -import com.tenwa.sdk.VO.SDKPayCallBackVO; -import com.tenwa.sdk.VO.SDKPayCallDetail; -import com.tenwa.sdk.VO.SDKPayRqxVO; -import com.tenwa.sdk.VO.SDKToPayVO; +import com.tenwa.sdk.VO.*; import com.tenwa.sdk.utils.HttpRequest; import com.tenwa.sdk.utils.XMLStream; import com.thoughtworks.xstream.XStream; - +import jbo.app.tenwa.calc.LB_ACTUAL_PAYMENT_INFO_TEMP; import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; -import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT; import jbo.com.tenwa.lease.comm.*; import jbo.prd.LB_PRODUCTTOCOMPANY_INFO; import jbo.sys.CODE_LIBRARY; import net.sf.json.JSONObject; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.*; + public class CmbToPayController extends BaseFlowStartAction { private String distributor_ids; //ȡѡ ID private String contract_ids; //ȡѡĺͬID @@ -116,26 +100,14 @@ public class CmbToPayController extends BaseFlowStartAction { /* * ſ˻ȡ######ʼ */ - BizObjectManager accountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); - List accountBoList = null; - if("aa740e4111c111eaaa0000163e0e11e6".equals(subjectId)){ - accountBoList = accountManager.createQuery("select o.id,o.acc_number,o.acc_bank,o.acc_name,o.branch_code,oi.OWN_NAME from o left join jbo.com.tenwa.entity.comm.own.OWN_INFO oi on o.own_id = oi.OWN_NUMBER where o.money_type='01' and o.state_='0010' and o.acc_type='0010' and o.FbSdk='Y' and (o.account_type='out_account' or o.account_type='inAndOut_account') and oi.OWN_NAME='ޣڣ޹˾'").getResultList(false); - }else if("d989246c11c111eaaa0000163e0e11e6".equals(subjectId)){ - accountBoList = accountManager.createQuery("select o.id,o.acc_number,o.acc_bank,o.acc_name,o.branch_code,oi.OWN_NAME from o left join jbo.com.tenwa.entity.comm.own.OWN_INFO oi on o.own_id = oi.OWN_NUMBER where o.money_type='01' and o.state_='0010' and o.acc_type='0010' and o.FbSdk='Y' and (o.account_type='out_account' or o.account_type='inAndOut_account') and oi.OWN_NAME='ޣ޹˾'").getResultList(false); - } - if( accountBoList==null ||accountBoList.size()==0) { - map.put("code", "1") ; - map.put("msg", "ûƥı˻,ڱ˻м飡") ; + BizObjectManager actualPaymentMan = JBOFactory.getBizObjectManager(LB_ACTUAL_PAYMENT_INFO_TEMP.CLASS_NAME); + BizObject accountBo = actualPaymentMan.createQuery("select o.account,o.acc_number,o.bank,oa.id,oa.branch_code from o join jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT oa on o.acc_number = oa.acc_number where flowunid=:flowunid and and (oa.account_type='out_account' or oa.account_type='inAndOut_account')").setParameter("flowunid", FLOWUNID).getSingleResult(false); + if (accountBo == null) { + map.put("code", "1"); + map.put("msg", "ûƥı˻,ڱ˻м飡"); JSONObject jsonObj = JSONObject.fromObject(map); return jsonObj.toString(); } - if( accountBoList!=null && accountBoList.size()>1 ) { - map.put("code", "1") ; - map.put("msg", "õſ˻ֻͬʱһ,ڱ˻м飡") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - BizObject accountBo = accountBoList.get(0); /* * ſ˻ȡ###### */ @@ -490,6 +462,9 @@ public class CmbToPayController extends BaseFlowStartAction { income_boo.setParameter("FLOWUNID",pay_detail_one.getAttribute("FLOWUNID").toString()) ; income_boo.setParameter("CONTRACT_ID",pay_detail_one.getAttribute("CONTRACT_ID").toString()) ; income_boo.setParameter("DISTRIBUTOR_ID",pay_detail_one.getAttribute("DISTRIBUTOR_ID").toString()) ; + income_boo.setParameter("bank",accountBo.getAttribute("bank").toString()) ; + income_boo.setParameter("account",accountBo.getAttribute("account").toString()) ; + income_boo.setParameter("acc_number",accountBo.getAttribute("acc_number").toString()) ; income_boo.executeUpdate();//ʽո pay_detail_bom.saveObject(pay_detail_one); //֧ } diff --git a/src_core/com/tenwa/comm/util/date/DateAssistant.java b/src_core/com/tenwa/comm/util/date/DateAssistant.java index f9158f227..1075f4d0b 100644 --- a/src_core/com/tenwa/comm/util/date/DateAssistant.java +++ b/src_core/com/tenwa/comm/util/date/DateAssistant.java @@ -38,7 +38,17 @@ public class DateAssistant { DateX date=new DateX(); return date.getDateString("HH:mm:ss"); } - + + /** + * Զʽ + * @param format + * @return + */ + public final static String getFormatDate(String format){ + DateX date=new DateX(); + return date.getDateString(format); + } + public static long getDateSubDays(String sDate1, String sDate2, String sFormat) throws Exception { Calendar calendar1 = Calendar.getInstance(); calendar1.setTime(new SimpleDateFormat(sFormat).parse(sDate1)); diff --git a/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java b/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java index bfb537804..8bda14ba3 100644 --- a/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java +++ b/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java @@ -1,5 +1,18 @@ package com.tenwa.flow.fund.fundcollection; +import com.amarsoft.are.jbo.*; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.ASResultSet; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.bussinessapprove.BussinessStatusAndDetailAction; +import com.tenwa.util.MultiSubjectUtil; +import jbo.app.tenwa.calc.*; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; + import java.math.BigDecimal; import java.sql.SQLException; import java.util.HashMap; @@ -7,31 +20,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import com.amarsoft.app.base.businessobject.BusinessObject; -import net.sf.json.*; -import jbo.app.tenwa.calc.LB_PAYMENTRETURN_LOG; -import jbo.app.tenwa.calc.LC_EBANK_PROCESS; -import jbo.app.tenwa.calc.LC_EBANK_TEMP; -import jbo.app.tenwa.calc.LC_FUND_INCOME; -import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; -import jbo.app.tenwa.calc.LC_FUND_PLAN; -import jbo.app.tenwa.calc.VI_LC_FUND_PLAN; -import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT; -import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.are.util.StringFunction; -import com.amarsoft.awe.util.ASResultSet; -import com.amarsoft.awe.util.SqlObject; -import com.amarsoft.awe.util.Transaction; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.flow.bussinessapprove.BussinessStatusAndDetailAction; -import com.tenwa.reckon.util.Conn; - public class FundIncomeMethod { private String planIDs; @@ -453,12 +441,6 @@ public String getContactId(JBOTransaction tx) throws SQLException, Exception{ } public String createActualPayment(JBOTransaction tx) throws JBOException{ try{ - //ȡڱ˻ - BizObject boOAS = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME,tx) - .createQuery("account_purpose='default' and state_='0010' and FbSdk='Y' and own_id='807001002001' ").getSingleResult(false); - //ȡ򱾷˻ - BizObject boOAT = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME,tx) - .createQuery("account_purpose='default' and state_='0010' and FbSdk='Y' and own_id='807001003' ").getSingleResult(false); for(String contractId : contractIds.split("@")){ @SuppressWarnings("unchecked") List bos = JBOFactory.getBizObjectManager(LC_FUND_INCOME.CLASS_NAME) @@ -479,17 +461,6 @@ public String getContactId(JBOTransaction tx) throws SQLException, Exception{ otherProperty.put("FlowUnid", flowunid); otherProperty.put("IS_FLOWING", "0"); otherProperty.put("ACCOUNTING_DATE", StringFunction.getTodayNow().split(" ")[0]); - if("aa740e4111c111eaaa0000163e0e11e6".equals(lci.getAttribute("SUBJECTID").toString())){ - otherProperty.put("BANK", boOAS.getAttribute("ACC_BANK").getString()); - otherProperty.put("ACCOUNT", boOAS.getAttribute("ACC_NAME").getString()); - otherProperty.put("ACC_NUMBER", boOAS.getAttribute("ACC_NUMBER").getString()); - }else if("d989246c11c111eaaa0000163e0e11e6".equals(lci.getAttribute("SUBJECTID").toString())){ - otherProperty.put("BANK", boOAT.getAttribute("ACC_BANK").getString()); - otherProperty.put("ACCOUNT", boOAT.getAttribute("ACC_NAME").getString()); - otherProperty.put("ACC_NUMBER", boOAT.getAttribute("ACC_NUMBER").getString()); - }else{ - throw new RuntimeException("δѯӦϢ"); - } otherProperty.put("INCOME_ID", bo.getAttribute("ID").getString()); otherProperty.put(LC_FUND_INCOME.EBANK_STATUS, "03"); if("0020".equals(payType)||"0030".equals(payType)){ @@ -634,6 +605,24 @@ public String getContactId(JBOTransaction tx) throws SQLException, Exception{ }else{ meaage="ɵıθϸкѡͬ岻"; } + //ϢĬϱ˻ + if ("true".equals(meaage)) { + String subjectName = ""; + if (MultiSubjectUtil.SZSUBJECTID.equals(subjectuid)) { + subjectName = MultiSubjectUtil.SZSUBJECTNAME; + } else if (MultiSubjectUtil.TJSUBJECTID.equals(subjectuid)) { + subjectName = MultiSubjectUtil.TJSUBJECTNAME; + } + BizObjectManager bm_own = JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT", tx); + BizObject bo_own = bm_own.createQuery("acc_name =:accName and account_purpose = 'default' and account_type = 'out_account' and state_ = '0010'") + .setParameter("accName", subjectName).getSingleResult(false); + JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LB_ACTUAL_PAYMENT_INFO_TEMP","update o set bank=:bank,account=:account,acc_number=:acc_number where flowunid = :flowunid ") + .setParameter("bank",bo_own.getAttribute("acc_bank").getString()) + .setParameter("account",bo_own.getAttribute("acc_name").getString()) + .setParameter("acc_number",bo_own.getAttribute("acc_number").getString()) + .setParameter("flowunid",flowunid) + .executeUpdate(); + } }else{ meaage="ѡͬ漰壬飡"; } From 094510c82e51df48727517cf5586abad4b9372d8 Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Thu, 29 Jul 2021 10:27:26 +0800 Subject: [PATCH 23/51] =?UTF-8?q?=E5=B9=BF=E5=8F=91=E9=93=B6=E4=BC=81?= =?UTF-8?q?=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/cgb.properties | 8 + .../com/tenwa/cgb/conf/CGBconfProperties.java | 32 ++ .../controller/OperateOfCGBController.java | 473 ++++++++++++++++++ .../com/tenwa/cgb/util/CGBLogAssistant.java | 74 +++ src_cmb/com/tenwa/cgb/util/HttpAssistant.java | 64 +++ 5 files changed, 651 insertions(+) create mode 100644 config/cgb.properties create mode 100644 src_cmb/com/tenwa/cgb/conf/CGBconfProperties.java create mode 100644 src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java create mode 100644 src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java create mode 100644 src_cmb/com/tenwa/cgb/util/HttpAssistant.java diff --git a/config/cgb.properties b/config/cgb.properties new file mode 100644 index 000000000..54ed59eb2 --- /dev/null +++ b/config/cgb.properties @@ -0,0 +1,8 @@ +#ͻ +cifMaster=60000002922 +#Ա +entUserId=100001 +# +password=1q2w3e4r +#ǰûַ +cgbUrl=http://114.242.219.170:63312/CGBClient/BankAction \ No newline at end of file diff --git a/src_cmb/com/tenwa/cgb/conf/CGBconfProperties.java b/src_cmb/com/tenwa/cgb/conf/CGBconfProperties.java new file mode 100644 index 000000000..91ba0a429 --- /dev/null +++ b/src_cmb/com/tenwa/cgb/conf/CGBconfProperties.java @@ -0,0 +1,32 @@ +package com.tenwa.cgb.conf; + +import java.io.IOException; +import java.util.Properties; + +/** + * 㷢ֱ + * + * @program: apzl_leasing + * @author: yjf + * @create: 2021-07-20 08:24 + **/ +public class CGBconfProperties { + + public static final String CIFMASTER; + public static final String ENTUSERID; + public static final String PASSWORD; + public static final String CGBURL; + + static { + Properties prop = new Properties(); + try { + prop.load(CGBconfProperties.class.getResourceAsStream("/cgb.properties")); + } catch (IOException e) { + e.printStackTrace(); + } + CIFMASTER = prop.getProperty("cifMaster"); + ENTUSERID = prop.getProperty("entUserId"); + PASSWORD = prop.getProperty("password"); + CGBURL = prop.getProperty("cgbUrl"); + } +} diff --git a/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java b/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java new file mode 100644 index 000000000..1f4a1c2d9 --- /dev/null +++ b/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java @@ -0,0 +1,473 @@ +package com.tenwa.cgb.controller; + +import com.amarsoft.are.jbo.*; +import com.amarsoft.awe.util.ASResultSet; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.amarsoft.dict.als.manage.CodeManager; +import com.tenwa.cgb.conf.CGBconfProperties; +import com.tenwa.cgb.util.CGBLogAssistant; +import com.tenwa.cgb.util.HttpAssistant; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.comm.util.date.DateAssistant; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import jbo.app.tenwa.calc.LB_ACTUAL_PAYMENT_INFO_TEMP; +import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; +import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_CALLBACK_DETAIL_TEMP; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @program: apzl_leasing + * @author: yjf + * @create: 2021-07-19 11:39 + **/ +public class OperateOfCGBController { + + private static final String XMLDECLARE = ""; + private static Log log = LogFactory.getLog(OperateOfCGBController.class); + private String flowUnid; + private String userId; + private String orgId; + private String contractIds; + + public void setFlowUnid(String flowUnid) { + this.flowUnid = flowUnid; + } + + public void setContractIds(String contractIds) { + this.contractIds = contractIds; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + /** + * ת + * + * @param tx + * @return + * @throws Exception + */ + public String batchPayOfCGB(JBOTransaction tx) throws Exception { + String retResult = "success𸶿ɹ!"; + contractIds = contractIds.replaceAll("@", "','"); + String subjectSql = "SELECT subjectId AS subjectuid FROM lb_contract_info WHERE id IN ('" + contractIds + "') GROUP BY subjectId "; + List> lciList = DataOperatorUtil.getDataBySql(subjectSql); + if (lciList.size() > 1) { + return "ſͬж壬飡"; + } + BizObjectManager actualPaymentMan = JBOFactory.getBizObjectManager(LB_ACTUAL_PAYMENT_INFO_TEMP.CLASS_NAME, tx); + BizObject actualBo = actualPaymentMan.createQuery("flowunid=:flowunid").setParameter("flowunid", flowUnid).getSingleResult(false); + if (actualBo == null || actualBo.getAttribute("acc_number").getString().length() == 0) { + throw new BusinessException("ûƥı˻,飡"); + } + String payAccountNum = actualBo.getAttribute("acc_number").getString(); + BizObjectManager incomeMan = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME, tx); + BizObject singleResult = incomeMan.createQuery("select v.count(1) as v.allCount from O where FLOWUNID=:FLOWUNID and o.contract_id in ('" + contractIds + "') and o.PAY_TYPE = 'pay_type_out' and o.CMB_PAY_LOG is null ").setParameter("FLOWUNID", flowUnid).getSingleResult(false); + if (singleResult != null && singleResult.getAttribute("allCount").getInt() > 0) { + int start = 0; + int maxCount = 200; + while (singleResult.getAttribute("allCount").getInt() > start) { + String customerBatchNo = "AP" + System.currentTimeMillis(); + log.info("CGB FLOWUNID[" + flowUnid + "]---ʼ" + start + "" + (start + maxCount) + "ѭ"); + List income_all_list = incomeMan.createQuery("select o.ID,o.CMB_PAY_NO,o.FACT_MONEY,o.FLOWUNID,o.CONTRACT_ID,contract_info.CONTRACT_NO,contract_info.ZC_CONTRACT_NUMBER,lul.CUSTOMER_NAME,distributor.distributor_id,distributor.acc_number,distributor.open_bank,distributor.account from o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO contract_info on o.CONTRACT_ID = contract_info.id join jbo.com.tenwa.lease.comm.LB_UNION_LESSEE lul on contract_info.id = lul.contract_id join jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT distributor on contract_info.distributor_id = distributor.distributor_id and distributor.is_main='Y' " + + " where o.FLOWUNID=:FLOWUNID and o.contract_id in ('" + contractIds + "') and o.PAY_TYPE = 'pay_type_out' and o.CMB_PAY_LOG is null ") + .setParameter("FLOWUNID", flowUnid).setFirstResult(start).setMaxResults(maxCount).getResultList(false); + //ת˱ + String batchPayMsgXml = createBatchPayMsg(customerBatchNo, payAccountNum, income_all_list); + //淢־ + CGBLogAssistant.insertCGBlog(flowUnid, "pay", customerBatchNo, null, batchPayMsgXml); + HashMap map = new HashMap<>(); + map.put("cgb_data", batchPayMsgXml); + String retMsg = HttpAssistant.post(CGBconfProperties.CGBURL, map); + if (retMsg == null) return "ǰû쳣,ϵԱ!"; + log.info("CGB [" + customerBatchNo + "] BATCHPAY RETURN XML : " + retMsg); + //·־ + CGBLogAssistant.updateCGBlog(customerBatchNo, null, retMsg); + //ת˱Ľ + Map batchPayResult = getBatchPayResult(retMsg); + if (batchPayResult.size() > 0 && "000".equals(batchPayResult.get("retCode"))) { + for (BizObject incomeObj : income_all_list) { + payBackResultHandle(incomeObj, customerBatchNo, batchPayResult, actualBo); + } + } else { + return "𸶿ʧ,㷢ش:[" + CodeManager.getItemName("cgb_describe", batchPayResult.get("retCode")) + "]"; + } + start += 200; + } + } else { + return "ѡݰ,飡"; + } + return retResult; + } + + /** + * ѯ + * + * @param tx + * @return + * @throws Exception + */ + public String batchQueryOfCGB(JBOTransaction tx) throws Exception { + BizObjectManager bm = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_DETAIL_TEMP.CLASS_NAME); + List bizObjects = bm.createQuery(" flowunid = :flowunid and contract_id in ('" + contractIds.replaceAll("@", "','") + "') and cmb_pay_log is not null and ERRTXT='' ") + .setParameter("flowunid", flowUnid).getResultList(false); + if (bizObjects.isEmpty()) return "Ϊ,"; + String customerBatchNo = null, customerSalarySeq = null; + for (BizObject bizObject : bizObjects) { + customerBatchNo = bizObject.getAttribute("cmb_pay_log").getString(); + customerSalarySeq = bizObject.getAttribute("cmb_pay_no").getString(); + String batchPayQueryXml = createBatchPayQueryMsg(customerBatchNo, customerSalarySeq); + //淢־ + CGBLogAssistant.insertCGBlog(flowUnid, "query", customerBatchNo, customerSalarySeq, batchPayQueryXml); + HashMap map = new HashMap<>(); + map.put("cgb_data", batchPayQueryXml); + String retMsg = HttpAssistant.post(CGBconfProperties.CGBURL, map); + if (retMsg == null) return "ǰû쳣,ϵԱ!"; + log.info("CGB customerBatchNo[" + customerBatchNo + "] customerSalarySeq[" + customerSalarySeq + "] QUERY RETURN XML : " + retMsg); + //·־ + CGBLogAssistant.updateCGBlog(customerBatchNo, customerSalarySeq, retMsg); + Map batchQueryResult = getBatchQueryResult(retMsg); + JBOTransaction tx1 = null; + try { + tx1 = JBOFactory.createJBOTransaction(); + Transaction sqlca = Transaction.createTransaction(tx1); + String retCode = batchQueryResult.get("retCode"); + if ("000".equals(retCode)) { + String bankstatus = batchQueryResult.get("bankstatus"); + String errText = ""; + String business_status = null, ebankStatus = null; + if ("6,B".indexOf(bankstatus) != -1) { //׳ɹ + business_status = "31"; + ebankStatus = "05"; + errText = "ɹ"; + } else if ("4,7,9,C,b".indexOf(bankstatus) != -1) { //ʧ + business_status = "32"; + ebankStatus = "04"; + errText = "ʧ"; + } + errText = batchQueryResult.get("errorreason") == null ? errText : batchQueryResult.get("errorreason"); + //»ص״̬ + SqlObject sqlObject = new SqlObject("update LC_FUND_INCOME_CALLBACK_DETAIL_TEMP set ERRCOD=:errCode,ERRTXT=:errText where id =:id") + .setParameter("errCode", bankstatus) + .setParameter("errText", errText) + .setParameter("id", bizObject.getAttribute("id").getString()); + sqlca.executeSQL(sqlObject); + if (business_status != null) { + //Ŀȱ + sqlObject = new SqlObject(""); + sqlObject.setOriginalSql("insert into BUSINESS_STATUS select replace(uuid(),'-',''),contract_no,'" + business_status + "','" + userId + "','" + orgId + "','" + DateAssistant.getTodayNow() + "',null,null,null,null from lb_contract_info where id = '" + bizObject.getAttribute("contract_id").getString() + "'"); + sqlca.executeSQL(sqlObject); + //ʽʵʱ + sqlObject = new SqlObject("update LC_FUND_INCOME_TEMP set EBANK_STATUS=:ebankStatus,CMB_PAY_NO=:customerSalarySeq,CMB_PAY_LOG=:customerBatchNo where flowunid=:flowunid and contract_id =:contractId ") + .setParameter("ebankStatus", ebankStatus) + .setParameter("customerSalarySeq", "04".equals(ebankStatus) ? null : customerSalarySeq) + .setParameter("customerBatchNo", "04".equals(ebankStatus) ? null : customerBatchNo) + .setParameter("flowunid", flowUnid) + .setParameter("contractId", bizObject.getAttribute("contract_id").getString()); + sqlca.executeSQL(sqlObject); + } + } else { + //»ص״̬ + SqlObject sqlObject = new SqlObject("update LC_FUND_INCOME_CALLBACK_DETAIL_TEMP set ERRCOD=:errCode,ERRTXT=:errText where id =:id") + .setParameter("errCode", retCode) + .setParameter("errText", CodeManager.getItemName("cgb_describe", retCode)) + .setParameter("id", bizObject.getAttribute("id").getString()); + sqlca.executeSQL(sqlObject); + } + tx1.commit(); + } catch (Exception e) { + log.error("customerBatchNo:[" + customerBatchNo + "] customerSalarySeq:[" + customerSalarySeq + "] ѯ쳣:", e); + if (tx1 != null) try { + tx1.rollback(); + } catch (JBOException e1) { + e1.printStackTrace(); + } + } + } + return "successѯɹ"; + } + + /** + * ת˱ + * + * @param tx + * @return + * @throws Exception + */ + private String createBatchPayMsg(String customerBatchNo, String accountNo, List payObjs) throws Exception { + StringBuilder sb = new StringBuilder(); + sb.append(XMLDECLARE); + sb.append(""); + sb.append(""); + sb.append(commonMseeage("0033")); + sb.append(""); + sb.append("").append(customerBatchNo).append("");//ͻκ ҵΨһ[] 20 + sb.append("").append(accountNo).append("");//˺ [] + int allCount = 0; + BigDecimal allSalary = new BigDecimal(0); + for (BizObject payObj : payObjs) { + allSalary = allSalary.add(BigDecimal.valueOf(payObj.getAttribute("fact_money").getDouble())); + allCount++; + } + sb.append("").append(allCount).append("");//ܱ [] + sb.append("").append(allSalary.toString()).append("");//ܽ λԪ[] + sb.append(""); + int i = 0; + String customerSalarySeq = null, customerName = null, contractNo = null, contractNoZC = null, remark = null; + for (BizObject payObj : payObjs) { + customerSalarySeq = customerBatchNo + String.format("%04d", ++i); + customerName = payObj.getAttribute("CUSTOMER_NAME").getString(); + contractNo = payObj.getAttribute("contract_no").getString(); + contractNoZC = payObj.getAttribute("ZC_CONTRACT_NUMBER").getString(); + remark = "".equals(contractNoZC) ? customerName + "-" + contractNo : customerName + "-" + contractNoZC + "-" + contractNo; + sb.append(""); + sb.append("").append(customerSalarySeq).append("");//ͻˮ ҵΨһ[] 20 + sb.append("").append(checkCGB(payObj.getAttribute("open_bank").getString()) ? "0" : "1").append(""); // 0 1 [] + sb.append("").append(payObj.getAttribute("account")).append(""); //տ [] + sb.append("").append(payObj.getAttribute("acc_number")).append(""); //տ˺ [] + sb.append("").append(payObj.getAttribute("open_bank").getString()).append(""); //տ [] + sb.append("").append("").append(""); //տеַ + sb.append("").append("").append(""); //к ʱ [] 㷢Զƥ--ظ + sb.append("").append(payObj.getAttribute("fact_money").getString()).append(""); // λԪ [] + sb.append("").append(remark).append(""); //ע ͻ+ͬ+ͬ + sb.append("").append(payObj.getAttribute("id").getString()).append(""); // ֧ + sb.append(""); + payObj.setAttributeValue("CMB_PAY_NO", customerSalarySeq); + } + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + log.info("CGB [" + customerBatchNo + "] BATCHPAY SEND XML : " + sb.toString()); + return sb.toString(); + } + + /** + * ת˽ + * + * @param strXML + * @return + */ + private Map getBatchPayResult(String strXML) { + Map res = new HashMap(); + //ȡκ + Pattern pm = Pattern.compile("(?<=)([\\S\\s]*?)(?=)"); + Matcher mm = pm.matcher(strXML); + if (mm.find()) { + res.put("customerBatchNo", mm.group()); + } + pm = Pattern.compile("(?<=)([\\S\\s]*?)(?=)"); + mm = pm.matcher(strXML); + if (mm.find()) { + res.put("retCode", mm.group()); + } + return res; + } + + /** + * ת˲ѯ + * + * @param customerBatchNo + * @param customerSalarySeq + * @return + * @throws Exception + */ + private String createBatchPayQueryMsg(String customerBatchNo, String customerSalarySeq) throws Exception { + StringBuilder sb = new StringBuilder(); + sb.append(XMLDECLARE); + sb.append(""); + sb.append(""); + sb.append(commonMseeage("0034")); + sb.append(""); + sb.append("").append(customerBatchNo).append(""); //ͻκ [] + sb.append("").append(customerSalarySeq == null ? "" : customerSalarySeq).append(""); //ͻˮ + sb.append(""); + sb.append(""); + sb.append(""); + log.info("CGB customerBatchNo[" + customerBatchNo + "] customerSalarySeq[" + customerSalarySeq + "] QUERY SEND XML : " + sb.toString()); + return sb.toString(); + } + + + /** + * ѯ + * + * @param strXML + * @return + */ + private Map getBatchQueryResult(String strXML) { + Map res = new HashMap(); + Pattern pm = Pattern.compile("(?<=)([\\S\\s]*?)(?=)"); + Matcher mm = pm.matcher(strXML); + if (mm.find()) { + res.put("retCode", mm.group()); + } + //ȡκ + pm = Pattern.compile("(?<=)([\\S\\s]*?)(?=)"); + mm = pm.matcher(strXML); + if (mm.find()) { + res.put("customerSalarySeq", mm.group()); + } + pm = Pattern.compile("(?<=)([\\S\\s]*?)(?=)"); + mm = pm.matcher(strXML); + if (mm.find()) { + res.put("bankstatus", mm.group()); + } + pm = Pattern.compile("(?<=)([\\S\\s]*?)(?=)"); + mm = pm.matcher(strXML); + if (mm.find()) { + if (mm.group().length() > 0) res.put("errorreason", mm.group()); + } + return res; + } + + + /** + * ͷƴ + * + * @param tranCode + * @return + */ + private String commonMseeage(String tranCode) throws Exception { + StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append("").append(tranCode).append("");// + sb.append("").append(CGBconfProperties.CIFMASTER).append("");//ͻ + sb.append("").append("CGB").append(System.currentTimeMillis()).append("");//ҵϵͳˮ ҵϵͳԼˮ,ÿΨһ 20 + sb.append("").append(DateAssistant.getFormatDate("yyyyMMdd")).append("");// + sb.append("").append(DateAssistant.getFormatDate("HHmmss")).append("");//ʱ + sb.append("");//,,ĬΪ + sb.append("").append(CGBconfProperties.ENTUSERID).append("");//Ա + sb.append(" ");// + sb.append(""); + return sb.toString(); + } + + /** + * Ƿ㷢˺ + * + * @param str + * @return + */ + private boolean checkCGB(String str) { + if (str.indexOf("㷢") != -1) { + return true; + } else { + return false; + } + } + + /** + * ֧ص + */ + private void payBackResultHandle(BizObject payObj, String customerBatchNo, Map retResult, BizObject actualObj) { + JBOTransaction tx = null; + String serialNum = null; + try { + serialNum = payObj.getAttribute("CMB_PAY_NO").getString(); + tx = JBOFactory.createJBOTransaction(); + Transaction sqlca = Transaction.createTransaction(tx); + //޸ϴοۿ¼,ʾ + SqlObject sqlObject = new SqlObject("update LC_FUND_INCOME_CALLBACK_DETAIL_TEMP set contract_id = null where flowunid=:flowunid and contract_id =:contractId") + .setParameter("flowunid", flowUnid).setParameter("contractId", payObj.getAttribute("contract_id").getString()); + sqlca.executeSQL(sqlObject); + //µĿۿ¼ + sqlObject = new SqlObject("insert into LC_FUND_INCOME_CALLBACK_DETAIL_TEMP (id,FLOWUNID,CMB_PAY_LOG,CMB_PAY_NO,ERRTXT,CONTRACT_ID,DISTRIBUTOR_ID,INPUTUSERID,INPUTORGID,INPUTTIME) " + + " values (replace(uuid(),'-',''),:flowunid,:cmbPayLog,:serialNum,'',:contractId,:distributorId,:userId,:orgId,:inputTime)") + .setParameter("flowunid", flowUnid) + .setParameter("cmbPayLog", customerBatchNo) //κ + .setParameter("serialNum", serialNum) // + .setParameter("contractId", payObj.getAttribute("contract_id").getString()) //ͬid + .setParameter("distributorId", payObj.getAttribute("distributor_id").getString())//id + .setParameter("userId", userId) + .setParameter("orgId", orgId) + .setParameter("inputTime", DateAssistant.getTodayNow()); + sqlca.executeSQL(sqlObject); + //κţŵ֧ϸ + sqlObject = new SqlObject("update LC_FUND_INCOME_TEMP set CMB_PAY_LOG=:customerBatchNo,CMB_PAY_NO=:serialNum,bank=:bank,account=:account,acc_number=:accNumber where id = :id ") + .setParameter("customerBatchNo", customerBatchNo) + .setParameter("serialNum", serialNum) + .setParameter("bank", actualObj.getAttribute("bank").getString())// + .setParameter("account", actualObj.getAttribute("account").getString())//˻ + .setParameter("accNumber", actualObj.getAttribute("acc_number").getString())//˺ + .setParameter("id", payObj.getAttribute("id").getString()); + sqlca.executeSQL(sqlObject); + tx.commit(); + } catch (Exception e) { + log.error("customerBatchNo:[" + customerBatchNo + "] customerSalarySeq:[" + serialNum + "] ת˽쳣!", e); + if (tx != null) try { + tx.rollback(); + } catch (JBOException e1) { + e1.printStackTrace(); + } + } + } + + /** + * ״״̬ + * + * @param bankstatus + * @return + */ + private String getbankstatusMsg(String bankstatus) { + String msg = null; + //ڻ:6,7,8 л:A,B,C,E + switch (bankstatus) { + case "6": + msg = "׳ɹ"; + break; + case "7": + msg = "ʧ"; + break; + case "8": + msg = "״̬δ֪,ûյ̨ϵͳصӦ"; + break; + case "A": + msg = "֧ϵͳڴ"; + break; + case "B": + msg = "ɹ"; + break; + case "C": + msg = "ʧ"; + break; + case "E": + msg = "֤"; + break; + case "9": + msg = "֤ȡ"; + break; + } + return msg; + } + + public String vaildate(Transaction sqlCa) throws Exception { + ASResultSet as = sqlCa.getASResultSet("select count(1) as nums," + + "sum(case when cmb_pay_log is not null or locate(RTNFLG,'F')>0 and length(RTNFLG)>0 then 0 else 1 end ) cmb_succ_num," + + "sum(case when cmb_pay_log is null or locate(ERRCOD,'4,7,9,C,b,W')>0 and length(ERRCOD)>0 then 0 else 1 end ) cgb_succ_num" + + " from LC_FUND_INCOME_CALLBACK_DETAIL_TEMP where flowunid = '" + flowUnid + "'"); + if (as.next()) { + int nums = as.getInt("nums"); + int CMBNums = as.getInt("cmb_succ_num"); //̷ɹ + int CGBNums = as.getInt("cgb_succ_num"); //㷢ɹ + if (nums > 0 && (CMBNums > 0 || CGBNums > 0)) { + return "ѷ֧,ֹ"; + } + } + return "succ"; + } +} diff --git a/src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java b/src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java new file mode 100644 index 000000000..4e3782dbe --- /dev/null +++ b/src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java @@ -0,0 +1,74 @@ +package com.tenwa.cgb.util; + +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.comm.util.date.DateAssistant; + +/** + * @program: apzl_leasing + * @author: yjf + * @create: 2021-07-20 15:15 + **/ +public class CGBLogAssistant { + + public static void insertCGBlog(String flowUnid, String type, String batchNo, String serialNum, String reqMsg) { + JBOTransaction tx = null; + try { + tx = JBOFactory.createJBOTransaction(); + Transaction sqlca = Transaction.createTransaction(tx); + SqlObject sqlObject = new SqlObject("insert into lb_cgb_log (type,flow_unid,batch_no,serial_num,req_msg,req_time) values (:type,:flowUnid,:batchNo,:serialNum,:reqMsg,:reqTime)") + .setParameter("type", type) + .setParameter("flowUnid", flowUnid) + .setParameter("batchNo", batchNo) + .setParameter("serialNum", serialNum) + .setParameter("reqMsg", reqMsg) + .setParameter("reqTime", DateAssistant.getTodayNow()); + sqlca.executeSQL(sqlObject); + tx.commit(); + } catch (Exception e) { + if (tx != null) try { + tx.rollback(); + } catch (JBOException e1) { + e1.printStackTrace(); + } + } + } + + + public static void updateCGBlog(String batchNo, String serialNum, String retMsg) { + JBOTransaction tx = null; + try { + tx = JBOFactory.createJBOTransaction(); + Transaction sqlca = Transaction.createTransaction(tx); + SqlObject sqlObject = null; + StringBuilder sb = new StringBuilder("update lb_cgb_log set ret_msg=:retMsg,ret_time=:retTime where batch_no =:batchNo and"); + if (serialNum == null) { + sb.append(" serial_num is null"); + sqlObject = new SqlObject(sb.toString()) + .setParameter("retMsg", retMsg) + .setParameter("retTime", DateAssistant.getTodayNow()) + .setParameter("batchNo", batchNo); + } else { + sb.append(" serial_num =:serialNum"); + sqlObject = new SqlObject(sb.toString()) + .setParameter("retMsg", retMsg) + .setParameter("retTime", DateAssistant.getTodayNow()) + .setParameter("batchNo", batchNo) + .setParameter("serialNum", serialNum); + } + sqlca.executeSQL(sqlObject); + tx.commit(); + } catch (Exception e) { + if (tx != null) try { + tx.rollback(); + } catch (JBOException e1) { + e1.printStackTrace(); + } + } + } + + +} diff --git a/src_cmb/com/tenwa/cgb/util/HttpAssistant.java b/src_cmb/com/tenwa/cgb/util/HttpAssistant.java new file mode 100644 index 000000000..8b1530710 --- /dev/null +++ b/src_cmb/com/tenwa/cgb/util/HttpAssistant.java @@ -0,0 +1,64 @@ +package com.tenwa.cgb.util; + + +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.HttpStatus; +import org.apache.commons.httpclient.NameValuePair; +import org.apache.commons.httpclient.methods.PostMethod; +import org.apache.commons.httpclient.params.HttpMethodParams; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @program: apzl_leasing + * @author: yjf + * @create: 2021-07-20 08:43 + **/ +public class HttpAssistant { + + private static Log log = LogFactory.getLog(HttpAssistant.class); + private static final HttpClient httpClient = new HttpClient(); + + static { + httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(10000); + httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET, "GBK"); + } + + public static String post(String reqUrl, Map paramMap) { + String result = null; + PostMethod postMethod = null; + try { + postMethod = new PostMethod(reqUrl); + // basicNameValue**List + List nameValuePairs = new ArrayList(); + // basicNameValue*** + if (paramMap != null) { + for (Map.Entry entry : paramMap.entrySet()) { + nameValuePairs.add(new NameValuePair(entry.getKey(), entry.getValue().toString())); + } + } + // ֵ + NameValuePair[] param = nameValuePairs.toArray(new NameValuePair[nameValuePairs.size()]); + postMethod.addParameters(param); + postMethod.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=gbk"); + postMethod.setRequestHeader("Cache-Control", "no-cache"); + // ִpostMethod + int statusCode = httpClient.executeMethod(postMethod); + if (statusCode == HttpStatus.SC_OK) { + result = postMethod.getResponseBodyAsString(); + } + } catch (IOException e) { + log.error("ִHTTP Post" + reqUrl + "ʱ,쳣:", e); + } finally { + if (postMethod != null) postMethod.releaseConnection(); + } + return result; + } + +} From 4684322a5bc6f32073d09ae5f5808962066927c5 Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Thu, 29 Jul 2021 16:14:29 +0800 Subject: [PATCH 24/51] =?UTF-8?q?=E5=B9=BF=E5=8F=91=E9=93=B6=E4=BC=81?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp | 7 ++----- .../com/tenwa/cgb/controller/OperateOfCGBController.java | 7 +++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp index b50e2b2cc..f88146a8b 100644 --- a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp @@ -18,6 +18,7 @@ if("cgb".equals(payMode)){ doTemp.setVisible("REQSTS",false); doTemp.setVisible("RTNFLG",false); + doTemp.setVisible("RTNNAR",true); } ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--ΪGrid-- @@ -142,10 +143,6 @@ } function cmb_tp_callback(){ var contractId = getItemValueArray(0,"CONTRACT_ID")+""; - if(typeof(contractId)=="undefined" || contractId.length==0 ){ - alert("ѡһ¼"); - return ; - } var contractIds = contractId.replace(",","@"); if('cmb'=='<%=payMode%>'){ var sParams = "CurUserID=<%=CurUser.getUserID()%>,FLOWUNID=<%=flowunid%>,contractIds="+contractIds; @@ -158,7 +155,7 @@ reloadSelf(); } }else if('cgb'=='<%=payMode%>'){ - var sParams = "userId=<%=CurUser.getUserID()%>,contractIds="+contractIds+",flowUnid=<%=flowunid%>,orgId=<%=CurUser.getOrgID()%>"; + var sParams = "userId=<%=CurUser.getUserID()%>,flowUnid=<%=flowunid%>,orgId=<%=CurUser.getOrgID()%>"; var sReturn = RunJavaMethodTrans("com.tenwa.cgb.controller.OperateOfCGBController", "batchQueryOfCGB",sParams ); if('success'==sReturn.substring(0,7)){ alert(sReturn.substring(7)); diff --git a/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java b/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java index 1f4a1c2d9..910882247 100644 --- a/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java +++ b/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java @@ -123,7 +123,7 @@ public class OperateOfCGBController { */ public String batchQueryOfCGB(JBOTransaction tx) throws Exception { BizObjectManager bm = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_DETAIL_TEMP.CLASS_NAME); - List bizObjects = bm.createQuery(" flowunid = :flowunid and contract_id in ('" + contractIds.replaceAll("@", "','") + "') and cmb_pay_log is not null and ERRTXT='' ") + List bizObjects = bm.createQuery(" flowunid = :flowunid and cmb_pay_log is not null and ERRTXT='' ") .setParameter("flowunid", flowUnid).getResultList(false); if (bizObjects.isEmpty()) return "Ϊ,"; String customerBatchNo = null, customerSalarySeq = null; @@ -161,9 +161,10 @@ public class OperateOfCGBController { } errText = batchQueryResult.get("errorreason") == null ? errText : batchQueryResult.get("errorreason"); //»ص״̬ - SqlObject sqlObject = new SqlObject("update LC_FUND_INCOME_CALLBACK_DETAIL_TEMP set ERRCOD=:errCode,ERRTXT=:errText where id =:id") + SqlObject sqlObject = new SqlObject("update LC_FUND_INCOME_CALLBACK_DETAIL_TEMP set ERRCOD=:errCode,ERRTXT=:errText,RTNNAR=:rtnNar where id =:id") .setParameter("errCode", bankstatus) .setParameter("errText", errText) + .setParameter("rtnNar", getbankstatusMsg(bankstatus)) .setParameter("id", bizObject.getAttribute("id").getString()); sqlca.executeSQL(sqlObject); if (business_status != null) { @@ -451,6 +452,8 @@ public class OperateOfCGBController { case "9": msg = "֤ȡ"; break; + default: + msg = bankstatus; } return msg; } From b895ca8934c6f51b448f42b34988b0bed5f9f01d Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Thu, 29 Jul 2021 17:39:32 +0800 Subject: [PATCH 25/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=9E=8D=E9=83=A8=E5=88=86=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LoanBasicInfo.jsp | 16 +++- .../tenwa/reckon/check/SubsectionCheck.java | 81 +++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 calc/com/tenwa/reckon/check/SubsectionCheck.java diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 2a154c51f..819cbcc68 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -898,7 +898,6 @@ function changeSettleMethod2(){ }); $("#INCOME_NUMBER_YEAR").val(incomeValue); } - document.all( 'A_Group_0020' ).style.display = 'none'; showItem(0,"SUBSECTION_CONDIG",'none'); if ( settleMethod === 'segmented_financing' ) { @@ -1087,6 +1086,21 @@ function changeCorpusRatio(){ } function saveRecord(sPostEvents){ + var settleMethod=getItemValue(0,0,"SETTLE_METHOD"); + if(settleMethod === 'segmented_financing'){ + var subsectionCondig=getItemValue(0,0,"SUBSECTION_CONDIG"); + if(typeof(subsectionCondig) == "undefined" || subsectionCondig.length == 0 ){ + alert("ѡֶϢ"); + return ; + } + var equipAmt=getItemValue(0,0,"EQUIP_AMT"); + var cleanLeaseMoney=getItemValue(0,0,"CLEAN_LEASE_MONEY"); + var checkSubsectionInfo= AsControl.RunJavaMethod("com.tenwa.reckon.check.SubsectionCheck","checkSubsectionInfo","flowUnid=<%=flowunid%>"+",equipAmt="+equipAmt+",cleanLeaseMoney="+cleanLeaseMoney+",subsectionCondig="+subsectionCondig); + if(checkSubsectionInfo != "success"){ + alert(checkSubsectionInfo); + return ; + } + } if(getItemValue(0,0,"PURCHASE_TAX") < 0){ alert("˰С0"); return; diff --git a/calc/com/tenwa/reckon/check/SubsectionCheck.java b/calc/com/tenwa/reckon/check/SubsectionCheck.java new file mode 100644 index 000000000..4acb7b5d2 --- /dev/null +++ b/calc/com/tenwa/reckon/check/SubsectionCheck.java @@ -0,0 +1,81 @@ +package com.tenwa.reckon.check; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import jbo.app.tenwa.calc.LC_CALC_SUBSECTION_INFO_TEMP; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +public class SubsectionCheck { + private String flowUnid ; + private String equipAmt ; + private String cleanLeaseMoney ; + private String subsectionCondig ; + + + public String checkSubsectionInfo() throws Exception{ + BizObjectManager lcsitManage = JBOFactory.getBizObjectManager(LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME); + List lcsits = lcsitManage.createQuery("flowunid=:flowunid").setParameter("flowunid", flowUnid).getResultList(false); + if( lcsits == null || lcsits.size()==0){ + return "ֶϢΪգ飡"; + } + lcsits = lcsitManage.createQuery("flowunid=:flowunid and (v.ifnull(CLEAN_LEASE_MONEY,0) > 0 or v.ifnull(FINANCING_RATE,0) > 0 or v.ifnull(INCOME_NUMBER,0) > 0)").setParameter("flowunid", flowUnid).getResultList(false); + if( lcsits == null || lcsits.size()==0){ + return "ֶϢʽʡڴΪգ飡"; + } + List> dataClm = DataOperatorUtil.getDataBySql("select sum(ifnull(CLEAN_LEASE_MONEY,0)) as CLEAN_LEASE_MONEY from LC_CALC_SUBSECTION_INFO_TEMP where flowunid='"+flowUnid+"' group by flowunid"); + BigDecimal clm = new BigDecimal("0"); + if( dataClm != null && dataClm.size() > 0 ){ + clm = new BigDecimal(dataClm.get(0).get("CLEAN_LEASE_MONEY")); + } + if(subsectionCondig.equals("CarPrice")){ + if(new BigDecimal(equipAmt).compareTo( clm ) != 0){ + return "ֶʶͳ۽һ£飡"; + } + }else if(subsectionCondig.equals("FinancingPrice")){ + if(new BigDecimal(cleanLeaseMoney).compareTo( clm ) != 0){ + return "ֶʶۺʶһ£飡"; + } + }else{ + return "ûм鵽Ӧķֶã飡"; + } + return "success"; + } + + + public String getFlowUnid() { + return flowUnid; + } + public void setFlowUnid(String flowUnid) { + this.flowUnid = flowUnid; + } + + public String getEquipAmt() { + return equipAmt; + } + + public void setEquipAmt(String equipAmt) { + this.equipAmt = equipAmt; + } + + public String getCleanLeaseMoney() { + return cleanLeaseMoney; + } + + public void setCleanLeaseMoney(String cleanLeaseMoney) { + this.cleanLeaseMoney = cleanLeaseMoney; + } + + public String getSubsectionCondig() { + return subsectionCondig; + } + + public void setSubsectionCondig(String subsectionCondig) { + this.subsectionCondig = subsectionCondig; + } +} + From 25653c352d4a46d90bec447f08c15951613a2e04 Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Fri, 30 Jul 2021 13:38:04 +0800 Subject: [PATCH 26/51] =?UTF-8?q?=E5=B9=BF=E5=8F=91=E9=93=B6=E4=BC=81?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp index 6c50325d9..7a0d6316b 100644 --- a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp +++ b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp @@ -14,7 +14,7 @@ dwTemp.ReadOnly = "0";//ֻģʽ dwTemp.genHTMLObjectWindow(flowunid); String sButtons[][] = { - {"0020".equals(phaseNo)?"true":"false","All","Button","","޸","saveRecord()","","","",""}, + {"0020".equals(phaseNo)?"true":"false","","Button","","޸","saveRecord()","","","",""}, }; sButtonPosition = "south"; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> @@ -31,7 +31,11 @@ function selectOwnAccount(){ var position = getRow(0); - AsDialog.OpenSelector("SelectOwnAccountPay","accName,"+getItemValue(0,0,'ACCOUNT'),"dialogWidth=" + parseInt(window.screen.width * 0.6) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",function(sReturn){ + var account = getItemValue(0,0,'ACCOUNT'); + if(account == ""){ + return false; + } + AsDialog.OpenSelector("SelectOwnAccountPay","accName,"+account,"dialogWidth=" + parseInt(window.screen.width * 0.6) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"){ return; } From 2d6d37d30228d0eccec383936099f67e94916738 Mon Sep 17 00:00:00 2001 From: zhulh Date: Fri, 30 Jul 2021 15:44:54 +0800 Subject: [PATCH 27/51] =?UTF-8?q?=E7=8E=B0=E9=87=91=E6=B5=81=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=B4=B4=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reckon/executor/CashFlowExecutor.java | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java index ae3b1dc7a..7843cbd13 100644 --- a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java +++ b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java @@ -23,14 +23,14 @@ import com.tenwa.reckon.util.IRRCalculateUtil; import com.tenwa.reckon.util.IrrTools; public class CashFlowExecutor { - + private JBOTransaction tx; - + public CashFlowExecutor(JBOTransaction tx){ this.tx=tx; } - - + + public String run(ConditionBean cb , TabCalBean tcb) throws Exception{ this.delete(tcb, cb); this.add(cb, tcb); @@ -87,15 +87,15 @@ public class CashFlowExecutor { } return irr; } - + private void delete(TabCalBean tcb,ConditionBean cb) throws Exception{ BizObjectManager bm=JBOFactory.getBizObjectManager(tcb.getContractCashTb(), tx); String sql = " delete from O where flowunid='" + tcb.getDocId() + "' and "+tcb.getPlanCName()+"='"+tcb.getPlanCValue()+"'"; bm.createQuery(sql).executeUpdate(); - } - + } + private void add(ConditionBean cb,TabCalBean tcb) throws Exception{ - + Map> productRevenues = tcb.getProductRevenues(); String GPSDifference = "0";//ȡƷеGPS Map GPSMap = productRevenues == null ? null : productRevenues.get( "GPSDifference" ); @@ -115,7 +115,7 @@ public class CashFlowExecutor { personalInsuranceDifference = "0"; } }*/ - + String sql = ""; if("MYSQL".equals(InitDBType.DBTYPE)){ sql += "INSERT INTO " +Tools.getTable(tcb.getContractCashTb())+ " (id," + tcb.getPlanCName() + ""; @@ -127,7 +127,7 @@ public class CashFlowExecutor { sql += ",net_flow"; sql += ",flowunid";//create_date,creator_ "+DateUtil.getSystemDate()+"' create_date ,'"+SecurityUtil.getPrincipal().getId()+"' creator_" sql += " )"; - + sql +=" select replace(uuid(),'-','') id,'"+tcb.getPlanCValue()+"' "+tcb.getPlanCName()+",t.plan_date,sum(t.flowin) fundin,ifnull(group_concat(if(t.flowindetail='',null,t.flowindetail)),'-') fundindetails, "; sql +=" sum(t.flowout) fundout ,ifnull(group_concat(if(t.flowoutdetail='',null,t.flowoutdetail)),'-')fundoutdetails,sum(t.cleanfow)netflow ,'"+tcb.getDocId()+"' flowunid " ; sql +=" from (" ; @@ -146,7 +146,7 @@ public class CashFlowExecutor { sql +=" if(fundplan.pay_type='pay_type_in',fundplan.plan_money,-fundplan.plan_money) cleanfow " ; sql +=" from "+Tools.getTable(tcb.getFundFundPlan_tb())+" fundplan " ; sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno and tdd.codeno='FeeType' " ; - sql +=" where fundplan.flowunid = '"+ tcb.getDocId()+"' and fundplan."+tcb.getPlanCName()+"='"+tcb.getPlanCValue()+"' and fundplan.fee_type in ('feetype2','feetype1','feetype10','feetype16','feetype17','feetype33','feetype24') "; + sql +=" where fundplan.flowunid = '"+ tcb.getDocId()+"' and fundplan."+tcb.getPlanCName()+"='"+tcb.getPlanCValue()+"' and fundplan.fee_type in ('feetype2','feetype1','feetype10','feetype16','feetype17','feetype33','feetype24','feetype27') "; //ݿͻ񣩲ǷƷõGPS͸ղӵIRR /* if( !"0".equals(personalInsuranceDifference) ){ @@ -156,7 +156,7 @@ public class CashFlowExecutor { if( !"0".equals(GPSDifference) ){ sql += "union all select plan_date,'"+GPSDifference+"' flowin,'GPS:"+GPSDifference+"' flowindetail,'' flowout,'' flowoutdetil,'"+GPSDifference+"' cleanfow from lc_fund_plan_temp where flowunid = '"+tcb.getDocId()+"' and fee_type='feetype10' "; } - + }else if("ORACLE".equals(InitDBType.DBTYPE)){ sql += "INSERT INTO " +Tools.getTable(tcb.getContractCashTb())+ " (id," + tcb.getPlanCName() + ""; sql += ",plan_date"; @@ -167,7 +167,7 @@ public class CashFlowExecutor { sql += ",net_flow"; sql += ",flowunid";//create_date,creator_ "+DateUtil.getSystemDate()+"' create_date ,'"+SecurityUtil.getPrincipal().getId()+"' creator_" sql += " )"; - + sql +=" select sys_guid() id,'"+tcb.getPlanCValue()+"' "+tcb.getPlanCName()+",t.plan_date,sum(t.flowin) fundin,nvl(wmsys.wm_concat(case when t.flowindetail='' then null else t.flowindetail end ),'-') fundindetails, "; sql +=" sum(t.flowout) fundout ,nvl(wmsys.wm_concat(case when t.flowoutdetail='' then null else t.flowoutdetail end),'-') fundoutdetails,sum(t.cleanfow)netflow ,'"+tcb.getDocId()+"' flowunid " ; sql +=" from (" ; @@ -207,10 +207,10 @@ public class CashFlowExecutor { sql +=" )t group by t.plan_date "; Transaction Sqlca =null; Sqlca = Transaction.createTransaction(tx); - SqlObject asql = new SqlObject(""); + SqlObject asql = new SqlObject(""); asql.setOriginalSql(sql); Sqlca.executeSQL(asql); - + String depositStyle = ""; Map> productCost = ProductParamUtil.getProductComponentType(productId, "PRD0315"); if( productCost != null && productCost.size() > 0 ){ @@ -244,7 +244,7 @@ public class CashFlowExecutor { break; } } - + }else if ("caution_money_method02".equals( depositStyle )){//֤˻ outMoney = new BigDecimal(cb.getCautionMoney() ); inMoney = new BigDecimal(lcftDate.get(0).get("FUND_IN") ); @@ -252,9 +252,9 @@ public class CashFlowExecutor { asql.setOriginalSql(updateSql); Sqlca.executeSQL(asql); } - + } - - - + + + } From bc53e4d033fb146014c7019fb024bdd3edc63a4c Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Mon, 2 Aug 2021 08:26:48 +0800 Subject: [PATCH 28/51] =?UTF-8?q?=E5=B9=BF=E5=8F=91=E9=93=B6=E4=BC=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src_sql/预投SQL/v20210831/yjf20210831.sql | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src_sql/预投SQL/v20210831/yjf20210831.sql diff --git a/src_sql/预投SQL/v20210831/yjf20210831.sql b/src_sql/预投SQL/v20210831/yjf20210831.sql new file mode 100644 index 000000000..5ad7f860e --- /dev/null +++ b/src_sql/预投SQL/v20210831/yjf20210831.sql @@ -0,0 +1,65 @@ + +-- ֶ +alter table LB_ACTUAL_PAYMENT_INFO_TEMP add column pay_mode VARCHAR(10) DEFAULT 'cgb' comment 'ʽ' ; +alter table LB_ACTUAL_PAYMENT_INFO_TEMP add bank varchar(200) comment ''; +alter table LB_ACTUAL_PAYMENT_INFO_TEMP add account varchar(200) comment '˻'; +alter table LB_ACTUAL_PAYMENT_INFO_TEMP add acc_number varchar(200) comment 'ʺ'; + +alter table LB_ACTUAL_PAYMENT_INFO add column pay_mode VARCHAR(10) comment 'ʽ' ; +alter table LB_ACTUAL_PAYMENT_INFO add bank varchar(200) comment ''; +alter table LB_ACTUAL_PAYMENT_INFO add account varchar(200) comment '˻'; +alter table LB_ACTUAL_PAYMENT_INFO add acc_number varchar(200) comment 'ʺ'; + +-- ޸ֶγ +alter table lc_fund_income_callback_detail_temp modify column SQRNBR varchar(50); +alter table lc_fund_income_callback_detail modify column SQRNBR varchar(50); + +-- θϸ޸ +update awe_do_library set isfilter = '0' where dono = 'ActualPaymentCarTempList'; +update awe_do_library set isfilter = '1',colfilteroptions ='Like' where dono = 'ActualPaymentCarTempList' and colactualname in ('CUSTOMER_NAME','CONTRACT_NUMBER','REQSTS','ERRTXT'); +-- ƻ +update awe_do_library set isfilter ='0' where dono='VIActualFundPlan'; +update awe_do_library set isfilter ='1',colfilteroptions ='Like' where dono='VIActualFundPlan' and colname in ('contract_number','customer_name'); + +-- ״ֵ̬ +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '104', 'Ա', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '106', 'Ա', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '199', '', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '218', 'ظˮ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '242', '޷Ľ׼¼', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '407', 'ȡ֤', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '419', 'ǩݳ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '616', 'ظĿͻˮ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '888', 'ûյ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', '889', 'ʧ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'A01', 'ҵͻŲΪ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'A02', 'ҵϵͳˮŲΪ,ҳȲܴ20', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'A03', '˺Ÿʽȷ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'A04', 'ѯת˺δӹֱ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'A05', 'ԱΪգҳȲܴڴ12', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'A06', 'Ա벻Ϊ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'C99', 'ҵ쳣', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'D46', 'ûʹøýӿڵȨ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'E01', '֤Чѹ', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'E02', 'ûûа֤', '1', 'system', '2021/07/26 17:20:31'); +INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `isinuse`, `inputuser`, `inputtime`) VALUES ('cgb_describe', 'E03', 'ǩʧ', '1', 'system', '2021/07/26 17:20:31'); + +-- ѡ +INSERT INTO `apzl`.`select_catalog` (`selname`, `seltype`, `seldescribe`, `seltablename`, `selprimarykey`, `selbrowsemode`, `selargs`, `selhidefield`, `selcode`, `selfieldname`, `selfielddisp`, `selreturnvalue`, `selfilterfield`, `isinuse`, `mutilorsingle`, `attribute1`, `attribute2`, `attribute3`, `attribute4`, `attribute5`, `inputuser`, `inputorg`, `inputtime`, `updateuser`, `updatetime`, `remark`) VALUES ('SelectOwnAccountPay', 'Sql', 'ѯ˻', '', '', 'Grid', 'String accName', '', 'SELECT acc_number,acc_bank,acc_name FROM own_account WHERE state_=\'0010\' AND acc_type=\'0010\' AND (account_type=\'out_account\' OR account_type=\'inAndOut_account\') and acc_name = \'#accName\'', 'ʺ,,', 'acc_number@style={width:200px;}@acc_name@style={width:400px;}', 'acc_number@acc_bank@acc_name', '', '1', 'Single', '', '', '', '', '', 'SYS_Designer', '', '2021/07/23 09:38:25', 'SYS_Designer', '2021/07/23 09:42:57', ''); + + +-- ӹ㷢־ +CREATE TABLE `lb_cgb_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` varchar(10) DEFAULT NULL COMMENT ' pay:ת,query:ѯ', + `flow_unid` varchar(50) DEFAULT NULL COMMENT 'id', + `batch_no` varchar(50) DEFAULT NULL COMMENT 'κ', + `req_msg` mediumtext, + `ret_msg` text, + `req_time` varchar(50) DEFAULT NULL COMMENT 'ʱ', + `ret_time` varchar(50) DEFAULT NULL COMMENT 'ʱ', + `serial_num` varchar(50) DEFAULT NULL COMMENT '', + PRIMARY KEY (`id`), + KEY `idx_no_num` (`batch_no`,`serial_num`) +); + From f148079ddd64c6a6f6bf902b760bbde267d8f1cc Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Mon, 2 Aug 2021 09:59:32 +0800 Subject: [PATCH 29/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=9E=8D=E9=83=A8=E5=88=86=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LCCalcSubsectionInfoTempList.jsp | 9 +++++++++ calc/com/tenwa/reckon/product/ProductCondition.java | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index 69796348c..fb85aa3a6 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -12,6 +12,15 @@ doTemp.setHtmlEvent( "DISCOUNT_RATE", "onblur", "changeDiscountRate" ); doTemp.setHtmlEvent( "CLEAN_LEASE_RATIO", "onblur", "changeCleanLeaseRatio" ); doTemp.setHtmlEvent( "CLEAN_LEASE_MONEY", "onblur", "changeCleanLeaseMoney" ); + String discountCalcMethod = Sqlca.getString("select DISCOUNT_CALC_METHOD from LC_CALC_SUBSECTION_INFO_TEMP where FLOWUNID='"+flowunid+"'"); + if(discountCalcMethod != null && discountCalcMethod.equals("1")){ + doTemp.setReadOnly("DISCOUNT",true); + doTemp.setReadOnly("DISCOUNT_RATE",false); + }else{ + doTemp.setReadOnly("DISCOUNT",false); + doTemp.setReadOnly("DISCOUNT_RATE",true); + } + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--ΪGrid-- dwTemp.ReadOnly = "0"; //ֻģʽ diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index 2f6161b84..8beef300f 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -767,12 +767,16 @@ public class ProductCondition { "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ); List> sf = configs.get( "segmented_financing" ); int i = 1; + String discountCalcMethod = null ; for ( Map f : sf ) { - String discountCalcMethod = f.get( "DiscountCalcMethod" ); + if(discountCalcMethod == null || discountCalcMethod.isEmpty()){ + discountCalcMethod = f.get("DiscountCalcMethod"); + } + //String discountCalcMethod = f.get( "DiscountCalcMethod" ); BizObject bo = bom.newObject(); bo.setAttributeValue( "SUBSECTION_NUMBER", i ); bo.setAttributeValue( "RATE", f.get( "Rate" ) ); - bo.setAttributeValue( "DISCOUNT_CALC_METHOD", f.get( "DiscountCalcMethod" ) ); + bo.setAttributeValue( "DISCOUNT_CALC_METHOD", discountCalcMethod ); if ( "1".equals( discountCalcMethod ) ) { bo.setAttributeValue( "DISCOUNT_RATE", f.get( "DiscountRate" ) ); bo.setAttributeValue( "FINANCING_RATE", f.get( "DiscountRate" ) ); From 1258bba9deaea3dc9eb66e7c20b28f20d072cb8b Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Wed, 4 Aug 2021 13:44:28 +0800 Subject: [PATCH 30/51] =?UTF-8?q?=E5=88=86=E6=AE=B5=E8=9E=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9C=9F=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCCalcSubsectionInfoTempList.jsp | 14 ++++++++++++++ .../WEB-INF/etc/app/component/component-config.xml | 2 +- .../app/component/component-parameter-config.xml | 2 +- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 3 +++ .../com/tenwa/reckon/product/ProductCondition.java | 11 ++++++++++- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index fb85aa3a6..be4600759 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -143,5 +143,19 @@ function viewAndEdit(){ AsDialog.PopView("/Accounting/LoanSimulation/LCSubsectionRentPlanTempList.jsp","flowunid=<%=flowunid%>","resizable=yes;dialogWidth=1250px;dialogHeight=800px;center:yes;status:no;statusbar:no",function(){reloadSelf();},"ϸϢ"); } + + function afterSearch(){ + for(var i=0;i <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/WEB-INF/etc/app/component/component-config.xml b/WebContent/WEB-INF/etc/app/component/component-config.xml index 630aa8b74..81d56c0c8 100644 --- a/WebContent/WEB-INF/etc/app/component/component-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-config.xml @@ -1107,4 +1107,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index 25ee0562e..cc07f108b 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -196,4 +196,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 084841b69..fa37fd1f8 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4668,6 +4668,7 @@ + @@ -4702,6 +4703,7 @@ + @@ -4737,6 +4739,7 @@ + diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index 8beef300f..cda163cac 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -764,7 +764,7 @@ public class ProductCondition { List bos = bom.createQuery( "flowunid = :flowunid" ).setParameter( "flowunid", flowunid ).getResultList( false ); if ( bos.size() == 0 ) { Map>> configs = ProductParamUtil.getProductComponentDecisionTable( productId, "PRD0301", - "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ); + "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ,"incomeNumber"); List> sf = configs.get( "segmented_financing" ); int i = 1; String discountCalcMethod = null ; @@ -792,6 +792,15 @@ public class ProductCondition { } bo.setAttributeValue( "MAXIMUM_DISCOUNT", f.get( "MaximumDiscount" ) ); bo.setAttributeValue( "FLOWUNID", flowunid ); + //ݲƷڴΣøֵӦֵ + String incomeNumber = f.get( "incomeNumber" ); + if(incomeNumber == null || incomeNumber.isEmpty() ){ + bo.setAttributeValue( "IS_ONLYREAD_INCOME_NUMBER", "N" ); + }else{ + bo.setAttributeValue( "IS_ONLYREAD_INCOME_NUMBER", "Y" ); + bo.setAttributeValue( "INCOME_NUMBER", incomeNumber ); + } + bom.saveObject( bo ); i ++; } From 84a40321f558f861b6bf794b1c08df9d8c540860 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Wed, 4 Aug 2021 13:46:53 +0800 Subject: [PATCH 31/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java | 4 ++++ src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java | 4 ++++ src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java index ab23df4aa..185ab8e0d 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java @@ -109,4 +109,8 @@ public interface LC_CALC_SUBSECTION_INFO{ * ʱ STRING(32)
*/ public static final String UPDATETIME = "UPDATETIME"; + /** + * ڴǷֻ STRING(10)
+ */ + public static final String IS_ONLYREAD_INCOME_NUMBER = "IS_ONLYREAD_INCOME_NUMBER"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java index f5ecf782f..a8db67ce7 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java @@ -109,4 +109,8 @@ public interface LC_CALC_SUBSECTION_INFO_HIS{ * ʱ STRING(32)
*/ public static final String UPDATETIME = "UPDATETIME"; + /** + * ڴǷֻ STRING(10)
+ */ + public static final String IS_ONLYREAD_INCOME_NUMBER = "IS_ONLYREAD_INCOME_NUMBER"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java index 841d4ee5c..f4fdcc382 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java @@ -113,4 +113,8 @@ public interface LC_CALC_SUBSECTION_INFO_TEMP{ * ̱ʶ STRING(32)
*/ public static final String FLOWUNID = "FLOWUNID"; + /** + * ڴǷֻ STRING(10)
+ */ + public static final String IS_ONLYREAD_INCOME_NUMBER = "IS_ONLYREAD_INCOME_NUMBER"; } \ No newline at end of file From fd87af1594a989dfed95b92a17420239450fd8e8 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Fri, 6 Aug 2021 18:24:27 +0800 Subject: [PATCH 32/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=9E=8D=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCCalcSubsectionInfoTempList.jsp | 37 ++++++++++--- .../LCSubsectionRentPlanTempList.jsp | 2 +- .../LoanSimulation/LoanBasicInfo.jsp | 53 ++++++++++--------- .../BusinessApplication/CustomerInfo.jsp | 11 ++-- .../etc/app/component/component-config.xml | 2 +- .../component/component-parameter-config.xml | 2 +- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 12 +++++ .../reckon/product/ProductCondition.java | 8 ++- 8 files changed, 86 insertions(+), 41 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index be4600759..e8b6393e0 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -65,16 +65,26 @@ } function changeCleanLeaseRatio() { + debugger; var subsectionConfig = parent.getItemValue( 0, 0, 'SUBSECTION_CONDIG' ); var equipAmt = parent.getItemValue( 0, 0, 'EQUIP_AMT' ); var cleanLeaseMoney = parent.getItemValue( 0, 0, 'CLEAN_LEASE_MONEY' ); var cleanLeaseRatio = getItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO' ); if ( subsectionConfig ) { + var fcleanLeaseMoney ; if ( 'CarPrice' === subsectionConfig ) { - setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', Decimal( equipAmt ).mul( cleanLeaseRatio ).div( 100 ).toFixed( 2 ) ); + fcleanLeaseMoney = Decimal( equipAmt ).mul( cleanLeaseRatio ).div( 100 ).toFixed( 2 ); } else { - setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', Decimal( cleanLeaseMoney ).mul( cleanLeaseRatio ).div( 100 ).toFixed( 2 ) ); + fcleanLeaseMoney = Decimal( cleanLeaseMoney ).mul( cleanLeaseRatio ).div( 100 ).toFixed( 2 ) } + var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ) ; + if( (fcleanLeaseMoney*1) > (maxLeaseMoney*1) ){ + alert("öεʽܴڣ"+maxLeaseMoney+"飡"); + setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); + setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); + return + } + setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', fcleanLeaseMoney); } else { setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', '' ); } @@ -84,7 +94,14 @@ var subsectionConfig = parent.getItemValue( 0, 0, 'SUBSECTION_CONDIG' ); var equipAmt = parent.getItemValue( 0, 0, 'EQUIP_AMT' ); var cleanLeaseMoney = parent.getItemValue( 0, 0, 'CLEAN_LEASE_MONEY' ); - var clm = getItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY' ); + var clm = getItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY' ); + var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ); + if( (clm*1) > (maxLeaseMoney*1) ){ + alert("öεʽܴڣ"+maxLeaseMoney+"飡"); + setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); + setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); + return + } if ( subsectionConfig ) { if ( 'CarPrice' === subsectionConfig ) { setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', Decimal( clm ).div( equipAmt ).mul( 100 ).toFixed( 2 ) ); @@ -141,18 +158,26 @@ as_save( 0 ); } function viewAndEdit(){ - AsDialog.PopView("/Accounting/LoanSimulation/LCSubsectionRentPlanTempList.jsp","flowunid=<%=flowunid%>","resizable=yes;dialogWidth=1250px;dialogHeight=800px;center:yes;status:no;statusbar:no",function(){reloadSelf();},"ϸϢ"); + var subsectionNumber = getItemValue( 0, getRow(), 'SUBSECTION_NUMBER' ); + AsDialog.PopView("/Accounting/LoanSimulation/LCSubsectionRentPlanTempList.jsp","flowunid=<%=flowunid%>&subsectionNumber="+subsectionNumber,"resizable=yes;dialogWidth=1250px;dialogHeight=600px;center:yes;status:no;statusbar:no",function(){reloadSelf();},"ϸϢ"); } function afterSearch(){ for(var i=0;i"); - var termMax = parseInt("<%=termMax%>"); - var incomeNumber = parseInt(getItemValue(0,0,"INCOME_NUMBER")); - if("02"=="<%=termType%>"){ - if(incomeNumber"); + var termMax = parseInt("<%=termMax%>"); + var incomeNumber = parseInt(getItemValue(0, 0, "INCOME_NUMBER")); + if ("02" == "<%=termType%>") { + if (incomeNumber < termMin) { + alert("С" + termMin); + return; + } + if (incomeNumber > termMax) { + alert("ܴ" + termMax); + return; + } } - if(incomeNumber>termMax){ - alert("ܴ"+termMax); - return; - } - } - //УǷϷ - var isFixedRate = "<%=isFixedRate%>"; - var yearRae = getItemValue(0,0,"YEAR_RATE"); - if("N" == isFixedRate && yearRae > 0 ){ - var rateTermMin = "<%=rateTermMin%>"; - var rateTermMax = "<%=rateTermMax%>"; - console.log(rateTermMin +"===" +yearRae+"====" +rateTermMax); - console.log(rateTermMin > yearRae); - console.log(Number(yearRae) > Number(rateTermMax)); - if(Number(rateTermMin) > Number(yearRae) || Number(yearRae) > Number(rateTermMax)){ - alert("ʱڵڣ"+rateTermMin+",Сڵڣ"+rateTermMax); - return; + //УǷϷ + var isFixedRate = "<%=isFixedRate%>"; + var yearRae = getItemValue(0, 0, "YEAR_RATE"); + if ("N" == isFixedRate && yearRae > 0) { + var rateTermMin = "<%=rateTermMin%>"; + var rateTermMax = "<%=rateTermMax%>"; + console.log(rateTermMin + "===" + yearRae + "====" + rateTermMax); + console.log(rateTermMin > yearRae); + console.log(Number(yearRae) > Number(rateTermMax)); + if (Number(rateTermMin) > Number(yearRae) || Number(yearRae) > Number(rateTermMax)) { + alert("ʱڵڣ" + rateTermMin + ",Сڵڣ" + rateTermMax); + return; + } } } //ܴڲƷ diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index aad0090b4..271182133 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -86,11 +86,12 @@ } function checkMailingAddress(){//ʼĵַѡΪַʱַ var mailingAddress = getItemValue(0,0,'Mailing_Address'); - if("ַ" == mailingAddress){ - setItemRequired(0, "NATIVEPLACE", true); - }else{ - setItemRequired(0, "NATIVEPLACE", false); - } + setItemRequired(0, "NATIVEPLACE", true); + // if("ַ" == mailingAddress){ + // setItemRequired(0, "NATIVEPLACE", true); + // }else{ + // setItemRequired(0, "NATIVEPLACE", true); + // } } /* function identityVerification(){//У diff --git a/WebContent/WEB-INF/etc/app/component/component-config.xml b/WebContent/WEB-INF/etc/app/component/component-config.xml index 81d56c0c8..23ef344de 100644 --- a/WebContent/WEB-INF/etc/app/component/component-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-config.xml @@ -1107,4 +1107,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index cc07f108b..006886e44 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -196,4 +196,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index fa37fd1f8..17e857d8f 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4669,6 +4669,10 @@ + + + + @@ -4704,6 +4708,10 @@ + + + + @@ -4740,6 +4748,10 @@ + + + + diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index cda163cac..6b2e790b8 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -764,7 +764,8 @@ public class ProductCondition { List bos = bom.createQuery( "flowunid = :flowunid" ).setParameter( "flowunid", flowunid ).getResultList( false ); if ( bos.size() == 0 ) { Map>> configs = ProductParamUtil.getProductComponentDecisionTable( productId, "PRD0301", - "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ,"incomeNumber"); + "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ,"incomeNumber", + "isFixedDiscount","isUpdateLeaseMoneyRatio","maxLeaseMoney","MinimumDiscount"); List> sf = configs.get( "segmented_financing" ); int i = 1; String discountCalcMethod = null ; @@ -801,6 +802,11 @@ public class ProductCondition { bo.setAttributeValue( "INCOME_NUMBER", incomeNumber ); } + bo.setAttributeValue( "IS_FIXED_DISCOUNT", f.get( "isFixedDiscount" ) ); + bo.setAttributeValue( "IS_UPDATE_LEASE_MONEY_RATIO", f.get( "isUpdateLeaseMoneyRatio" ) ); + bo.setAttributeValue( "MAX_LEASE_MONEY", f.get( "maxLeaseMoney" ) ); + bo.setAttributeValue( "MINIMUM_DISCOUNT", f.get( "MinimumDiscount" ) ); + bom.saveObject( bo ); i ++; } From 9b91e30c82c49e30f63156c272d9427f82ead613 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Fri, 6 Aug 2021 18:28:07 +0800 Subject: [PATCH 33/51] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java | 16 ++++++++++++++++ .../tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java | 16 ++++++++++++++++ .../tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java index 185ab8e0d..6ade2a378 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java @@ -113,4 +113,20 @@ public interface LC_CALC_SUBSECTION_INFO{ * ڴǷֻ STRING(10)
*/ public static final String IS_ONLYREAD_INCOME_NUMBER = "IS_ONLYREAD_INCOME_NUMBER"; + /** + * ϢǷ̶ STRING(10)
+ */ + public static final String IS_FIXED_DISCOUNT = "IS_FIXED_DISCOUNT"; + /** + * Ƿ޸ STRING(10)
+ */ + public static final String IS_UPDATE_LEASE_MONEY_RATIO = "IS_UPDATE_LEASE_MONEY_RATIO"; + /** + * ʽֵ STRING(32)
+ */ + public static final String MAX_LEASE_MONEY = "MAX_LEASE_MONEY"; + /** + * СϢ STRING(10)
+ */ + public static final String MINIMUM_DISCOUNT = "MINIMUM_DISCOUNT"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java index a8db67ce7..b0923156c 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java @@ -113,4 +113,20 @@ public interface LC_CALC_SUBSECTION_INFO_HIS{ * ڴǷֻ STRING(10)
*/ public static final String IS_ONLYREAD_INCOME_NUMBER = "IS_ONLYREAD_INCOME_NUMBER"; + /** + * ϢǷ̶ STRING(10)
+ */ + public static final String IS_FIXED_DISCOUNT = "IS_FIXED_DISCOUNT"; + /** + * Ƿ޸ STRING(10)
+ */ + public static final String IS_UPDATE_LEASE_MONEY_RATIO = "IS_UPDATE_LEASE_MONEY_RATIO"; + /** + * ʽֵ STRING(32)
+ */ + public static final String MAX_LEASE_MONEY = "MAX_LEASE_MONEY"; + /** + * СϢ STRING(10)
+ */ + public static final String MINIMUM_DISCOUNT = "MINIMUM_DISCOUNT"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java index f4fdcc382..eb5e2b82c 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java @@ -117,4 +117,20 @@ public interface LC_CALC_SUBSECTION_INFO_TEMP{ * ڴǷֻ STRING(10)
*/ public static final String IS_ONLYREAD_INCOME_NUMBER = "IS_ONLYREAD_INCOME_NUMBER"; + /** + * ϢǷ̶ STRING(10)
+ */ + public static final String IS_FIXED_DISCOUNT = "IS_FIXED_DISCOUNT"; + /** + * Ƿ޸ STRING(10)
+ */ + public static final String IS_UPDATE_LEASE_MONEY_RATIO = "IS_UPDATE_LEASE_MONEY_RATIO"; + /** + * ʽֵ STRING(32)
+ */ + public static final String MAX_LEASE_MONEY = "MAX_LEASE_MONEY"; + /** + * СϢ STRING(10)
+ */ + public static final String MINIMUM_DISCOUNT = "MINIMUM_DISCOUNT"; } \ No newline at end of file From c3ca6db24684a09e8a1eed4621d2ffe08e6b971e Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Tue, 10 Aug 2021 10:51:31 +0800 Subject: [PATCH 34/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=09=E8=B4=B4=E6=81=AF?= =?UTF-8?q?=E5=90=8E=E5=88=A9=E7=8E=87=E6=98=AF=E5=90=A6=E5=9B=BA=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/app/component/component-config.xml | 2 +- .../WEB-INF/etc/app/component/component-parameter-config.xml | 2 +- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 3 +++ src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java | 4 ++++ src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java | 4 ++++ src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java | 4 ++++ 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/WebContent/WEB-INF/etc/app/component/component-config.xml b/WebContent/WEB-INF/etc/app/component/component-config.xml index 23ef344de..95aecfe66 100644 --- a/WebContent/WEB-INF/etc/app/component/component-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-config.xml @@ -1107,4 +1107,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index 006886e44..2b3c3c9e1 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -196,4 +196,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 17e857d8f..5b2cb5912 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4673,6 +4673,7 @@ + @@ -4712,6 +4713,7 @@ + @@ -4752,6 +4754,7 @@ + diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java index 6ade2a378..d3bceab49 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java @@ -129,4 +129,8 @@ public interface LC_CALC_SUBSECTION_INFO{ * СϢ STRING(10)
*/ public static final String MINIMUM_DISCOUNT = "MINIMUM_DISCOUNT"; + /** + * ϢǷ̶ STRING(10)
+ */ + public static final String IS_FIXED_DISCOUNT_RATE = "IS_FIXED_DISCOUNT_RATE"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java index b0923156c..c662becdf 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java @@ -129,4 +129,8 @@ public interface LC_CALC_SUBSECTION_INFO_HIS{ * СϢ STRING(10)
*/ public static final String MINIMUM_DISCOUNT = "MINIMUM_DISCOUNT"; + /** + * ϢǷ̶ STRING(10)
+ */ + public static final String IS_FIXED_DISCOUNT_RATE = "IS_FIXED_DISCOUNT_RATE"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java index eb5e2b82c..e289829f6 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java @@ -133,4 +133,8 @@ public interface LC_CALC_SUBSECTION_INFO_TEMP{ * СϢ STRING(10)
*/ public static final String MINIMUM_DISCOUNT = "MINIMUM_DISCOUNT"; + /** + * ϢǷ̶ STRING(10)
+ */ + public static final String IS_FIXED_DISCOUNT_RATE = "IS_FIXED_DISCOUNT_RATE"; } \ No newline at end of file From e37a8b7f74061008de317406c9939efb58c7cc13 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Tue, 10 Aug 2021 16:54:46 +0800 Subject: [PATCH 35/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCCalcSubsectionInfoTempList.jsp | 20 +++++++++++++++++-- .../reckon/product/ProductCondition.java | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index e8b6393e0..0b32932c6 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -78,7 +78,7 @@ fcleanLeaseMoney = Decimal( cleanLeaseMoney ).mul( cleanLeaseRatio ).div( 100 ).toFixed( 2 ) } var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ) ; - if( (fcleanLeaseMoney*1) > (maxLeaseMoney*1) ){ + if( (Number(fcleanLeaseMoney) ) > ( Number(maxLeaseMoney) ) ){ alert("öεʽܴڣ"+maxLeaseMoney+"飡"); setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); @@ -96,7 +96,7 @@ var cleanLeaseMoney = parent.getItemValue( 0, 0, 'CLEAN_LEASE_MONEY' ); var clm = getItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY' ); var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ); - if( (clm*1) > (maxLeaseMoney*1) ){ + if( Number(clm) > Number(maxLeaseMoney) ){ alert("öεʽܴڣ"+maxLeaseMoney+"飡"); setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); @@ -132,6 +132,16 @@ if ( '' === discount ) { alert( 'д' + ( i + 1 ) + 'Ϣ' ); return; + }else{ + var ifd = getItemValue( 0, i, 'IS_FIXED_DISCOUNT' ); + if(ifd=="N"){ + var mind = getItemValue( 0, i, 'MINIMUM_DISCOUNT' ); + var maxd = getItemValue( 0, i, 'MAXIMUM_DISCOUNT' ); + if( Number(discount) < Number(mind) || Number(discount)>Number(maxd) ){ + alert( 'д' + ( i + 1 ) + 'ϢڲƷõڣ飡' ); + return; + } + } } } else { var discountRate = getItemValue( 0, i, 'DISCOUNT_RATE' ); @@ -179,6 +189,12 @@ $("input[id*=FINANCING_RATE_"+i+"]").attr('readonly',true); $("input[id*=FINANCING_RATE_"+i+"]").css('border','0'); } + + var ifdr = getItemValue( 0, i, 'IS_FIXED_DISCOUNT_RATE' ); + if(ifdr=="Y"){ + $("input[id*=DISCOUNT_RATE_"+i+"]").attr('readonly',true); + $("input[id*=DISCOUNT_RATE_"+i+"]").css('border','0'); + } } } diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index 6b2e790b8..471893761 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -765,7 +765,7 @@ public class ProductCondition { if ( bos.size() == 0 ) { Map>> configs = ProductParamUtil.getProductComponentDecisionTable( productId, "PRD0301", "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ,"incomeNumber", - "isFixedDiscount","isUpdateLeaseMoneyRatio","maxLeaseMoney","MinimumDiscount"); + "isFixedDiscount","isUpdateLeaseMoneyRatio","maxLeaseMoney","MinimumDiscount","isFixedDiscountRate"); List> sf = configs.get( "segmented_financing" ); int i = 1; String discountCalcMethod = null ; @@ -806,6 +806,7 @@ public class ProductCondition { bo.setAttributeValue( "IS_UPDATE_LEASE_MONEY_RATIO", f.get( "isUpdateLeaseMoneyRatio" ) ); bo.setAttributeValue( "MAX_LEASE_MONEY", f.get( "maxLeaseMoney" ) ); bo.setAttributeValue( "MINIMUM_DISCOUNT", f.get( "MinimumDiscount" ) ); + bo.setAttributeValue( "IS_FIXED_DISCOUNT_RATE", f.get( "isFixedDiscountRate" ) ); bom.saveObject( bo ); i ++; From c2e40bbce599c8ff8b1e70c5b3434e67860498e1 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Fri, 13 Aug 2021 09:43:53 +0800 Subject: [PATCH 36/51] =?UTF-8?q?=E5=88=86=E6=AE=B5=E8=9E=8D=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E6=A0=A1=E9=AA=8C=E5=B9=B4=E5=88=A9=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/app/component/component-config.xml | 2 +- .../WEB-INF/etc/app/component/component-parameter-config.xml | 2 +- .../com/tenwa/reckon/executor/CreateTransactionExecutor.java | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/WebContent/WEB-INF/etc/app/component/component-config.xml b/WebContent/WEB-INF/etc/app/component/component-config.xml index 95aecfe66..a34705abb 100644 --- a/WebContent/WEB-INF/etc/app/component/component-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-config.xml @@ -1107,4 +1107,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index 2b3c3c9e1..3ae3af03d 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -196,4 +196,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java index b51bb2ecc..f9b4ff979 100644 --- a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java +++ b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java @@ -193,7 +193,8 @@ public class CreateTransactionExecutor implements Transaction { } public void checkYearRate( ConditionBean cb, TabCalBean tcb, BigDecimal yearRate ) throws BusinessException { -// if ( "Y".equals( cb.getFlexible() ) ) { + if( !"segmented_financing".equals( cb.getSettleMethod() ) ){ + // if ( "Y".equals( cb.getFlexible() ) ) { // Ʒ֤ try { Map> productRevenues = ProductParamUtil.getProductComponentType( tcb.getProductId(), "PRD0390" ); @@ -221,7 +222,9 @@ public class CreateTransactionExecutor implements Transaction { e.printStackTrace(); throw new BusinessException( e.getMessage() ); } + // } + } } /** From 304385e67351928f8ebe1f87ecd42dd37e2c8f22 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Fri, 13 Aug 2021 18:06:01 +0800 Subject: [PATCH 37/51] =?UTF-8?q?=E5=88=86=E6=AE=B5=E8=9E=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=9B=BA=E5=AE=9A=E5=80=BC=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCCalcSubsectionInfoTempList.jsp | 28 +++++++++++++------ .../LoanSimulation/LoanBasicInfo.jsp | 9 ++++++ .../etc/app/component/component-config.xml | 2 +- .../executor/SegmentedFinancingExecutor.java | 13 ++++++++- .../reckon/product/ProductCondition.java | 6 +++- 5 files changed, 47 insertions(+), 11 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index 0b32932c6..36569e88c 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -13,14 +13,20 @@ doTemp.setHtmlEvent( "CLEAN_LEASE_RATIO", "onblur", "changeCleanLeaseRatio" ); doTemp.setHtmlEvent( "CLEAN_LEASE_MONEY", "onblur", "changeCleanLeaseMoney" ); String discountCalcMethod = Sqlca.getString("select DISCOUNT_CALC_METHOD from LC_CALC_SUBSECTION_INFO_TEMP where FLOWUNID='"+flowunid+"'"); - if(discountCalcMethod != null && discountCalcMethod.equals("1")){ - doTemp.setReadOnly("DISCOUNT",true); - doTemp.setReadOnly("DISCOUNT_RATE",false); - }else{ - doTemp.setReadOnly("DISCOUNT",false); - doTemp.setReadOnly("DISCOUNT_RATE",true); + if(discountCalcMethod != null){ + if(discountCalcMethod.equals("1")){ + doTemp.setReadOnly("DISCOUNT",true); + doTemp.setReadOnly("DISCOUNT_RATE",false); + }else if (discountCalcMethod.equals("2")){ + doTemp.setReadOnly("DISCOUNT",false); + doTemp.setReadOnly("DISCOUNT_RATE",true); + }else if (discountCalcMethod.equals("3")){//̶ֵӦֵΪֻ + doTemp.setReadOnly("DISCOUNT_RATE",true); + doTemp.setReadOnly("FINANCING_RATE",true); + doTemp.setReadOnly("INCOME_NUMBER",true); + doTemp.setReadOnly("DISCOUNT",true); + } } - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--ΪGrid-- dwTemp.ReadOnly = "0"; //ֻģʽ @@ -30,7 +36,7 @@ //0Ƿչʾ 1 Ȩ޿ 2 չʾ 3ťʾ 4ť 5ť¼ 6 7 8 9ͼ꣬CSSʽ 10 String sButtons[][] = { {"true","All","Button","","","save()","","","","btn_icon_save",""}, - {"true","All","Button","","","viewAndEdit()","","","","btn_icon_detail",""}, + {"true","","Button","","","viewAndEdit()","","","","btn_icon_detail",""}, }; %><%@include file="/Frame/resources/include/ui/include_list.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 322131210..2625c1299 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -1138,12 +1138,12 @@ function saveRecord(sPostEvents){ alert('ʶ0 '); return ; } - var incomeNumebr = getItemValue(0,getRow(),"INCOME_NUMBER"); - if(incomeNumebr && Number(incomeNumebr) <= 0){ - alert('0 '); - return ; - } if(settleMethod != 'segmented_financing') { + var incomeNumebr = getItemValue(0,getRow(),"INCOME_NUMBER"); + if(incomeNumebr && Number(incomeNumebr) <= 0){ + alert('0 '); + return ; + } var termMin = parseInt("<%=termMin%>"); var termMax = parseInt("<%=termMax%>"); var incomeNumber = parseInt(getItemValue(0, 0, "INCOME_NUMBER")); @@ -1171,31 +1171,32 @@ function saveRecord(sPostEvents){ return; } } - } - //ܴڲƷ - var cleanLeaseMoney=eval(getItemValue(0,0,"CLEAN_LEASE_MONEY"));//ʶ - var EQUIP_AMT=eval(getItemValue(0,0,"EQUIP_AMT")); - var LeaseMoneyRatio = Number(cleanLeaseMoney/EQUIP_AMT*100).toFixed(6); - if(calcRules["fund"]["CLEAN_LEASE_MONEY"]){ - var productCleanLeaseMoneyRatioMax = eval(calcRules["fund"]["CLEAN_LEASE_MONEY"]["LeaseMoneyRatio"]["max"]);// - var productCleanLeaseMoneyRatioMin = eval(calcRules["fund"]["CLEAN_LEASE_MONEY"]["LeaseMoneyRatio"]["min"]);// - var productCleanLeaseMoneyMax = eval(calcRules["fund"]["CLEAN_LEASE_MONEY"]["max"]);//ʶ - var productCleanLeaseMoneyMin = eval(calcRules["fund"]["CLEAN_LEASE_MONEY"]["min"]);//ʶ - if((LeaseMoneyRatioproductCleanLeaseMoneyRatioMax)&&(productCleanLeaseMoneyRatioMax!=null)&&(productCleanLeaseMoneyRatioMax!="")){ - AsDebug.showMessage("ʾ","ۺʶܴ"+productCleanLeaseMoneyRatioMax+"%","","",true); - return ; - } - if((cleanLeaseMoneyproductCleanLeaseMoneyMax)&&(productCleanLeaseMoneyMax!=null)&&(productCleanLeaseMoneyMax!="")){ - AsDebug.showMessage("ʾ","ʶܴ"+productCleanLeaseMoneyMax,"","",true); - return ; + + //ܴڲƷ + var cleanLeaseMoney=eval(getItemValue(0,0,"CLEAN_LEASE_MONEY"));//ʶ + var EQUIP_AMT=eval(getItemValue(0,0,"EQUIP_AMT")); + var LeaseMoneyRatio = Number(cleanLeaseMoney/EQUIP_AMT*100).toFixed(6); + if(calcRules["fund"]["CLEAN_LEASE_MONEY"]){ + var productCleanLeaseMoneyRatioMax = eval(calcRules["fund"]["CLEAN_LEASE_MONEY"]["LeaseMoneyRatio"]["max"]);// + var productCleanLeaseMoneyRatioMin = eval(calcRules["fund"]["CLEAN_LEASE_MONEY"]["LeaseMoneyRatio"]["min"]);// + var productCleanLeaseMoneyMax = eval(calcRules["fund"]["CLEAN_LEASE_MONEY"]["max"]);//ʶ + var productCleanLeaseMoneyMin = eval(calcRules["fund"]["CLEAN_LEASE_MONEY"]["min"]);//ʶ + if((LeaseMoneyRatioproductCleanLeaseMoneyRatioMax)&&(productCleanLeaseMoneyRatioMax!=null)&&(productCleanLeaseMoneyRatioMax!="")){ + AsDebug.showMessage("ʾ","ۺʶܴ"+productCleanLeaseMoneyRatioMax+"%","","",true); + return ; + } + if((cleanLeaseMoneyproductCleanLeaseMoneyMax)&&(productCleanLeaseMoneyMax!=null)&&(productCleanLeaseMoneyMax!="")){ + AsDebug.showMessage("ʾ","ʶܴ"+productCleanLeaseMoneyMax,"","",true); + return ; + } } } var startDate=getItemValue(0,getRow(),"START_DATE"); diff --git a/WebContent/WEB-INF/etc/app/component/component-config.xml b/WebContent/WEB-INF/etc/app/component/component-config.xml index a3f4a429f..147a9f006 100644 --- a/WebContent/WEB-INF/etc/app/component/component-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-config.xml @@ -1107,4 +1107,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index 3ae3af03d..730aa5bd9 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -196,4 +196,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 5b2cb5912..14e1f8e83 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4674,6 +4674,9 @@ + + + @@ -4714,6 +4717,9 @@ + + + @@ -4755,6 +4761,9 @@ + + + diff --git a/calc/com/tenwa/reckon/check/SubsectionCheck.java b/calc/com/tenwa/reckon/check/SubsectionCheck.java index 4acb7b5d2..b1a4f1b30 100644 --- a/calc/com/tenwa/reckon/check/SubsectionCheck.java +++ b/calc/com/tenwa/reckon/check/SubsectionCheck.java @@ -32,7 +32,11 @@ public class SubsectionCheck { if( dataClm != null && dataClm.size() > 0 ){ clm = new BigDecimal(dataClm.get(0).get("CLEAN_LEASE_MONEY")); } - if(subsectionCondig.equals("CarPrice")){ + //ܸʲô㣬УֶڵĽۺʶ + if(new BigDecimal(cleanLeaseMoney).compareTo( clm ) != 0){ + return "ֶʶۺʶһ£飡"; + } + /*if(subsectionCondig.equals("CarPrice")){ if(new BigDecimal(equipAmt).compareTo( clm ) != 0){ return "ֶʶͳ۽һ£飡"; } @@ -42,7 +46,7 @@ public class SubsectionCheck { } }else{ return "ûм鵽Ӧķֶã飡"; - } + }*/ return "success"; } diff --git a/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java b/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java index e1590d72c..02a0cb96b 100644 --- a/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java +++ b/calc/com/tenwa/reckon/executor/SegmentedFinancingExecutor.java @@ -63,6 +63,8 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor { String discountCalcMethod = bo.getAttribute( "DISCOUNT_CALC_METHOD" ).getString(); // BigDecimal financingRate; + //ȡǷֻֻÿμҪ + String iulma =bo.getAttribute( "IS_UPDATE_LEASE_MONEY_RATIO" ).getString(); if ( "1".equals( discountCalcMethod ) ) { // ʼϢ // Ϣ BigDecimal discountRate = new BigDecimal( bo.getAttribute( "DISCOUNT_RATE" ).getString() ).divide( new BigDecimal( 100 ), 20, 4 ); @@ -77,7 +79,8 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor { bo.setAttributeValue( "DISCOUNT", discount ); String fr = bo.getAttribute( "FINANCING_RATE" ).getString(); - if ( StringUtils.isEmpty( fr ) ) { + + if ( StringUtils.isEmpty( fr ) || ( iulma!=null && "Y".equals(iulma) ) ) { financingRate = discountRate.divide( new BigDecimal( 100 ), 20, 4 ); bo.setAttributeValue( "FINANCING_RATE", discountRate.toString() ); } else { @@ -100,7 +103,7 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor { BigDecimal discountRate = getIRR( cashFlow, incomeNumberYear ).setScale( 6, 4 ); bo.setAttributeValue( "DISCOUNT_RATE", discountRate.toString() ); String fr = bo.getAttribute( "FINANCING_RATE" ).getString(); - if ( StringUtils.isEmpty( fr ) ) { + if ( StringUtils.isEmpty( fr ) || ( iulma!=null && "Y".equals(iulma) ) ) { financingRate = discountRate.divide( new BigDecimal( 100 ), 20, 4 ); bo.setAttributeValue( "FINANCING_RATE", discountRate.toString() ); } else { diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index fda148de0..9a2174ab0 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -1,5 +1,6 @@ package com.tenwa.reckon.product; +import java.math.BigDecimal; import java.util.Calendar; import java.util.HashMap; import java.util.List; @@ -764,8 +765,8 @@ public class ProductCondition { List bos = bom.createQuery( "flowunid = :flowunid" ).setParameter( "flowunid", flowunid ).getResultList( false ); if ( bos.size() == 0 ) { Map>> configs = ProductParamUtil.getProductComponentDecisionTable( productId, "PRD0301", - "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ,"incomeNumber", - "isFixedDiscount","isUpdateLeaseMoneyRatio","maxLeaseMoney","MinimumDiscount","isFixedDiscountRate"); + "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" , + "isFixedDiscount","isUpdateLeaseMoneyRatio","maxLeaseMoney","MinimumDiscount","MaxincomeNumber","MinincomeNumber","MinLeaseMoney"); List> sf = configs.get( "segmented_financing" ); int i = 1; String discountCalcMethod = null ; @@ -798,20 +799,22 @@ public class ProductCondition { bo.setAttributeValue( "MAXIMUM_DISCOUNT", f.get( "MaximumDiscount" ) ); bo.setAttributeValue( "FLOWUNID", flowunid ); //ݲƷڴΣøֵӦֵ - String incomeNumber = f.get( "incomeNumber" ); - if(incomeNumber == null || incomeNumber.isEmpty() ){ - bo.setAttributeValue( "IS_ONLYREAD_INCOME_NUMBER", "N" ); - }else{ + String MinincomeNumber = f.get( "MinincomeNumber" ); + String MaxincomeNumber = f.get( "MaxincomeNumber" ); + if(MinincomeNumber != null && MaxincomeNumber != null && new BigDecimal(MinincomeNumber).compareTo(new BigDecimal(MaxincomeNumber))==0 ){ bo.setAttributeValue( "IS_ONLYREAD_INCOME_NUMBER", "Y" ); - bo.setAttributeValue( "INCOME_NUMBER", incomeNumber ); + bo.setAttributeValue( "INCOME_NUMBER", MaxincomeNumber ); + }else{ + bo.setAttributeValue( "IS_ONLYREAD_INCOME_NUMBER", "N" ); } + bo.setAttributeValue( "MAX_INCOME_NUMBER", MaxincomeNumber ); + bo.setAttributeValue( "MIN_INCOME_NUMBER", MinincomeNumber ); bo.setAttributeValue( "IS_FIXED_DISCOUNT", f.get( "isFixedDiscount" ) ); bo.setAttributeValue( "IS_UPDATE_LEASE_MONEY_RATIO", f.get( "isUpdateLeaseMoneyRatio" ) ); bo.setAttributeValue( "MAX_LEASE_MONEY", f.get( "maxLeaseMoney" ) ); + bo.setAttributeValue( "MIN_LEASE_MONEY", f.get( "MinLeaseMoney" ) ); bo.setAttributeValue( "MINIMUM_DISCOUNT", f.get( "MinimumDiscount" ) ); - bo.setAttributeValue( "IS_FIXED_DISCOUNT_RATE", f.get( "isFixedDiscountRate" ) ); - bom.saveObject( bo ); i ++; } diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java index d3bceab49..4957803a7 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO.java @@ -133,4 +133,16 @@ public interface LC_CALC_SUBSECTION_INFO{ * ϢǷ̶ STRING(10)
*/ public static final String IS_FIXED_DISCOUNT_RATE = "IS_FIXED_DISCOUNT_RATE"; + /** + * ڴ STRING(32)
+ */ + public static final String MAX_INCOME_NUMBER = "MAX_INCOME_NUMBER"; + /** + * Сڴ STRING(32)
+ */ + public static final String MIN_INCOME_NUMBER = "MIN_INCOME_NUMBER"; + /** + * ʽСֵ STRING(10)
+ */ + public static final String MIN_LEASE_MONEY = "MIN_LEASE_MONEY"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java index c662becdf..d834134ed 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_HIS.java @@ -133,4 +133,17 @@ public interface LC_CALC_SUBSECTION_INFO_HIS{ * ϢǷ̶ STRING(10)
*/ public static final String IS_FIXED_DISCOUNT_RATE = "IS_FIXED_DISCOUNT_RATE"; + + /** + * ڴ STRING(32)
+ */ + public static final String MAX_INCOME_NUMBER = "MAX_INCOME_NUMBER"; + /** + * Сڴ STRING(32)
+ */ + public static final String MIN_INCOME_NUMBER = "MIN_INCOME_NUMBER"; + /** + * ʽСֵ STRING(32
+ */ + public static final String MIN_LEASE_MONEY = "MIN_LEASE_MONEY"; } \ No newline at end of file From f62646a34ea2a86bcc019d1abce3905e8b009177 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Thu, 19 Aug 2021 14:42:51 +0800 Subject: [PATCH 42/51] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=9E=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java index e289829f6..794c431a5 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_SUBSECTION_INFO_TEMP.java @@ -137,4 +137,16 @@ public interface LC_CALC_SUBSECTION_INFO_TEMP{ * ϢǷ̶ STRING(10)
*/ public static final String IS_FIXED_DISCOUNT_RATE = "IS_FIXED_DISCOUNT_RATE"; + /** + * ڴ STRING(32)
+ */ + public static final String MAX_INCOME_NUMBER = "MAX_INCOME_NUMBER"; + /** + * Сڴ STRING(32)
+ */ + public static final String MIN_INCOME_NUMBER = "MIN_INCOME_NUMBER"; + /** + * ʽСֵ STRING(32
+ */ + public static final String MIN_LEASE_MONEY = "MIN_LEASE_MONEY"; } \ No newline at end of file From 894885ac93a652740768ce04afd76d7c9a1fbe6f Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Thu, 26 Aug 2021 14:59:47 +0800 Subject: [PATCH 43/51] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E9=87=91=E8=87=AA=E5=8A=A8=E6=8A=B5=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 1 + .../jbo/app/tenwa/calc/VI_LC_RENT_PLAN.java | 5 + .../app/quartzmession/MarginDeduction.java | 200 ++++++++++-------- 3 files changed, 120 insertions(+), 86 deletions(-) diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 14e1f8e83..a9b388627 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -1967,6 +1967,7 @@ + diff --git a/src_jbo/jbo/app/tenwa/calc/VI_LC_RENT_PLAN.java b/src_jbo/jbo/app/tenwa/calc/VI_LC_RENT_PLAN.java index a07dc40d2..8ecedbae2 100644 --- a/src_jbo/jbo/app/tenwa/calc/VI_LC_RENT_PLAN.java +++ b/src_jbo/jbo/app/tenwa/calc/VI_LC_RENT_PLAN.java @@ -125,4 +125,9 @@ public interface VI_LC_RENT_PLAN{ * ״̬ STRING(20)
*/ public static final String planstatus = "planstatus"; + + /** + * Ŀid STRING(20)
+ */ + public static final String project_id = "project_id"; } \ No newline at end of file diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/MarginDeduction.java b/src_tenwa/com/tenwa/lease/app/quartzmession/MarginDeduction.java index 025377ee9..d81751f19 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/MarginDeduction.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/MarginDeduction.java @@ -4,8 +4,11 @@ import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; +import java.util.Map; import java.util.UUID; +import com.base.util.DateUtil; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; @@ -30,98 +33,123 @@ public class MarginDeduction implements Job{ try { tx = JBOFactory.createJBOTransaction(); Sqlca = Transaction.createTransaction(tx); + BizObjectManager lrpBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_RENT_PLAN",Sqlca); BizObjectManager lriBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_RENT_INCOME",Sqlca); BizObjectManager lfiBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_FUND_INCOME",Sqlca); BizObjectManager lfpBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_FUND_PLAN",Sqlca); BizObjectManager vlrpBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.VI_LC_RENT_PLAN",Sqlca); - List vlrpBoList = vlrpBm.createQuery("(rent_over>0 OR penalty_over>0) AND plan_date=v.DATE_FORMAT(v.NOW(),'%Y/%m/%d') and not exists (select 1 from jbo.com.tenwa.lease.comm.LC_OCCUPY_RENT_LIST lorl where lorl.PAYMENT_NUMBER=O.PAYMENT_NUMBER and lorl.PLAN_LIST=O.PLAN_LIST)").getResultList(false); - if(vlrpBoList.size()>0) { - for (BizObject vlrpBo : vlrpBoList) { - StringBuffer str = new StringBuffer("select lfp.PLAN_MONEY-ifnull(lfit.fact_money,'0')-IfNULL(lfi.fact_money,'0') as fact_money from lc_fund_plan lfp "); - str.append("left join (select sum(fact_money) fact_money,PAYMENT_NUMBER from lc_fund_income_temp where FEE_TYPE='feetype16' and PAYMENT_NUMBER='"+vlrpBo.getAttribute("PAYMENT_NUMBER")+"' and is_flowing='0' and ROLL_BACK='0') lfit on lfp.PAYMENT_NUMBER=lfit.PAYMENT_NUMBER "); - str.append("LEFT JOIN (SELECT SUM(fact_money) fact_money,PAYMENT_NUMBER FROM lc_fund_income WHERE FEE_TYPE='feetype16' AND PAYMENT_NUMBER='"+vlrpBo.getAttribute("PAYMENT_NUMBER")+"' AND ROLL_BACK='0') lfi on lfp.PAYMENT_NUMBER=lfi.PAYMENT_NUMBER "); - str.append(" where lfp.FEE_TYPE='feetype16' and lfp.SETTLE_METHOD is not null and lfp.PAYMENT_NUMBER='"+vlrpBo.getAttribute("PAYMENT_NUMBER")+"'"); - String factMoney = Sqlca.getString(str.toString()); - if(factMoney==null) { - continue; + List> listData = DataOperatorUtil.getDataBySql("select cast(lfp.PLAN_MONEY as decimal(18,2))-cast(ifnull(lfit.fact_money,'0') as decimal(18,2))-cast(IfNULL(lfi.fact_money,'0') as decimal(18,2)) as fact_money,lci.id as contractId " + + "from lc_fund_plan lfp left join lb_contract_info lci on lci.id=lfp.CONTRACT_ID " + + " left join (select sum(fact_money) fact_money,PAYMENT_NUMBER from lc_fund_income_temp where FEE_TYPE='feetype16' and is_flowing='0' and ROLL_BACK='0' group by PAYMENT_NUMBER) lfit on lfp.PAYMENT_NUMBER=lfit.PAYMENT_NUMBER " + + " LEFT JOIN (SELECT SUM(fact_money) fact_money,PAYMENT_NUMBER FROM lc_fund_income WHERE FEE_TYPE='feetype16' AND ROLL_BACK='0' group by PAYMENT_NUMBER) lfi on lfp.PAYMENT_NUMBER=lfi.PAYMENT_NUMBER " + + "where lci.BUSINESSTYPE='1' and lci.CONTRACT_STATUS='31' and lfp.FEE_TYPE='feetype16' and lfp.SETTLE_METHOD is not null "); + if(listData!=null && listData.size() > 0 ){ + for (int i = 0; i < listData.size(); i++) { + String contractId = listData.get(i).get("contractId"); + BigDecimal fact_money = new BigDecimal( listData.get(i).get("fact_money").toString() ); + BigDecimal money = new BigDecimal( listData.get(i).get("fact_money").toString() ); + BizObject vlrpBo = null ; + List vlrpBoList = vlrpBm.createQuery("rent_over>0 and contract_id =:contract_id order by plan_list desc ").setParameter("contract_id",contractId).getResultList(false); + if( vlrpBoList!=null && vlrpBoList.size() > 0){ + BigDecimal rent = BigDecimal.ZERO ; + int j = 0 ; + for ( ; j < vlrpBoList.size() ; j++ ) { + BigDecimal plistRent = new BigDecimal( vlrpBoList.get(j).getAttribute("rent_over").toString() ); + rent = rent.add( plistRent ) ; + if(rent.compareTo(fact_money) > -1 || (vlrpBoList.size()-1) == j ){ + vlrpBo = vlrpBoList.get(j); + break; + } + money = money.subtract(plistRent); + } + if(j == vlrpBoList.size()-1 ){//ѭݵڼϵֵ˵ֿǰĽѾ + String plan_date = vlrpBo.getAttribute("plan_date").toString(); + String nowDate = DateUtil.getSystemTimeByFormat("yyyy/MM/dd"); + if(nowDate.compareTo(plan_date)>-1){ + BizObject lriBo = lriBm.newObject(); + BigDecimal interestOver = new BigDecimal(vlrpBo.getAttribute("interest_over").toString()); + if(interestOver.compareTo(money)>-1) { + lriBo.setAttributeValue("INTEREST",money); + money=BigDecimal.ZERO; + }else { + lriBo.setAttributeValue("INTEREST",interestOver); + money=money.subtract(interestOver); + } + + BigDecimal corpusOver = new BigDecimal(vlrpBo.getAttribute("corpus_over").toString()); + if(corpusOver.compareTo(money)>-1) { + lriBo.setAttributeValue("CORPUS",money); + money=BigDecimal.ZERO; + }else { + lriBo.setAttributeValue("CORPUS",corpusOver); + money=money.subtract(corpusOver); + } + BizObject lrp = lrpBm.createQuery(" id=:id ").setParameter("id",vlrpBo.getAttribute("ID").toString()).getSingleResult(true); + BigDecimal drent = new BigDecimal(lriBo.getAttribute("CORPUS").toString()).add( new BigDecimal( lriBo.getAttribute("INTEREST").toString() ) ); + BigDecimal rentOver = new BigDecimal(vlrpBo.getAttribute("rent_over").toString()); + + String fundIncomeId = UUID.randomUUID().toString().replaceAll("-",""); + lriBo.setAttributeValue("PROJECT_ID",vlrpBo.getAttribute("PROJECT_ID")); + lriBo.setAttributeValue("PROJECT_PLAN_NUMBER",lrp.getAttribute("PROJECT_PLAN_NUMBER")); + lriBo.setAttributeValue("CONTRACT_ID",vlrpBo.getAttribute("CONTRACT_ID")); + lriBo.setAttributeValue("CONTRACT_PLAN_NUMBER",lrp.getAttribute("CONTRACT_PLAN_NUMBER")); + lriBo.setAttributeValue("PAYMENT_NUMBER",vlrpBo.getAttribute("PAYMENT_NUMBER")); + lriBo.setAttributeValue("PLAN_ID",vlrpBo.getAttribute("ID")); + lriBo.setAttributeValue("PLAN_LIST",vlrpBo.getAttribute("PLAN_LIST")); + double hireList = Sqlca.getDouble("select max(HIRE_LIST) from lc_rent_income where PAYMENT_NUMBER='"+vlrpBo.getAttribute("PAYMENT_NUMBER")+"' and PLAN_LIST='"+vlrpBo.getAttribute("PLAN_LIST")+"'"); + lriBo.setAttributeValue("HIRE_LIST",hireList+1); + lriBo.setAttributeValue("HIRE_DATE",vlrpBo.getAttribute("PLAN_DATE")); + lriBo.setAttributeValue("RENT",drent); + lriBo.setAttributeValue("PENALTY","0.00"); + lriBo.setAttributeValue("CORPUS_ADJUST","0.00"); + lriBo.setAttributeValue("INTEREST_ADJUST","0.00"); + lriBo.setAttributeValue("PENALTY_ADJUST","0.00"); + lriBo.setAttributeValue("SETTLE_METHOD","settlemethod7"); + lriBo.setAttributeValue("DEDUCTION_ID",fundIncomeId); + lriBo.setAttributeValue("ACCOUNTING_DATE",vlrpBo.getAttribute("PLAN_DATE")); + lriBo.setAttributeValue("MEMO","ֿ֤۶ʱ"); + lriBo.setAttributeValue("ROLL_BACK","0"); + lriBo.setAttributeValue("INPUTTIME",sdf.format(new Date())); + lriBm.saveObject(lriBo); + + BizObject lfpBo = lfpBm.createQuery("PAYMENT_NUMBER='"+vlrpBo.getAttribute("PAYMENT_NUMBER")+"'").getSingleResult(false); + BizObject lfiBo = lfiBm.newObject(); + lfiBo.setAttributeValue("ID", fundIncomeId); + //lfiBo.setAttributeValue("RELATIVE_ID", lfpBo.getAttribute("RELATIVE_ID")); + lfiBo.setAttributeValue("PROJECT_ID", lfpBo.getAttribute("PROJECT_ID")); + lfiBo.setAttributeValue("PROJECT_PLAN_NUMBER", lfpBo.getAttribute("PROJECT_PLAN_NUMBER")); + lfiBo.setAttributeValue("CONTRACT_ID", lfpBo.getAttribute("CONTRACT_ID")); + lfiBo.setAttributeValue("CONTRACT_PLAN_NUMBER", lfpBo.getAttribute("CONTRACT_PLAN_NUMBER")); + lfiBo.setAttributeValue("PAYMENT_NUMBER", lfpBo.getAttribute("PAYMENT_NUMBER")); + lfiBo.setAttributeValue("PLAN_ID", vlrpBo.getAttribute("ID")); + lfiBo.setAttributeValue("PLAN_LIST", lfpBo.getAttribute("PLAN_LIST")); + lfiBo.setAttributeValue("PAY_TYPE", lfpBo.getAttribute("PAY_TYPE")); + lfiBo.setAttributeValue("FEE_TYPE", lfpBo.getAttribute("FEE_TYPE")); + lfiBo.setAttributeValue("SETTLE_METHOD","settlemethod7"); + double chargeList = Sqlca.getDouble("select max(CHARGE_LIST) from lc_fund_income where PAYMENT_NUMBER='"+lfpBo.getAttribute("PAYMENT_NUMBER")+"' and PLAN_LIST='"+lfpBo.getAttribute("PLAN_LIST")+"'"); + lfiBo.setAttributeValue("CHARGE_LIST",chargeList+1); + lfiBo.setAttributeValue("FACT_DATE",vlrpBo.getAttribute("PLAN_DATE")); + lfiBo.setAttributeValue("FACT_MONEY",drent); + lfiBo.setAttributeValue("FEE_ADJUST","0.00"); + lfiBo.setAttributeValue("ACCOUNTING_DATE",vlrpBo.getAttribute("PLAN_DATE")); + lfiBo.setAttributeValue("APPLYPAY_DATE",vlrpBo.getAttribute("PLAN_DATE")); + lfiBo.setAttributeValue("MEMO","ֿ֤۶ʱ"); + lfiBo.setAttributeValue("ROLL_BACK","0"); + lfiBo.setAttributeValue("INPUTTIME",sdf.format(new Date())); + lfiBm.saveObject(lfiBo); + + if( drent.compareTo(rentOver) == 0 ){//Ӧ޸ƻе״̬ + lrp.setAttributeValue("COLLECT_STATUS","ֿ֤"); + lrp.setAttributeValue("COLLECT_MSG","ֿ֤"); + lrpBm.saveObject(lrp); + } + } + + } } - String rent = Sqlca.getString("SELECT SUM(lrp.RENT) FROM lc_rent_plan lrp WHERE lrp.PAYMENT_NUMBER='"+vlrpBo.getAttribute("PAYMENT_NUMBER")+"' AND plan_date>DATE_FORMAT(NOW(),'%Y/%m/%d')"); - BigDecimal money = null; - if(rent==null) { - money = new BigDecimal(factMoney); - }else { - money = new BigDecimal(factMoney).subtract(new BigDecimal(rent)); - } - if(money.compareTo(BigDecimal.ZERO)<1) { - continue; - } - - BizObject lriBo = lriBm.newObject(); - BigDecimal interestOver = new BigDecimal(vlrpBo.getAttribute("interest_over").toString()); - if(interestOver.compareTo(money)>-1) { - lriBo.setAttributeValue("INTEREST",money); - money=BigDecimal.ZERO; - }else { - lriBo.setAttributeValue("INTEREST",interestOver); - money=money.subtract(interestOver); - } - - BigDecimal corpusOver = new BigDecimal(vlrpBo.getAttribute("corpus_over").toString()); - if(corpusOver.compareTo(money)>-1) { - lriBo.setAttributeValue("CORPUS",money); - money=BigDecimal.ZERO; - }else { - lriBo.setAttributeValue("CORPUS",corpusOver); - money=money.subtract(corpusOver); - } - String fundIncomeId = UUID.randomUUID().toString().replaceAll("-",""); - lriBo.setAttributeValue("PROJECT_ID",vlrpBo.getAttribute("PROJECT_ID")); - lriBo.setAttributeValue("PROJECT_PLAN_NUMBER",vlrpBo.getAttribute("PROJECT_PLAN_NUMBER")); - lriBo.setAttributeValue("CONTRACT_ID",vlrpBo.getAttribute("CONTRACT_ID")); - lriBo.setAttributeValue("CONTRACT_PLAN_NUMBER",vlrpBo.getAttribute("CONTRACT_PLAN_NUMBER")); - lriBo.setAttributeValue("PAYMENT_NUMBER",vlrpBo.getAttribute("PAYMENT_NUMBER")); - lriBo.setAttributeValue("PLAN_ID",vlrpBo.getAttribute("ID")); - lriBo.setAttributeValue("PLAN_LIST",vlrpBo.getAttribute("PLAN_LIST")); - double hireList = Sqlca.getDouble("select max(HIRE_LIST) from lc_rent_income where PAYMENT_NUMBER='"+vlrpBo.getAttribute("PAYMENT_NUMBER")+"' and PLAN_LIST='"+vlrpBo.getAttribute("PLAN_LIST")+"'"); - lriBo.setAttributeValue("HIRE_LIST",hireList+1); - lriBo.setAttributeValue("HIRE_DATE",vlrpBo.getAttribute("PLAN_DATE")); - lriBo.setAttributeValue("RENT",vlrpBo.getAttribute("CORPUS").getDouble()+vlrpBo.getAttribute("INTEREST").getDouble()); - lriBo.setAttributeValue("PENALTY","0.00"); - lriBo.setAttributeValue("CORPUS_ADJUST","0.00"); - lriBo.setAttributeValue("INTEREST_ADJUST","0.00"); - lriBo.setAttributeValue("PENALTY_ADJUST","0.00"); - lriBo.setAttributeValue("SETTLE_METHOD","settlemethod7"); - lriBo.setAttributeValue("DEDUCTION_ID",fundIncomeId); - lriBo.setAttributeValue("ACCOUNTING_DATE",vlrpBo.getAttribute("PLAN_DATE")); - lriBo.setAttributeValue("MEMO","ֿ֤۶ʱ"); - lriBo.setAttributeValue("ROLL_BACK","0"); - lriBo.setAttributeValue("INPUTTIME",sdf.format(new Date())); - lriBm.saveObject(lriBo); - - BizObject lfpBo = lfpBm.createQuery("PAYMENT_NUMBER='"+vlrpBo.getAttribute("PAYMENT_NUMBER")+"'").getSingleResult(false); - BizObject lfiBo = lfiBm.newObject(); - lfiBo.setAttributeValue("ID", fundIncomeId); - lfiBo.setAttributeValue("RELATIVE_ID", lfpBo.getAttribute("RELATIVE_ID")); - lfiBo.setAttributeValue("PROJECT_ID", lfpBo.getAttribute("PROJECT_ID")); - lfiBo.setAttributeValue("PROJECT_PLAN_NUMBER", lfpBo.getAttribute("PROJECT_PLAN_NUMBER")); - lfiBo.setAttributeValue("CONTRACT_ID", lfpBo.getAttribute("CONTRACT_ID")); - lfiBo.setAttributeValue("PAYMENT_NUMBER", lfpBo.getAttribute("PAYMENT_NUMBER")); - lfiBo.setAttributeValue("PLAN_LIST", lfpBo.getAttribute("PLAN_LIST")); - lfiBo.setAttributeValue("PAY_TYPE", lfpBo.getAttribute("PAY_TYPE")); - lfiBo.setAttributeValue("FEE_TYPE", lfpBo.getAttribute("FEE_TYPE")); - lfiBo.setAttributeValue("SETTLE_METHOD","settlemethod7"); - double chargeList = Sqlca.getDouble("select max(CHARGE_LIST) from lc_fund_income where PAYMENT_NUMBER='"+lfpBo.getAttribute("PAYMENT_NUMBER")+"' and PLAN_LIST='"+lfpBo.getAttribute("PLAN_LIST")+"'"); - lfiBo.setAttributeValue("CHARGE_LIST",chargeList+1); - lfiBo.setAttributeValue("FACT_DATE",vlrpBo.getAttribute("PLAN_DATE")); - lfiBo.setAttributeValue("FACT_MONEY",vlrpBo.getAttribute("CORPUS").getDouble()+vlrpBo.getAttribute("INTEREST").getDouble()); - lfiBo.setAttributeValue("FEE_ADJUST","0.00"); - lfiBo.setAttributeValue("ACCOUNTING_DATE",vlrpBo.getAttribute("PLAN_DATE")); - lfiBo.setAttributeValue("APPLYPAY_DATE",vlrpBo.getAttribute("PLAN_DATE")); - lfiBo.setAttributeValue("MEMO","ֿ֤۶ʱ"); - lfiBo.setAttributeValue("ROLL_BACK","0"); - lfiBo.setAttributeValue("INPUTTIME",sdf.format(new Date())); - lfiBm.saveObject(lfiBo); + } + } QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.MarginDeduction", "success", "ɹ", userId == null? "system" : userId.toString()); } catch (Exception e1) { From 3407183f353c87543582b7b04350b5396fe256cd Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Tue, 31 Aug 2021 10:45:52 +0800 Subject: [PATCH 44/51] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=9E=8D=E7=BB=BC=E5=90=88=E5=88=A9=E7=8E=87=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCCalcSubsectionInfoTempList.jsp | 6 ++--- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 3 +++ calc/com/tenwa/reckon/bean/ConditionBean.java | 15 ++++++++++-- .../reckon/executor/CashFlowExecutor.java | 24 +++++++++++++++---- .../tenwa/reckon/help/ConditionHelper.java | 4 +++- .../jbo/app/tenwa/calc/LC_CALC_CONDITION.java | 5 ++++ .../app/tenwa/calc/LC_CALC_CONDITION_HIS.java | 4 ++++ .../tenwa/calc/LC_CALC_CONDITION_TEMP.java | 4 ++++ 8 files changed, 54 insertions(+), 11 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index 75c90b18f..f41241c95 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -85,10 +85,10 @@ } var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ) ; var minLeaseMoney = getItemValue( 0, getRow(), 'MIN_LEASE_MONEY' ); - if( Number(clm) > Number(maxLeaseMoney) || Number(clm) < Number(minLeaseMoney)){ - alert("öεʽڲƷõڣ飡"); + if( Number(fcleanLeaseMoney) > Number(maxLeaseMoney) || Number(fcleanLeaseMoney) < Number(minLeaseMoney)){ setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); + alert("öεʽڲƷõڣ飡"); return } setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', fcleanLeaseMoney); @@ -105,9 +105,9 @@ var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ); var minLeaseMoney = getItemValue( 0, getRow(), 'MIN_LEASE_MONEY' ); if( Number(clm) > Number(maxLeaseMoney) || Number(clm) < Number(minLeaseMoney)){ - alert("öεʽڲƷõڣ飡"); setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); + alert("öεʽڲƷõڣ飡"); return } if ( subsectionConfig ) { diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index a9b388627..d93d5b429 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -1426,6 +1426,7 @@ + @@ -2788,6 +2789,7 @@ + @@ -3374,6 +3376,7 @@ + diff --git a/calc/com/tenwa/reckon/bean/ConditionBean.java b/calc/com/tenwa/reckon/bean/ConditionBean.java index 183f6f2e0..d3b290e03 100644 --- a/calc/com/tenwa/reckon/bean/ConditionBean.java +++ b/calc/com/tenwa/reckon/bean/ConditionBean.java @@ -177,6 +177,9 @@ public class ConditionBean implements Cloneable{ private String discountInterest; // Ϣ() private String personalInsurance; // /*****************************/ + /* ******* ֶ ****************/ + private String comprehensiveRate; // ۺ + /*****************************/ /*********************************************************************************** * ʱδʹֶ(ʷ汾ֶ) @@ -1453,6 +1456,7 @@ public class ConditionBean implements Cloneable{ param = (param.isEmpty() ? "0" : param); return param; } + /* * ڳΪƻһڼһڣĩΪƻһ */ @@ -1832,6 +1836,13 @@ public class ConditionBean implements Cloneable{ public void setPersonalInsurance(String personalInsurance) { this.personalInsurance = personalInsurance; } - - + + + public void setComprehensiveRate(String comprehensiveRate) { + this.comprehensiveRate = comprehensiveRate; + } + + public String getComprehensiveRate() { + return defaultZero(comprehensiveRate); + } } diff --git a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java index 7843cbd13..de8795fc7 100644 --- a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java +++ b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java @@ -15,6 +15,7 @@ import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; +import com.gnete.bc.util.Strings; import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.reckon.bean.ConditionBean; import com.tenwa.reckon.bean.TabCalBean; @@ -34,19 +35,32 @@ public class CashFlowExecutor { public String run(ConditionBean cb , TabCalBean tcb) throws Exception{ this.delete(tcb, cb); this.add(cb, tcb); - String irr = this.getIrr(cb,tcb); + String irr = ""; + if( "segmented_financing".equals( cb.getSettleMethod() ) ){ + irr = this.getIrr(cb,tcb,"subsectionIRR"); + String subsectionRate = this.getIrr(cb, tcb, "subsectionRate"); + cb.setComprehensiveRate( subsectionRate ); + }else{ + irr = this.getIrr(cb,tcb,"normal"); + } cb.setIrr(irr); return irr; } - private String getIrr(ConditionBean cb ,TabCalBean tcb) throws Exception{ + //calcType normalͬIRRsubsectionIRRֶڼIRRsubsectionRateֶڼۺ + private String getIrr(ConditionBean cb , TabCalBean tcb, String calcType) throws Exception{ String cashSql = "select NET_FLOW,PLAN_DATE from "+Tools.getTable(tcb.getContractCashTb())+" where flowunid ='"+tcb.getDocId()+"' and "+tcb.getPlanCName()+"='"+tcb.getPlanCValue()+"' order by plan_date"; List> cashes =DataOperatorUtil.getDataBySql(tx, cashSql, null); List netList = new ArrayList(); List dateList = new ArrayList(); - for(Map cash :cashes){ - netList.add(cash.get("NET_FLOW")); - dateList.add(cash.get("PLAN_DATE")); + for(Map cash :cashes){ + netList.add(cash.get("NET_FLOW")); + dateList.add(cash.get("PLAN_DATE")); } + if ("subsectionRate".equals(calcType) ){ + String cleanLeaseMoney = cb.getCleanLeaseMoney(); + netList.set(0,"-"+cleanLeaseMoney); + } + String irr=""; if("STAGE_IRR".equals(cb.getIrrType())){//IRR BigDecimal issueRate=IRRCalculateUtil.getIRR2(netList); diff --git a/calc/com/tenwa/reckon/help/ConditionHelper.java b/calc/com/tenwa/reckon/help/ConditionHelper.java index 0b1717844..7a7eecc01 100644 --- a/calc/com/tenwa/reckon/help/ConditionHelper.java +++ b/calc/com/tenwa/reckon/help/ConditionHelper.java @@ -81,7 +81,9 @@ public class ConditionHelper { //±ֿ֤ params.put("CAUTION_DEDUCTION_MONEY",cb.getCautionDeductionMoney()); params.put("CAUTION_MONEY_REMAIN",cb.getCautionMoneyRemain()); - + if( "segmented_financing".equals( cb.getSettleMethod() ) ){ + params.put( "COMPREHENSIVE_RATE",cb.getComprehensiveRate() ); + } if ( "Y".equals( cb.getFlexible() ) ) { // Ʒ try { diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION.java index 91fcb6774..8215899cd 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION.java @@ -617,4 +617,9 @@ public interface LC_CALC_CONDITION{ * Ϣ
*/ public static final String DISCOUNT_INTEREST = "DISCOUNT_INTEREST"; + + /** + * ۺ
+ */ + public static final String COMPREHENSIVE_RATE = "COMPREHENSIVE_RATE"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION_HIS.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION_HIS.java index 98a642391..71a6e9af7 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION_HIS.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION_HIS.java @@ -617,4 +617,8 @@ public interface LC_CALC_CONDITION_HIS{ * Ϣ
*/ public static final String DISCOUNT_INTEREST = "DISCOUNT_INTEREST"; + /** + * ۺ
+ */ + public static final String COMPREHENSIVE_RATE = "COMPREHENSIVE_RATE"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION_TEMP.java index c1a894f8e..8b018dbe4 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION_TEMP.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CALC_CONDITION_TEMP.java @@ -617,4 +617,8 @@ public interface LC_CALC_CONDITION_TEMP{ * Ϣ
*/ public static final String DISCOUNT_INTEREST = "DISCOUNT_INTEREST"; + /** + * ۺ
+ */ + public static final String COMPREHENSIVE_RATE = "COMPREHENSIVE_RATE"; } \ No newline at end of file From 33f062ee93aee45335b8aeae846db821f96accb6 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Tue, 31 Aug 2021 11:25:16 +0800 Subject: [PATCH 45/51] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LCCalcSubsectionInfoTempList.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index f41241c95..cefb3c1a8 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -85,7 +85,7 @@ } var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ) ; var minLeaseMoney = getItemValue( 0, getRow(), 'MIN_LEASE_MONEY' ); - if( Number(fcleanLeaseMoney) > Number(maxLeaseMoney) || Number(fcleanLeaseMoney) < Number(minLeaseMoney)){ + if(typeof(fcleanLeaseMoney)!="undefined" && fcleanLeaseMoney.length!=0 && (Number(fcleanLeaseMoney) > Number(maxLeaseMoney) || Number(fcleanLeaseMoney) < Number(minLeaseMoney))){ setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); alert("öεʽڲƷõڣ飡"); @@ -104,7 +104,7 @@ var clm = getItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY' ); var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ); var minLeaseMoney = getItemValue( 0, getRow(), 'MIN_LEASE_MONEY' ); - if( Number(clm) > Number(maxLeaseMoney) || Number(clm) < Number(minLeaseMoney)){ + if(typeof(clm)!="undefined" && clm.length!=0 && ( Number(clm) > Number(maxLeaseMoney) || Number(clm) < Number(minLeaseMoney) )){ setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); alert("öεʽڲƷõڣ飡"); From c51894a2ffd6ee4eacfac1ef44cf5450992043f5 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Thu, 2 Sep 2021 10:22:36 +0800 Subject: [PATCH 46/51] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E5=88=A9=E7=8E=87=E8=AE=A1=E7=AE=97=E5=92=8C=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Accounting/LoanSimulation/LoanBasicInfo.jsp | 2 ++ .../tenwa/reckon/executor/CashFlowExecutor.java | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 2625c1299..09253a440 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -900,8 +900,10 @@ function changeSettleMethod2(){ } document.all( 'A_Group_0020' ).style.display = 'none'; showItem(0,"SUBSECTION_CONDIG",'none'); + showItem(0,"COMPREHENSIVE_RATE",'none'); if ( settleMethod === 'segmented_financing' ) { showItem(0,"SUBSECTION_CONDIG",'block'); + showItem(0,"COMPREHENSIVE_RATE",'block'); document.all( 'A_Group_0020' ).style.display = 'block'; var param = 'CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>'; AsControl.OpenView( '/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp', param, 'subsection_list' ); diff --git a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java index de8795fc7..628782c26 100644 --- a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java +++ b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java @@ -57,10 +57,19 @@ public class CashFlowExecutor { dateList.add(cash.get("PLAN_DATE")); } if ("subsectionRate".equals(calcType) ){ - String cleanLeaseMoney = cb.getCleanLeaseMoney(); - netList.set(0,"-"+cleanLeaseMoney); + String subsectionSql = "select IS_BALANCE_LENDING,DISCOUNT,DISCOUNT_COLLECTION_PERIOD from lc_calc_subsection_info_temp where FLOWUNID='"+tcb.getDocId()+"'"; + List> subsectionData =DataOperatorUtil.getDataBySql(tx, subsectionSql, null); + BigDecimal tempMoney = BigDecimal.ZERO; + int coss = 0; + for (Map subsection :subsectionData) { + String ibl = subsection.get("IS_BALANCE_LENDING"); + if(!"Y".equals(ibl)){ + coss = Integer.parseInt( subsection.get("DISCOUNT_COLLECTION_PERIOD") ); + } + tempMoney = new BigDecimal( netList.get(coss) ); + netList.set(coss, ( tempMoney.subtract( new BigDecimal( subsection.get("DISCOUNT") ) ) ).toString() ); + } } - String irr=""; if("STAGE_IRR".equals(cb.getIrrType())){//IRR BigDecimal issueRate=IRRCalculateUtil.getIRR2(netList); From 5a0f30afcfa0754629e6309c1c8b660c94f2b793 Mon Sep 17 00:00:00 2001 From: yjf <2211675158@qq.com> Date: Thu, 2 Sep 2021 11:26:03 +0800 Subject: [PATCH 47/51] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=94=BE=E6=AC=BE=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp index 7a0d6316b..375d4df2d 100644 --- a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp +++ b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/LBActualPaymentInfoTemp.jsp @@ -43,6 +43,11 @@ setItemValue(0,position,"ACC_NUMBER", sReturn[0]); setItemValue(0,position,"BANK", sReturn[1]); setItemValue(0,position,"ACCOUNT", sReturn[2]); + if (sReturn[1].indexOf('㷢') >= 0) { + setItemValue(0, position, "PAY_MODE", 'cgb'); + } else if (sReturn[1].indexOf('') >= 0) { + setItemValue(0, position, "PAY_MODE", 'cmb'); + } },"ѡ񱾷˻Ϣ"); } From 55c494032fde58c153154efde1afa96672d2eb8b Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Fri, 3 Sep 2021 09:20:54 +0800 Subject: [PATCH 48/51] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E5=89=8D?= =?UTF-8?q?=E7=BB=93=E6=B8=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calc/com/tenwa/reckon/executor/RentCalHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calc/com/tenwa/reckon/executor/RentCalHelper.java b/calc/com/tenwa/reckon/executor/RentCalHelper.java index 599d8de64..591e0c95c 100644 --- a/calc/com/tenwa/reckon/executor/RentCalHelper.java +++ b/calc/com/tenwa/reckon/executor/RentCalHelper.java @@ -142,7 +142,7 @@ public class RentCalHelper { // if(payDayAdjust.compareTo(min) >= 0 && payDayAdjust.compareTo(max) <= 0){ if(payDayAdjust.compareTo(max) <= 0){ //Լֹղѻƻ - checkSql = "select max(rp.plan_date) maxdate from LC_RENT_PLAN rp left join lc_rent_income ci on rp.id=ci.plan_id where ci.id is not null and rp.contract_id = ? and rp.payment_number=?"; + checkSql = "select max(rp.plan_date) maxdate from LC_RENT_PLAN rp left join lc_rent_income ci on rp.id=ci.plan_id where (rp.COLLECT_STATUS <> 'δտ' AND rp.COLLECT_STATUS IS NOT NULL AND LENGTH(rp.COLLECT_STATUS)>0 ) and ci.id is not null and rp.contract_id = ? and rp.payment_number=?"; results = conn.executeQuery(checkSql, this.contractId,this.paymentnumber); String maxDate = results.get(0).get("maxdate"); if(maxDate != null){ From ae4ee4bac8c64519e03daab1036a1c880ea80680 Mon Sep 17 00:00:00 2001 From: yjf <2211675158@qq.com> Date: Fri, 3 Sep 2021 10:14:42 +0800 Subject: [PATCH 49/51] =?UTF-8?q?=E9=93=B6=E8=81=94=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cache/CollectAuditInfoCache.java | 391 ++++++++---------- .../cache/CollectAuditInfoCacheTj.java | 383 ++++++++--------- .../cache/CollectAuditProcess.java | 25 +- .../cache/CollectAuditProcessTj.java | 9 +- 4 files changed, 370 insertions(+), 438 deletions(-) diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java index bf470c5a0..76a562fb8 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java @@ -1,5 +1,36 @@ package com.tenwa.collectaudit.cache; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.amarsoft.app.awe.config.InitCollectConfig; +import com.amarsoft.app.util.StringUtil; +import com.amarsoft.are.jbo.*; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.ASResultSet; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.gnete.security.crypt.Crypt; +import com.gnete.security.crypt.CryptException; +import com.tenwa.comm.util.date.DateAssistant; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.lease.app.allinpay.service.impl.AllinpayPaymentDo; +import com.tenwa.quartz.DateUtil; +import jbo.app.tenwa.calc.LC_COLLECT_MANUAL_INFO; +import jbo.app.tenwa.calc.LC_RENT_INCOME; +import jbo.app.tenwa.calc.LC_RENT_PLAN; +import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT; +import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; +import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO; +import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO; +import jbo.com.tenwa.lease.comm.*; +import jbo.sys.CODE_LIBRARY; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.quartz.JobExecutionContext; +import org.quartz.Scheduler; +import org.quartz.SchedulerException; +import org.quartz.impl.StdSchedulerFactory; + import java.io.File; import java.math.BigDecimal; import java.sql.SQLException; @@ -10,47 +41,9 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.quartz.JobExecutionContext; -import org.quartz.Scheduler; -import org.quartz.SchedulerException; -import org.quartz.impl.StdSchedulerFactory; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.amarsoft.app.awe.config.InitCollectConfig; -import com.amarsoft.app.util.StringUtil; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.are.util.StringFunction; -import com.amarsoft.awe.util.ASResultSet; -import com.amarsoft.awe.util.SqlObject; -import com.amarsoft.awe.util.Transaction; -import com.gnete.security.crypt.Crypt; -import com.gnete.security.crypt.CryptException; -import com.tenwa.comm.util.date.DateAssistant; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.lease.app.allinpay.service.impl.AllinpayPaymentDo; -import com.tenwa.quartz.DateUtil; - -import jbo.app.tenwa.calc.LC_COLLECT_MANUAL_INFO; -import jbo.app.tenwa.calc.LC_RENT_INCOME; -import jbo.app.tenwa.calc.LC_RENT_PLAN; -import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT; -import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; -import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO; -import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO; -import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG; -import jbo.com.tenwa.lease.comm.LB_CLEAR_FILE_RECORD; -import jbo.com.tenwa.lease.comm.LB_INTFACE_FILE_RECORD; -import jbo.com.tenwa.lease.comm.VI_BOND_COMPENSATORY; -import jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN; -import jbo.loan.VI_RENT_COLLECT; -import jbo.sys.CODE_LIBRARY; - public class CollectAuditInfoCache { + + private static Log log = LogFactory.getLog(CollectAuditInfoCache.class); private String id; private String fileSavePath = "d:/tmp/als/InterFace"; @@ -812,13 +805,12 @@ public class CollectAuditInfoCache { } /** - * - + * -(ʱ--) * @param tx * @return * @throws Exception */ public String batchCollectManage(JBOTransaction tx) throws Exception{ - int i = 0,j = 0; String[] ids = id.split("@"); StringBuffer parms = new StringBuffer(); for (String str : ids) { @@ -829,10 +821,9 @@ public class CollectAuditInfoCache { } } BizObjectManager bm = JBOFactory.getFactory().getManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME); - BizObjectManager bc = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME); //ڵݽв - List bolist = bm.createQuery("select distinct O.contract_id,O.plan_date,O.id,ca.ACC_NUMBER,ca.ACCOUNT,ca.BANK_NAME,O.rent from O , jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca where O.contract_id=ca.contract_id and ca.acc_type = 'Debit' and O.id in ("+parms.toString()+")").getResultList(false); - if (bolist.size() != 0) { + List bolist = bm.createQuery("select distinct O.contract_id,O.plan_date,O.id,ca.ACC_NUMBER,ca.ACCOUNT,ca.BANK_NAME,O.rent from O , jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca where O.contract_id=ca.contract_id and ca.acc_type = 'Debit' and O.id in (" + parms.toString() + ")").getResultList(false); + if (bolist.size() > 0) { singleBatchCollectMoeny(tx, bolist); } return "ϵͳڴУԺ"; @@ -1008,7 +999,7 @@ public class CollectAuditInfoCache { } for (int i = 1; i <= snArray.length; i++) { - + log.warn("ShenZhen counteroffer batch_no:"+query_sn+" batch_sn:"+snArray[(i-1)]+" rentid:"+bo.getAttribute("id").toString()); Map map = querySingleBatchCollect(tx, bo, query_sn, snArray[(i-1)]); if(map == null ) { continue; @@ -1337,7 +1328,7 @@ public class CollectAuditInfoCache { return strbuff; } /** - * - + * -(װ,100001ӿ,ƻbatch_status״̬) * @param tx * @param bc * @param bo @@ -1352,37 +1343,46 @@ public class CollectAuditInfoCache { String currentYear = currentDateTime.substring(0,4); String month = currentDateTime.substring(5,7); String day = currentDateTime.substring(8,10); - String merchantNumber = InitCollectConfig.MERCHANTID; - String flag = InitCollectConfig.FLAG; - String version = InitCollectConfig.C_VERSION; + String merchantNumber = InitCollectConfig.MERCHANTID;//̻ + String flag = InitCollectConfig.FLAG;//ӿ--ձʶ + String version = InitCollectConfig.C_VERSION;//ӿڰ汾 String date = currentYear+month+day;//ύ - String batch_title = ""; - int i = 0,j = 0; - //ļ· - String rootDir = this.fileSavePath; - File file = new File(rootDir + File.separator + currentYear - + File.separator + month + File.separator + //ļ· + File file = new File( this.fileSavePath+ File.separator + currentYear + File.separator + month + File.separator + day); - System.out.println(file.getAbsolutePath()); - if(!file.exists()){//Ŀ¼ֱӴ - file.mkdirs(); - } - String req_sn = System.currentTimeMillis()+"";//κ - batch_title = merchantNumber+"_"+flag+version+date+"_"+req_sn; + //Ŀ¼ֱӴ + if(!file.exists()) file.mkdirs(); + + String req_sn = System.currentTimeMillis()+"";//κ REQ_SN + //ļ + String batch_title = merchantNumber+"_"+flag+version+date+"_"+req_sn; + //۱ StringBuffer strbuff = collectBatch(req_sn,list); - //Ӧ - String strResp = cp.CollectAuditPayReq(strbuff,file.getAbsolutePath(), batch_title); - for (BizObject bo : list) { - //ɴ̡ļ - savaFile(tx, strResp,batch_title,bo); + //ӿڵ,Ӧ + String strResp = ""; + try { + strResp = cp.CollectAuditPayReq(strbuff,file.getAbsolutePath(), batch_title); + }catch (Exception e){ + JBOTransaction jboTransaction = null; + try { + String rentIds = getRentIds(list); + jboTransaction = JBOFactory.createJBOTransaction(); + Transaction.createTransaction(jboTransaction).executeSQL("update lc_rent_plan set batch_sn=null where id in ('" + rentIds + "')"); + jboTransaction.commit(); + }catch (Exception e1){ + if (jboTransaction != null) jboTransaction.rollback(); + e1.printStackTrace(); + } + throw new RuntimeException("ӿڵ쳣:", e); } + //ɴ̡ļ(,־LB_INTFACE_FILE_RECORD.RELA_ID 洢κ) + BizObject bo = new BizObject("jbo.app.tenwa.calc.LC_RENT_PLAN"); + bo.setAttributeValue("id",req_sn); + savaFile(tx, strResp,batch_title,bo); + //Ӧ Map map = getRetAndCodeByBatch(strResp); if (map.containsKey("RET_CODE")) {//״̬ - StringBuilder updateIds = new StringBuilder(); - for (BizObject biz : list) { - updateIds.append(biz.getAttribute("id").toString()).append("','"); - } - String updateIdsStr = updateIds.delete(updateIds.length() - 3, updateIds.length()).toString(); + String updateIdsStr = getRentIds(list); //״̬ BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME); bm.createQuery("update O set O.BATCH_STATUS=null,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=null where O.id in ('" + updateIdsStr + "')") @@ -1398,31 +1398,37 @@ public class CollectAuditInfoCache { JBOTransaction trans = null; try { trans = JBOFactory.createJBOTransaction(); - BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME, trans); - BizObject bo0 = bm.createQuery("O.BATCH_NO=:BATCH_NO and O.BATCH_SN like '%" + map.get("SN" + k) + "%'").setParameter("BATCH_NO", map.get("REQ_SN")).getSingleResult(true); - if (bo0 != null && "process".equals(bo0.getAttribute("BATCH_STATUS").getString())) { - continue; - } - //Ӧɹ - if (map.containsKey("REQ_SN") && map.containsKey("RET_CODE" + k) && "0000".equals(map.get("RET_CODE" + k))) { - bo0.setAttributeValue("BATCH_STATUS", "process"); - } else {//Ӧ쳣 - bo0.setAttributeValue("BATCH_STATUS", null); - bo0.setAttributeValue("BATCH_NO", null); - bo0.setAttributeValue("BATCH_SN", null); - } - bm.saveObject(bo0); + Transaction sqlCa = Transaction.createTransaction(trans); + SqlObject sqlObject = new SqlObject("update lc_rent_plan lrp join lb_union_middle lum on lrp.id = lum.rent_id set lrp.batch_status = 'process' " + + " where lum.batch_no =:batchNo and lum.batch_sn =:batchSn") + .setParameter("batchNo",map.get("REQ_SN")).setParameter("batchSn", map.get("SN" + k)); + sqlCa.executeSQL(sqlObject); } catch (Exception e) { - e.printStackTrace(); + log.error("ShenZhenBuckle process status update exception ",e); if (trans != null) trans.rollback(); } finally { + log.warn("ShenZhenBuckle process status update -- batch_no:"+map.get("REQ_SN")+" batch_sn:"+map.get("SN" + k)); if (trans != null) trans.commit(); } } } return map; } - + + /** + * ȡƻids + * @param list + * @return + * @throws JBOException + */ + private String getRentIds(List list) throws JBOException { + StringBuilder updateIds = new StringBuilder(); + for (BizObject biz : list) { + updateIds.append(biz.getAttribute("id").toString()).append("','"); + } + return updateIds.delete(updateIds.length() - 3, updateIds.length()).toString(); + } + /** * --ƴ * @param rent @@ -1434,7 +1440,6 @@ public class CollectAuditInfoCache { */ public StringBuffer collectBatch(String req_sn,List list) throws JBOException{ //ƴXML - //String req = System.currentTimeMillis()+""; StringBuffer strbuff = new StringBuffer(); strbuff.append(""); strbuff.append(""); @@ -1452,32 +1457,32 @@ public class CollectAuditInfoCache { strbuff.append(""); strbuff.append(""); strbuff.append(""); - BigDecimal mutly = new BigDecimal("0"); + BigDecimal mutly = new BigDecimal("0");//ܽ int i = 0; + //ѯ޶ itemname<> itemdescribe<޶> + List codelist = JBOFactory.getFactory().getBizObjectManager(CODE_LIBRARY.CLASS_NAME).createQuery("O.codeno = 'bankType' and O.itemdescribe is not null ").getResultList(false); + //㿨ܽ, for (BizObject bo : list) { String single = bo.getAttribute("rent").toString(); BigDecimal m = new BigDecimal(single); mutly = mutly.add(m); String bank_name = bo.getAttribute("BANK_NAME").toString(); - List codelist = JBOFactory.getFactory().getBizObjectManager(CODE_LIBRARY.CLASS_NAME).createQuery("O.codeno = 'bankType' and O.itemdescribe is not null ").getResultList(false); - //ֵеitemdescribeֶδе - double itemdescribe = 0; + + BigDecimal itemdescribe = new BigDecimal("0"); boolean flag = false; for (BizObject code : codelist) { String itemnameTmp = code.getAttribute("itemname").toString().trim(); - double itemdescribeTmp = code.getAttribute("itemdescribe").getDouble(); String itemdescribeTmp1 = code.getAttribute("itemdescribe").toString(); if (bank_name.indexOf(itemnameTmp) != -1 && itemdescribeTmp1 != null && !"".equals(itemdescribeTmp1)) { - itemdescribe = new BigDecimal(itemdescribeTmp).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); + itemdescribe = new BigDecimal(itemdescribeTmp1).setScale(2, BigDecimal.ROUND_HALF_UP); flag = true; break; } } - - if (flag == true && Double.parseDouble(bo.getAttribute("rent").toString()) > itemdescribe) { + if (flag == true && m.compareTo(itemdescribe) == 1) { BigDecimal mi = new BigDecimal(bo.getAttribute("rent").toString()); int singlerent = mi.multiply(new BigDecimal(100)).intValue(); - int singleitem = new BigDecimal(itemdescribe).multiply(new BigDecimal(100)).intValue(); + int singleitem = itemdescribe.multiply(new BigDecimal(100)).intValue(); int k = (int) Math.floor(singlerent/singleitem); int l = (int) Math.ceil(singlerent%singleitem); for (int j = 0; j < k; j++) { @@ -1489,8 +1494,8 @@ public class CollectAuditInfoCache { }else{ i++; } - } + String totalSum = String.valueOf(mutly.multiply(new BigDecimal(100)).longValue()); String totalItem = String.valueOf(i); Trans_Sum trans_sum = new Trans_Sum(); @@ -1510,27 +1515,23 @@ public class CollectAuditInfoCache { String account = biz.getAttribute("account").toString(); String bank_name = biz.getAttribute("BANK_NAME").toString(); String planId = biz.getAttribute("id").toString(); - List codelist = JBOFactory.getFactory().getBizObjectManager(CODE_LIBRARY.CLASS_NAME).createQuery("O.codeno = 'bankType' and O.itemdescribe is not null ").getResultList(false); - double itemdescribe = 0; + BigDecimal itemdescribe = new BigDecimal("0"); boolean flag = false; for (BizObject code : codelist) { String itemnameTmp = code.getAttribute("itemname").toString().trim(); - double itemdescribeTmp = code.getAttribute("itemdescribe").getDouble(); String itemdescribeTmp1 = code.getAttribute("itemdescribe").toString(); if (bank_name.indexOf(itemnameTmp) != -1 && itemdescribeTmp1 != null && !"".equals(itemdescribeTmp1)) { - itemdescribe = new BigDecimal(itemdescribeTmp).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); + itemdescribe = new BigDecimal(itemdescribeTmp1).setScale(2, BigDecimal.ROUND_HALF_UP); flag = true; break; } } - - if (flag == true && Double.parseDouble(biz.getAttribute("rent").toString()) > itemdescribe) { + if (flag == true && m.compareTo(itemdescribe) == 1) { BigDecimal mi = new BigDecimal(biz.getAttribute("rent").toString()); int singlerent = mi.multiply(new BigDecimal(100)).intValue(); - int singleitem = new BigDecimal(itemdescribe).multiply(new BigDecimal(100)).intValue(); + int singleitem = itemdescribe.multiply(new BigDecimal(100)).intValue(); int k = (int) Math.floor(singlerent/singleitem); int l = (int) Math.ceil(singlerent%singleitem); - for (int k2 = 1; k2 <= k; k2++) { Trans_Detail trans_detail = new Trans_Detail(); String sn = ""; @@ -1541,48 +1542,7 @@ public class CollectAuditInfoCache { }else{ sn = "0000"+ (++item); } - //׷״̬ - JBOTransaction trans = JBOFactory.createJBOTransaction(); - BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME); - BizObject bo = bm.createQuery("O.id=:id").setParameter("id", planId).getSingleResult(false); - String itemsn0 = ""; - if (bo !=null) { - String itemsn = bo.getAttribute("batch_sn").toString(); - if (itemsn.length() == 0) { - itemsn0 += sn; - }else{ - itemsn0 += itemsn+","+sn; - } - } - bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id") - .setParameter("BATCH_STATUS", "")//״̬-Ϊ - .setParameter("BATCH_NO", req_sn) - .setParameter("BATCH_SN", itemsn0) - .setParameter("id", planId).executeUpdate(); - //ֶӵֶ - if("manual".equals(collectStyle)){ - JBOTransaction transj = JBOFactory.createJBOTransaction(); - BizObjectManager bmlcmi = JBOFactory.getFactory().getManager(LC_COLLECT_MANUAL_INFO.CLASS_NAME,transj); - if(k2==1){ - BizObject bolmci = bmlcmi.newObject(); - bolmci.setAttributeValue("contract_id",biz.getAttribute("contract_id").toString()); - bolmci.setAttributeValue("plan_id",planId); - bolmci.setAttributeValue("BATCH_NO",req_sn); - bolmci.setAttributeValue("BATCH_SN",itemsn0); - bolmci.setAttributeValue("money",biz.getAttribute("rent").toString()); - bolmci.setAttributeValue("hire_date",DateUtil.getSystemTimeByFormat("yyyy/MM/dd")); - bmlcmi.saveObject(bolmci); - transj.commit(); - }else{ - bmlcmi.createQuery("update O set O.BATCH_SN=:BATCH_SN where O.plan_id=:id and O.BATCH_NO=:BATCH_NO") - .setParameter("BATCH_SN", itemsn0) - .setParameter("BATCH_NO", req_sn) - .setParameter("id", planId).executeUpdate(); - transj.commit(); - } - - } - trans.commit(); + rentPlanHandle(planId,req_sn,sn,biz,k2,String.valueOf(singleitem));//׷״̬ trans_detail.setSN(sn); trans_detail.setACCOUNT_TYPE(""); trans_detail.setACCOUNT_NO(acc_number); @@ -1594,8 +1554,7 @@ public class CollectAuditInfoCache { strbuff.append(EntityTransform.toXmlByBatchCollect(trans_detail)); } if (l != 0) { - String surprent = String.format("%.2f", biz.getAttribute("rent").getDouble() - k*itemdescribe); - BigDecimal mj = new BigDecimal(surprent); + BigDecimal mj = mi.subtract(itemdescribe.multiply(new BigDecimal(k))).setScale(2, BigDecimal.ROUND_HALF_UP); String singlerent0 = String.valueOf(mj.multiply(new BigDecimal(100)).longValue()); Trans_Detail trans_detail = new Trans_Detail(); String sn = ""; @@ -1606,35 +1565,7 @@ public class CollectAuditInfoCache { }else{ sn = "0000"+ (++item); } - //׷״̬ - JBOTransaction trans = JBOFactory.createJBOTransaction(); - BizObjectManager bmlcmi = JBOFactory.getFactory().getManager(LC_COLLECT_MANUAL_INFO.CLASS_NAME,trans); - BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans); - BizObject bo = bm.createQuery("O.id=:id").setParameter("id", planId).getSingleResult(false); - String itemsn0 = ""; - if (bo !=null) { - String itemsn = bo.getAttribute("batch_sn").toString(); - if (itemsn.length() == 0) { - itemsn0 += sn; - }else{ - itemsn0 += itemsn+","+sn; - } - } - bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id") - .setParameter("BATCH_STATUS", "")//״̬-Ϊ - .setParameter("BATCH_NO", req_sn) - .setParameter("BATCH_SN", itemsn0) - .setParameter("id", planId).executeUpdate(); - //ӵֶ - if("manual".equals(collectStyle)){ - JBOTransaction transj = JBOFactory.createJBOTransaction(); - bmlcmi.createQuery("update O set O.BATCH_SN=:BATCH_SN where O.plan_id=:id and O.BATCH_NO=:BATCH_NO") - .setParameter("BATCH_SN", itemsn0) - .setParameter("BATCH_NO", req_sn) - .setParameter("id", planId).executeUpdate(); - transj.commit(); - } - trans.commit(); + rentPlanHandle(planId,req_sn,sn,biz,99,singlerent0);//׷״̬ trans_detail.setSN(sn); trans_detail.setACCOUNT_TYPE(""); trans_detail.setACCOUNT_NO(acc_number); @@ -1656,27 +1587,7 @@ public class CollectAuditInfoCache { }else{ sn = "0000"+ (++item); } - //׷״̬ - JBOTransaction trans = JBOFactory.createJBOTransaction(); - BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans); - bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id") - .setParameter("BATCH_STATUS", "")//״̬-Ϊ - .setParameter("BATCH_NO", req_sn) - .setParameter("BATCH_SN", sn) - .setParameter("id", planId).executeUpdate(); - //ֶӵֶ - if("manual".equals(collectStyle)){ - BizObjectManager bmlcmi = JBOFactory.getFactory().getManager(LC_COLLECT_MANUAL_INFO.CLASS_NAME,trans); - BizObject bolmci = bmlcmi.newObject(); - bolmci.setAttributeValue("contract_id",biz.getAttribute("contract_id").toString()); - bolmci.setAttributeValue("plan_id",planId); - bolmci.setAttributeValue("BATCH_NO",req_sn); - bolmci.setAttributeValue("BATCH_SN",sn); - bolmci.setAttributeValue("money",biz.getAttribute("rent").toString()); - bolmci.setAttributeValue("hire_date",DateUtil.getSystemTimeByFormat("yyyy/MM/dd")); - bmlcmi.saveObject(bolmci); - } - trans.commit(); + rentPlanHandle(planId,req_sn,sn,biz,1,rent);//׷״̬ trans_detail.setSN(sn); trans_detail.setACCOUNT_TYPE(""); trans_detail.setACCOUNT_NO(acc_number); @@ -1693,9 +1604,72 @@ public class CollectAuditInfoCache { strbuff.append(""); strbuff.append(""); collectStyle=null; - return strbuff; } + + + /** + * ƻ batch_no batch_sn ,ֹ۵ģֹۼ¼ + * @param planId ƻid + * @param req_sn κ + * @param sn + * @param biz + * @param k2 k2==1 ֹ۲,ֹ۱ + * @throws Exception + */ + private void rentPlanHandle(String planId,String req_sn,String sn,BizObject biz,int k2,String amount) throws JBOException{ + //׷״̬ + JBOTransaction trans = null; + try{ + trans = JBOFactory.createJBOTransaction(); + Transaction transaction = Transaction.createTransaction(trans); + BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME); + BizObject bo = bm.createQuery("O.id=:id").setParameter("id", planId).getSingleResult(false); + String itemsn0 = ""; + if (bo !=null) { + String itemsn = bo.getAttribute("batch_sn").toString(); + if (itemsn.length() == 0) { + itemsn0 += sn; + }else{ + itemsn0 += itemsn+","+sn; + } + } + //κ + bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id") + .setParameter("BATCH_STATUS", "")//״̬-Ϊ + .setParameter("BATCH_NO", req_sn) + .setParameter("BATCH_SN", itemsn0) + .setParameter("id", planId).executeUpdate(); + //¼м lb_union_middle + SqlObject sqlObject = new SqlObject("insert into lb_union_middle (id,batch_no,batch_sn,rent_id,amount,input_time) values (replace(uuid(),'-',''),:batchNo,:batchSn,:rentId,:amount,SYSDATE()) ") + .setParameter("batchNo", req_sn).setParameter("batchSn", sn) + .setParameter("rentId", planId).setParameter("amount",amount); + transaction.executeSQL(sqlObject); + //ֶӵֶ + if("manual".equals(collectStyle)){ + BizObjectManager bmlcmi = JBOFactory.getFactory().getManager(LC_COLLECT_MANUAL_INFO.CLASS_NAME,trans); + if(k2==1){ + BizObject bolmci = bmlcmi.newObject(); + bolmci.setAttributeValue("contract_id",biz.getAttribute("contract_id").toString()); + bolmci.setAttributeValue("plan_id",planId); + bolmci.setAttributeValue("BATCH_NO",req_sn); + bolmci.setAttributeValue("BATCH_SN",itemsn0); + bolmci.setAttributeValue("money",biz.getAttribute("rent").toString()); + bolmci.setAttributeValue("hire_date",DateUtil.getSystemTimeByFormat("yyyy/MM/dd")); + bmlcmi.saveObject(bolmci); + }else{ + bmlcmi.createQuery("update O set O.BATCH_SN=:BATCH_SN where O.plan_id=:id and O.BATCH_NO=:BATCH_NO") + .setParameter("BATCH_SN", itemsn0) + .setParameter("BATCH_NO", req_sn) + .setParameter("id", planId).executeUpdate(); + } + } + trans.commit(); + }catch (Exception e){ + if (trans != null) trans.rollback(); + throw new JBOException(e.getMessage()); + } + } /** * ̡ļ @@ -1712,13 +1686,9 @@ public class CollectAuditInfoCache { String day = currentDateTime.substring(8,10); //ļ· String rootDir = this.fileSavePath; - File file = new File(rootDir + File.separator + currentYear - + File.separator + month + File.separator - + day); - System.out.println(file.getAbsolutePath()); - if(!file.exists()){//Ŀ¼ֱӴ - file.mkdirs(); - } + File file = new File(rootDir + File.separator + currentYear + File.separator + month + File.separator + day); + //Ŀ¼ֱӴ + if(!file.exists())file.mkdirs(); //ļ BizObjectManager bm = JBOFactory.getFactory().getManager(LB_INTFACE_FILE_RECORD.CLASS_NAME); BizObject send = bm.newObject(); @@ -1731,9 +1701,9 @@ public class CollectAuditInfoCache { send.setAttributeValue("inputorgid", this.inputorgid); send.setAttributeValue("inputtime", currentDateTime); bm.saveObject(send); + //ɸѡӦϢ Map map = getRetAndCode(strResp); - //getMsgAndCode(strResp); //ļ BizObject reply = bm.newObject(); @@ -1795,7 +1765,6 @@ public class CollectAuditInfoCache { public Map getRetAndCodeByBatch(String strXML){ Map map = new HashMap(); Map res = new HashMap(); - System.out.println(1); int iStart = strXML.indexOf(""); if (iStart != -1) { int end = strXML.indexOf(""); diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java index 16c5e87dc..9811957a5 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java @@ -1,5 +1,34 @@ package com.tenwa.collectaudit.cache; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.amarsoft.app.awe.config.InitCollectConfigTj; +import com.amarsoft.are.jbo.*; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.ASResultSet; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.gnete.security.crypt.CryptException; +import com.tenwa.comm.util.date.DateAssistant; +import com.tenwa.lease.app.allinpay.service.impl.AllinpayPaymentDo; +import com.tenwa.quartz.DateUtil; +import jbo.app.tenwa.calc.LC_COLLECT_MANUAL_INFO; +import jbo.app.tenwa.calc.LC_RENT_INCOME; +import jbo.app.tenwa.calc.LC_RENT_PLAN; +import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; +import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO; +import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO; +import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG; +import jbo.com.tenwa.lease.comm.LB_INTFACE_FILE_RECORD; +import jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN; +import jbo.sys.CODE_LIBRARY; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.quartz.JobExecutionContext; +import org.quartz.Scheduler; +import org.quartz.SchedulerException; +import org.quartz.impl.StdSchedulerFactory; + import java.io.File; import java.math.BigDecimal; import java.sql.SQLException; @@ -10,46 +39,10 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.quartz.JobExecutionContext; -import org.quartz.Scheduler; -import org.quartz.SchedulerException; -import org.quartz.impl.StdSchedulerFactory; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.amarsoft.app.awe.config.InitCollectConfigTj; -import com.amarsoft.app.util.StringUtil; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.are.util.StringFunction; -import com.amarsoft.awe.util.ASResultSet; -import com.amarsoft.awe.util.SqlObject; -import com.amarsoft.awe.util.Transaction; -import com.gnete.security.crypt.Crypt; -import com.gnete.security.crypt.CryptException; -import com.tenwa.comm.util.date.DateAssistant; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.lease.app.allinpay.service.impl.AllinpayPaymentDo; -import com.tenwa.quartz.DateUtil; - -import jbo.app.tenwa.calc.LC_COLLECT_MANUAL_INFO; -import jbo.app.tenwa.calc.LC_RENT_INCOME; -import jbo.app.tenwa.calc.LC_RENT_PLAN; -import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT; -import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; -import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO; -import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO; -import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG; -import jbo.com.tenwa.lease.comm.LB_CLEAR_FILE_RECORD; -import jbo.com.tenwa.lease.comm.LB_INTFACE_FILE_RECORD; -import jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN; -import jbo.sys.CODE_LIBRARY; - public class CollectAuditInfoCacheTj { - + + private static Log log = LogFactory.getLog(CollectAuditInfoCacheTj.class); + private String id; private String fileSavePath = "d:/tmp/als/InterFace"; private String inputuserid; @@ -1006,7 +999,7 @@ public class CollectAuditInfoCacheTj { } for (int i = 1; i <= snArray.length; i++) { - + log.warn("TianJin counteroffer batch_no:"+query_sn+" batch_sn:"+snArray[(i-1)]+" rentid:"+bo.getAttribute("id").toString()); Map map = querySingleBatchCollect(tx, bo, query_sn, snArray[(i-1)]); if(map == null ) { continue; @@ -1350,39 +1343,45 @@ public class CollectAuditInfoCacheTj { String currentYear = currentDateTime.substring(0,4); String month = currentDateTime.substring(5,7); String day = currentDateTime.substring(8,10); - String merchantNumber = InitCollectConfigTj.MERCHANTID; - String flag = InitCollectConfigTj.FLAG; - String version = InitCollectConfigTj.C_VERSION; + String merchantNumber = InitCollectConfigTj.MERCHANTID;//̻ + String flag = InitCollectConfigTj.FLAG;//ӿ--ձʶ + String version = InitCollectConfigTj.C_VERSION;//ӿڰ汾 String date = currentYear+month+day;//ύ - String batch_title = ""; - int i = 0,j = 0; //ļ· - String rootDir = this.fileSavePath; - File file = new File(rootDir + File.separator + currentYear - + File.separator + month + File.separator - + day); - System.out.println(file.getAbsolutePath()); - if(!file.exists()){//Ŀ¼ֱӴ - file.mkdirs(); - } - String req_sn = System.currentTimeMillis()+"";//κ - batch_title = merchantNumber+"_"+flag+version+date+"_"+req_sn; - //(޶) + File file = new File(this.fileSavePath + File.separator + currentYear + File.separator + month + File.separator + day); + //Ŀ¼ֱӴ + if (!file.exists()) file.mkdirs(); + String req_sn = System.currentTimeMillis()+""; //κ REQ_SN + //ļ + String batch_title = merchantNumber+"_"+flag+version+date+"_"+req_sn; + //۱ StringBuffer strbuff = collectBatch(req_sn,list); - //Ӧ - String strResp = cp.CollectAuditPayReq(strbuff,file.getAbsolutePath(), batch_title); - for (BizObject bo : list) { - //ɴ̡ļ - savaFile(tx, strResp,batch_title,bo); + //ӿڵ,Ӧ + String strResp = ""; + try { + strResp = cp.CollectAuditPayReq(strbuff,file.getAbsolutePath(), batch_title); + }catch (Exception e){ + JBOTransaction jboTransaction = null; + try { + String rentIds = getRentIds(list); + jboTransaction = JBOFactory.createJBOTransaction(); + Transaction.createTransaction(jboTransaction).executeSQL("update lc_rent_plan set batch_sn=null where id in ('" + rentIds + "')"); + jboTransaction.commit(); + }catch (Exception e1){ + if (jboTransaction != null) jboTransaction.rollback(); + e1.printStackTrace(); + } + throw new RuntimeException("ӿڵ쳣:", e); } + //ɴ̡ļ(,־LB_INTFACE_FILE_RECORD.RELA_ID 洢κ) + BizObject bo = new BizObject("jbo.app.tenwa.calc.LC_RENT_PLAN"); + bo.setAttributeValue("id",req_sn); + savaFile(tx, strResp,batch_title,bo); + //Ӧ Map map = getRetAndCodeByBatch(strResp); //RET_CODE˵Ӧûгɹ if (map.containsKey("RET_CODE")) {//״̬ - StringBuilder updateIds = new StringBuilder(); - for (BizObject biz : list) { - updateIds.append(biz.getAttribute("id").toString()).append("','"); - } - String updateIdsStr = updateIds.delete(updateIds.length() - 3, updateIds.length()).toString(); + String updateIdsStr = getRentIds(list); //״̬ BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME); bm.createQuery("update O set O.BATCH_STATUS=null,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=null where O.id in ('" + updateIdsStr + "')") @@ -1395,34 +1394,40 @@ public class CollectAuditInfoCacheTj { m++; } } - for (int k = 1; k <= m; k++) { - JBOTransaction trans = null; - try { - trans = JBOFactory.createJBOTransaction(); - BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME, trans); - BizObject bo0 = bm.createQuery("O.BATCH_NO=:BATCH_NO and O.BATCH_SN like '%" + map.get("SN" + k) + "%'").setParameter("BATCH_NO", map.get("REQ_SN")).getSingleResult(true); - if (bo0 != null && "process".equals(bo0.getAttribute("BATCH_STATUS").getString())) { - continue; - } - //Ӧɹ - if (map.containsKey("REQ_SN") && map.containsKey("RET_CODE" + k) && "0000".equals(map.get("RET_CODE" + k))) { - bo0.setAttributeValue("BATCH_STATUS", "process"); - } else {//Ӧ쳣 - bo0.setAttributeValue("BATCH_STATUS", null); - bo0.setAttributeValue("BATCH_NO", null); - bo0.setAttributeValue("BATCH_SN", null); - } - bm.saveObject(bo0); - } catch (Exception e) { - e.printStackTrace(); - if (trans != null) trans.rollback(); - } finally { - if (trans != null) trans.commit(); - } - } + for (int k = 1; k <= m; k++) { + JBOTransaction trans = null; + try { + trans = JBOFactory.createJBOTransaction(); + Transaction sqlCa = Transaction.createTransaction(trans); + SqlObject sqlObject = new SqlObject("update lc_rent_plan lrp join lb_union_middle lum on lrp.id = lum.rent_id set lrp.batch_status = 'process' " + + " where lum.batch_no =:batchNo and lum.batch_sn =:batchSn") + .setParameter("batchNo", map.get("REQ_SN")).setParameter("batchSn", map.get("SN" + k)); + sqlCa.executeSQL(sqlObject); + } catch (Exception e) { + log.error("TianjinBuckle process status update exception ", e); + if (trans != null) trans.rollback(); + } finally { + log.warn("TianjinBuckle process status update -- batch_no:" + map.get("REQ_SN") + " batch_sn:" + map.get("SN" + k)); + if (trans != null) trans.commit(); + } + } } return map; } + + /** + * ȡƻids + * @param list + * @return + * @throws JBOException + */ + private String getRentIds(List list) throws JBOException { + StringBuilder updateIds = new StringBuilder(); + for (BizObject biz : list) { + updateIds.append(biz.getAttribute("id").toString()).append("','"); + } + return updateIds.delete(updateIds.length() - 3, updateIds.length()).toString(); + } /** * --ƴ @@ -1435,7 +1440,6 @@ public class CollectAuditInfoCacheTj { */ public StringBuffer collectBatch(String req_sn,List list) throws JBOException{ //ƴXML - //String req = System.currentTimeMillis()+""; StringBuffer strbuff = new StringBuffer(); strbuff.append(""); strbuff.append(""); @@ -1453,17 +1457,17 @@ public class CollectAuditInfoCacheTj { strbuff.append(""); strbuff.append(""); strbuff.append(""); - //ܽ - BigDecimal mutly = new BigDecimal("0"); - // - int i = 0; + BigDecimal mutly = new BigDecimal("0");//ܽ + int i = 0;// + //ѯ޶ itemname<> itemdescribe<޶> + List codelist = JBOFactory.getFactory().getBizObjectManager(CODE_LIBRARY.CLASS_NAME).createQuery("O.codeno = 'TjbankType' and O.itemdescribe is not null ").getResultList(false); + //㿨ܽ, for (BizObject bo : list) { String single_s = bo.getAttribute("rent").toString(); BigDecimal m_s = new BigDecimal(single_s); mutly = mutly.add(m_s); String bank_name = bo.getAttribute("BANK_NAME").toString(); - List codelist = JBOFactory.getFactory().getBizObjectManager(CODE_LIBRARY.CLASS_NAME).createQuery("O.codeno = 'TjbankType' and O.itemdescribe is not null ").getResultList(false); - //ֵеitemdescribeֶδе + //ֵеitemdescribeֶδе BigDecimal itemdescribe = new BigDecimal("0"); boolean flag = false; for (BizObject code : codelist) { @@ -1475,9 +1479,8 @@ public class CollectAuditInfoCacheTj { break; } } - if (flag == true && m_s.compareTo(itemdescribe)==1) { - BigDecimal mi_s = m_s; - int singlerent = mi_s.multiply(new BigDecimal(100)).intValue(); + if (flag == true && m_s.compareTo(itemdescribe) == 1) { + int singlerent = m_s.multiply(new BigDecimal(100)).intValue(); int singleitem = itemdescribe.multiply(new BigDecimal(100)).intValue(); int k = singlerent/singleitem; int l = singlerent%singleitem; @@ -1490,7 +1493,6 @@ public class CollectAuditInfoCacheTj { }else{ i++; } - } String totalSum = String.valueOf(mutly.multiply(new BigDecimal(100)).longValue()); String totalItem = String.valueOf(i); @@ -1511,7 +1513,6 @@ public class CollectAuditInfoCacheTj { String account = biz.getAttribute("account").toString(); String bank_name = biz.getAttribute("BANK_NAME").toString(); String planId = biz.getAttribute("id").toString(); - List codelist = JBOFactory.getFactory().getBizObjectManager(CODE_LIBRARY.CLASS_NAME).createQuery("O.codeno = 'TjbankType' and O.itemdescribe is not null ").getResultList(false); BigDecimal itemdescribe = new BigDecimal("0"); boolean flag = false; for (BizObject code : codelist) { @@ -1524,8 +1525,7 @@ public class CollectAuditInfoCacheTj { } } if (flag == true && m.compareTo(itemdescribe)==1) { - BigDecimal mi = m; - int singlerent = mi.multiply(new BigDecimal(100)).intValue(); + int singlerent = m.multiply(new BigDecimal(100)).intValue(); int singleitem = itemdescribe.multiply(new BigDecimal(100)).intValue(); int k = singlerent/singleitem; int l = singlerent%singleitem; @@ -1543,48 +1543,7 @@ public class CollectAuditInfoCacheTj { }else{ sn = "" + (++item); } - //׷״̬ - JBOTransaction trans = JBOFactory.createJBOTransaction(); - BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans); - BizObject bo = bm.createQuery("O.id=:id").setParameter("id", biz.getAttribute("id").toString()).getSingleResult(false); - String itemsn0 = ""; - if (bo !=null) { - String itemsn = bo.getAttribute("batch_sn").toString(); - if (itemsn.length() == 0) { - itemsn0 += sn; - }else{ - itemsn0 += itemsn+","+sn; - } - } - bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id") - .setParameter("BATCH_STATUS", "")//״̬-Ϊ - .setParameter("BATCH_NO", req_sn) - .setParameter("BATCH_SN", itemsn0) - .setParameter("id", biz.getAttribute("id").toString()).executeUpdate(); - //ֶӵֶ - if("manual".equals(collectStyle)){ - JBOTransaction transj = JBOFactory.createJBOTransaction(); - BizObjectManager bmlcmi = JBOFactory.getFactory().getManager(LC_COLLECT_MANUAL_INFO.CLASS_NAME,transj); - if(k2==1){ - BizObject bolmci = bmlcmi.newObject(); - bolmci.setAttributeValue("contract_id",biz.getAttribute("contract_id").toString()); - bolmci.setAttributeValue("plan_id",planId); - bolmci.setAttributeValue("BATCH_NO",req_sn); - bolmci.setAttributeValue("BATCH_SN",itemsn0); - bolmci.setAttributeValue("money",biz.getAttribute("rent").toString()); - bolmci.setAttributeValue("hire_date",DateUtil.getSystemTimeByFormat("yyyy/MM/dd")); - bmlcmi.saveObject(bolmci); - transj.commit(); - }else{ - bmlcmi.createQuery("update O set O.BATCH_SN=:BATCH_SN where O.plan_id=:id and O.BATCH_NO=:BATCH_NO") - .setParameter("BATCH_SN", itemsn0) - .setParameter("BATCH_NO", req_sn) - .setParameter("id", planId).executeUpdate(); - transj.commit(); - } - - } - trans.commit(); + rentPlanHandle(planId,req_sn,sn,biz,k2,String.valueOf(singleitem));//׷״̬ trans_detail.setSN(sn); trans_detail.setACCOUNT_TYPE(""); trans_detail.setACCOUNT_NO(acc_number); @@ -1596,7 +1555,7 @@ public class CollectAuditInfoCacheTj { strbuff.append(EntityTransform.toXmlByBatchCollect(trans_detail)); } if (l != 0) { - BigDecimal mj = mi.subtract(itemdescribe.multiply(new BigDecimal(k))).setScale(2, BigDecimal.ROUND_HALF_UP); + BigDecimal mj = m.subtract(itemdescribe.multiply(new BigDecimal(k))).setScale(2, BigDecimal.ROUND_HALF_UP); String singlerent0 = String.valueOf(mj.multiply(new BigDecimal(100)).longValue()); Trans_Detail trans_detail = new Trans_Detail(); String sn = ""; @@ -1611,35 +1570,7 @@ public class CollectAuditInfoCacheTj { }else{ sn = "" + (++item); } - //׷״̬ - JBOTransaction trans = JBOFactory.createJBOTransaction(); - BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans); - BizObject bo = bm.createQuery("O.id=:id").setParameter("id", biz.getAttribute("id").toString()).getSingleResult(false); - String itemsn0 = ""; - if (bo !=null) { - String itemsn = bo.getAttribute("batch_sn").toString(); - if (itemsn.length() == 0) { - itemsn0 += sn; - }else{ - itemsn0 += itemsn+","+sn; - } - } - bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id") - .setParameter("BATCH_STATUS", "")//״̬-Ϊ - .setParameter("BATCH_NO", req_sn) - .setParameter("BATCH_SN", itemsn0) - .setParameter("id", biz.getAttribute("id").toString()).executeUpdate(); - //ֶӵֶ - if("manual".equals(collectStyle)){ - JBOTransaction transj = JBOFactory.createJBOTransaction(); - BizObjectManager bmlcmi = JBOFactory.getFactory().getManager(LC_COLLECT_MANUAL_INFO.CLASS_NAME,transj); - bmlcmi.createQuery("update O set O.BATCH_SN=:BATCH_SN where O.plan_id=:id and O.BATCH_NO=:BATCH_NO") - .setParameter("BATCH_SN", itemsn0) - .setParameter("BATCH_NO", req_sn) - .setParameter("id", planId).executeUpdate(); - transj.commit(); - } - trans.commit(); + rentPlanHandle(planId,req_sn,sn,biz,99,singlerent0);//׷״̬ trans_detail.setSN(sn); trans_detail.setACCOUNT_TYPE(""); trans_detail.setACCOUNT_NO(acc_number); @@ -1664,27 +1595,7 @@ public class CollectAuditInfoCacheTj { }else{ sn = "" + (++item); } - //׷״̬ - JBOTransaction trans = JBOFactory.createJBOTransaction(); - BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans); - bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id") - .setParameter("BATCH_STATUS", "")//״̬-Ϊ - .setParameter("BATCH_NO", req_sn) - .setParameter("BATCH_SN", sn) - .setParameter("id", biz.getAttribute("id").toString()).executeUpdate(); - //ֶӵֶ - if("manual".equals(collectStyle)){ - BizObjectManager bmlcmi = JBOFactory.getFactory().getManager(LC_COLLECT_MANUAL_INFO.CLASS_NAME,trans); - BizObject bolmci = bmlcmi.newObject(); - bolmci.setAttributeValue("contract_id",biz.getAttribute("contract_id").toString()); - bolmci.setAttributeValue("plan_id",planId); - bolmci.setAttributeValue("BATCH_NO",req_sn); - bolmci.setAttributeValue("BATCH_SN",sn); - bolmci.setAttributeValue("money",biz.getAttribute("rent").toString()); - bolmci.setAttributeValue("hire_date",DateUtil.getSystemTimeByFormat("yyyy/MM/dd")); - bmlcmi.saveObject(bolmci); - } - trans.commit(); + rentPlanHandle(planId,req_sn,sn,biz,1,rent);//׷״̬ trans_detail.setSN(sn); trans_detail.setACCOUNT_TYPE(""); trans_detail.setACCOUNT_NO(acc_number); @@ -1704,7 +1615,70 @@ public class CollectAuditInfoCacheTj { return strbuff; } - + + /** + * ƻ batch_no batch_sn ,ֹ۵ģֹۼ¼ + * @param planId ƻid + * @param req_sn κ + * @param sn + * @param biz + * @param k2 k2==1 ֹ۲,ֹ۱ + * @throws Exception + */ + private void rentPlanHandle(String planId,String req_sn,String sn,BizObject biz,int k2,String amount) throws JBOException{ + //׷״̬ + JBOTransaction trans = null; + try{ + trans = JBOFactory.createJBOTransaction(); + Transaction transaction = Transaction.createTransaction(trans); + BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME); + BizObject bo = bm.createQuery("O.id=:id").setParameter("id", planId).getSingleResult(false); + String itemsn0 = ""; + if (bo !=null) { + String itemsn = bo.getAttribute("batch_sn").toString(); + if (itemsn.length() == 0) { + itemsn0 += sn; + }else{ + itemsn0 += itemsn+","+sn; + } + } + //κ + bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id") + .setParameter("BATCH_STATUS", "")//״̬-Ϊ + .setParameter("BATCH_NO", req_sn) + .setParameter("BATCH_SN", itemsn0) + .setParameter("id", planId).executeUpdate(); + //¼м lb_union_middle + SqlObject sqlObject = new SqlObject("insert into lb_union_middle (id,batch_no,batch_sn,rent_id,amount,input_time) values (replace(uuid(),'-',''),:batchNo,:batchSn,:rentId,:amount,SYSDATE()) ") + .setParameter("batchNo", req_sn).setParameter("batchSn", sn) + .setParameter("rentId", planId).setParameter("amount",amount); + transaction.executeSQL(sqlObject); + //ֶӵֶ + if("manual".equals(collectStyle)){ + BizObjectManager bmlcmi = JBOFactory.getFactory().getManager(LC_COLLECT_MANUAL_INFO.CLASS_NAME,trans); + if(k2==1){ + BizObject bolmci = bmlcmi.newObject(); + bolmci.setAttributeValue("contract_id",biz.getAttribute("contract_id").toString()); + bolmci.setAttributeValue("plan_id",planId); + bolmci.setAttributeValue("BATCH_NO",req_sn); + bolmci.setAttributeValue("BATCH_SN",itemsn0); + bolmci.setAttributeValue("money",biz.getAttribute("rent").toString()); + bolmci.setAttributeValue("hire_date",DateUtil.getSystemTimeByFormat("yyyy/MM/dd")); + bmlcmi.saveObject(bolmci); + }else{ + bmlcmi.createQuery("update O set O.BATCH_SN=:BATCH_SN where O.plan_id=:id and O.BATCH_NO=:BATCH_NO") + .setParameter("BATCH_SN", itemsn0) + .setParameter("BATCH_NO", req_sn) + .setParameter("id", planId).executeUpdate(); + } + } + trans.commit(); + }catch (Exception e){ + if (trans != null) trans.rollback(); + throw new JBOException(e.getMessage()); + } + } + /** * ̡ļ * @param tx @@ -1720,13 +1694,10 @@ public class CollectAuditInfoCacheTj { String day = currentDateTime.substring(8,10); //ļ· String rootDir = this.fileSavePath; - File file = new File(rootDir + File.separator + currentYear - + File.separator + month + File.separator + File file = new File(rootDir + File.separator + currentYear + File.separator + month + File.separator + day); - System.out.println(file.getAbsolutePath()); - if(!file.exists()){//Ŀ¼ֱӴ - file.mkdirs(); - } + if (!file.exists()) file.mkdirs();//Ŀ¼ֱӴ + //ļ BizObjectManager bm = JBOFactory.getFactory().getManager(LB_INTFACE_FILE_RECORD.CLASS_NAME); BizObject send = bm.newObject(); @@ -1741,7 +1712,6 @@ public class CollectAuditInfoCacheTj { bm.saveObject(send); //ɸѡӦϢ Map map = getRetAndCode(strResp); - //getMsgAndCode(strResp); //ļ BizObject reply = bm.newObject(); @@ -1803,7 +1773,6 @@ public class CollectAuditInfoCacheTj { public Map getRetAndCodeByBatch(String strXML){ Map map = new HashMap(); Map res = new HashMap(); - System.out.println(1); int iStart = strXML.indexOf(""); if (iStart != -1) { int end = strXML.indexOf(""); diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcess.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcess.java index 250c133ad..1e179d798 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcess.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcess.java @@ -1,18 +1,19 @@ package com.tenwa.collectaudit.cache; -import java.io.IOException; +import com.amarsoft.app.awe.config.InitCollectConfig; +import com.gnete.security.crypt.Crypt; +import com.gnete.security.crypt.CryptException; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.params.HttpMethodParams; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.commons.httpclient.protocol.Protocol; import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; -import com.amarsoft.app.awe.config.InitCollectConfig; -import com.gnete.security.crypt.Crypt; -import com.gnete.security.crypt.CryptException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.IOException; /** @@ -94,8 +95,7 @@ public class CollectAuditProcess { protected String CollectAuditPayReq(StringBuffer sendXml,String fileSavePath,String fileName) throws CryptException { String strSendData = sendXml.toString(); HttpClient httpClient = new HttpClient( ); - PostMethod postMethod = - new PostMethod(InitCollectConfig.C_SERVERURL); + PostMethod postMethod = new PostMethod(InitCollectConfig.C_SERVERURL); //ñ httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"GBK"); @@ -105,19 +105,17 @@ public class CollectAuditProcess { Protocol.registerProtocol("https", new Protocol("https", fcty, 443)); strSendData = this.signMsg(strSendData); - log.info(strSendData); - System.out.println("ͱģ"+strSendData); + log.info("ͱģ"+strSendData); InterFaceFileCreate.sendDiscFileCreate(strSendData, fileSavePath, fileName); postMethod.setRequestBody(strSendData); try { long start = System.currentTimeMillis(); //ִgetMethod int statusCode = httpClient.executeMethod(postMethod); - System.out.println("cost:"+(System.currentTimeMillis()-start)); + System.out.println("ShenZhen interface ["+fileName+"] call cost time:" + (System.currentTimeMillis() - start)); //ʧ if (statusCode != HttpStatus.SC_OK) { - log.error( - "Method failed: " + postMethod.getStatusLine()); + log.error("Method failed: " + postMethod.getStatusLine()); //ȡ byte[] responseBody = postMethod.getResponseBody(); // @@ -131,7 +129,6 @@ public class CollectAuditProcess { String strResp = new String(responseBody, "GBK"); log.info(":" + strResp); InterFaceFileCreate.replyDiscFileCreate(strResp, fileSavePath, fileName); - System.out.println(":" + strResp); //ǩ if (this.verifySign(strResp)) { log.info("ǩȷصı"); diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcessTj.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcessTj.java index 2f0d80f72..dd8a31dd1 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcessTj.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcessTj.java @@ -106,19 +106,17 @@ public class CollectAuditProcessTj { Protocol.registerProtocol("https", new Protocol("https", fcty, 443)); strSendData = this.signMsg(strSendData); - log.info(strSendData); - System.out.println("ͱģ"+strSendData); + log.info("ͱģ"+strSendData); InterFaceFileCreate.sendDiscFileCreate(strSendData, fileSavePath, fileName); postMethod.setRequestBody(strSendData); try { long start = System.currentTimeMillis(); //ִgetMethod int statusCode = httpClient.executeMethod(postMethod); - System.out.println("cost:"+(System.currentTimeMillis()-start)); + System.out.println("TianJin interface ["+fileName+"] call cost time:" + (System.currentTimeMillis() - start)); //ʧ if (statusCode != HttpStatus.SC_OK) { - log.error( - "Method failed: " + postMethod.getStatusLine()); + log.error("Method failed: " + postMethod.getStatusLine()); //ȡ byte[] responseBody = postMethod.getResponseBody(); // @@ -132,7 +130,6 @@ public class CollectAuditProcessTj { String strResp = new String(responseBody, "GBK"); log.info(":" + strResp); InterFaceFileCreate.replyDiscFileCreate(strResp, fileSavePath, fileName); - System.out.println(":" + strResp); //ǩ if (this.verifySign(strResp)) { log.info("ǩȷصı"); From 6080a1a90e4ea0e505c3ea0b05ccd1f8024323fe Mon Sep 17 00:00:00 2001 From: yjf <2211675158@qq.com> Date: Fri, 3 Sep 2021 10:15:18 +0800 Subject: [PATCH 50/51] =?UTF-8?q?=E9=80=9A=E8=81=94=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AllinpayPaymentDo.java | 5 +- .../service/impl/AllinpayPaymentQueryJob.java | 43 +++--- .../service/impl/AllinpayPaymentQueryRun.java | 71 ++++----- .../lease/app/quartzmession/AutoRefresh.java | 142 +++++++++--------- 4 files changed, 125 insertions(+), 136 deletions(-) diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentDo.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentDo.java index 30e005792..cc76dbd1a 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentDo.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentDo.java @@ -19,7 +19,7 @@ import com.amarsoft.are.jbo.JBOTransaction; public class AllinpayPaymentDo { private String id; - + /** * - * @param tx @@ -103,8 +103,7 @@ public class AllinpayPaymentDo { new Thread(run).start(); } public void queryCollectResult(){ - AllinpayPaymentQueryRun run = new AllinpayPaymentQueryRun(); - new Thread(run).start(); + new AllinpayPaymentQueryRun().allinpayPaymentQuerySt(); } public String getId() { return id; diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryJob.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryJob.java index 4e6020ae6..c7ec72914 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryJob.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryJob.java @@ -1,31 +1,30 @@ package com.tenwa.lease.app.allinpay.service.impl; -import org.apache.log4j.Logger; -import org.quartz.Job; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; - import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; +import org.apache.log4j.Logger; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; -public class AllinpayPaymentQueryJob implements Job{ - private Logger logger = Logger.getLogger(this.getClass()); - @Override - public void execute(JobExecutionContext arg0) throws JobExecutionException { - try { - BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_PAYMENT"); - BizObject object = manager.createQuery("O.STATUS='ڴ'").getSingleResult(true); - if(object==null) { - logger.info("ûҪѯͨϢ"); - return; - } - AllinpayPaymentQueryRun run = new AllinpayPaymentQueryRun(); - run.run(); - } catch (JBOException e) { - e.printStackTrace(); - } - } +public class AllinpayPaymentQueryJob implements Job { + private Logger logger = Logger.getLogger(this.getClass()); + + @Override + public void execute(JobExecutionContext arg0) throws JobExecutionException { + try { + BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_PAYMENT"); + BizObject object = manager.createQuery("O.STATUS='ڴ'").getSingleResult(true); + if (object == null) { + logger.info("ûҪѯͨϢ"); + return; + } + new AllinpayPaymentQueryRun().allinpayPaymentQuerySt(); + } catch (JBOException e) { + e.printStackTrace(); + } + } } diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java index 94d42949f..2fd414732 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java @@ -1,67 +1,53 @@ package com.tenwa.lease.app.allinpay.service.impl; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.sql.SQLException; -import java.text.DecimalFormat; -import java.text.SimpleDateFormat; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG; - -import org.apache.log4j.Logger; - import com.allinpay.xml.XmlParser; import com.allinpay.xstruct.common.AipgRsp; import com.allinpay.xstruct.common.InfoRsp; import com.allinpay.xstruct.trans.qry.QTDetail; import com.allinpay.xstruct.trans.qry.QTransRsp; import com.amarsoft.app.lc.util.DateAssistant; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.jbo.*; import com.amarsoft.are.util.StringFunction; import com.amarsoft.awe.util.ASResultSet; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; -import com.ctc.wstx.util.DataUtil; import com.tenwa.collectaudit.cache.CollectAuditInfoCache; import com.tenwa.lease.app.allinpay.util.AllinpayProperties; import com.tenwa.lease.app.allinpay.util.ConfigConstant; import com.tenwa.reckon.util.UUIDUtil; +import jbo.app.tenwa.calc.LC_RENT_INCOME; +import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG; +import org.apache.log4j.Logger; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; public class AllinpayPaymentQueryRun implements Runnable{ - + @Override public void run() { this.allinpayPaymentQuerySt(); } private AllinpayProperties allinpay; - + private String localFilePath; private Logger logger = Logger.getLogger(this.getClass()); - public AllinpayPaymentQueryRun() { - } - /** * ҳҪвѯĿۿ - * @param + * @param * @return */ @SuppressWarnings({ "unchecked"}) @@ -82,16 +68,16 @@ public class AllinpayPaymentQueryRun implements Runnable{ while (size > start) { logger.info("ʼ" + start + "" + (start + maxCount) + "ѭ"); boLOEDs = bomLCP.createQuery("O.STATUS='ڴ' ").setFirstResult(start).setMaxResults(maxCount).getResultList(true); - + if (boLOEDs == null || boLOEDs.size() == 0) { logger.error("ûҪѯ֧ͨϢ>>>>>>>>>>:"); break; } for (BizObject boLCP : boLOEDs) { try { - + BizObject object = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO").createQuery("O.id=:id").setParameter("id", boLCP.getAttribute("PROJECT_ID").toString()).getSingleResult(false); - + allinpay = new AllinpayProperties(object.getAttribute("subjectid").toString()); String quertSn= boLCP.getAttribute("REQ_SN").toString(); String num = boLCP.getAttribute("NUM").toString(); @@ -101,7 +87,7 @@ public class AllinpayPaymentQueryRun implements Runnable{ sqlMap.put("NUM", Integer.parseInt(num) + ""); mapXml.put("quertSn", quertSn); sqlMap = sendMessageByProxy(mapXml, sqlMap); - + if (localFilePath == null) { LocalDateTime ldt = LocalDateTime.now(); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMdd"); @@ -248,7 +234,6 @@ public class AllinpayPaymentQueryRun implements Runnable{ /** * ޸ͨۿݻܱ - * @param map * @return Exception */ private void updateMessage(BizObjectManager bomLCP, BizObject boLCP, Map sqlMap) throws Exception { @@ -260,7 +245,7 @@ public class AllinpayPaymentQueryRun implements Runnable{ boLCP.setAttributeValue(key, sqlMap.get(key)); } bomLCP.saveObject(boLCP); - + updateOtherMessage(boLCP); } public void saveBuckle(BizObject bo,JBOTransaction tx,String sn,String rent) throws JBOException{ @@ -306,11 +291,11 @@ public class AllinpayPaymentQueryRun implements Runnable{ if("ɹ".equals(status)&&boLCP.getAttribute("FINISH_AMOUNT")!=null&&!"".equals(boLCP.getAttribute("FINISH_AMOUNT").toString())){ insertMessage(boLRP,finishAmount,tx); //ƻ״̬ - BizObjectManager bomVRC = JBOFactory.getBizObjectManager("jbo.loan.VI_RENT_COLLECT",tx); - BizObject vrc = bomVRC.createQuery("id=:id").setParameter("id", plan_id).getSingleResult(false); - double rentOver = vrc.getAttribute("rent_over").getDouble(); - double penaltyOver = vrc.getAttribute("penalty_over").getDouble(); - if(rentOver>0 || penaltyOver>0){ + BizObjectManager bomIncome = JBOFactory.getBizObjectManager(LC_RENT_INCOME.CLASS_NAME,tx); + BizObject boLRI = bomIncome.createQuery("select v.sum(v.ifnull(rent,0)) as v.rent from o where payment_number=:paymentNumber and plan_list=:planList") + .setParameter("paymentNumber", boLRP.getAttribute("payment_number").getString()) + .setParameter("planList", boLRP.getAttribute("plan_list").getString()).getSingleResult(false); + if(boLRP.getAttribute("rent").getDouble()>boLRI.getAttribute("rent").getDouble()){ batchStatus = "complete"; collectStatus = "տ"; collectMsg = "ͨտ"; diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java index 523f17652..b288a4639 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java @@ -1,15 +1,6 @@ package com.tenwa.lease.app.quartzmession; -import java.util.List; - -import jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN; - -import org.quartz.Job; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; - import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.awe.Configure; @@ -21,65 +12,80 @@ import com.tenwa.collectaudit.cache.CollectAuditInfoCache; import com.tenwa.collectaudit.cache.CollectAuditInfoCacheTj; import com.tenwa.comm.util.date.DateAssistant; import com.tenwa.lease.app.allinpay.service.impl.AllinpayPaymentQueryRun; +import jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; -public class AutoRefresh implements Job{ +import java.util.List; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; - @Override - public void execute(JobExecutionContext arg0) throws JobExecutionException { - CollectAuditInfoCache ca = new CollectAuditInfoCache(); - JBOTransaction tx = null; - String plan_date = DateAssistant.getToday(); - Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId"); - String curUserId = userId == null? "system" : userId.toString(); - try { - tx = JBOFactory.createJBOTransaction(); - Transaction Sqlca = Transaction.createTransaction(tx); - String sSql = "SELECT STATUS FROM lb_card_buckle_status WHERE STATUS='Y' "; - SqlObject asql = new SqlObject(sSql); - ASResultSet rs = Sqlca.getASResultSet(asql); - if(rs.next()) { - return ; - } - List bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δտ', 'տ','') and O.SUBJECTID='aa740e4111c111eaaa0000163e0e11e6' and O.collect_type='YLcollect' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true); - StringBuffer ids = new StringBuffer(); - if(bos!=null && bos.size()>0){ - for (BizObject bo : bos) { - ids.append(bo.getAttribute("id").getString()+"@"); - } - ca.setId(ids.toString().substring(0, ids.toString().length()-1)); - Configure CurConfig = Configure.getInstance(); - ca.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath")); - ca.setInputuserid("system"); - ca.setInputorgid("system"); - ca.queryBatchCollectStatus(tx); - } - //Զ - CollectAuditInfoCacheTj caTj = new CollectAuditInfoCacheTj(); - List bosTj = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δտ', 'տ','') and O.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and O.collect_type='YLcollect' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true); - StringBuffer idsTj = new StringBuffer(); - if(bosTj!=null && bosTj.size()>0){ - for (BizObject bo : bosTj) { - idsTj.append(bo.getAttribute("id").getString()+"@"); - } - caTj.setId(idsTj.toString().substring(0, idsTj.toString().length()-1)); - Configure CurConfig = Configure.getInstance(); - caTj.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath")); - caTj.setInputuserid("system"); - caTj.setInputorgid("system"); - caTj.queryBatchCollectStatus(tx); - } - QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoRefresh", "success", "ɹ",curUserId); - } catch (Exception e) { - e.printStackTrace(); - QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoRefresh", "error", "ʧ",curUserId); - }finally{ - try { - tx.commit(); - } catch (JBOException e) { - e.printStackTrace(); - } - } - AllinpayPaymentQueryRun run = new AllinpayPaymentQueryRun(); - new Thread(run).start(); - } +public class AutoRefresh implements Job { + + private static final Lock lock = new ReentrantLock(); + + @Override + public void execute(JobExecutionContext arg0) throws JobExecutionException { + String plan_date = DateAssistant.getToday(); + Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId"); + String curUserId = userId == null ? "system" : userId.toString(); + boolean lockHoldStatus = lock.tryLock(); + try { + if (lockHoldStatus) { + CollectAuditInfoCache ca = new CollectAuditInfoCache(); + JBOTransaction tx = null; + try { + tx = JBOFactory.createJBOTransaction(); + Transaction Sqlca = Transaction.createTransaction(tx); + String sSql = "SELECT STATUS FROM lb_card_buckle_status WHERE STATUS='Y' "; + SqlObject asql = new SqlObject(sSql); + ASResultSet rs = Sqlca.getASResultSet(asql); + if (rs.next()) { + return; + } + List bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δտ', 'տ','') and O.SUBJECTID='aa740e4111c111eaaa0000163e0e11e6' and O.collect_type='YLcollect' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '" + plan_date + "'").getResultList(true); + StringBuilder ids = new StringBuilder(); + if (bos != null && bos.size() > 0) { + for (BizObject bo : bos) { + ids.append(bo.getAttribute("id").getString()).append("@"); + } + ca.setId(ids.toString().substring(0, ids.toString().length() - 1)); + ca.setFileSavePath(Configure.getInstance().getConfigure("InterfaceFileSavePath")); + ca.setInputuserid("system"); + ca.setInputorgid("system"); + ca.queryBatchCollectStatus(tx); + } + //Զ + CollectAuditInfoCacheTj caTj = new CollectAuditInfoCacheTj(); + List bosTj = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δտ', 'տ','') and O.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and O.collect_type='YLcollect' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '" + plan_date + "'").getResultList(true); + StringBuilder idsTj = new StringBuilder(); + if (bosTj != null && bosTj.size() > 0) { + for (BizObject bo : bosTj) { + idsTj.append(bo.getAttribute("id").getString()).append("@"); + } + caTj.setId(idsTj.toString().substring(0, idsTj.toString().length() - 1)); + caTj.setFileSavePath(Configure.getInstance().getConfigure("InterfaceFileSavePath")); + caTj.setInputuserid("system"); + caTj.setInputorgid("system"); + caTj.queryBatchCollectStatus(tx); + } + tx.commit(); + //ͨۻ + new AllinpayPaymentQueryRun().allinpayPaymentQuerySt(); + QuartzUtil.insertLog(plan_date, "com.tenwa.lease.app.quartzmession.AutoRefresh", "success", "ɹ", curUserId); + } catch (Exception e) { + if (tx != null) tx.rollback(); + e.printStackTrace(); + QuartzUtil.insertLog(plan_date, "com.tenwa.lease.app.quartzmession.AutoRefresh", "error", "ʧ", curUserId); + } + } else { + QuartzUtil.insertLog(plan_date, "com.tenwa.lease.app.quartzmession.AutoRefresh", "lockerror", "ȡʧ", curUserId); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (lockHoldStatus) lock.unlock(); + } + } } From 783a776b391da02e2704721d8d26a405f9895192 Mon Sep 17 00:00:00 2001 From: wangling <1127159486@qq.com> Date: Sun, 5 Sep 2021 16:42:54 +0800 Subject: [PATCH 51/51] =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=B4=B4=E6=81=AF?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=BADISCOUNT=5FINTEREST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp | 1 + calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 09253a440..db72d1d38 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -198,6 +198,7 @@ if(CurUser.hasRole("401")){ doTemp.setVisible("CAUTION_MONEY_METHOD",false); doTemp.setVisible("DISCOUNT", false); + doTemp.setVisible("DISCOUNT_INTEREST", false); // doTemp.setColumnAttribute("DISCOUNT","colvisible","0"); } if(CurUser.hasRole("800R00000013")||CurUser.hasRole("800R00000014")||CurUser.hasRole("800R00000015")){ diff --git a/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java b/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java index e93d27bc3..a108b0e47 100644 --- a/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java +++ b/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java @@ -49,7 +49,7 @@ public class FundFundPlanExecutor { BizObjectManager bom = JBOFactory.getBizObjectManager( "jbo.app.tenwa.calc.LC_CALC_SUBSECTION_INFO_TEMP", tx ); List bos = bom.createQuery( "flowunid = :flowunid" ).setParameter( "flowunid", tcb.getDocId() ).getResultList( false ); for ( BizObject bo : bos ) { - String discount = bo.getAttribute( "DISCOUNT" ).getString(); + String discount = bo.getAttribute( "DISCOUNT_INTEREST" ).getString(); String subsectionNumber = bo.getAttribute( "SUBSECTION_NUMBER" ).getString(); String isBalanceLending = bo.getAttribute( "IS_BALANCE_LENDING" ).getString(); String discountCollectionPeriod = bo.getAttribute( "DISCOUNT_COLLECTION_PERIOD" ).getString();