客户(张磊)修改信审考核统计报表

This commit is contained in:
tangfutang 2020-04-21 11:38:32 +08:00
parent aed1ad6e49
commit 0556cfd2da
9 changed files with 1316 additions and 0 deletions

View File

@ -1277,6 +1277,30 @@
</manager>
</class>
</package>
<package name="jbo.com.tenwa.entity.comm.credit" >
<class name="ST_CREDIT_AUDIT_HOLIDAY" label="工作日节假日维护test" keyAttributes="id">
<attributes>
<attribute name="id" label="编号" type="String" length="32"/>
<attribute name="c_year" label="年" type="INT" length="10"/>
<attribute name="c_month" label="月" type="INT" length="10"/>
<attribute name="c_day" label="日" type="INT" length="10"/>
<attribute name="c_date" label="当前日期" type="STRING" length="32"/>
<attribute name="otype" label="班/休" type="STRING" length="21"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="ST_CREDIT_AUDIT_HOLIDAY" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
<package name="jbo.com.tenwa.entity.comm.insurance" >
<class name="VI_INSURANCE_INFO" label="保险信息" keyAttributes="">
<attributes>

View File

@ -0,0 +1,78 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info00;Describe=注释区;]~*/%>
<%
/*
Author:lzb 2017-5-12
Tester:
Content: 本方信息
Input Param:
Output param:
History Log:
*/
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%>
<%
String PG_TITLE = "本方信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%>
<%
String rightType = CurPage.getParameter("rightType");
if(rightType ==null)rightType="";
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
<%
String sTempletNo = "creditHolidayInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if(rightType.equals("ReadOnly")){
dwTemp.ReadOnly = "1";//只读模式
}
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
CurPage.getCurComp().setAttribute("RightType", rightType);
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
<%
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
{"true","","Button","返回","返回列表页面","parent.AsDialog.ClosePage()","","","","btn_icon_return"}
};
sButtonPosition = "south";
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%>
<%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件-;]~*/%>
<script type="text/javascript">
/*~[Describe=保存记录;InputParam=无;OutPutParam=无;]~*/
function saveRecord(){
as_save("myiframe0","parent.AsDialog.ClosePage()");
}
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,154 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%>
<%
/*
Author:lzb 2017-05-12
Tester:
Content: 本方信息
Input Param:
Output param:
History Log:
*/
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%>
<%
String PG_TITLE = "本方信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List02;Describe=定义变量,获取参数;]~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List03;Describe=定义数据对象;]~*/%>
<%
ASObjectModel doTemp = new ASObjectModel("creditHolidayList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(30);
dwTemp.genHTMLObjectWindow("");
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%>
<%
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","All","Button","修改","修改","edit()","","","","btn_icon_edit",""},
{"true","All","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
{"true","","Button","批量登记","批量登记","inExcel()","","","","btn_icon_detail",""},
{"true","","Button","下载模板","下载模板","downLoad()","","","","btn_icon_down",""}
};
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%/*~END~*/%>
<form name=form1 method=post action="<%=sWebRootPath%>/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>" target=MyAtt>
<div style="display:none">
<input id="sqlString" name="sqlString" value="">
</div>
</form>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=定义按钮事件;]~*/%>
<script type="text/javascript">
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
function newRecord(){
var sUrl = "/report/creditAduit/creditHolidayInfo.jsp";
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
reloadSelf();
},"新增账户信息");
}
/*~[Describe=详情;InputParam=无;OutPutParam=无;]~*/
function view(){
var sUrl = "/report/creditAduit/creditHolidayInfo.jsp";
var id = getItemValue(0,getRow(0),'id');
if(typeof(id)=="undefined" || id.length==0 ){
alert("请选择一条信息!");
return ;
}
AsDialog.PopView(sUrl,'id='+id+'&rightType=ReadOnly',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
reloadSelf();
},"账户信息详情");
}
function edit(){
var sUrl = "/report/creditAduit/creditHolidayInfo.jsp";
var id = getItemValue(0,getRow(0),'id');
if(typeof(id)=="undefined" || id.length==0 ){
alert("请选择一条信息!");
return ;
}
AsDialog.PopView(sUrl,'id='+id,"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
reloadSelf();
},"修改账户信息");
}
function deleteRecord(){
var ownNumber = getItemValue(0,getRow(),'id');
if(typeof(ownNumber)=="undefined" || ownNumber.length==0 ){
alert("请选择一条信息!");
return ;
}
if(confirm('确实要删除吗?')){
as_delete(0,'');
}
}
/*~[Describe=导入抵押物excel;InputParam=无;OutPutParam=无;]~*/
function inExcel(){
var importCondition = {};//导入配置
importCondition["templateNo"] = "da670c357a4f11eaae2500163e0ad612";//导入的模板编号必填
//增加其他配置参数
var sUrl = "/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcel.jsp";
var sparam = JSON.stringify(importCondition).replace(/,/g,"@");//生成模板的参数据
AsDialog.PopView(sUrl,"importparam="+sparam,{width:"350px",height:"40px",title:"上传节假日维护"},function(){reloadSelf();});
}
/*~[Describe=下载抵押物Excel;InputParam=无;OutPutParam=无;]~*/
function downLoad(){
var sId = "da670c357a4f11eaae2500163e0ad612";//下载的模板编号
$("#sqlString").val("save@"+sId);
form1.submit();
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%>
<script type="text/javascript">
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
<script type="text/javascript">
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,11 @@
<%@ page contentType="text/html; charset=GBK"%><%@
include file="/IncludeBegin.jsp"%><%
String PG_TITLE = "隐藏左侧区域的Main页面"; // 浏览器窗口标题 <title> PG_TITLE </title>
String PG_CONTENT_TITLE = "<strong class='pt9white'>本方信息</strong>"; //默认的内容区标题
String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
String PG_LEFT_WIDTH = "1";//默认的treeview宽度
%><%@include file="/Resources/CodeParts/Main04.jsp"%>
<script type="text/javascript">
AsControl.OpenView("/report/creditAduit/creditHolidayList.jsp","","right","");
</script>
<%@ include file="/IncludeEnd.jsp"%>

View File

@ -0,0 +1,59 @@
package com.tenwa.holiday.handler;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
import jbo.com.tenwa.entity.comm.credit.ST_CREDIT_AUDIT_HOLIDAY;
import jbo.com.tenwa.entity.comm.holiday.BT_HOLIDAY;
public class CreditAuditHolidayHandler extends CommonHandler{
@Override
protected void beforeInsert(JBOTransaction tx, BizObject bo)
throws Exception {
// TODO Auto-generated method stub
String cdate=bo.getAttribute("c_date").getString();
String[] vDate=cdate.split("/");
bo.setAttributeValue("c_year", vDate[0]);
bo.setAttributeValue("c_month", vDate[1]);
bo.setAttributeValue("c_day", vDate[2]);
super.beforeInsert(tx, bo);
}
@Override
protected void beforeUpdate(JBOTransaction tx, BizObject bo)throws Exception {
String cdate=bo.getAttribute("c_date").getString();
String[] vDate=cdate.split("/");
bo.setAttributeValue("c_year", vDate[0]);
bo.setAttributeValue("c_month", vDate[1]);
bo.setAttributeValue("c_day", vDate[2]);
super.beforeUpdate(tx, bo);
}
@Override
protected boolean validityCheck(BizObject bo, boolean isInsert) {
try{
if(isInsert){
BizObject bx=JBOFactory.createBizObjectQuery(ST_CREDIT_AUDIT_HOLIDAY.CLASS_NAME, "c_date=:c_date").setParameter("c_date", bo.getAttribute("c_date").getString()).getSingleResult(false);
if(bx!=null)
{
this.errors="ÈÕÆÚÖØ¸´";
return false;
}
}else{
BizObject bx=JBOFactory.createBizObjectQuery(ST_CREDIT_AUDIT_HOLIDAY.CLASS_NAME, "c_date=:c_date and id<>'"+bo.getAttribute("id").getString()+"'").setParameter("c_date", bo.getAttribute("c_date").getString()).getSingleResult(false);
if(bx!=null)
{
this.errors="ÈÕÆÚÖØ¸´";
return false;
}
}
}catch(Exception e){
e.printStackTrace();
}
return super.validityCheck(bo, isInsert);
}
}

View File

@ -0,0 +1,59 @@
package com.tenwa.officetempalte.importcallback.impl;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
*
* Author: guoshanglei 2017年5月11日
* Tester:
* Describe:
* History Log:
*/
public class CreditAuditHolidayCallBack extends BaseImportExcelCallBack{
//读取数据运行run方法
@Override
public void run(ASUser CurUser, BizObject importObject,
Map<String, String> model, Integer rowIndex, JBOTransaction tx,
Transaction Sqlca) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
String INPUTUSERID = CurUser.getUserID();//获取登记人
String INPUTORGID = CurUser.getOrgID();//获取登记部门
String INPUTTIME = sdf.format(new Date()).toString();//格式化登记时间
String cdate=importObject.getAttribute("c_date").getString();
String strSplit=cdate.indexOf("/")>0?"/":"-";
String[] vDate=cdate.split(strSplit);
importObject.setAttributeValue("c_year", vDate[0]);
importObject.setAttributeValue("c_month", vDate[1]);
importObject.setAttributeValue("c_day", vDate[2]);
importObject.setAttributeValue("c_date", cdate.replaceAll("-", "/"));//初始化登记人
importObject.setAttributeValue("INPUTUSERID", INPUTUSERID);//初始化登记人
importObject.setAttributeValue("INPUTORGID", INPUTORGID);//初始化登记部门
importObject.setAttributeValue("INPUTTIME", INPUTTIME);//初始化登记时间
}
//数据保存进数据库前runBefor运行
@Override
public void runBefore(ASUser CurUser, Map<String, String> model,List<BizObject> importObjects,
JBOTransaction tx, Transaction Sqlca) throws Exception {
}
//数据保存进数据库后runAfter运行
@Override
public void runAfter(ASUser CurUser, Map<String, String> model,List<BizObject> importObjects,
JBOTransaction tx, Transaction Sqlca) throws Exception {
}
}

View File

@ -0,0 +1,64 @@
package jbo.com.tenwa.entity.comm.credit;
import java.lang.String;
/**
* 工作日节假日维护test - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface ST_CREDIT_AUDIT_HOLIDAY{
/**
* 工作日节假日维护test<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.com.tenwa.entity.comm.credit.ST_CREDIT_AUDIT_HOLIDAY";
/**
* 编号 STRING(32)<br>
*/
public static final String id = "id";
/**
* INT(10)<br>
*/
public static final String c_year = "c_year";
/**
* INT(10)<br>
*/
public static final String c_month = "c_month";
/**
* INT(10)<br>
*/
public static final String c_day = "c_day";
/**
* 当前日期 STRING(32)<br>
*/
public static final String c_date = "c_date";
/**
* / STRING(21)<br>
*/
public static final String otype = "otype";
/**
* 登记人 STRING(32)<br>
*/
public static final String INPUTUSERID = "INPUTUSERID";
/**
* 登记部门 STRING(32)<br>
*/
public static final String INPUTORGID = "INPUTORGID";
/**
* 登记时间 STRING(32)<br>
*/
public static final String INPUTTIME = "INPUTTIME";
/**
* 更新人 STRING(32)<br>
*/
public static final String UPDATEUSERID = "UPDATEUSERID";
/**
* 更新部门 STRING(32)<br>
*/
public static final String UPDATEORGID = "UPDATEORGID";
/**
* 更新时间 STRING(32)<br>
*/
public static final String UPDATETIME = "UPDATETIME";
}

View File

@ -0,0 +1,136 @@
-- 添加直租合同模板,已更新生产环境
INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `bankno`, `sortno`, `isinuse`, `itemdescribe`, `itemattribute`, `relativecode`, `attribute1`, `attribute2`, `attribute3`, `attribute4`, `attribute5`, `attribute6`, `attribute7`, `attribute8`, `inputuser`, `inputorg`, `inputtime`, `updateuser`, `updatetime`, `remark`, `helptext`) VALUES ('operationType', 'CDZZ', 'C端直租', '', '0120', '1', '', '', '', '', '', '', '', '', '', '', '', 'SYS_Designer', NULL, '2020/03/31 15:08:56', 'SYS_Designer', '2020/03/31 15:08:56', '', '');
INSERT INTO `apzl`.`bf_template` (`ID`, `SERIALNO`, `SORTNUMBER`, `TEMPLATENAME`, `TEMPLATESHOWNAME`, `TEMPLATEPATH`, `TEMPLATETYPE`, `OPERATETYPE`, `CALLBACK`, `CREATEMETHOD`, `DOCTYPE`, `ONECLASSIFY`, `TWOCLASSIFY`, `THREECLASSIFY`, `FOURCLASSIFY`, `TEMPLATEVERSION`, `STATUS`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `INPUTTIME`, `UPDATEUSERID`, `UPDATEORGID`, `UPDATETIME`, `CREATECONDITION`, `CREATESHEETCONDITION`) VALUES ('59f109e144c347d1b0d61da63a4fe822', NULL, '', 'C端直租', '融资租赁合同-C端直租.doc', '融资租赁合同-C端直租-定稿版.docx', 'word', 'create', '', NULL, '030', '030002', '', '', '', '1', '', '', 'administrator', '8009001', '2020/03/31 14:02:27', 'admin', '8009001', '2020/03/31 02:18:46', '', '');
INSERT INTO `apzl`.`bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('25fff44b316c42d397cc8e2c214f2b20', '975294b526544d83b806e3fc2f99cd16', '59f109e144c347d1b0d61da63a4fe822', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `apzl`.`bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('31eccaf2a04c471ea341f7ef7a760961', 'bbe36e81f17542078489f223239e658a', '59f109e144c347d1b0d61da63a4fe822', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `apzl`.`bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('5952afc7c09044ab9a8966d75bcd7e19', 'ced1455267d64183ba1b270a9eda6089', '59f109e144c347d1b0d61da63a4fe822', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `apzl`.`bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('801e60bfebd649e09d673b7fa0f7fc23', '484815c4a7a14cf6bdbf69939e5b060e', '59f109e144c347d1b0d61da63a4fe822', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `apzl`.`bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('9d3b561076b74fca88e50e92d51413ef', 'cc67cd6da08745329d0723f5f6fda25d', '59f109e144c347d1b0d61da63a4fe822', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `apzl`.`bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('aba1e85d33b5444bb35357f837100335', 'db5b1632a6b44e7ea99e0dd0b2193ef3', '59f109e144c347d1b0d61da63a4fe822', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `apzl`.`bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('bd605c45dc554628ae5094c58a270b26', 'be101123ef74413eb0d8acad8b6b22b9', '59f109e144c347d1b0d61da63a4fe822', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `apzl`.`bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) VALUES ('f921be5522b14cf38d04320165696a74', '755698c1c27a43efa6c23310757c6163', '59f109e144c347d1b0d61da63a4fe822', NULL, NULL, NULL, NULL, NULL, NULL);
-- --------------------------------------修改信审考核统计报表
-- ------------------------------【新增SQL】----------------------------------------
CREATE TABLE `st_credit_audit_order_detail` (
`id` varchar(32) NOT NULL COMMENT 'id',
`serialno` varchar(32) NOT NULL COMMENT '流水号',
`objectno` varchar(32) NOT NULL COMMENT '订单流程编号',
`userid` varchar(32) DEFAULT NULL COMMENT '承办人编号',
`username` varchar(80) DEFAULT NULL COMMENT '承办人姓名',
`auditFlowType` varchar(32) DEFAULT NULL COMMENT '审核流程阶段类型',
`auditFlowTypeDes` varchar(80) DEFAULT NULL COMMENT '审核流程阶段类型解释',
`createtime` varchar(32) DEFAULT NULL COMMENT '订单流程创建时间',
`begintime` varchar(32) DEFAULT NULL COMMENT '开始执行时间',
`endtime` varchar(32) DEFAULT NULL COMMENT '完成执行时间',
`create_day` varchar(32) DEFAULT NULL COMMENT '跳过节假日-跳过节假日之后流程创建日期',
`audit_day` varchar(32) DEFAULT NULL COMMENT '跳过节假日-跳过节假日之后流程审核日期',
`jump_createtime` varchar(32) DEFAULT NULL COMMENT '跳过节假日-订单流程创建时间',
`jump_begintime` varchar(32) DEFAULT NULL COMMENT '跳过节假日-开始执行时间',
`jump_endtime` varchar(32) DEFAULT NULL COMMENT '跳过节假日-完成执行时间',
`nextAuditFlowType` varchar(250) DEFAULT NULL COMMENT '下阶段审核流程:【任意退回】',
`auditResSts` varchar(255) DEFAULT NULL COMMENT '审核结果状态',
`auditResStsDes` varchar(255) DEFAULT NULL COMMENT '审核结果状态解释',
`remark` varchar(255) DEFAULT NULL COMMENT '备注信息',
`INPUTTIME` varchar(32) DEFAULT NULL COMMENT '登记时间',
`UPDATETIME` varchar(32) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='信审考核统计订单-明细';
CREATE TABLE `st_credit_audit_order` (
`id` varchar(32) NOT NULL COMMENT 'id',
`every_day` varchar(20) DEFAULT NULL COMMENT '当前日期',
`userid` varchar(32) DEFAULT NULL COMMENT '承办人编号',
`username` varchar(80) DEFAULT NULL COMMENT '承办人姓名',
`auditFlowType` varchar(32) DEFAULT NULL COMMENT '审核流程阶段类型',
`auditFlowTypeDes` varchar(80) DEFAULT NULL COMMENT '审核流程阶段类型解释',
`order_count` int(11) DEFAULT NULL COMMENT '当日进单数量',
`count_audit` int(11) DEFAULT NULL COMMENT '当日审批数量',
`count_audit_pass` int(11) DEFAULT NULL COMMENT '当日审批通过数量',
`count_audit_refuse` int(11) DEFAULT NULL COMMENT '当日审批拒绝数量',
`count_audit_refuse1` int(11) DEFAULT NULL COMMENT '当日审批拒绝数量-分类1信用不良',
`count_audit_refuse2` int(11) DEFAULT NULL COMMENT '当日审批拒绝数量-分类2法院执行',
`count_audit_refuse3` int(11) DEFAULT NULL COMMENT '当日审批拒绝数量-分类3虚假信息',
`count_audit_refuse4` int(11) DEFAULT NULL COMMENT '当日审批拒绝数量-分类4身份核实异常',
`count_audit_refuse5` int(11) DEFAULT NULL COMMENT '当日审批拒绝数量-分类5购车目的异常',
`count_audit_refuse6` int(11) DEFAULT NULL COMMENT '当日审批拒绝数量-分类6综合评分不足',
`begintime` varchar(32) DEFAULT NULL COMMENT '开始执行时间',
`endtime` varchar(32) DEFAULT NULL COMMENT '完成执行时间',
`audittime` varchar(32) DEFAULT NULL COMMENT '审核使用时间',
`remark` varchar(255) DEFAULT NULL COMMENT '备注信息',
`INPUTTIME` varchar(32) DEFAULT NULL COMMENT '登记时间',
`UPDATETIME` varchar(32) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='信审考核统计订单';
CREATE TABLE `st_credit_audit_holiday` (
`id` varchar(32) NOT NULL COMMENT '编号',
`c_year` int(11) DEFAULT NULL COMMENT '',
`c_month` int(11) DEFAULT NULL COMMENT '',
`c_day` int(11) DEFAULT NULL COMMENT '',
`c_date` varchar(32) DEFAULT NULL COMMENT '当前日期',
`otype` varchar(21) DEFAULT NULL COMMENT '班/休',
`INPUTUSERID` varchar(32) DEFAULT NULL COMMENT '登记人',
`INPUTORGID` varchar(32) DEFAULT NULL COMMENT '登记部门',
`INPUTTIME` varchar(32) DEFAULT NULL COMMENT '登记时间',
`UPDATEUSERID` varchar(32) DEFAULT NULL COMMENT '更新人',
`UPDATEORGID` varchar(32) DEFAULT NULL COMMENT '更新部门',
`UPDATETIME` varchar(32) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='信审考核-工作日和休息日维护';
-- ------------------------------【新增记录-信审节假日维护】----------------------------------------
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 ('creditHolidayList', '审核节假日维护', NULL, '30', NULL, '1', '1', 'default', 'jbo.com.tenwa.entity.comm.credit.ST_CREDIT_AUDIT_HOLIDAY', 'O', NULL, NULL, 'c_date', NULL, NULL, 'SYS_Designer', '2017/09/12 16:10:55', 'SYS_Designer', '2017/09/12 17:38:59', NULL, '1', NULL);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910001', '910001', '1', 'O', 'id', 'id', 'String', null, '编号', null, '1', 'Text', '1', '3', null, null, null, '0', '0', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2017/09/13 09:32:31', '0', null, '0', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910002', '910002', '1', 'O', 'c_year', 'c_year', 'String', null, '', null, '1', 'Text', '2', '3', null, null, null, '0', '0', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2017/09/13 09:32:31', '0', null, '0', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910003', '910003', '1', 'O', 'c_month', 'c_month', 'String', null, '', null, '1', 'Text', '2', '3', null, null, null, '0', '0', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2017/09/12 16:43:57', '0', null, '0', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910004', '910004', '1', 'O', 'c_day', 'c_day', 'String', null, '', null, '1', 'Text', '2', '3', null, null, null, '0', '0', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2017/09/12 16:43:57', '0', null, '0', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910005', '910005', '1', 'O', 'c_date', 'c_date', 'String', null, '当前日期', null, '1', 'Date', '3', '2', null, null, null, '32', '1', '0', '0', '1', '1', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2018/08/14 15:45:14', '0', null, '1', null, null, null, 'BigThan,LessThan,Area');
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910006', '910006', '1', 'O', 'otype', 'otype', 'String', null, '班/休', null, '1', 'Text', '1', '1', null, null, null, '21', '1', '0', '0', '1', '1', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2018/08/14 15:45:14', '0', null, '1', null, null, null, 'Like,Equals');
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910007', '910007', '1', 'O', 'INPUTUSERID', 'INPUTUSERID', 'String', null, '登记人', null, '1', 'Text', '1', '1', null, null, null, '32', '1', '0', '0', '1', '1', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2018/08/14 15:45:14', '0', null, '1', null, null, null, 'Like,Equals');
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910008', '910008', '1', 'O', 'INPUTORGID', 'INPUTORGID', 'String', null, '登记部门ID', null, '1', 'Text', '1', '1', null, null, null, '32', '0', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2017/09/13 09:32:32', '0', null, '1', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910009', '910009', '1', null, 'NameManager.getOrgName(INPUTORGID)', 'INPUTORGIDName', 'String', null, '登记部门', null, '1', 'Text', '1', '1', null, null, null, '32', '1', '0', '0', '0', '0', '1', '0', null, null, 'SYS_Designer', '2017/09/13 09:17:36', 'SYS_Designer', '2017/09/13 09:32:32', '0', null, '1', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910010', '910010', '1', 'O', 'INPUTTIME', 'INPUTTIME', 'String', null, '登记时间', null, '1', 'Date', '3', '2', null, null, null, '32', '1', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:55', 'SYS_Designer', '2017/09/13 09:32:32', '0', null, '1', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910011', '910011', '1', 'O', 'UPDATEUSERID', 'UPDATEUSERID', 'String', null, '更新人', null, '1', 'Text', '1', '1', null, null, null, '32', '1', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:56', 'SYS_Designer', '2017/09/13 09:32:32', '0', null, '1', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910012', '910012', '1', 'O', 'UPDATEORGID', 'UPDATEORGID', 'String', null, '更新部门ID', null, '1', 'Text', '1', '1', null, null, null, '32', '0', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:56', 'SYS_Designer', '2017/09/13 09:32:32', '0', null, '1', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910013', '910013', '1', 'O', 'UPDATETIME', 'UPDATETIME', 'String', null, '更新时间', null, '1', 'Date', '3', '2', null, null, null, '32', '1', '0', '0', '0', '0', '1', '0', null, null, 'SYS_DESIGNER', '2017/09/12 16:10:56', 'SYS_Designer', '2017/09/13 09:32:32', '0', null, '1', null, null, null, null);
INSERT INTO `awe_do_library` VALUES ('creditHolidayList', '910014', '910014', '1', null, 'NameManager.getOrgName(UPDATEORGID)', 'UPDATEORGIDName', 'String', null, '更新部门', null, '1', 'Text', '1', '1', null, null, null, '32', '1', '0', '0', '0', '0', '1', '0', null, null, 'SYS_Designer', '2017/09/13 09:26:10', 'SYS_Designer', '2017/09/13 09:32:32', '0', null, '1', null, null, null, null);
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 ('creditHolidayInfo', '审核节假日维护', NULL, '30020', NULL, '1', '1', 'default', 'jbo.com.tenwa.entity.comm.credit.ST_CREDIT_AUDIT_HOLIDAY', 'O', 'id=:id', NULL, NULL, 'com.tenwa.holiday.handler.CreditAuditHolidayHandler', NULL, 'SYS_Designer', '2017/09/12 16:10:01', 'SYS_Designer', '2017/09/12 16:59:52', NULL, '1', NULL);
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 ('creditHolidayInfo', '910015', '910015', '1', 'O', 'id', 'id', 'Number', NULL, '编号', NULL, '1', 'Text', '2', '3', NULL, NULL, NULL, '0', '0', '0', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'admin', '2017/09/12 17:19:08', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910016', '910016', '1', 'O', 'c_year', 'c_year', 'Number', NULL, '', NULL, '1', 'Text', '2', '3', NULL, NULL, NULL, '0', '0', '0', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'admin', '2017/09/12 17:19:08', '0', NULL, '0', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910017', '910017', '1', 'O', 'c_month', 'c_month', 'Number', NULL, '', NULL, '1', 'Text', '2', '3', NULL, NULL, NULL, '0', '0', '0', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'admin', '2017/09/12 17:19:08', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910018', '910018', '1', 'O', 'c_day', 'c_day', 'Number', NULL, '', NULL, '1', 'Text', '2', '3', NULL, NULL, NULL, '0', '0', '0', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'admin', '2017/09/12 17:19:08', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910019', '910019', '1', 'O', 'c_date', 'c_date', 'String', NULL, '当前日期', NULL, '1', 'Date', '3', '2', NULL, NULL, NULL, '32', '1', '0', '1', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'SYS_Designer', '2017/09/12 17:22:34', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910020', '910020', '1', 'O', 'otype', 'otype', 'String', NULL, '班/休', NULL, '1', 'Select', '1', '1', 'CodeTable', '班,班,休,休', NULL, '21', '1', '0', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'admin', '2017/09/12 17:19:08', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910021', '910021', '1', 'O', 'INPUTUSERID', 'INPUTUSERID', 'String', NULL, '登记人ID', NULL, '1', 'Text', '1', '1', NULL, NULL, NULL, '32', '0', '1', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'SYS_Designer', '2017/09/13 09:47:26', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910022', '910022', '1', 'O', 'INPUTORGID', 'INPUTORGID', 'String', NULL, '登记部门ID', NULL, '1', 'Text', '1', '1', NULL, NULL, NULL, '32', '0', '0', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'SYS_Designer', '2017/09/13 09:47:26', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910023', '910023', '1', 'O', 'INPUTTIME', 'INPUTTIME', 'String', NULL, '登记时间', NULL, '1', 'Text', '1', '2', NULL, NULL, NULL, '32', '0', '1', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'SYS_Designer', '2017/09/13 09:47:26', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910024', '910024', '1', 'O', 'UPDATEUSERID', 'UPDATEUSERID', 'String', NULL, '更新人ID', NULL, '1', 'Text', '1', '1', NULL, NULL, NULL, '32', '0', '1', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'SYS_Designer', '2017/09/13 09:47:26', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910025', '910025', '1', 'O', 'UPDATEORGID', 'UPDATEORGID', 'String', NULL, '更新部门ID', NULL, '1', 'Text', '1', '1', NULL, NULL, NULL, '32', '0', '0', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'SYS_Designer', '2017/09/13 09:47:26', '0', NULL, '1', NULL, NULL, NULL, NULL);
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 ('creditHolidayInfo', '910026', '910026', '1', 'O', 'UPDATETIME', 'UPDATETIME', 'String', NULL, '更新时间', NULL, '1', 'Text', '1', '2', NULL, NULL, NULL, '32', '0', '1', '0', '1', '1', '1', '0', NULL, NULL, 'SYS_DESIGNER', '2017/09/12 16:10:01', 'SYS_Designer', '2017/09/13 09:47:26', '0', NULL, '1', NULL, NULL, NULL, NULL);
INSERT INTO `apzl`.`bf_template` (`ID`, `SERIALNO`, `SORTNUMBER`, `TEMPLATENAME`, `TEMPLATESHOWNAME`, `TEMPLATEPATH`, `TEMPLATETYPE`, `OPERATETYPE`, `CALLBACK`, `CREATEMETHOD`, `DOCTYPE`, `ONECLASSIFY`, `TWOCLASSIFY`, `THREECLASSIFY`, `FOURCLASSIFY`, `TEMPLATEVERSION`, `STATUS`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `INPUTTIME`, `UPDATEUSERID`, `UPDATEORGID`, `UPDATETIME`, `CREATECONDITION`, `CREATESHEETCONDITION`)
VALUES ('da670c357a4f11eaae2500163e0ad612', NULL, NULL, '信审考核节假日维护', '信审考核节假日维护.xlsx', '信审考核节假日维护导入.xlsx', 'excel', 'upload', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', NULL, '维护当年中因法定节假日 工作日改为休息日,或休息日调整为节假日', 'admin', '80009000200010001', '2020/03/13 10:07:19', 'admin', '80009000200010001', '2020/03/13 11:02:17', NULL, NULL);
INSERT INTO `apzl`.`bf_importconfig` (`ID`, `IMPORTTABLE`, `ROWLINE`, `DATEINDEX`, `SHEETNAME`, `ISDELDATE`, `DELCONDITION`, `IMPORTCLASS`, `CENOTE`, `INPUTUSERID`, `INPUTORGID`, `INPUTTIME`, `UPDATEUSERID`, `UPDATEORGID`, `UPDATETIME`, `RELATIVECLASS`, `TEMPLATEID`, `ISSAVE`)
VALUES ('e6c678657a4f11eaae2500163e0ad612', 'ST_CREDIT_AUDIT_HOLIDAY', '1', '2', NULL, 'yes', 'c_date=:{c_date}', 'com.tenwa.officetempalte.importcallback.impl.CreditAuditHolidayCallBack', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'jbo.com.tenwa.entity.comm.credit.ST_CREDIT_AUDIT_HOLIDAY', 'da670c357a4f11eaae2500163e0ad612', NULL);
-- ------------------------------【新增记录--定时任务】配置为每天早上5点-----------------------------
INSERT INTO `apzl`.`code_library` (`codeno`, `itemno`, `itemname`, `bankno`, `sortno`, `isinuse`, `itemdescribe`, `itemattribute`, `relativecode`, `attribute1`, `attribute2`, `attribute3`, `attribute4`, `attribute5`, `attribute6`, `attribute7`, `attribute8`, `inputuser`, `inputorg`, `inputtime`, `updateuser`, `updatetime`, `remark`, `helptext`)
VALUES ('MissionName', 'com.tenwa.lease.app.quartzmession.CreditAuditHolidayBatch', '信审考核统计处理', '5101001', '5101001', '1', '信审考核统计处理', '', '', '', '', '', '', '', '', '', '', 'SYS_Designer', NULL, '2019/12/26 10:13:04', 'SYS_Designer', '2019/12/26 10:14:07', '', '');

View File

@ -0,0 +1,731 @@
package com.tenwa.lease.app.quartzmession;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.UUID;
/**
* 初始化信审考核报表数据跑批
* @author xiezhiwen
*/
public class CreditAuditHolidayBatch implements Job{
private static final Logger logger = LogManager.getLogger(CreditAuditHolidayBatch.class);// 引入logger日志
public void execute(JobExecutionContext arg0) throws JobExecutionException {
initDetail();
updateDetail();
initOrderAuditDay();
saveOrderAuditDay();
updateOrderAuditDay();
}
/**
* 添加审核流程记录明细
* @return
*/
private void initDetail(){
Transaction Sqlca=null;
try{
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
//初始化信审考核明细表
String result1 = initDetail(Sqlca);
Sqlca.commit();
logger.info("【初始化信审考核明细表】定时任务执行成功<<<<<<<<<<<<<: "+result1);
}catch(Exception e){
logger.error("<<<<<<<<<<<<<<<<<<<<<<【初始化信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【初始化信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【初始化信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
try {
Sqlca.rollback();
} catch (JBOException e1) {
e1.printStackTrace();
}
e.printStackTrace();
}finally {
if(Sqlca!=null) {
try {
Sqlca.commit();
Sqlca.disConnect();
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}
/**
* 修改审核明细的创建时间
* @return
*/
private void updateDetail(){
Transaction Sqlca=null;
try{
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
//初始化信审考核明细表
String result1 = updateDetail(Sqlca);
Sqlca.commit();
logger.info("【修改信审考核明细表】定时任务执行异常<<<<<<<<<<<<<: "+result1);
}catch(Exception e){
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
try {
Sqlca.rollback();
} catch (JBOException e1) {
e1.printStackTrace();
}
e.printStackTrace();
}finally {
if(Sqlca!=null) {
try {
Sqlca.commit();
Sqlca.disConnect();
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}
/**
* 初始化审核统计报表-根据进单日期
* @return
*/
private void initOrderAuditDay(){
Transaction Sqlca=null;
try{
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
//初始化信审考核明细表
String result1 = initOrderAuditDay(Sqlca);
Sqlca.commit();
logger.info("【修改信审考核明细表】定时任务执行完成<<<<<<<<<<<<<: "+result1);
}catch(Exception e){
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
try {
Sqlca.rollback();
} catch (JBOException e1) {
e1.printStackTrace();
}
e.printStackTrace();
}finally {
if(Sqlca!=null) {
try {
Sqlca.commit();
Sqlca.disConnect();
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}
/**
* 初始化或者修改审核统计报表-根据审单日期
* @return
*/
private void saveOrderAuditDay(){
Transaction Sqlca=null;
try{
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
//初始化信审考核明细表
String result1 = saveOrderAuditDay(Sqlca);
Sqlca.commit();
logger.info("【修改信审考核明细表】定时任务执行完成<<<<<<<<<<<<<: "+result1);
}catch(Exception e){
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
try {
Sqlca.rollback();
} catch (JBOException e1) {
e1.printStackTrace();
}
e.printStackTrace();
}finally {
if(Sqlca!=null) {
try {
Sqlca.commit();
Sqlca.disConnect();
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}
/**
* 初始化或者修改审核统计报表-根据审单日期
* @return
*/
private void updateOrderAuditDay(){
Transaction Sqlca=null;
try{
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
//初始化信审考核明细表
String result1 = updateOrderAuditDay(Sqlca);
Sqlca.commit();
logger.info("【修改信审考核明细表】定时任务执行完成<<<<<<<<<<<<<: "+result1);
}catch(Exception e){
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
logger.error("<<<<<<<<<<<<<<<<<<<<<<【修改信审考核明细表】定时任务执行异常>>>>>>>>>>>>>>>>>>>>>>>");
try {
Sqlca.rollback();
} catch (JBOException e1) {
e1.printStackTrace();
}
e.printStackTrace();
}finally {
if(Sqlca!=null) {
try {
Sqlca.commit();
Sqlca.disConnect();
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}
/**
* 添加审核流程记录明细
* @return
* @throws Exception
*/
public String initDetail(Transaction Sqlca) throws Exception {
// 定义全局对象
String uuidDetail = ""; // 业务id
String userid = ""; // 用户id
String username = ""; // 用户姓名
String objectno = ""; // 流程编号
String serialno = ""; // 流程处理流水
String auditFlowType = ""; // 流程审核类型
String auditFlowTypeDes = ""; // 流程审核类型说明
String createtime = ""; // 流程创建时间
String begintime = ""; // 流程开始时间
String endtime = ""; // 流程结束时间
String jump_createtime = ""; // 跳过节假日之后流程创建时间
String create_day = ""; // 跳过节假日之后流程创建日期
String audit_day = ""; // 跳过节假日之后流程审核日期
String jump_begintime = ""; // 跳过节假日之后流程开始时间
String jump_endtime = ""; // 跳过节假日之后流程结束时间
String nextAuditFlowType = ""; // 下阶段流程审核类型
String auditResSts = ""; // 流程审核结果
String auditResStsDes = ""; // 流程审核结果说明
String remark = "";
String insertSql = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
int con=0;
// 查询所有需要发送还款提醒的数据
String selSql="SELECT \n" +
" FT.userid,\n" +
" FT.username,\n" +
" FT.objectno,\n" +
" FT.serialno,\n" +
" FT.phaseno AS auditFlowType,\n" +
" FT.phasename AS auditFlowTypeDes,\n" +
" FT.begintime,\n" +
" FT.endtime,\n" +
" FT.phaseopinion1 AS nextAuditFlowType,\n" +
" fob.phaseopinion AS auditResSts,\n" +
" (SELECT itemname from code_library WHERE codeno='disagreeOP' AND itemno=fob.phaseopinion) AS auditResStsDes\n" +
"FROM FLOW_TASK FT\n" +
"LEFT JOIN FLOW_OPINION_BUSINESS FOB ON FT.SERIALNO=FOB.SERIALNO \n" +
"WHERE FT.flowname = '业务申请流程' \n" +
"AND FT.phaseno='0030' \n" +
"AND (FT.USERNAME IS NOT NULL OR FT.USERNAME <>'')";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
while(rs.next()) {
// 获取接口推送所需数据
con++;
uuidDetail = UUID.randomUUID().toString().replace("-", "");
userid = rs.getString("userid"); // 用户id
username = rs.getString("username"); // 用户姓名
objectno = rs.getString("objectno"); // 流程编号
serialno = rs.getString("serialno"); // 流程处理流水
auditFlowType = rs.getString("auditFlowType"); // 流程审核类型
auditFlowTypeDes = rs.getString("auditFlowTypeDes"); // 流程审核类型说明
createtime = rs.getString("begintime"); // 流程创建时间
begintime = rs.getString("begintime"); // 流程开始时间
endtime = rs.getString("endtime"); // 流程结束时间
nextAuditFlowType = rs.getString("nextAuditFlowType"); // 下阶段流程审核类型
auditResSts = rs.getString("auditResSts"); // 流程审核结果
auditResStsDes = rs.getString("auditResStsDes"); // 流程审核结果说明
if("任意退回".equals(nextAuditFlowType)){
continue;
}
if(StringUtils.isNotEmpty(createtime)){//开始时间不为空
jump_createtime = resJumpHoliday(Sqlca, rs.getString("begintime")); // 跳过节假日之后流程创建时间
create_day = dayFormat.format(simpleDateFormat.parse(jump_createtime));
jump_createtime = sdf.format(simpleDateFormat.parse(jump_createtime));
jump_begintime = jump_createtime; // 跳过节假日之后流程开始时间
createtime = sdf.format(simpleDateFormat.parse(createtime));
begintime = createtime;
}
if (StringUtils.isNotEmpty(endtime)){//结束时间不为空
jump_endtime = resJumpHoliday(Sqlca, rs.getString("endtime")); // 跳过节假日之后流程结束时间
audit_day = dayFormat.format(simpleDateFormat.parse(jump_endtime));
endtime = sdf.format(simpleDateFormat.parse(endtime));
jump_endtime = sdf.format(simpleDateFormat.parse(jump_endtime));
}
insertSql="INSERT INTO st_credit_audit_order_detail(id,serialno,objectno,userid,username, " +
"auditFlowType," +
"auditFlowTypeDes," +
"createtime," +
"begintime," +
"endtime," +
"create_day," +
"audit_day," +
"jump_createtime," +
"jump_begintime," +
"jump_endtime," +
"nextAuditFlowType," +
"auditResSts," +
"auditResStsDes," +
"remark," +
"INPUTTIME, " +
"UPDATETIME " +
") " +
"VALUES ( " +
"'"+uuidDetail+"', " +
"'"+serialno+"', " +
"'"+objectno+"', " +
"'"+userid+"', " +
"'"+username+"', " +
"'"+auditFlowType+"', " +
"'"+auditFlowTypeDes+"', " +
" '"+createtime+"', " +
" '"+begintime+"', " +
" '"+endtime+"', " +
" '"+create_day+"', " +
" '"+audit_day+"', " +
" '"+jump_createtime+"', " +
" '"+jump_begintime+"', " +
" '"+jump_endtime+"', " +
"'"+nextAuditFlowType+"', " +
"'"+auditResSts+"', " +
"'"+auditResStsDes+"', " +
"'"+remark+"', " +
"DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'), " +
"DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') " +
")";
Sqlca.executeSQL(new SqlObject(insertSql));
}
return String.valueOf(con);
}
/**
* 查询最小创建时间更改明细记录中对应的创建时间
* @return
* @throws Exception
*/
public String updateDetail(Transaction Sqlca) throws Exception {
// 定义全局对象
String objectno = ""; // 流程编号
String begintime = ""; // 流程创建时间
String createtime = ""; // 跳过节假日之后流程创建时间
String create_day = ""; // 跳过节假日之后流程创建日期
String updSql = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
int con=0;
// 查询所有需要发送还款提醒的数据
// 查询所有需要发送还款提醒的数据
String selSql="SELECT \n" +
" FT.userid,\n" +
" FT.objectno,\n" +
" min(FT.begintime) AS begintime\n" +
"FROM FLOW_TASK FT\n" +
"LEFT JOIN FLOW_OPINION_BUSINESS FOB ON FT.SERIALNO=FOB.SERIALNO \n" +
"WHERE FT.flowname = '业务申请流程' \n" +
"AND FT.phaseno='0030' \n" +
"AND (FT.USERNAME IS NOT NULL OR FT.USERNAME <>'') group by FT.objectno";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
while(rs.next()) {
// 获取接口推送所需数据
con++;
begintime = rs.getString("begintime"); // 流程编号
objectno = rs.getString("objectno"); // 流程创建时间
createtime = sdf.format(simpleDateFormat.parse(begintime));
create_day = dayFormat.format(simpleDateFormat.parse(resJumpHoliday(Sqlca, begintime)));
updSql="UPDATE st_credit_audit_order_detail SET create_day='"+create_day+"', createtime='"+createtime+"'," +
"UPDATETIME=DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') WHERE objectno='"+objectno+"' ";
Sqlca.executeSQL(new SqlObject(updSql));
objectno = "";
begintime = "";
createtime = "";
create_day = "";
updSql = "";
}
return String.valueOf(con);
}
/**
* 初始化审核统计报表-保存审核日期相关订单
* @return
* @throws Exception
*/
public String initOrderAuditDay(Transaction Sqlca) throws Exception {
String insertSql="INSERT INTO st_credit_audit_order(\n" +
" id,\n" +
" every_day,\n" +
" userid,\n" +
" username,\n" +
" auditFlowType,\n" +
" auditFlowTypeDes,\n" +
" count_audit,\n" +
" count_audit_pass,\n" +
" count_audit_refuse,\n" +
" count_audit_refuse1,\n" +
" count_audit_refuse2,\n" +
" count_audit_refuse3,\n" +
" count_audit_refuse4,\n" +
" count_audit_refuse5,\n" +
" count_audit_refuse6\n" +
" )\n" +
" SELECT \n" +
" replace(uuid(),'-',''),\n" +
" st2.every_day,\n" +
" st2.userid,\n" +
" st2.username,\n" +
" st2.auditFlowType,\n" +
" st2.auditFlowTypeDes,\n" +
" st2.count_audit,\n" +
" st3.count_audit_pass,\n" +
" st4.count_audit_refuse,\n" +
" st5.count_audit_refuse1,\n" +
" st6.count_audit_refuse2,\n" +
" st7.count_audit_refuse3,\n" +
" st8.count_audit_refuse4,\n" +
" st9.count_audit_refuse5,\n" +
" st10.count_audit_refuse6\n" +
" from\n" +
" (SELECT COUNT(1) AS count_audit,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts != 'null'AND (endtime is not null or endtime != '') GROUP BY audit_day, userid) as st2 \n" +
" left join (SELECT COUNT(1) AS count_audit_pass,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts = '0070'AND (endtime is not null or endtime != '')GROUP BY audit_day, userid) as st3 on st3.every_day = st2.every_day AND st3.userid=st2.userid\n" +
" left join (SELECT COUNT(1) AS count_audit_refuse,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts != '0070' AND auditResSts != 'null' AND (endtime is not null or endtime != '') GROUP BY audit_day, userid) as st4 on st4.every_day = st2.every_day AND st4.userid=st2.userid\n" +
" left join (SELECT COUNT(1) AS count_audit_refuse1,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts = '0010' AND (endtime is not null or endtime != '') GROUP BY audit_day, userid) as st5 on st5.every_day = st2.every_day AND st5.userid=st2.userid\n" +
" left join (SELECT COUNT(1) AS count_audit_refuse2,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts = '0020' AND (endtime is not null or endtime != '') GROUP BY audit_day, userid) as st6 on st6.every_day = st2.every_day AND st6.userid=st2.userid\n" +
" left join (SELECT COUNT(1) AS count_audit_refuse3,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts = '0030' AND (endtime is not null or endtime != '') GROUP BY audit_day, userid) as st7 on st7.every_day = st2.every_day AND st7.userid=st2.userid\n" +
" left join (SELECT COUNT(1) AS count_audit_refuse4,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts = '0040' AND (endtime is not null or endtime != '') GROUP BY audit_day, userid) as st8 on st8.every_day = st2.every_day AND st8.userid=st2.userid\n" +
" left join (SELECT COUNT(1) AS count_audit_refuse5,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts = '0050' AND (endtime is not null or endtime != '') GROUP BY audit_day, userid) as st9 on st9.every_day = st2.every_day AND st9.userid=st2.userid\n" +
" left join (SELECT COUNT(1) AS count_audit_refuse6,audit_day AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail \n" +
" WHERE auditResSts = '0060' AND (endtime is not null or endtime != '') GROUP BY audit_day, userid) as st10 on st10.every_day = st2.every_day AND st10.userid=st2.userid \n";
Sqlca.executeSQL(new SqlObject(insertSql));
return "-1";
}
/**
* 根据查询进单统计数据添加或者更新统计订单数据
* @return
* @throws Exception
*/
public String saveOrderAuditDay(Transaction Sqlca) throws Exception {
// 定义全局对象
String id = ""; // 流程编号
String order_count = ""; // 流程编号
String userid = ""; // 流程编号
String every_day = ""; // 流程编号
String username = ""; // 流程创建时间
String auditFlowType = ""; // 流程创建时间
String auditFlowTypeDes = ""; // 跳过节假日之后流程创建时间
String updSql = "";
String selSql2 = "";
int con=0;
// 查询所有需要发送还款提醒的数据
String selSql="SELECT count(1) as order_count,std1.every_day,std1.userid,std1.username,std1.auditFlowType,std1.auditFlowTypeDes \n" +
" from (SELECT min(create_day) AS every_day,userid,username,auditFlowType,auditFlowTypeDes from st_credit_audit_order_detail GROUP BY objectno) AS std1 \n" +
" GROUP BY std1.every_day ";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
while(rs.next()) {
id = UUID.randomUUID().toString().replace("-", "");
// 获取接口推送所需数据
con++;
every_day = rs.getString("every_day"); // 流程编号
order_count = rs.getString("order_count"); // 流程创建时间
userid = rs.getString("userid"); // 流程创建时间
username = rs.getString("username"); // 流程创建时间
auditFlowType = rs.getString("auditFlowType"); // 流程创建时间
auditFlowTypeDes = rs.getString("auditFlowTypeDes"); // 流程创建时间
selSql2="SELECT count(1) as countNum FROM st_credit_audit_order WHERE every_day ='" + every_day +"'";
ASResultSet rs2 = Sqlca.getASResultSet(new SqlObject(selSql2));
if(rs2.next()) {
if(rs2.getInt("countNum") > 0){
updSql="UPDATE st_credit_audit_order SET order_count='"+order_count+"', " +
"UPDATETIME=DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') WHERE every_day='"+every_day+"' ";
Sqlca.executeSQL(new SqlObject(updSql));
}else {
String insertSql = "INSERT INTO st_credit_audit_order(\n" +
" id,\n" +
" every_day,\n" +
" userid,\n" +
" username,\n" +
" auditFlowType,\n" +
" auditFlowTypeDes,\n" +
" order_count,\n" +
" INPUTTIME, " +
" UPDATETIME " +
" ) " +
" VALUES ( " +
" '" + id + "', " +
" '" + every_day + "', " +
" '" + userid + "', " +
" '" + userid + "', " +
" '" + username + "', " +
" '" + auditFlowType + "', " +
" '" + auditFlowTypeDes + "', " +
"DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'), " +
"DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') " +
")";
}
}
id = "";
order_count = "";
userid = "";
every_day = "";
username = "";
auditFlowType = "";
auditFlowTypeDes = "";
updSql = "";
selSql2 = "";
}
return String.valueOf(con);
}
/**
* 根据查询进单统计数据修改
* @return
* @throws Exception
*/
public String updateOrderAuditDay(Transaction Sqlca) throws Exception {
// 定义全局对象
String id = ""; // 流程编号
String userid = ""; // 流程编号
String every_day = ""; // 流程编号
String begintime = ""; // 流程创建时间
String endtime = ""; // 流程创建时间
String audittime = ""; // 跳过节假日之后流程创建时间
String updSql = "";
String selSql2 = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
int con=0;
// 查询所有需要发送还款提醒的数据
String selSql="SELECT id, every_day, userid FROM st_credit_audit_order ";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
while(rs.next()) {
// 获取接口推送所需数据
con++;
id = rs.getString("id"); // 流程编号
every_day = rs.getString("every_day"); // 流程编号
userid = rs.getString("userid"); // 流程创建时间
selSql2="SELECT \n" +
" jump_begintime,\n" +
" jump_endtime \n" +
" FROM st_credit_audit_order_detail \n" +
" WHERE userid = '" + userid +"'" +
" AND audit_day ='" + every_day +"'" +
" AND auditResSts != 'null'" +
" AND (endtime is not null or endtime != '')" ;
ASResultSet rs2 = Sqlca.getASResultSet(new SqlObject(selSql2));
begintime = ""; // 流程创建时间
endtime = "";
while(rs2.next()) {
String jump_begintime = rs2.getString("jump_begintime"); // 流程创建时间
String jump_endtime = rs2.getString("jump_endtime"); // 流程创建时间
if(StringUtils.isEmpty(begintime) || sdf.parse(begintime).getTime() > sdf.parse(jump_begintime).getTime()){
begintime = jump_begintime;
}
if(StringUtils.isEmpty(endtime) || sdf.parse(jump_endtime).getTime() > sdf.parse(endtime).getTime()){
endtime = jump_endtime;
}
}
audittime = resDiffJumpHoliday(Sqlca, simpleDateFormat.format(sdf.parse(begintime)), simpleDateFormat.format(sdf.parse(endtime)));
updSql="UPDATE st_credit_audit_order SET begintime='"+begintime+"', " +
" endtime='"+endtime+"', " +
" audittime='"+audittime+"', " +
"UPDATETIME=DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') WHERE id='"+id+"' ";
Sqlca.executeSQL(new SqlObject(updSql));
id = "";
userid = "";
every_day = "";
begintime = "";
endtime = "";
audittime = "";
updSql = "";
selSql2 = "";
}
return String.valueOf(con);
}
/**
* 0010 信用不良
* 0020 法院执行
* 0030 虚假信息
* 0040 身份核实异常
* 0050 购车目的异常
* 0060 综合评分不足
* 0070 同意
* 0080 附条件通过
*/
/**
* 根据当前时间获得跳过节假日的工作日时间
* @param date
* @return
*/
private String resJumpHoliday(Transaction Sqlca, String date) throws SQLException, ParseException {
//查询当前时间是否在工作时间
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
int hour = Integer.parseInt(date.substring(11, 13));
int minute = Integer.parseInt(date.substring(14, 16));
if(hour < 9){//时间小于当天9点则调整时间为上午九点
date = date.substring(0, 11) + "09:00:00";
}else if((hour == 17 && minute > 30) || (hour > 17)){//时间小于当天17:30点则调整时间为第二天的上午九点
Date time = simpleDateFormat.parse(date);
Calendar calendar = Calendar.getInstance();
calendar.setTime(time);
calendar.add(Calendar.DAY_OF_MONTH, 1);
date = simpleDateFormat.format(calendar.getTime()).substring(0, 11) + "09:00:00";
}
//查询当前时间是否在节假日时间
String day = date.substring(0, 10);
int count = 0;
while (count < 15){
count ++;
String selSql="SELECT count(1) as countNum " +
" FROM st_credit_audit_holiday st" +
" WHERE st.c_date='" + day +"'" +
" AND st.otype='休'" ;
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
int countNum = 0;
if(rs.next()){
countNum = rs.getInt("countNum");
}
if(countNum > 0){
Date time = simpleDateFormat.parse(date);
Calendar calendar = Calendar.getInstance();
calendar.setTime(time);
calendar.add(Calendar.DAY_OF_MONTH, 1);
date = simpleDateFormat.format(calendar.getTime()).substring(0, 11) + "09:00:00";
day = date.substring(0, 10);
}else {
break;
}
}
return date;
}
/**
* 根据时间段相差时间获得跳过节假日的工作日时间
* @param begintime 开始时间
* @param endtime 结束时间
* @return
*/
private String resDiffJumpHoliday(Transaction Sqlca, String begintime, String endtime) throws SQLException, ParseException {
//获取开始时间结束时间跳过节假日的时间
begintime = resJumpHoliday(Sqlca, begintime);
endtime = resJumpHoliday(Sqlca, endtime);
//确认开始时间到结束时间中间隔的时间并排除节假日时间
//如果结束时间小于或者等于开始时间
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date beginDate = simpleDateFormat.parse(begintime);
Date endDate = simpleDateFormat.parse(endtime);
long diff = 0;
if(beginDate.getTime() >= endDate.getTime()){
return "0";
}else if (begintime.substring(0, 10).equals(endtime.substring(0, 10))){
diff = diffMinute(beginDate.getTime(), endDate.getTime());
return String.valueOf(diff);
}else {
long diffBeginAfter = diffBeginDateAfter(begintime, beginDate);
long diffEndDateBefore = diffEndDateBefore(endtime, endDate);
diff = diffBeginAfter + diffEndDateBefore;
//得到相差的天数 betweenDate
beginDate = dayFormat.parse(dayFormat.format(beginDate));
endDate = dayFormat.parse(dayFormat.format(endDate));
long betweenDate = (endDate.getTime() - beginDate.getTime())/(60*60*24*1000);
if (betweenDate == 1){
return String.valueOf(diff);
}else {//中间相隔大于一天查询数据库相隔天数中有几天是假期
begintime = dayFormat.format(beginDate);
endtime = dayFormat.format(endDate);
String selSql="SELECT COUNT(1) as countNum FROM (\n" +
" SELECT c_date\n" +
" FROM st_credit_audit_holiday st\n" +
" WHERE st.c_date BETWEEN '"+begintime+"' AND '"+endtime+"'\n" +
" AND st.otype='休'\n" +
" GROUP BY st.c_date\n" +
" ) AS s" ;
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
int countNum = 0;
if(rs.next()){
countNum = rs.getInt("countNum");
}
diff += (betweenDate - countNum - 1)*8*60;
return String.valueOf(diff);
}
}
}
private long diffEndDateBefore(String endTime, Date endDate) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
String endtimeBefore = endTime.substring(0, 11) + "09:00:00";
Date endDateBefore = simpleDateFormat.parse(endtimeBefore);
return diffMinute(endDateBefore.getTime(), endDate.getTime());
}
private long diffBeginDateAfter(String beginTime, Date beginDate) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
String begintimeAfter = beginTime.substring(0, 11) + "17:30:00";
Date beginDateAfter = simpleDateFormat.parse(begintimeAfter);
return diffMinute(beginDate.getTime(), beginDateAfter.getTime());
}
private long diffMinute(long begin, long end){
if(begin > end){
return -1;
}
return (end - begin)/1000/60;
}
private boolean compareTime(String begin, String end) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
return simpleDateFormat.parse(begin).getTime() > simpleDateFormat.parse(begin).getTime();
}
}