This commit is contained in:
zhouyahui 2018-11-07 09:58:47 +08:00
commit de7726123a
53 changed files with 621 additions and 88 deletions

View File

@ -36,5 +36,9 @@
<script type="text/javascript">
var productName="<%=productName%>";
setItemValue(0, 0, "PRODUCT_NAME", productName);
var flag = getItemValue(0, 0, "DefaultDueDay");
if(flag==null||flag==""){
hideItem(0, "DefaultDueDay");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -33,6 +33,7 @@
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.ShowSummary="1";
dwTemp.setPageSize(10);
if("21".equals(contract_status)){

View File

@ -19,7 +19,7 @@
String cmessage="";
if (!myAmarsoftUpload.getFiles().getFile(0).isMissing()){
try {
JBOTransaction tx=JBOFactory.getFactory().createTransaction();
//JBOTransaction tx=JBOFactory.getFactory().createTransaction();
String importparam= CurPage.getParameter("importparam");
importparam=importparam.replaceAll("@", ",");
JSONObject paramJson=JSONDecoder.decode(importparam);

View File

@ -20,7 +20,7 @@
String cmessage="";
if (!myAmarsoftUpload.getFiles().getFile(0).isMissing()){
try {
JBOTransaction tx=JBOFactory.getFactory().createTransaction();
//JBOTransaction tx=JBOFactory.getFactory().createTransaction();
String importparam= CurPage.getParameter("importparam");
importparam=importparam.replaceAll("@", ",");
JSONObject paramJson=JSONDecoder.decode(importparam);

View File

@ -46,6 +46,7 @@
JBOTransaction tx=JBOFactory.createJBOTransaction();
Map<String,String> params=new HashMap<String,String>();
list=DataOperatorUtil.getDataBySql(tx, sql, params);
tx.commit();
String[][] displayData = new String[list.size()][headers.length];
for(int i=0;i<displayData.length;i++){
for(int j=0;j<displayData[i].length;j++){

View File

@ -26,11 +26,13 @@ public static boolean changeHtmlData2DB(FormatDocConfig config, Transaction Sqlc
changeHtmlData2xml(rs, config, conn);
}
conn.commit();
conn.close();
return true;
}catch(Exception e){
ARE.getLog().debug(e);
if(conn != null) try{
conn.rollback();
conn.close();
}catch(Exception e0){}
return false;
}finally{

View File

@ -7,7 +7,7 @@
String taskNo = CurPage.getParameter("TaskNo");
if(StringX.isSpace(taskNo)) taskNo = "";
String userID = CurUser.getUserID(), attribute10 = null; /* 传阅角色 */
JBOTransaction tx = JBOFactory.createJBOTransaction();
//JBOTransaction tx = JBOFactory.createJBOTransaction();
FlowTask ft = new FlowTask(taskNo, Sqlca);//使用jboTrans
BizObject fm = JBOFactory.getBizObjectManager("jbo.sys.FLOW_MODEL").createQuery("select attribute10 from O where flowNo=:flowNo and phaseNo=:phaseNo ")
.setParameter("flowNo", ft.FlowNo ).setParameter("phaseNo", ft.PhaseNo).getSingleResult(false);

View File

@ -7,7 +7,7 @@
String taskNo = CurPage.getParameter("TaskNo");
if(StringX.isSpace(taskNo)) taskNo = "";
String userID = CurUser.getUserID(), attribute9 = null; /* 工作指派角色 */
JBOTransaction tx = JBOFactory.createJBOTransaction();
//JBOTransaction tx = JBOFactory.createJBOTransaction();
FlowTask ft = new FlowTask(taskNo, Sqlca);//使用jboTrans
BizObject fm = JBOFactory.getBizObjectManager("jbo.sys.FLOW_MODEL").createQuery("select attribute9 from O where flowNo=:flowNo and phaseNo=:phaseNo ")
.setParameter("flowNo", ft.FlowNo ).setParameter("phaseNo", ft.PhaseNo).getSingleResult(false);

View File

@ -9,7 +9,7 @@
<%@page import="com.tenwa.flow.service.FlowUserManageServie"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
JBOTransaction tx = JBOFactory.createJBOTransaction();
//JBOTransaction tx = JBOFactory.createJBOTransaction();
String result = "";
String xCoordinate = CurPage.getParameter("xcoordinate");
String yCoordinate = CurPage.getParameter("ycoordinate");

View File

@ -29,6 +29,7 @@
searchCondtion.put("id",distributor_id);
JBOTransaction tx = JBOFactory.createJBOTransaction();
BizObject bo = DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO.CLASS_NAME,searchCondtion,tx);
tx.commit();
int size = bo==null? 0:1;
String sTempletNo = "CustomerDistributorAccountInfo";//--Ä£°åºÅ--

View File

@ -0,0 +1,82 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.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("FlowInstanceTrack2");
doTemp.appendJboWhere(" and O.flowno='BusinessApplyFlow'");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(15);
dwTemp.genHTMLObjectWindow("");
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%>
<%
String sButtons[][] = {};
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=定义按钮事件;]~*/%>
<script type="text/javascript">
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
var userId=getItemValue(0,i,"USERID");
if(userId=="system"){
getObj(0,i,"ENDTIME").innerHTML=getObj(0,i,"BEGINTIME").textContent;
}
getObj(0,i,"ACTION").innerHTML= '<a onclick="javascript:viewFlowGraph()">显示流程图</a>&nbsp;&nbsp;&nbsp; <a href=# onclick="javascript:viewHisTab()">申请详情</a> ';
}
setColumnWidth(0,"ACTION",150);
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
<script type="text/javascript">
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -55,6 +55,7 @@
<%
OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage,"业务详情","right");
FlowTaskViewTabService.initOHTMLTreeViewProduct(tx,tviTemp,FlowFixedParam);
tx.commit();
%>
<%/*~END~*/%>

View File

@ -51,7 +51,7 @@ function afterSearch(){
}
}
if(flowState!=""){getObj(0,i,"flow_key").innerHTML=getObj(0,i,"flow_key").innerHTML+"[<span style='color:red'>"+flowState+"</span>]";}
getObj(0,i,"ACTION").innerHTML= <%=bFlag%> ? '<a href=# onclick="javascript:viewTab()">ÉêÇëÏêÇé</a> ' : '<a onclick="javascript:viewFlowGraph()">ÏÔʾÁ÷³Ìͼ</a>&nbsp;&nbsp;&nbsp; <a href=# onclick="javascript:viewTab()">ÉêÇëÏêÇé</a> ';
getObj(0,i,"ACTION").innerHTML= <%=bFlag%> ? '<a href=# onclick="javascript:viewHisTab()">ÉêÇëÏêÇé</a> ' : '<a onclick="javascript:viewFlowGraph()">ÏÔʾÁ÷³Ìͼ</a>&nbsp;&nbsp;&nbsp; <a href=# onclick="javascript:viewHisTab()">ÉêÇëÏêÇé</a> ';
}
setColumnWidth(0,"ACTION",150);
}

View File

@ -34,6 +34,7 @@
<%
OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage,"业务详情","right");
FlowTaskViewTabService.initOHTMLTreeViewProjectContract(tx,tviTemp,CurPage);
tx.commit();
String FlowUnid=CurPage.getParameter("FlowUnid");
%>
<%/*~END~*/%>

View File

@ -93,7 +93,7 @@
}
//选择承租人
function selectCust(){
AsDialog.OpenSelector("SelectCustomer","","dialogWidth=" + parseInt(window.screen.width * 0.9) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
AsDialog.OpenSelector("SelectCustomerBank","","dialogWidth=" + parseInt(window.screen.width * 0.9) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;

View File

@ -82,7 +82,6 @@
/*~[Describe=±£´æ¼Ç¼;InputParam=ÎÞ;OutPutParam=ÎÞ;]~*/
function saveRecord(){
debugger;
var ids="<%=ids%>";
ids=ids.replace(/,/ig,"@");
var ASSETTRANSFERER=getItemValue(0,getRow(0),"ASSETTRANSFERER");

View File

@ -41,6 +41,7 @@
if(list.size()>0){
libraryId=list.get(0).get("ID");
}
tx.commit();
}
BizObjectManager libBm=JBOFactory.getBizObjectManager("jbo.app.tenwa.doc.LB_DOCLIBRARY");
BizObjectManager attrBm=JBOFactory.getBizObjectManager("jbo.app.tenwa.doc.LB_DOCATTRIBUTE");

View File

@ -44,6 +44,9 @@
if("01".equals(customertype)&&!"合同变更流程".equals(flowName)){
falg = "false";
}
if(RightType.equals("ReadOnly")){
falg = "false";
}
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][]=new String[][]{
{"false","","Button","新增","新增","newRecord()","","","","btn_icon_add",""},

View File

@ -29,6 +29,7 @@
map.clear();
map.put("flow_unid", FlowUnid);
List<Map<String,String>> list=DataOperatorUtil.getDataBySql(tx, sql, map);
tx.commit();
if(list.size()==0){
%>

View File

@ -124,17 +124,17 @@
//isShowButton=false;
String compClientID = request.getParameter("CompClientID");
String sparm="";
dwTemp.replaceColumn("LBContractTemplateList", "<iframe id=\"LBContractTemplateList\" type='iframe' name=\"LBContractTemplateList\" width=\"100%\" height=\"260\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBContractTemplate/LBContractTemplateList.jsp?FlowUnid="+flowunid+"&TaskNo="+taskno+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&TempletNo=LBContractTemplateList"+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("LBContractTemplateList", "<iframe id=\"LBContractTemplateList\" type='iframe' name=\"LBContractTemplateList\" width=\"100%\" height=\"260\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBContractTemplate/LBContractTemplateList.jsp?FlowUnid="+flowunid+"&TaskNo="+taskno+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+RightType+"&TempletNo=LBContractTemplateList"+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
String sButtons[][] = null;
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";
sButtons=new String[][]{
{phaseno.equals("0010")?"true":"false","","Button","生成合同","生成合同","createContractByTemplate()","","","","btn_icon_up",""}
{phaseno.equals("0010")&&(!RightType.equals("ReadOnly"))?"true":"false","","Button","生成合同","生成合同","createContractByTemplate()","","","","btn_icon_up",""}
};
}else{
sButtons=new String[][] {
{phaseno.equals("0010")?"true":"false","","Button","生成合同","生成合同","createContractByTemplate()","","","","btn_icon_up",""}
{phaseno.equals("0010")&&(!RightType.equals("ReadOnly"))?"true":"false","","Button","生成合同","生成合同","createContractByTemplate()","","","","btn_icon_up",""}
};
}
dwTemp.replaceColumn("contracttemplate", "<div id=\"filetemplatemodel\" style=\"heigth:100%,width:100px\">请稍等。。。。。。</div>", CurPage.getObjectWindowOutput());

View File

@ -20,8 +20,9 @@
var customertype = sReturn[6];
var leasform = sReturn[7];
var carAttributes = sReturn[8];
var isNetCar = sReturn[9];
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
sParams =sParams+",carAttributes="+carAttributes+",leasform="+leasform+",customertype="+customertype+",ProjectId="+project_id+",FlowKey="+contract_number+",ProductId="+product_id+",ProjectNo="+project_no+",ContractId="+contract_id+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>";
sParams =sParams+",isNetCar="+isNetCar+",carAttributes="+carAttributes+",leasform="+leasform+",customertype="+customertype+",ProjectId="+project_id+",FlowKey="+contract_number+",ProductId="+product_id+",ProjectNo="+project_no+",ContractId="+contract_id+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
var sReturnInfos=sReturnInfo.split("@");

View File

@ -47,6 +47,7 @@
JBOTransaction tx=JBOFactory.createJBOTransaction();
Map<String,String> params=new HashMap<String,String>();
list=DataOperatorUtil.getDataBySql(tx, sql, params);
tx.commit();
displayData = new String[list.size()][headers.length];
for(int i=0;i<displayData.length;i++){
for(int j=0;j<displayData[i].length;j++){

View File

@ -63,7 +63,7 @@
// dwTemp.getDataObject().setReadOnly("InterOpinion2", true);
dwTemp.setGroupHidden("0040,0050");
}
}else if("0040".equals(phaseNo)||"0060".equals(phaseNo)){//复审
}else if("0040".equals(phaseNo)||"0050".equals(phaseNo)){//复审
dwTemp.getDataObject().setVisible("firstchoice", true);
dwTemp.getDataObject().setVisible("firstopinion", true);
dwTemp.getDataObject().setReadOnly("firstchoice", true);
@ -73,7 +73,7 @@
dwTemp.getDataObject().setRequired("secondchoice", true);
dwTemp.getDataObject().setRequired("secondopinion", true);
dwTemp.setGroupHidden("0040");
if("BACK".equals(flowstate)||"ANYBACK".equals(flowstate)){
if(("BACK".equals(flowstate)||"ANYBACK".equals(flowstate))&&"0050".equals(phaseNo)){
dwTemp.getDataObject().setVisible("thirdchoice", true);
dwTemp.getDataObject().setVisible("thirdopinion", true);
dwTemp.getDataObject().setReadOnly("thirdchoice", true);
@ -85,7 +85,7 @@
if(CurUser.hasRole("401")){
dwTemp.setGroupHidden("0030,0040");
}
}else if("0050".equals(phaseNo)){//信审
}else if("0060".equals(phaseNo)){//信审
if(!"true".equals(ishistory)){
dwTemp.getDataObject().setVisible("firstchoice", true);
dwTemp.getDataObject().setVisible("firstopinion", true);
@ -131,6 +131,41 @@
dwTemp.getDataObject().setReadOnly("thirdchoice", false);
dwTemp.getDataObject().setReadOnly("thirdopinion", false);
dwTemp.setGroupHidden("0030,0040,0050");
}else if("0070".equals(phaseNo)){//添加业务分管领导
if(!"true".equals(ishistory)){//显示初审和复审意见
dwTemp.getDataObject().setVisible("firstchoice", true);
dwTemp.getDataObject().setVisible("firstopinion", true);
dwTemp.getDataObject().setReadOnly("firstchoice", true);
dwTemp.getDataObject().setReadOnly("firstopinion", true);
dwTemp.getDataObject().setVisible("secondchoice", true);
dwTemp.getDataObject().setVisible("secondopinion", true);
dwTemp.getDataObject().setReadOnly("secondchoice", true);
dwTemp.getDataObject().setReadOnly("secondopinion", true);
if(money>200000){//如果大约20万显示负责人审批意见
dwTemp.getDataObject().setVisible("thirdchoice", true);
dwTemp.getDataObject().setVisible("thirdopinion", true);
dwTemp.getDataObject().setReadOnly("thirdchoice", true);
dwTemp.getDataObject().setReadOnly("thirdopinion", true);
}else{
dwTemp.setGroupHidden("0040");
}
}else{
dwTemp.getDataObject().setVisible("firstchoice", true);
dwTemp.getDataObject().setVisible("firstopinion", true);
dwTemp.getDataObject().setReadOnly("firstchoice", true);
dwTemp.getDataObject().setReadOnly("firstopinion", true);
dwTemp.getDataObject().setVisible("secondchoice", false);
dwTemp.getDataObject().setVisible("secondopinion", false);
dwTemp.getDataObject().setVisible("thirdchoice", false);
dwTemp.getDataObject().setVisible("thirdopinion", false);
// dwTemp.getDataObject().setVisible("INTEROPINION2", false);
// dwTemp.getDataObject().setVisible("DISTRIOPINION2", false);
// dwTemp.getDataObject().setVisible("INTEROPINION3", false);
// dwTemp.getDataObject().setVisible("DISTRIOPINION3", false);
dwTemp.setGroupHidden("0030,0040,0050");
}
}
dwTemp.genHTMLObjectWindow(flowunid);
@ -142,8 +177,12 @@
$(function(){
$(".info_td_left").css("width","150px");
$(".info_mid_line").css("width","50%");
var selectOpinion = '';
var proposal = '';
switch('<%=phaseNo%>'){
case '0030'://初审
selectOpinion ='FIRSTOPINION';
proposal ='FIRSTCHOICE';
$("#A_div_1230").attr("style","display:none;");
$("#A_div_1240").attr("style","display:none;");
$("#A_div_1250").attr("style","display:none;");
@ -170,6 +209,8 @@
_user_validator[0]['messages']['FIRSTOPINION']['required0'] = "请输入审批意见";
break;
case '0040'://复审
selectOpinion ='SECONDOPINION';
proposal ='SECONDCHOICE';
$("#A_div_1250").attr("style","display:none;");
$("#A_div_1260").attr("style","display:none;");
@ -192,19 +233,21 @@
$("#A_div_1180").attr("style","display:none;");
$("#A_div_1250").attr("style","display:none;");
$("#A_Group_0020").attr("style","display:none;");
if("13"==<%=projectstatus%>){
html='<tr id="contractsign" class="test"><td>业务审批结果: 通过</td></tr>';
<%-- if("13"==<%=projectstatus%>){ --%>//添加业务二部风管领导审批意见0070显示
/* html='<tr id="contractsign" class="test"><td>业务审批结果: 通过</td></tr>';
}else{
html='<tr id="contractsign" class="test"><td>业务审批结果: 未通过</td></tr>';
}
$("#A_Group_0010").append(html);
$("#A_Group_0010").append(html); */
}
_user_validator[0]['rules']['SECONDCHOICE']['required0'] = true;
_user_validator[0]['messages']['SECONDCHOICE']['required0'] = '请输入复审意见';
_user_validator[0]['rules']['SECONDOPINION']['required0'] = true;
_user_validator[0]['messages']['SECONDOPINION']['required0'] = "请输入审批意见";
break;
case '0060'://大于20万复审
case '0050'://大于20万复审
selectOpinion ='SECONDOPINION';
proposal ='SECONDCHOICE';
$("#A_div_1250").attr("style","display:none;");
$("#A_div_1260").attr("style","display:none;");
@ -234,8 +277,9 @@
_user_validator[0]['rules']['SECONDOPINION']['required0'] = true;
_user_validator[0]['messages']['SECONDOPINION']['required0'] = "请输入审批意见";
break;
case '0050'://信审
case '0060'://信审
selectOpinion ='THIRDOPINION';
proposal ='THIRDCHOICE';
$("#FIRSTCHOICE").attr("disabled","disabled");//初审意见
$("#FIRSTOPINION").attr("disabled","disabled");//审批意见
// $("#INTEROPINION1").attr("disabled","disabled");//初审内部意见
@ -304,51 +348,89 @@
_user_validator[0]['rules']['FOUROPINION']['required0'] = true;
_user_validator[0]['messages']['FOUROPINION']['required0'] = "请输入审批意见";
break;
case '0070'://经销商
if("true"=="<%=ishistory%>"&&<%=CurUser.hasRole("401")%>){
$("#A_Group_0020").attr("style","display:none;");
if("13"==<%=projectstatus%>){
html='<tr id="contractsign" class="test"><td>业务审批结果: 通过</td></tr>';
}else{
html='<tr id="contractsign" class="test"><td>业务审批结果: 未通过</td></tr>';
}
$("#A_Group_0010").append(html);
}
break;
}
var certResult = checkCertId();
if(certResult=="4" && "false"=="<%=ishistory%>"){
//$("#FULLNAME").attr("style","color:red;");
$("#CERTID").css("color","red");
}
var firstchoice = getItemValue(0,0,"firstchoice");
var firstchoice = getItemValue(0,0,proposal);
var attribute1="";
if(firstchoice==""){
// setItemRequired(0,"InterOpinion1",false);
// setItemRequired(0,"DistriOpinion1",false);
$("#FIRSTOPINION").attr("disabled","");
// $("#FIRSTOPINION").attr("disabled","");
}
if(firstchoice=="0010"){
setItemRequired(0,"A_div_1220",true);
// setItemRequired(0,"InterOpinion1",false);
// setItemRequired(0,"DistriOpinion1",true);
/* setItemRequired(0,"InterOpinion1",false);
setItemRequired(0,"DistriOpinion1",true);
$("#FIRSTOPINION").attr("disabled","");
$("#SECONDOPINION").attr("disabled","");
$("#THIRDOPINION").attr("disabled","");
var obj=document.getElementById('FIRSTOPINION');
$("#THIRDOPINION").attr("disabled",""); */
var obj=document.getElementById(selectOpinion);
for(var i=0;i<7;i++){
obj.options[i].style.display = "block";
}
obj.options[7].style.display = "none";
obj.options[8].style.display = "none";
attribute1="1";
}
if(firstchoice=="0030"){
// setItemRequired(0,"InterOpinion1",true);
// setItemRequired(0,"DistriOpinion1",false);
$("#FIRSTOPINION").attr("disabled","");
$("#SECONDOPINION").attr("disabled","");
$("#THIRDOPINION").attr("disabled","");
var obj=document.getElementById('FIRSTOPINION');
if(firstchoice=="0020"){
/* $("#SECONDOPINION").attr("disabled","");
$("#THIRDOPINION").attr("disabled",""); */
var obj=document.getElementById(selectOpinion);
for(var i=0;i<7;i++){
obj.options[i].style.display = "none";
}
obj.options[0].style.display = "block";
obj.options[7].style.display = "block";
obj.options[8].style.display = "none";
attribute1="2";
}
if(firstchoice=="0040"||"0060"==firstchoice){
if(firstchoice=="0030"){
/* setItemRequired(0,"InterOpinion1",true);
setItemRequired(0,"DistriOpinion1",false);
$("#FIRSTOPINION").attr("disabled","");
$("#SECONDOPINION").attr("disabled","");
$("#THIRDOPINION").attr("disabled",""); */
var obj=document.getElementById(selectOpinion);
for(var i=0;i<8;i++){
obj.options[i].style.display = "none";
}
obj.options[0].style.display = "block";
attribute1="3";
}
if(firstchoice=="0040"||"0050"==firstchoice){
// setItemRequired(0,"InterOpinion1",false);
// setItemRequired(0,"DistriOpinion1",true);
setItemValue(0,0,"firstopinion","");
// setItemValue(0,0,"firstopinion","");
$("#FIRSTOPINION").attr("disabled","disabled");
$("#SECONDOPINION").attr("disabled","disabled");
$("#THIRDOPINION").attr("disabled","disabled");
attribute1="";
}
var selectOpin = getItemValue(0,getRow(),selectOpinion);
AsControl.RunJsp('/Tenwa/Lease/Flow/Project/BusinessApplication/GetApplyNameSelect.jsp','codeno=disagreeOP&attribute1='+attribute1+'&selectOpinion='+selectOpin,function(sReturn){
if("FALSE"!=allTrim(sReturn)){
var sReturn = lTrim(sReturn);
sReturn = rTrim(sReturn);
$('#'+selectOpinion).children().remove();
$('#'+selectOpinion).append(sReturn);
}
});
if("<%=CurUser.getUserID()%>".indexOf("8006")>=0){
$("#A_div_1130").attr("style","display:none;");
$("#A_div_1140").attr("style","display:none;");
@ -591,10 +673,10 @@
if("0030" == "<%=phaseNo%>"){
phaseChoice = getItemValue(0,0,"firstchoice");
phaseOpinion = getItemValue(0,0,"firstopinion");
}else if("0040" == "<%=phaseNo%>"||"0060" == "<%=phaseNo%>"){
}else if("0040" == "<%=phaseNo%>"||"0050" == "<%=phaseNo%>"){
phaseChoice = getItemValue(0,0,"secondchoice");
phaseOpinion = getItemValue(0,0,"secondopinion");
}else if("0050" == "<%=phaseNo%>"){
}else if("0060" == "<%=phaseNo%>"){
phaseChoice = getItemValue(0,0,"thirdchoice");
phaseOpinion = getItemValue(0,0,"thirdopinion");
}else if("0020" == "<%=phaseNo%>"){

View File

@ -0,0 +1,25 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
String codeno = CurPage.getParameter("codeno");
String attribute1 = CurPage.getParameter("attribute1");
String selectOpinion = CurPage.getParameter("selectOpinion");
try{
String sql = "select c.itemno,c.itemname from code_library c where c.codeno='"+codeno+"' and c.attribute1="+attribute1;
ASResultSet res = Sqlca.getASResultSet(new SqlObject(sql));
StringBuilder sb = new StringBuilder();
sb.append("<option value selected>---ÇëÑ¡Ôñ---</option>");
while(res.next()){
if(res.getString("itemno").toString().equals(selectOpinion)){
sb.append("<option value='"+res.getString("itemno")+"' selected>"+res.getString("itemname")+"</option>");
}else{
sb.append("<option value='"+res.getString("itemno")+"'>"+res.getString("itemname")+"</option>");
}
}
if(sb.length()>0){
out.print(sb.toString());
}
}catch(Exception e){
e.printStackTrace();
out.print("FALSE");
}
%><%@ include file="/IncludeEndAJAX.jsp"%>

View File

@ -0,0 +1,45 @@
<%@ page contentType="text/html; charset=GBK"%><%@
include
file="/Frame/resources/include/include_begin_info.jspf"%>
<%
//获得参数
String id = CurPage.getParameter("id");
if (id == null)
id = "";
String sUserID = CurPage.getParameter("UserID");
if (sUserID == null)
sUserID = "";
java.util.Date dateNow = new java.util.Date();
SimpleDateFormat sdfTemp = new SimpleDateFormat(
"yyyy/MM/dd");
String date = sdfTemp.format(dateNow);
ASObjectModel doTemp = new ASObjectModel("VERSION_INFO");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,
request);
dwTemp.Style = "2"; //设置DW风格 1:Grid 2:Freeform
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
dwTemp.genHTMLObjectWindow(id);
String sButtons[][] = {{"true", "All", "Button", "保存",
"保存所有修改", "saveRecord()", "", "", "", "btn_icon_save"},};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function goBack(){
parent.AsDialog.ClosePage();
}
function saveRecord(sPostEvents) {
if ("<%=id%>" == "") {
setItemValue(0,0,"CREATE_DATE", "<%=date%>");
setItemValue(0,0,"CREATOR", "<%=CurUser.getUserID()%>");
}
setItemValue(0,0,"MODIFY_DATE", "<%=date%>");
setItemValue(0,0,"MODIFICATOR", "<%=CurUser.getUserID()%>");
as_save("myiframe0", "goBack()");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,62 @@
<%@ page contentType="text/html; charset=GBK"%><%@
include
file="/Frame/resources/include/include_begin_list.jspf"%>
<%
ASObjectModel doTemp = new ASObjectModel("VERSION_LIST");
doTemp.setLockCount(2); //锁定两列
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //设置为Grid风格
dwTemp.ReadOnly = "1";//编辑模式
dwTemp.setPageSize(10);
dwTemp.ConvertCode2Title = "1";
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = {
{"true","","Button","新增应用","新增一个版本","newRecord()","","","","btn_icon_add"},
{"true","","Button","应用信息","查看版本信息","viewAndEdit()","","","","btn_icon_detail"},
{"true","","Button","删除该应用","删除该版本","if(confirm('确实要删除吗?'))as_delete(0,'')","","","","btn_icon_delete"},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
$(function() {
$("#ATTACHMENT").attr("type","file");
$("#myiframe0").attr("enctype","multipart/form-data");
var params={};
params["usreid"]="<%=CurUser.getUserID()%>";
var sparma="";
for(var key in params){
sparma=sparma+"<input type=\"text\" name=\""+key+"\" value=\""+params[key]+"\">"
}
hideItem(0,"FILENAME");
$("#ATTACHMENT").append(sparma);
$("#myiframe0").attr("action", "");
$("#myiframe0").attr("method","post");
});
function newRecord() {
var sUrl = "/Version/VersionInfo.jsp";
AsDialog.PopView(sUrl, "", "dialogWidth=600px;dialogHeight=450px;",
function(message) {
reloadSelf();
}, "新增一个版本");
}
function viewAndEdit() {
var sUrl = "/Version/VersionInfo.jsp";
var id = getItemValue(0, getRow(0), 'id');
if (id == "" || typeof(id) == "undefined") {
alert("请选上传的版本!");
return false;
}
AsDialog.PopView(sUrl, "id=" + id,
"dialogWidth=600px;dialogHeight=450px;", function(message) {
reloadSelf();
}, "新增一个版本");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -4717,6 +4717,25 @@
</managerProperties>
</manager>
</class>
<class name="VERSION" label="租赁系统版本配置表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="ID" type="STRING" length="96"/>
<attribute name="VERSION_DESC" label="VERSION_DESC" type="STRING" length="765"/>
<attribute name="UP_DATE" label="UP_DATE" type="STRING" length="60"/>
<attribute name="IS_NEW" label="IS_NEW" type="STRING" length="30"/>
<attribute name="CREATE_DATE" label="CREATE_DATE" type="STRING" length="60"/>
<attribute name="MODIFY_DATE" label="MODIFY_DATE" type="STRING" length="60"/>
<attribute name="MODIFICATOR" label="MODIFICATOR" type="STRING" length="96"/>
<attribute name="VERSION_CODE" label="VERSION_CODE" type="STRING" length="765"/>
<attribute name="VERSION_NAME" label="VERSION_NAME" type="STRING" length="765"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="version" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
<package name="jbo.com.tenwa.lease.carbrand" >
<class name="LB_CLAIMS_BOOK_DETAIL" label="索赔申请书详情表" keyAttributes="ID">

View File

@ -28,18 +28,24 @@ public class AmarScriptDataFetcher extends ParameterDataLoader{
throw new Exception("参数{"+parameterID+"}的取值逻辑定义不正确!");
method = StringHelper.replaceStringFullName(method,businessObject);
JBOTransaction tx = null;
Transaction sqlca = null;
try{
tx = JBOFactory.createJBOTransaction();
Transaction sqlca = Transaction.createTransaction(tx);
sqlca = Transaction.createTransaction(tx);
Any a=Expression.getExpressionValue(method, sqlca);//只做查询
if("Number".equalsIgnoreCase(a.getType()))
valueList.add(a.doubleValue());
else
valueList.add(a.stringValue());
tx.rollback();
//tx.rollback();
sqlca.commit();
}catch(Exception ex){
tx.rollback();
//tx.rollback();
if(sqlca !=null){
sqlca.rollback();
sqlca = null;
}
throw ex;
}
return valueList;

View File

@ -76,6 +76,16 @@ public class commissionSet {
}
} catch (Exception e) {
e.printStackTrace();
if(Sqlca != null){
Sqlca.rollback();
Sqlca = null;
}
}finally{
if(Sqlca != null){
Sqlca.commit();
Sqlca.disConnect();
Sqlca=null;
}
}
String startE = this.getEffectStart();
startE = startE.replaceAll("/", "");
@ -117,6 +127,16 @@ public class commissionSet {
} catch (Exception e) {
e.printStackTrace();
if(Sqlca != null){
Sqlca.rollback();
Sqlca = null;
}
}finally{
if(Sqlca != null){
Sqlca.commit();
Sqlca.disConnect();
Sqlca=null;
}
}
if(end>=start){
return "fail";

View File

@ -354,6 +354,7 @@ public class CollectAuditInfoCache {
j++;
}
if (map.containsKey("RET_CODE") && "0000".equals(map.get("RET_CODE"))) {
Transaction Sqlca =null;
String cerrentDate = DateAssistant.getToday();
JBOTransaction transaction = JBOFactory.createJBOTransaction();
BizObjectManager bmi = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,transaction);
@ -372,12 +373,12 @@ public class CollectAuditInfoCache {
+ "'"+boi.getAttribute("CONTRACT_ID")+"','"+boi.getAttribute("CONTRACT_PLAN_NUMBER")+"','"+boi.getAttribute("PAYMENT_NUMBER")+"','"+boi.getAttribute("EBANK_NUMBER")+"','"+boi.getAttribute("PLAN_ID")+"',"
+ "'"+boi.getAttribute("PLAN_LIST")+"','"+boi.getAttribute("INTEREST_ADJUST")+"','"+boi.getAttribute("SETTLE_METHOD")+"','"+boi.getAttribute("HIRE_LIST")+"','"+boi.getAttribute("HIRE_DATE")+"','"+boi.getAttribute("RENT")+"','"+boi.getAttribute("CORPUS")+"',"
+ "'"+boi.getAttribute("INTEREST")+"','"+boi.getAttribute("PENALTY")+"','"+boi.getAttribute("CORPUS_ADJUST")+"','"+boi.getAttribute("PENALTY_ADJUST")+"','"+boi.getAttribute("ROLL_BACK")+"','"+boi.getAttribute("COIN")+"')";
Transaction Sqlca =null;
Sqlca = Transaction.createTransaction(transaction);
SqlObject asql = new SqlObject(sql);
Sqlca.executeSQL(asql);
}
transaction.commit();
Sqlca.commit();
}
BizObject bco = bc.createQuery("id=:id").setParameter("id", bo.getAttribute("id").toString()).getSingleResult(false);
String batch_number = bco.getAttribute("batch_number").toString();
@ -439,6 +440,7 @@ public class CollectAuditInfoCache {
Sqlca = Transaction.createTransaction(transaction);
SqlObject asql = new SqlObject(sql);
Sqlca.executeSQL(asql);
Sqlca.commit();
}
transaction.commit();
BizObject bco = bc.createQuery("id=:id").setParameter("id", bo.getAttribute("id").toString()).getSingleResult(false);

View File

@ -71,6 +71,9 @@ public class sqlOperatorExample {
}
Sqlca.disConnect();
Sqlca=null;
conn.commit();
conn.close();
conn=null;
return "xxxx";
}

View File

@ -39,10 +39,14 @@ public class ContractRentCollectionHandler extends CommonHandler{
}
}catch(Exception e)
{
if(Sqlca !=null){
Sqlca.rollback();
Sqlca=null;
}
}
finally{
if(Sqlca!=null){
Sqlca.commit();
Sqlca.disConnect();
Sqlca=null;
}

View File

@ -248,6 +248,10 @@ public class FundIncomeEndRentPlanModify extends BaseBussiness{
Sqlca = Transaction.createTransaction(tx);
SqlObject asql = new SqlObject(sql);
Sqlca.executeSQL(asql);
Sqlca.commit();
}
private void delete(String paymentNumber,JBOTransaction tx) throws Exception{

View File

@ -829,9 +829,18 @@ public class RentIncomeMethod {
call.execute();
}catch(Exception e){
e.printStackTrace();
con.rollback();
tx.rollback();
if(con !=null){
con.rollback();
con.close();
con = null;
}
return "ERROR";
}finally{
if(con !=null){
con.commit();
con.close();
con = null;
}
}
return sReturn;
}

View File

@ -13,7 +13,7 @@ public class VoucherCache {
public static String getAuxiliary(String id) throws Exception
{
JBOTransaction tx=JBOFactory.getFactory().createTransaction();
//JBOTransaction tx=JBOFactory.getFactory().createTransaction();
BizObjectManager bm=JBOFactory.getFactory().getManager(VOUCHERASSSTACTS_INFO.CLASS_NAME);
String memo="";
List<BizObject> vous=bm.createQuery("select * from O where O.id in (select conn.ASSTACTTYPE from jbo.app.VOUCHER_CONNECTION conn where conn.config_id=:id)")

View File

@ -47,15 +47,25 @@ public class UpdateMessageHandler {
setSQL=setSQLStr.substring(0, setSQLStr.length()-1).replaceAll("@", ",");
sql.append(setSQL);
sql.append(idstr);
try{
Transaction Sqlca =null;
try{
Sqlca = Transaction.createTransaction(tx);
SqlObject asql = new SqlObject(sql.toString());
Sqlca.executeSQL(asql);
return "true";
}catch(Exception e){
e.printStackTrace();
if(Sqlca != null){
Sqlca.rollback();
Sqlca=null;
}
return "false";
}finally{
if(Sqlca != null){
Sqlca.commit();
Sqlca.disConnect();
Sqlca=null;
}
}
}
}

View File

@ -46,16 +46,27 @@ public class AutoBuckle implements Job {
ca.setInputuserid(jboName.getUserId(arg0, tx));
ca.setInputorgid("system");
ca.batchCollectManage(tx);
tx = JBOFactory.createJBOTransaction();
//tx = JBOFactory.createJBOTransaction();
ca.queryBatchCollectStatus(tx);
}
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "success", "³É¹¦", curUserId);
} catch (Exception e) {
e.printStackTrace();
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "error", "ʧ°Ü", curUserId);
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "error", "ʧ°Ü", curUserId);
if (tx != null) {
try {
tx.rollback();
tx=null;
} catch (JBOException e1) {
e1.printStackTrace();
}
}
}finally{
try {
tx.commit();
if(tx !=null){
tx.commit();
}
} catch (JBOException e) {
e.printStackTrace();
}

View File

@ -35,16 +35,25 @@ public class Commission implements Job{
//String sql="{CALL proc_insert_jlyj_his('2018/10/30','2018/10/30')};";
SqlObject asql = new SqlObject(sql);
Sqlca.executeSQL(asql);
tx.commit();
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.Commission", "success", "³É¹¦", curUserId);
} catch (Exception e) {
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.Commission", "success", "ʧ°Ü", curUserId);
logger.error(e.getMessage());
e.printStackTrace();
if(Sqlca!=null){
try {
Sqlca.rollback();
Sqlca = null;
} catch (JBOException e1) {
e1.printStackTrace();
}
}
}finally{
if(tx!=null){
try {
tx.rollback();
if(Sqlca!=null){
try {
Sqlca.commit();
Sqlca.disConnect();
Sqlca = null;
} catch (JBOException e) {
e.printStackTrace();
}

View File

@ -1,29 +1,15 @@
package com.tenwa.lease.app.quartzmession;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
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 com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.Transaction;
import com.base.util.QuartzUtil;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.reckon.util.Conn;
import jbo.app.tenwa.customer.LB_TEST;
import jbo.com.tenwa.entity.comm.own.LC_SOURCE_OF_FUNDS;
public class LBTESTinfo implements Job{
@Override
@ -33,10 +19,10 @@ public class LBTESTinfo implements Job{
Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId");
String curUserId = userId == null? "system" : userId.toString();
Transaction Sqlca = null;
try {
JBOTransaction tx = JBOFactory.createJBOTransaction();
//BizObjectManager LCBizObjectManager =JBOFactory.getBizObjectManager(LC_SOURCE_OF_FUNDS.CLASS_NAME,tx);
Transaction Sqlca = null;
Sqlca = Transaction.createTransaction(tx);
String insertSql="INSERT INTO LC_SOURCE_OF_FUNDS (id, contract_no, businesstype, lease_acc_name)"+
" (SELECT REPLACE(UUID(), '-', '') AS id,"+
@ -53,11 +39,28 @@ public class LBTESTinfo implements Job{
"AND lci.contract_no NOT IN "+
"(SELECT IFNULL(contract_no, '') AS contract_no FROM LC_SOURCE_OF_FUNDS))";
Sqlca.executeSQL(insertSql);
tx.commit();
QuartzUtil.insertLog(startime, "com.tenwa.lease.app.quartzmession.LBTESTinfo", "success", "³É¹¦", curUserId);
} catch (Exception e) {
QuartzUtil.insertLog(startime, "com.tenwa.lease.app.quartzmession.LBTESTinfo", "error", "ʧ°Ü", curUserId);
e.printStackTrace();
if(Sqlca!=null){
try {
Sqlca.rollback();
Sqlca = null;
} catch (JBOException e1) {
e1.printStackTrace();
}
}
}finally{
if(Sqlca!=null){
try {
Sqlca.commit();
Sqlca.disConnect();
Sqlca = null;
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}

View File

@ -210,11 +210,12 @@ public class QueryVehicleModeListAction implements Job{
bm4.createQuery("update O set currentversion=:CURRENTVERSION,initialversion=:INITIALVERSION")
.setParameter("CURRENTVERSION",map.get("CurrentVersion").toString())
.setParameter("INITIALVERSION",map.get("InitialVersion").toString()).executeUpdate();
}
}
} catch (Exception e) {
try {
if(null != tx){
tx.rollback();
tx.rollback();
tx = null;
}
} catch (JBOException e1) {
e1.printStackTrace();

View File

@ -53,13 +53,13 @@ public class SplitInts2 implements Job{
try{
//汽车业务
Sqlca = Transaction.createTransaction("als");
Sqlca.executeSQL(new SqlObject("{call proc_financial_interest()}"));
Sqlca.executeSQL(new SqlObject("{call proc_contract_rent_month_new()}"));
Sqlca.commit();
//传统业务
SplitInts3 s3=new SplitInts3();
/*SplitInts3 s3=new SplitInts3();
s3.contractRentMonth(tx);
s3.contractRentQuarter(tx);
s3.contractRentQuarter(tx);*/
tx.commit();
discountApportion();
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SplitInts", "success", "成功", curUserId);

View File

@ -56,7 +56,7 @@ public class SplitInts3 implements Job{
Transaction Sqlca =null;
List<String> idList=new ArrayList<String>();
tx =JBOFactory.createJBOTransaction();
//tx =JBOFactory.createJBOTransaction();
Sqlca = Transaction.createTransaction(tx);
//传统月付
String sql="SELECT lci.id AS ID ,lcc.PAYMENT_NUMBER,getTax(lci.leas_form,'租息',lcc.start_date) as TAX, lcc.START_DATE,lr.interest INTEREST, ROUND(lcc.HANDLING_CHARGE_MONEY/getTax(lci.LEAS_FORM,'手续费',lcc.start_date),2) AS HANDLING_CHARGE_MONEY FROM lb_contract_info lci LEFT JOIN lc_calc_condition lcc ON lcc.contract_id=lci.id LEFT JOIN (SELECT lrp.contract_id,ROUND(SUM(lrp.interest/getTax(lci.LEAS_FORM,'租息',lcc.start_date)),2) interest FROM lc_rent_plan lrp LEFT JOIN lb_contract_info lci ON lci.id=lrp.CONTRACT_ID LEFT JOIN lc_calc_condition lcc ON lcc.contract_id=lci.id GROUP BY lrp.contract_id) lr ON lr.contract_id=lci.id WHERE NOT EXISTS (SELECT 1 FROM contract_rent_month WHERE contract_id = lcc.contract_id) AND nvl(lr.interest,0) > 0 AND lci.contract_status BETWEEN 31 AND 100 AND lci.id NOT IN (SELECT contract_id FROM lc_fund_rent_adjust) AND lci.BUSINESSTYPE<>'1' AND lcc.INCOME_NUMBER_YEAR='income_1'";
@ -64,6 +64,7 @@ public class SplitInts3 implements Job{
//传统月付
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
tx.commit();
Sqlca.commit();
for(Map<String,String> ma:dataList){
MonthInterestEntity mit =new MonthInterestEntity();
String contract_id=ma.get("ID");
@ -81,7 +82,7 @@ public class SplitInts3 implements Job{
Transaction Sqlca =null;
List<String> idList=new ArrayList<String>();
tx =JBOFactory.createJBOTransaction();
//tx =JBOFactory.createJBOTransaction();
Sqlca = Transaction.createTransaction(tx);
//传统季付
String sql="SELECT lci.id AS ID ,lcc.PAYMENT_NUMBER,getTax(lci.leas_form,'租息',lcc.start_date) as TAX, lcc.START_DATE,lr.interest INTEREST, ROUND(lcc.HANDLING_CHARGE_MONEY/getTax(lci.LEAS_FORM,'手续费',lcc.start_date),2) AS HANDLING_CHARGE_MONEY FROM lb_contract_info lci LEFT JOIN lc_calc_condition lcc ON lcc.contract_id=lci.id LEFT JOIN (SELECT lrp.contract_id,ROUND(SUM(lrp.interest/getTax(lci.LEAS_FORM,'租息',lcc.start_date)),2) interest FROM lc_rent_plan lrp LEFT JOIN lb_contract_info lci ON lci.id=lrp.CONTRACT_ID LEFT JOIN lc_calc_condition lcc ON lcc.contract_id=lci.id GROUP BY lrp.contract_id) lr ON lr.contract_id=lci.id WHERE NOT EXISTS (SELECT 1 FROM contract_rent_month WHERE contract_id = lcc.contract_id) AND nvl(lr.interest,0) > 0 AND lci.contract_status BETWEEN 31 AND 100 AND lci.id NOT IN (SELECT contract_id FROM lc_fund_rent_adjust) AND lci.BUSINESSTYPE<>'1' AND lcc.INCOME_NUMBER_YEAR='income_3'";
@ -89,7 +90,8 @@ public class SplitInts3 implements Job{
Map<String,String> map=new HashMap<String, String>();
//传统季付
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
tx.commit();
//tx.commit();
Sqlca.commit();
for(Map<String,String> ma:dataList){
MonthInterestEntity mit =new MonthInterestEntity();
String contract_id=ma.get("ID");
@ -117,6 +119,7 @@ public class SplitInts3 implements Job{
List<BizObject> bolist=mit.getBizObjList();
saveBM(tx,bolist);
tx.commit();
Sqlca.commit();
}
public void saveBM(JBOTransaction tx,List<BizObject> boList) throws Exception{

View File

@ -0,0 +1,43 @@
package com.tenwa.lease.flow.contract.commbusiness;
import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS;
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.are.util.StringFunction;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import com.tenwa.flow.baseBussion.BaseBussiness;
public class LBProjectInfoBackApprove extends BaseBussiness{
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
ASUser asUser=new ASUser(this.getAttribute("CurUserID").toString());
this.saveBusinessStatus(Sqlca,asUser);
String sMessage="true";
return sMessage;
}
private void saveBusinessStatus(Transaction Sqlca,ASUser asUser) throws Exception{
JBOTransaction tx = null;
tx= JBOFactory.createJBOTransaction();
BizObjectManager bsbom = JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME,tx);
BizObject bsbo = bsbom.newObject();
try {
bsbo.setAttributeValue(BUSINESS_STATUS.contract_number,this.getAttribute("ProjectNo"));
bsbo.setAttributeValue(BUSINESS_STATUS.business_status,"1");
bsbo.setAttributeValue(BUSINESS_STATUS.inputuserid,asUser.getUserID());
bsbo.setAttributeValue(BUSINESS_STATUS.inputtime,StringFunction.getTodayNow());
bsbo.setAttributeValue(BUSINESS_STATUS.inputorgid,asUser.getOrgID());
bsbom.saveObject(bsbo);
tx.commit();
}catch (Exception e){
tx.rollback();
e.printStackTrace();
}
}
}

View File

@ -2,6 +2,7 @@ package com.tenwa.lease.flow.project.businessapply;
import java.sql.SQLException;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
@ -21,6 +22,12 @@ public class CheckGuaranteeUnit {
asql.setParameter("flowunid", this.flowunid);
ASResultSet rs = null;
rs = Sqlca.getASResultSet(asql);
//Ìá½»ÊÂÎï
try {
Sqlca.commit();
} catch (JBOException e) {
e.printStackTrace();
}
while(rs.next()){
this.number = rs.getInt("count");
}

View File

@ -221,7 +221,14 @@ public class CustomerAction {
asql.setParameter("certid", this.certid);
ASResultSet rs = null;
rs = Sqlca.getASResultSet(asql);
//关闭事物
try {
Sqlca.commit();
} catch (JBOException e) {
}
if(rs.next()){
return "false";
}else{
return "true";

View File

@ -200,6 +200,10 @@ public class CustomerInfoCheck {
} catch (JBOException e) {
e.printStackTrace();
return "ERROR";
}finally{
if(Sqlca !=null){
Sqlca.commit();
}
}
return CustomerId;
}

View File

@ -17,18 +17,15 @@ import com.tenwa.flow.baseBussion.BaseBussiness;
public class DeleteDiscountOccupy extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
//this.initBussinessParam(Sqlca);
String projectId=this.getAttribute("ProjectId").toString();
this.initBussinessParam(Sqlca);
String projectId = this.getAttribute("ProjectId").toString();
BizObjectManager ldoManage = JBOFactory.getBizObjectManager(LB_DISCOUNT_OCCUPY.CLASS_NAME,Sqlca);
BizObject ldo = ldoManage.createQuery("project_id=:projectid").setParameter("projectid", projectId).getSingleResult(true);
String sMessage="";
if(ldo!=null){
ldoManage.deleteObject(ldo);
sMessage="true";
}else{
sMessage="false";
}
String sMessage="true";
return sMessage;
}
}

View File

@ -41,7 +41,7 @@ public class InsertDiscountOccupy extends BaseBussiness {
+ " values (replace(uuid(),'-',''), '" + productId + "', '" + flowUnid + "', '" + projectId + "',"
+ " " + discountValue + ", '" + curUserID + "', '" + user.getOrgID() + "', replace(now(),'-','/'))"));
} else {
throw new BusinessException("产品额度已用完");
// throw new BusinessException("产品额度已用完");
}
}
}

View File

@ -0,0 +1,45 @@
package com.tenwa.lease.flow.project.commcheck;
import java.util.Map;
import jbo.app.tenwa.customer.CUSTOMER_INFO_TEMP;
import com.amarsoft.app.util.ProductParamUtil;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.template.check.DefaultBussinessCheck;
public class DiscountCheck extends DefaultBussinessCheck{
@Override
public Object run(Transaction Sqlca) throws Exception {
String flowunid=this.getAttribute("ObjectNo").toString();
BizObjectManager proBO = JBOFactory.getBizObjectManager(jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP.CLASS_NAME, Sqlca);
BizObject pro = proBO.createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
String productId = pro.getAttribute("PRODUCT_ID").toString();
Map<String, String> discount = ProductParamUtil.getProductComponentAllParameters(productId, "PRD0315", "DISCOUNT");
if(!discount.isEmpty() && !"".equals(discount.get("DISCOUNT_ALL")) && !"".equals(discount.get("CostType08"))) {
synchronized (this) {
String discountAll = discount.get("DISCOUNT_ALL");
String discountValue = discount.get("CostType08");
Transaction tran = Transaction.createTransaction(Sqlca);
String result = tran.getString(new SqlObject("select case when " + discountAll + "-ifnull(sum(discount), 0) >= " + discountValue + " then '0' else '1' end from lb_discount_occupy where product_id = '" +productId+ "'"));
if("0".equals(result)) {
putMsg("通过");
setPass(true);
} else {
putMsg("贴息额度已用完");
setPass(false);
}
}
}else{
putMsg("通过");
setPass(true);
}
return null;
}
}

View File

@ -47,8 +47,8 @@ public class BusinessApprovalStartAction extends BaseFlowStartAction{
@SuppressWarnings("deprecation")
public String askApplyStart(JBOTransaction tx) throws Exception {
Transaction Sqlca = null;
try {
Transaction Sqlca = null;
Configure CurConfig = Configure.getInstance();
String sDataSource = CurConfig.getDataSource();
Sqlca = Transaction.createTransaction(sDataSource);
@ -61,6 +61,10 @@ public class BusinessApprovalStartAction extends BaseFlowStartAction{
} catch (Exception e) {
ARE.getLog().error(e);
return "false";
}finally{
if(Sqlca !=null){
Sqlca.commit();
}
}
}

View File

@ -259,9 +259,18 @@ public class LoanFundHireManager {
ps.execute();
}catch(Exception e){
e.printStackTrace();
if(con !=null){
con.rollback();
con.close();
con=null;
}
return "ERROR@操作失败!";
}finally{
con.close();
if(con !=null){
con.commit();
con.close();
}
}
return "SUCCESS@操作成功!";
}