apzl_leasing/WebContent/Common/Evaluate/ConsoleEvaluateAction.jsp
2018-06-03 22:26:41 +08:00

70 lines
3.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@page import="com.amarsoft.biz.finance.ReportManager"%>
<%@page import="com.amarsoft.biz.workflow.FlowObject"%>
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
<%@page import="com.amarsoft.are.jbo.*"%>
<%@page import="com.amarsoft.biz.workflow.FlowTask"%>
<%@page import="com.amarsoft.biz.evaluate.*" %>
<%@ page contentType="text/html; charset=GBK"%><%@
include file="/IncludeBeginMDAJAX.jsp"%><%
/*
* Content: 信用等级评估动作:新增、删除
*/
//获取页面参数
String sActionType = CurPage.getParameter("Action"); //操作类型
String sObjectType = CurPage.getParameter("ObjectType"); //对象类型
String sObjectNo = CurPage.getParameter("ObjectNo"); //对象编号
String sSerialNo = CurPage.getParameter("SerialNo"); //评级流水号
String sAccountMonth = CurPage.getParameter("AccountMonth");//会计月份
String sModelNo = CurPage.getParameter("ModelNo"); //评估模型类型代码
String sModelType = CurPage.getParameter("ModelType"); //评估模型类型
String sReportScope = CurPage.getParameter("ReportScope"); //财务报表口径
String sReportStatus = CurPage.getParameter("ReportStatus"); //报表状态
String proj_id = CurPage.getParameter("proj_id"); //报表状态
//将空值转化为空字符串
if(sActionType == null) sActionType = "";
if(sObjectType == null) sObjectType = "";
if(sObjectNo == null) sObjectNo = "";
if(sSerialNo == null) sSerialNo = "";
if(sAccountMonth == null) sAccountMonth = "";
if(sModelNo == null) sModelNo = "";
if(sModelType == null) sModelType = "";
if(sReportScope == null) sReportScope = "";
JBOTransaction tx = JBOFactory.createJBOTransaction();
try{
if(sActionType.equals("add")){ //新增
//实现多口径后,新增一条信用等级评估申请记录时,要带上相应的财务报表的口径参数。
//这里修改了方法Evaluate.newEvaluate在原来的基础上增加了口径参数。
//sSerialNo = Evaluate.newEvaluate(sObjectType,sObjectNo,sAccountMonth,sModelNo,StringFunction.getToday(),CurOrg.getOrgID(),CurUser.getUserID(),Sqlca); //原来的方法
sSerialNo = Evaluate.newEvaluate(sObjectType,sObjectNo,sAccountMonth,sModelNo,StringFunction.getToday(),CurOrg.getOrgID(),CurUser.getUserID(),sReportScope,tx); //修改后的方法
if(sObjectType.equals("Customer")){
//objectType, objectNo, baseFlowNo, applyType, phaseNo, userID, orgID, jboTrans
//FlowTask.initFlow(sObjectType, sSerialNo, "EvaluateFlow", "CreditCogApply", "0010", CurUser.getUserID(), CurUser.getOrgID(), tx);
FlowObject.CreateInstance("CreditCogApply", sSerialNo, CurUser.getUserID(), tx);
}
//如果新增客户信用等级评估申请记录,要将报表状态置为锁定。sModelType=010为企业信用等级评估sModelType=012为中小企业信用等级评估,sModelType=017为个体经营户。
// 详情见代码表EvaluateModelType
if("010".equals(sModelType) ||"012".equals(sModelType) || "017".equals(sModelType)){
ReportManager.updateFSStatus(sObjectNo, sAccountMonth, sReportScope, sReportStatus, tx);
}
out.println(sSerialNo); //AJAX返回值
}else if(sActionType.equals("get")){
sSerialNo =Evaluate.newEvaluate(sObjectType,sObjectNo,sAccountMonth,sModelNo,StringFunction.getToday(),CurOrg.getOrgID(),CurUser.getUserID(),sReportScope,tx); //修改后的方法
EvaluateManager evalManager = new EvaluateManager("evaluate", sObjectType, sObjectNo, sSerialNo, sModelNo,CurPage, tx);
String sMessage = evalManager.updateOrEval();
System.out.println("--------sss"+sSerialNo);
out.println(sSerialNo); //AJAX返回值
}else if(sActionType.equals("delete")){ //删除
Evaluate.deleteEvaluate(sObjectType,sObjectNo,sSerialNo,tx);
//删除信用等级评估记录成功
out.println("success"); //AJAX返回值
}
tx.commit();
BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.sys.EVALUATE_RECORD.CLASS_NAME);
bom.createQuery("update O set COGNUSERID4=:COGNUSERID4 where serialno=:serialno").setParameter("COGNUSERID4", proj_id).setParameter("serialno", sSerialNo).executeUpdate();
}catch(Exception e){
tx.rollback();
throw e;
}
%><%@ include file="/IncludeEndAJAX.jsp"%>