Merge remote-tracking branch 'origin/release20211231' into release20211231

This commit is contained in:
zhanglei 2023-09-15 14:32:43 +08:00
commit 2be5156c94
10 changed files with 214 additions and 119 deletions

View File

@ -50,9 +50,10 @@
dwTemp.Style="1"; //设置为Grid风格
//dwTemp.MultiSelect = true;//允许多选
dwTemp.ReadOnly = "1";//编辑模式
doTemp.setVisible("ACTIONA","1040".equals(sPhaseType));
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = applyManager.getButtonArr();
//control distributor(temporary)
List<String[]> buttonLists = Arrays.asList(sButtons);
buttonLists = new ArrayList<String[]>(buttonLists);
@ -101,4 +102,4 @@
%>
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/FlowCommButton.jspf"%>
<%/*~END~*/%>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>

View File

@ -72,7 +72,7 @@ FlowFunction.doSubmit=function(sObjectType,sObjectNo,sTaskNo,sFlowName,sFlowNo,s
var result= AsControl.RunJavaMethodTrans("com.tenwa.flow.treeview.action.CheckAndSaveTreeView","run","TaskNo="+sTaskNo);
if(result!="success"){alert(result);return false;}
//检查是否签署意见
var isOpitionRequire=AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","getIsOpitionsRequire","flowNo="+sFlowNo+",phaseNo="+sPhaseNo)
var isOpitionRequire=AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","getIsOpitionsRequire","flowNo="+sFlowNo+",phaseNo="+sPhaseNo)
if(isOpitionRequire=="Y"){
var sReturn = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","isSignOpinion","TaskNo="+sTaskNo);//返回值: yes-有意见; no-无意见; error-查询出错
if(sReturn!="yes") {
@ -81,44 +81,53 @@ FlowFunction.doSubmit=function(sObjectType,sObjectNo,sTaskNo,sFlowName,sFlowNo,s
}
return;
}}
autoRiskScan(sFlowName,"TaskNo="+sTaskNo+"&ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&FlowNo="+sFlowNo+"&PhaseNo="+sPhaseNo+"&isAutoCommit=false",sPhaseNo,function(riskMessage){
if(riskMessage != true){
return;
}
if(assignSubmitType=="1"){
var isResult=AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","doFinishAssignTask","TaskNo="+sTaskNo+",userID=<%=CurUser.getUserID()%>");
if(isResult=="SUCCESS"){
var sFlowLogContent="<%=CurUser.getUserName()%>在"+"@时提交流程";
this.insertFlowLog(sObjectNo, sTaskNo, sFlowLogContent);
alert("流程提交成功");
FlowFunction.successCallBackReload();
}else{
alert("流程提交失败");
}
}else{
//处理退回直接提交的任务
var res = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","checkBackType","TaskNo="+sTaskNo+",userID=<%=CurUser.getUserID()%>");
if(res == "success") {
var sFlowLogContent="<%=CurUser.getUserName()%>在"+"@时提交流程";
this.insertFlowLog(sObjectNo, sTaskNo, sFlowLogContent);
alert("提交成功");
FlowFunction.successCallBackReload();
return;
}
AsDialog.PopView("/Common/WorkFlow/FlowSubmitDialog.jsp","TaskNo="+sTaskNo,"dialogWidth=850px;dialogHeight=550px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
return;
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
var sFlowLogContent="<%=CurUser.getUserName()%>在"+"@时提交流程";
this.insertFlowLog(sObjectNo, sTaskNo, sFlowLogContent);
alert("提交成功!");
FlowFunction.successCallBackReload();
}else{
alert(sPhaseInfo);
}
},"提交下一步");}
},sFlowName+":预警检查");
//判断经销商留言是否填写
if (sPhaseNo != "0010" && sPhaseNo != "0020") {
var isopenmassge = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction", "getjxsmessage", "TaskNo=" + sTaskNo);
if (isopenmassge == "Y") {
return this.getDealerMessage(sObjectNo, sPhaseNo, sTaskNo);
}
}
autoRiskScan(sFlowName,"TaskNo="+sTaskNo+"&ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&FlowNo="+sFlowNo+"&PhaseNo="+sPhaseNo+"&isAutoCommit=false",sPhaseNo,function(riskMessage){
if(riskMessage != true){
return;
}
if(assignSubmitType=="1"){
var isResult=AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","doFinishAssignTask","TaskNo="+sTaskNo+",userID=<%=CurUser.getUserID()%>");
if(isResult=="SUCCESS"){
var sFlowLogContent="<%=CurUser.getUserName()%>在"+"@时提交流程";
this.insertFlowLog(sObjectNo, sTaskNo, sFlowLogContent);
alert("流程提交成功");
FlowFunction.successCallBackReload();
}else{
alert("流程提交失败");
}
}else{
//处理退回直接提交的任务
var res = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","checkBackType","TaskNo="+sTaskNo+",userID=<%=CurUser.getUserID()%>");
if(res == "success") {
var sFlowLogContent="<%=CurUser.getUserName()%>在"+"@时提交流程";
this.insertFlowLog(sObjectNo, sTaskNo, sFlowLogContent);
alert("提交成功");
FlowFunction.successCallBackReload();
return;
}
AsDialog.PopView("/Common/WorkFlow/FlowSubmitDialog.jsp","TaskNo="+sTaskNo,"dialogWidth=850px;dialogHeight=550px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
return;
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
var sFlowLogContent="<%=CurUser.getUserName()%>在"+"@时提交流程";
this.insertFlowLog(sObjectNo, sTaskNo, sFlowLogContent);
alert("提交成功!");
FlowFunction.successCallBackReload();
}else{
alert(sPhaseInfo);
}
},"提交下一步");}
},sFlowName+":预警检查");
};
/*~[Describe=退回申请;InputParam=无;OutPutParam=无;]~*/
FlowFunction.successCallBackReload=function(){
@ -139,6 +148,15 @@ FlowFunction.backStep=function(sObjectType,sObjectNo,sFlowNo,sPhaseNo,sTaskNo,sF
}
return;
}}
//判断经销商留言是否填写
if (sPhaseNo != "0010" && sPhaseNo != "0020") {
var isopenmassge = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction", "getjxsmessage", "TaskNo=" + sTaskNo);
if (isopenmassge == "Y") {
return this.getDealerMessage(sObjectNo, sPhaseNo, sTaskNo);
}
}
if(sFlowName=="业务申请流程"){
autoRiskScan(sFlowName,"TaskNo="+sTaskNo+"&ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&FlowNo="+sFlowNo+"&PhaseNo="+sPhaseNo+"&isAutoCommit=false",sPhaseNo,function(riskMessage){
if(riskMessage != true){
@ -243,6 +261,16 @@ FlowFunction.signOpinion=function(sObjectType,sObjectNo,sFlowNo,sPhaseNo,isLoadS
}
});
};
/**
* 经销商留言
*/
FlowFunction.getDealerMessage=function(sObjectNo,sPhaseNo,sTaskNo){
var param = "flowunid="+sObjectNo+"&phaseNo="+sPhaseNo+"&taskno="+sTaskNo+"&userid=<%=CurPage.getUserId()%>&orgid=<%=CurPage.getUser().getOrgID()%>";
var sUrl = "/Tenwa/Customer/Lessee/Comm/Communication/Communication_info.jsp";
AsDialog.PopView(sUrl,param,"resizable=yes;dialogWidth=1000px;dialogHeight=400px;center:yes;status:no;statusbar:no",function(){},"经销商留言");
}
/*~[Describe=查看意见;InputParam=无;OutPutParam=无;]~*/
FlowFunction.viewOpinions=function (sObjectType,sObjectNo,sFlowNo,sPhaseNo){
AsDialog.PopView("/Common/WorkFlow/ViewFlowOpinions.jsp","FlowNo="+sFlowNo+"&PhaseNo="+sPhaseNo+"&ObjectType="+sObjectType+"&ObjectNo="+sObjectNo,"","","流程审批意见");

View File

@ -14,7 +14,7 @@
String orgname = Sqlca.getString("select orgname from org_info oi where orgid = '"+orgid+"'");
//判断修改人是否为提交人
String comm = "select case when phaseno = '"+phaseNo+"' and inputuser = '"+userid+"' then 'false' else 'true' end as comm from communication where id = '"+id+"'";
String comm = Sqlca.getString("select case when phaseno = '"+phaseNo+"' and inputuser = '"+userid+"' then 'false' else 'true' end as comm from communication where id = '"+id+"'");
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "/Tenwa/Customer/Lessee/Comm/Communication/Communication_list.jsp";

View File

@ -203,6 +203,17 @@
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
//拒单理由 复审意见为拒绝和返回经销商时拒单理由显示
var vo = getItemValue(0,0,"secondchoice");
if(vo=="0010"||vo=="0040"){
showItem(0,"VETO");
setItemRequired(0,"VETO",true);
}else {
hideItem(0,"VETO");
setItemRequired(0,"VETO",false);
}
$(".info_td_left").css("width","150px");
$(".info_mid_line").css("width","50%");
var selectOpinion = '';
@ -685,11 +696,12 @@
$('#SECONDOPINION').append(sReturn);
}
});
//拒单理由
//拒单理由 复审意见为拒绝和返回经销商时拒单理由显示
var vo = getItemValue(0,0,"secondchoice");
if(vo=="0010"||vo=="0040"){
showItem(0,"VETO");
setItemRequired(0,"VETO",true);
setItemValue(0, 0, "VETO", "");
}else {
hideItem(0,"VETO");
setItemRequired(0,"VETO",false);
@ -815,7 +827,7 @@
if(checkOpinion("THIRDCHOICE")){
return;
}
}
}
var updatedFields = DisplayFields[0];
if(iV_all(0)){
document.getElementById("messageBox").style.display='none';
@ -852,12 +864,14 @@
openDWDialog();
var phaseChoice = "";
var phaseOpinion = "";
var VETO = "";
if("0030" == "<%=phaseNo%>"){
phaseChoice = getItemValue(0,0,"firstchoice");
phaseOpinion = getItemValue(0,0,"firstopinion");
}else if("0040" == "<%=phaseNo%>"||"0050" == "<%=phaseNo%>"){
phaseChoice = getItemValue(0,0,"secondchoice");
phaseOpinion = getItemValue(0,0,"secondopinion");
VETO = getItemValue(0,0,"VETO");
}else if("0060" == "<%=phaseNo%>"){
phaseChoice = getItemValue(0,0,"thirdchoice");
phaseOpinion = getItemValue(0,0,"thirdopinion");
@ -872,7 +886,7 @@
// var InterOpinion3 = getItemValue(0,0,"InterOpinion3");
// var DistriOpinion3 = getItemValue(0,0,"DistriOpinion3");
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.BusinessApproveManager","saveApproveOpinion",
"serialNo=<%=taskno%>,phaseNo=<%=phaseNo%>,flowunid=<%=flowunid%>,phaseChoice="+phaseChoice+",phaseOpinion="+phaseOpinion+",userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>");
"serialNo=<%=taskno%>,phaseNo=<%=phaseNo%>,flowunid=<%=flowunid%>,phaseChoice="+phaseChoice+",phaseOpinion="+phaseOpinion+",veto="+VETO+",userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>");
if("SUCCESS" == sResult){
resetDWDialog("±£´æ³É¹¦£¡",true);
reloadSelf();

View File

@ -996,6 +996,8 @@
<attribute name="LEASE_TERM" label="合同期次" type="STRING" length="32"/>
<attribute name="STATUS_NAME" label="合同状态名称" type="STRING" length="32"/>
<attribute name="CONTRACT_STATUS" label="合同状态" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目ID" type="STRING" length="32"/>
<attribute name="PROJ_NAME" label="项目名称" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>

View File

@ -1,35 +1,11 @@
package com.amarsoft.app.flow;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.*;
import jbo.app.APP_BUSINESS_TEMPLATE;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.com.tenwa.entity.comm.flow.FLOW_READER;
import jbo.com.tenwa.entity.comm.flow.FLOW_STEP_NODE;
import jbo.com.tenwa.entity.comm.flow.FLOW_WORK_FLAG;
import jbo.sys.FLOW_ENTRUSTED_USER;
import jbo.sys.FLOW_MODEL;
import jbo.sys.FLOW_TASK;
import jbo.sys.FLOW_TASK_USER_HIS;
import jbo.sys.LM_APPROVAL_OPINION_LOG;
import jbo.sys.USER_TASK_DATA;
import jbo.sys.USER_TASK_INFO;
import org.apache.commons.lang.StringUtils;
import com.amarsoft.amarscript.Any;
import com.amarsoft.amarscript.ELContext;
import com.amarsoft.amarscript.Expression;
import com.amarsoft.app.lc.util.DateAssistant;
import com.amarsoft.are.ARE;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.BizObjectQuery;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.jbo.*;
import com.amarsoft.are.lang.StringX;
import com.amarsoft.are.msg.Message;
import com.amarsoft.are.msg.SMTPDispatcher;
@ -45,8 +21,6 @@ import com.amarsoft.biz.workflow.FlowTask;
import com.amarsoft.biz.workflow.TaskDataObject;
import com.amarsoft.context.ASUser;
import com.amarsoft.dict.als.manage.NameManager;
//import com.base.util.DateUtil;
import com.tenwa.reckon.util.DateUtil;
import com.tenwa.app.manage.constant.PushMessageConstant;
import com.tenwa.app.manage.util.PushMessageUtil;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
@ -59,7 +33,18 @@ import com.tenwa.flow.task.ProductFlowTaskDataService;
import com.tenwa.flow.task.TenwaFlowTask;
import com.tenwa.flow.util.FlowUtil;
import com.tenwa.officetempalte.util.FileOperatorUtil;
import com.tenwa.reckon.util.DateUtil;
import com.tenwa.reckon.util.UUIDUtil;
import jbo.app.APP_BUSINESS_TEMPLATE;
import jbo.com.tenwa.entity.comm.flow.*;
import jbo.sys.*;
import org.apache.commons.lang.StringUtils;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.*;
//import com.base.util.DateUtil;
/**
*
@ -280,13 +265,15 @@ public class FlowAction {
deleteTaskService.exectueFlowDelete();
DataOperatorUtil.deleteJBOByCondtion(FLOW_WORK_FLAG.CLASS_NAME,
condtion, tx);
DataOperatorUtil.deleteJBOByCondtion(
FLOW_BUSSINESS_OBJECT.CLASS_NAME, condtion, tx);
condtion.clear();
condtion.put("flowunid", objectNo);
DataOperatorUtil.deleteJBOByCondtion(FLOW_STEP_NODE.CLASS_NAME,
condtion, tx);
flowService.delete(objectNo, objectType, tx);
if (!"BusinessApplyFlow".equals(flowNo)) { //业务申请取消不删除数据修改状态
DataOperatorUtil.deleteJBOByCondtion(
FLOW_BUSSINESS_OBJECT.CLASS_NAME, condtion, tx);
condtion.clear();
condtion.put("flowunid", objectNo);
DataOperatorUtil.deleteJBOByCondtion(FLOW_STEP_NODE.CLASS_NAME,
condtion, tx);
flowService.delete(objectNo, objectType, tx);
}
return "success@删除成功";
} catch (Exception e) {
tx.rollback();
@ -294,10 +281,10 @@ public class FlowAction {
return "fail@删除失败";
}
}
/**接口平台业务取消通知入表*/
public void cancelOpinionLog(JBOTransaction tx) throws JBOException {
BizObjectManager fboBm = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME,tx);
BizObject fboBo = fboBm.createQuery(" select O.FixedFlowParam from O where O.flow_unid=:flow_unid").setParameter("flow_unid",objectNo).getSingleResult(false);
String fixedFlowParam = fboBo.getAttribute("FixedFlowParam").toString();
@ -318,7 +305,7 @@ public class FlowAction {
BizObject ftBo = ftBm.createQuery(" SELECT O.begintime FROM O WHERE OBJECTNO=:OBJECTNO AND O.ENDTIME IS NULL AND O.phaseno = '0010'").setParameter("OBJECTNO",flowunid).getSingleResult(false);
BizObjectManager laolBm = JBOFactory.getBizObjectManager(LM_APPROVAL_OPINION_LOG.CLASS_NAME,tx);
BizObject laolbo = laolBm.newObject();
laolbo.setAttributeValue("CHANNEL",channel);
laolbo.setAttributeValue("APPLICATION_NO",applicationNo);
laolbo.setAttributeValue("PROJECT_NO",projectNo);
@ -765,6 +752,14 @@ public class FlowAction {
if (bo != null)
taskSerialNo = bo.getAttribute("RELATIVESERIALNO").getString();
} else if(phaseNo.equals("8001")){
bo = JBOFactory
.getBizObjectManager("jbo.sys.FLOW_TASK", tx)
.createQuery("select SERIALNO from O where ObjectNo =:ObjectNo and PhaseNo ='0010' ")
.setParameter("ObjectNo", objectNo)
.getSingleResult(false);
if (bo != null)
taskSerialNo = bo.getAttribute("SERIALNO").getString();
} else {
bo = JBOFactory
.getBizObjectManager("jbo.sys.FLOW_TASK", tx)
@ -1593,6 +1588,24 @@ public class FlowAction {
return isRequireOpition;
}
public String getjxsmessage(JBOTransaction tx) throws Exception {
BizObject bo = null;
BizObjectManager bm = null;
BizObjectQuery bq = null;
bm = JBOFactory.getFactory().getManager(COMMUNICATION.CLASS_NAME);
bq = bm.createQuery("taskno=:taskno")
.setParameter("taskno", this.getTaskNo());
bo = bq.getSingleResult(false);
String remake = "";
if (bo == null) {
remake = "Y";
}else {
remake = "N";
}
return remake;
}
public String getIsStepLastUser(JBOTransaction tx) throws Exception {
if(this.nextNodeType.indexOf("JOIN")>=0){
TenwaFlowTask ft = new TenwaFlowTask(taskNo, tx);//使用jboTrans

View File

@ -1,8 +1,5 @@
package com.amarsoft.dict.als.manage;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import jbo.sys.FLOW_TASK;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
@ -14,6 +11,8 @@ import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CodeCache;
import com.amarsoft.dict.als.cache.NameCache;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import jbo.sys.FLOW_TASK;
public class NameManager
{
@ -191,26 +190,26 @@ public class NameManager
{
return NameCache.getName("jbo.app.tenwa.customer.CUSTOMER_INFO", "CustomerName", "CustomerID", sCustomerID);
}
public static String getOwnName(String sCustomerID) throws Exception{
if(sCustomerID.startsWith("DSTB")){
return NameCache.getName("jbo.app.tenwa.customer.DISTRIBUTOR_INFO", "DISTRIBUTOR_NAME", "DISTRIBUTOR_NO", sCustomerID);
}else{
return NameCache.getName("jbo.app.tenwa.customer.CUSTOMER_INFO", "CustomerName", "CustomerID", sCustomerID);
return NameCache.getName("jbo.app.tenwa.customer.CUSTOMER_INFO", "CustomerName", "CustomerID", sCustomerID);
}
}
public static String getDistributorNameById(String productId) throws Exception{
return NameCache.getName("jbo.app.tenwa.customer.DISTRIBUTOR_INFO", "DISTRIBUTOR_NAME", "DISTRIBUTOR_NO", productId);
}
public static String getCustomerNumber(String sCustomerID)
throws Exception
{
return NameCache.getName("jbo.app.tenwa.customer.CUSTOMER_INFO", "customer_num", "CustomerID", sCustomerID);
}
public static String getBusinessName(String sTypeNo)
throws Exception
{
@ -222,7 +221,7 @@ public class NameManager
{
return NameCache.getName("jbo.app.FORMATDOC_TYPE", "TYPETITLE", "TYPENO", typeNo);
}
/*public static String getCustManageUserID(String sCustomerID)
throws Exception
{
@ -240,28 +239,28 @@ public class NameManager
BizObject bo = bq.setParameter("CustomerID", sCustomerID).getSingleResult(false);
return bo == null ? "" : bo.getAttribute("OrgID").getString();
}*/
public static String getProjectNameByID(String projectID) throws Exception{
BizObject bo = JBOFactory.createBizObjectQuery(LB_PROJECT_INFO.CLASS_NAME, "ID=:ID").setParameter("ID", projectID).getSingleResult(false);
return bo != null?bo.getAttribute("PROJECT_NAME").getString():"";
}
public static String getFlowInitiator(String OBJECTNO) throws Exception{
BizObject bo = JBOFactory.createBizObjectQuery(FLOW_TASK.CLASS_NAME, "OBJECTNO=:OBJECTNO AND PHASENO=:PHASENO").setParameter("OBJECTNO", OBJECTNO).setParameter("PHASENO", "0010").getSingleResult(false);
return bo != null?bo.getAttribute("USERNAME").getString():"";
}
public static String getFlowInitTime(String OBJECTNO) throws Exception{
BizObject bo = JBOFactory.createBizObjectQuery(FLOW_TASK.CLASS_NAME, "OBJECTNO=:OBJECTNO AND PHASENO=:PHASENO").setParameter("OBJECTNO", OBJECTNO).setParameter("PHASENO", "0010").getSingleResult(false);
return bo != null?bo.getAttribute("BEGINTIME").getString():"";
}
public static String getYears(String ContractId,String i) throws Exception{
System.out.println(ContractId+"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"+i);
String sql = "select insurer_end_date from (SELECT @rownum ¡÷= @rownum + 1 AS rownum,insurer_end_date FROM LB_INSURANCE_INFO,(SELECT @rownum ¡÷= 0) t WHERE contract_id ='"+ContractId+"' ORDER BY insurer_start_date ) t WHERE t.rownum= '"+i+"';";
//SqlObject asql = new SqlObject(sql);
//
SqlObject so = new SqlObject(sql);
so.setDebugSql(so.getDebugSql().replaceAll("¡÷", ":"));
so.setOriginalSql(so.getOriginalSql().replaceAll("¡÷", ":"));
@ -296,7 +295,7 @@ public class NameManager
// TODO Auto-generated catch block
e.printStackTrace();
}
/* try {
BizObject bo = JBOFactory.createBizObjectQuery(BC_PAY_INFO_LOG.CLASS_NAME, sql).getSingleResult(false);
lastTime = bo.getAttribute("lastTime").toString();
@ -305,7 +304,7 @@ public class NameManager
}*/
return lastTime;
}
/*//»ñÈ¡µØÖ·Ãû³Æ
public static String getItemName(String codeno,String AddressCode) throws Exception{
if("".equals(AddressCode))
@ -435,4 +434,8 @@ public class NameManager
}
return plateNum == null ? "" : plateNum;
}
}
public static String getFlowStatus(String phaseType) throws Exception {
return "8001".equals(phaseType) ? "È¡Ïû" : "Õý³£";
}
}

View File

@ -118,20 +118,22 @@ public class InsertCustomerHistoryInfo {
}else {
carwjqnumber = "0";
}
//获取客户为主承租剩余租金,罚息
String money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over,format(sum(nvl(penalty_over,0)),2) as penalty_over from lb_union_lessee lul left join vi_rent_plan_sum vrps on lul.contract_id = vrps.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'Y' group by lul.CUSTOMER_ID";
//获取客户为主承租剩余租金,逾期租金
String money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over from lb_union_lessee lul left join vi_rent_plan_sum vrps on lul.contract_id = vrps.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'Y' group by lul.CUSTOMER_ID";
List<Map<String, String>> money_number = conn.executeQuery(money_num);
String yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from lb_union_lessee lul left join vi_rent_plan vrp on lul.contract_id = vrp.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'Y' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by lul.CUSTOMER_ID";
List<Map<String, String>> yqmoney_number = conn.executeQuery(yqmoney_num);
String czr_rent_over = "";
String czr_penalty_over = "";
String czr_yqrent_over = "";
if(money_number.size()>0){
czr_rent_over = money_number.get(0).get("rent_over");
}else {
czr_rent_over = "0";
}
if(money_number.size()>0){
czr_penalty_over = money_number.get(0).get("rent_over");
if(yqmoney_number.size()>0){
czr_yqrent_over = yqmoney_number.get(0).get("yqrent_over");
}else {
czr_penalty_over = "0";
czr_yqrent_over = "0";
}
//获取客户为共同承租人订单总数
String gt_gm_nu = "select count(lul.id) as num from lb_union_lessee lul where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'N' group by lul.CUSTOMER_ID";
@ -197,19 +199,21 @@ public class InsertCustomerHistoryInfo {
gtcarwjqnumber = "0";
}
//获取客户为共同承租人剩余租金,罚息
String gt_money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over,format(sum(nvl(penalty_over,0)),2) as penalty_over from lb_union_lessee lul left join vi_rent_plan_sum vrps on lul.contract_id = vrps.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'N' group by lul.CUSTOMER_ID";
String gt_money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over from lb_union_lessee lul left join vi_rent_plan_sum vrps on lul.contract_id = vrps.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'N' group by lul.CUSTOMER_ID";
List<Map<String, String>> gt_money_number = conn.executeQuery(gt_money_num);
String gt_yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from lb_union_lessee lul left join vi_rent_plan vrp on lul.contract_id = vrp.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'N' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by lul.CUSTOMER_ID";
List<Map<String, String>> gt_yqmoney_number = conn.executeQuery(gt_yqmoney_num);
String gt_rent_over = "";
String gt_penalty_over = "";
String gt_yqrent_over = "";
if(gt_money_number.size()>0){
gt_rent_over = gt_money_number.get(0).get("rent_over");
}else {
gt_rent_over = "0";
}
if(gt_money_number.size()>0){
gt_penalty_over = gt_money_number.get(0).get("penalty_over");
if(gt_yqmoney_number.size()>0){
gt_yqrent_over = gt_yqmoney_number.get(0).get("yqrent_over");
}else {
gt_penalty_over = "0";
gt_yqrent_over = "0";
}
//获取客户为担保人订单总数
String db_gm_nu = "select count(lgu.id) as num from lb_guarantee_unit lgu where lgu.certid = '"+certid+"' group by lgu.certid";
@ -277,26 +281,28 @@ public class InsertCustomerHistoryInfo {
//获取客户为担保人剩余租金,罚息
String db_money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over,format(sum(nvl(penalty_over,0)),2) as penalty_over from lb_guarantee_unit lgu left join vi_rent_plan_sum vrps on lgu.contract_id = vrps.contract_id where lgu.certid = '"+certid+"' group by lgu.certid";
List<Map<String, String>> db_money_number = conn.executeQuery(db_money_num);
String db_yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from lb_guarantee_unit lgu left join vi_rent_plan vrp on lgu.contract_id = vrp.contract_id where lgu.certid = '220121197205076448' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by lgu.certid";
List<Map<String, String>> db_yqmoney_number = conn.executeQuery(db_yqmoney_num);
String db_rent_over = "";
String db_penalty_over = "";
String db_yqrent_over = "";
if(db_money_number.size()>0){
db_rent_over = db_money_number.get(0).get("rent_over");
}else {
db_rent_over = "0";
}
if(db_money_number.size()>0){
db_penalty_over = db_money_number.get(0).get("penalty_over");
if(db_yqmoney_number.size()>0){
db_yqrent_over = db_yqmoney_number.get(0).get("yqrent_over");
}else {
db_penalty_over = "0";
db_yqrent_over = "0";
}
//客户敞口计算
Transaction sqlca = Transaction.createTransaction(tx);
BigDecimal exposureMoney = LBBusinessPrimary.obtainExposureMoney(sqlca,flowunid);
//录入客户历史信息表
String ssql = "insert into customer_history_info_temp(id,customerid,customername,certtype,certid,customertype,customer_num,flowunid,project_id,clientbuynumber,clientfinancingamount,clientclosedaccount,clientunsettled,clientvehiclepopulation,clientclosedvehicle,clientoutstandingvehicle,clientloanbalance,clientoverdueamount,jointlybuynumber,jointlyfinancingamount,jointlyclosedaccount,jointlyunsettled,jointlyveh,jointlyclosedvehicle,jointlyout,jointlyloanbalance,jointlyoverdueamount,guaranteebuynumber,guaranteefin,guaranteeclosedaccount,guaranteeunsettled,guaranteeveh,guaranteeclosedvehicle,guaranteeout,guaranteeloanbalance,guaranteeoverdueamount,exposure)"+
"VALUES(replace(uuid(),'-',''),'"+customerinfo.get(i).get("customerid")+"','"+customerinfo.get(i).get("customername")+"','"+customerinfo.get(i).get("certtype")+"','"+customerinfo.get(i).get("certid")+"','"+customerinfo.get(i).get("customertype")+"','"+customerinfo.get(i).get("customer_num")+"','"+flowunid+"','"+customerinfo.get(i).get("project_id")+"','"+gmnum+"','"+CLEAN_LEASE_MONEY+"','"+jq_number+"','"+wjq_number+"','"+carnumber+"','"+carjqnumber+"','"+carwjqnumber+"','"+czr_rent_over+"','"+czr_penalty_over+"',"+
"'"+gtgmnumber+"','"+GT_CLEAN_LEASE_MONEY+"','"+gt_jq_number+"','"+gt_wjq_number+"','"+gtcarnumber+"','"+gtcarjqnumber+"','"+gtcarwjqnumber+"','"+gt_rent_over+"','"+gt_penalty_over+"',"+
"'"+dbgmnumber+"','"+DB_CLEAN_LEASE_MONEY+"','"+db_jq_number+"','"+db_wjq_number+"','"+dbcarnumber+"','"+dbcarjqnumber+"','"+dbcarwjqnumber+"','"+db_rent_over+"','"+db_penalty_over+"','"+exposureMoney+"')";
"VALUES(replace(uuid(),'-',''),'"+customerinfo.get(i).get("customerid")+"','"+customerinfo.get(i).get("customername")+"','"+customerinfo.get(i).get("certtype")+"','"+customerinfo.get(i).get("certid")+"','"+customerinfo.get(i).get("customertype")+"','"+customerinfo.get(i).get("customer_num")+"','"+flowunid+"','"+customerinfo.get(i).get("project_id")+"','"+gmnum+"','"+CLEAN_LEASE_MONEY+"','"+jq_number+"','"+wjq_number+"','"+carnumber+"','"+carjqnumber+"','"+carwjqnumber+"','"+czr_rent_over+"','"+czr_yqrent_over+"',"+
"'"+gtgmnumber+"','"+GT_CLEAN_LEASE_MONEY+"','"+gt_jq_number+"','"+gt_wjq_number+"','"+gtcarnumber+"','"+gtcarjqnumber+"','"+gtcarwjqnumber+"','"+gt_rent_over+"','"+gt_yqrent_over+"',"+
"'"+dbgmnumber+"','"+DB_CLEAN_LEASE_MONEY+"','"+db_jq_number+"','"+db_wjq_number+"','"+dbcarnumber+"','"+dbcarjqnumber+"','"+dbcarwjqnumber+"','"+db_rent_over+"','"+db_yqrent_over+"','"+exposureMoney+"')";
SqlObject sqlObject = new SqlObject(ssql);
sqlca.executeSQL(sqlObject);

View File

@ -72,4 +72,14 @@ public interface VI_CUSTOMERHISTORY {
*/
public static final String CONTRACT_STATUS = "CONTRACT_STATUS";
/**
* ÏîÄ¿ID STRING(32)<br>
*/
public static final String PROJECT_ID = "PROJECT_ID";
/**
* ÏîÄ¿Ãû³Æ STRING(200)<br>
*/
public static final String PROJ_NAME = "PROJ_NAME";
}

View File

@ -1,5 +1,7 @@
package com.tenwa.lease.flow.project.businessapply;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import jbo.app.LB_EQUIPMENT_CAR;
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
@ -38,7 +40,17 @@ public class BusinessApproveManager {
private String projectId;
private String dataNum;//×âÁÞÎï¸´ÖÆµÄÊýÁ¿
private String carId;
private String veto;//¾Üµ¥ÀíÓÉ
public String getVeto() {
return veto;
}
public void setVeto(String veto) {
this.veto = veto;
}
public String getDistriOpinion1() {
return DistriOpinion1;
}
@ -208,6 +220,12 @@ public class BusinessApproveManager {
bomFT.createQuery("update O set relativeobjectno='"+serialNo+"' where serialno='"+serialNo+"'").executeUpdate();
}
bomFO.saveObject(bo);
if(veto!=null||"".equals(veto)){
Transaction sqlca = Transaction.createTransaction(tx);
String ssql= "update LB_PROJECT_INFO_TEMP set veto = '"+veto+"' where FLOWUNID = '"+flowunid+"'";
SqlObject sqlObject = new SqlObject(ssql);
sqlca.executeSQL(sqlObject);
}
tx.commit();
}catch(Exception e){
e.printStackTrace();