保险理赔记录盖章
This commit is contained in:
parent
3eb61b76f3
commit
b62610dbc7
120
WebContent/Tenwa/insurance/insuranceInfo.jsp
Normal file
120
WebContent/Tenwa/insurance/insuranceInfo.jsp
Normal file
@ -0,0 +1,120 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2016-06-07
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "InsuranceInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
String inputuserid=CurUser.getUserID();
|
||||
String inputorgid=CurUser.getOrgID();
|
||||
doTemp.setDefaultValue("InputUserID",inputuserid);
|
||||
doTemp.setDefaultValue("InputOrgID",inputorgid);
|
||||
// doTemp.setColTips("", "");
|
||||
// doTemp.setDefaultValue("invalid", "N");
|
||||
// doTemp.setHtmlEvent("had_money","onchange","adjustMayOpemoney");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","saveRecord()","","","",""},
|
||||
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return",""},
|
||||
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
|
||||
};
|
||||
String orgCompany=CurUser.getOrgID();
|
||||
if(orgCompany.length()>13){
|
||||
orgCompany=orgCompany.substring(0,13);
|
||||
}
|
||||
orgCompany=orgCompany.substring(0,orgCompany.length()-4);
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
hidenOrg();
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
function goBack(){
|
||||
AsControl.OpenView("/Tenwa/insurance/insuranceList.jsp", "","_self","");
|
||||
}
|
||||
function saveRecord(sPostEvents){
|
||||
var insurance_amount_number=getItemValue(0,getRow(),"insurance_amount_number");
|
||||
if(insurance_amount_number<0){
|
||||
alert("赔偿金额不能小于0");
|
||||
return;
|
||||
}
|
||||
var plate_number = getItemValue(0,getRow(),"PLATE_NUMBER");
|
||||
if(null == plate_number || ''== plate_number || 'null' == plate_number
|
||||
|| 'undefined' == plate_number){
|
||||
alert("车牌号不能为空");
|
||||
return;
|
||||
}
|
||||
var sProjID = getItemValue(0,getRow(),"ID");
|
||||
setItemValue(0,0,"ID",sProjID);
|
||||
as_save("myiframe0","goBack()");
|
||||
// var res=RunJavaMethodTrans("com.tenwa.lease.app.ebank.EbankUse","createEbankVoucher","");
|
||||
}
|
||||
|
||||
|
||||
function selectOwnAccount(){
|
||||
AsDialog.OpenSelector("SelectContractInsurance","","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;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,0,"contract_no", sReturn[0]);
|
||||
setItemValue(0,0,"username", sReturn[1]);
|
||||
setItemValue(0,0,"cert_id", sReturn[2]);
|
||||
var messages = RunJavaMethodTrans("com.tenwa.insurance.InsuranceInfo","checkInsuranceInfo","contractNo="+sReturn[0]);
|
||||
if("error" != messages){
|
||||
setItemValue(0,0,"equipment_id", messages.equipmentId);
|
||||
setItemValue(0,0,"FRAME_NUMBER", messages.FRAME_NUMBER);
|
||||
setItemValue(0,0,"PLATE_NUMBER", messages.plate_number);
|
||||
if(null == messages.plate_number || ''== messages.plate_number || 'null' == messages.plate_number
|
||||
|| 'undefined' == messages.plate_number){
|
||||
setItemValue(0,0,"PLATE_NUMBER", messages.LICENSE_PLATE_NUMBER);
|
||||
if(null == messages.LICENSE_PLATE_NUMBER || ''== messages.LICENSE_PLATE_NUMBER || 'null' == messages.LICENSE_PLATE_NUMBER
|
||||
|| 'undefined' == messages.LICENSE_PLATE_NUMBER){
|
||||
setItemValue(0,0,"PLATE_NUMBER", "");
|
||||
}
|
||||
}
|
||||
setItemValue(0,0,"project_name", messages.PROJECT_NAME);
|
||||
setItemValue(0,0,"product_id", messages.PRODUCT_ID);
|
||||
setItemValue(0,0,"product_name", messages.PRODUCT_NAME);
|
||||
setItemValue(0,0,"distributor_no", messages.distributor_no);
|
||||
setItemValue(0,0,"distributor_name", messages.DISTRIBUTOR_NAME);
|
||||
setItemValue(0,0,"subject_id", messages.SUBJECTID);
|
||||
setItemValue(0,0,"subject_name", messages.SUBJECTNAME);
|
||||
setItemValue(0,0,"contract_id", messages.contractId);
|
||||
setItemValue(0,0,"project_id", messages.PROJECT_ID);
|
||||
setItemValue(0,0,"customer_id", messages.customerid);
|
||||
}else {
|
||||
alert("当前合同信息异常!");
|
||||
}
|
||||
},"请选择本方账户信息");
|
||||
}
|
||||
function selectOrg(){
|
||||
var sOrg = getItemValue(0,getRow(),"InputOrgID");
|
||||
var sOrgName = getItemValue(0,getRow(),"InputOrgName");
|
||||
AsDialog.SetTreeValue("SelectBelongOrg","<%=orgCompany%>%", "InputOrgID=OrgID@InputOrgIDName=OrgName","OrgID","OrgName", [sOrg,sOrgName], false, true);
|
||||
}
|
||||
function selectInputUser(){
|
||||
var sUserID = getItemValue(0,getRow(),"InputUserID");
|
||||
var sUserName = getItemValue(0,getRow(),"InputUserName");
|
||||
AsDialog.SetTreeValue("SelectUserName", "<%=orgCompany%>%", "InputUserID=UserID@InputUserIDName=UserName","UserID","UserName", [sUserID,sUserName], false, true);
|
||||
}
|
||||
function hidenOrg(){
|
||||
<%if(!(CurUser.hasRole("099") || CurUser.hasRole("299"))){%>
|
||||
hideItem(0,"InputUserIDName");
|
||||
|
||||
hideItem(0,"InputOrgIDName");
|
||||
|
||||
<%}%>
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
223
WebContent/Tenwa/insurance/insuranceList.jsp
Normal file
223
WebContent/Tenwa/insurance/insuranceList.jsp
Normal file
@ -0,0 +1,223 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
|
||||
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
|
||||
<%@ page import="com.amarsoft.app.util.*" %>
|
||||
|
||||
|
||||
<%
|
||||
String userId = CurUser.getUserID();
|
||||
String orgId =CurUser.getOrgID();
|
||||
System.out.print(orgId);
|
||||
String falg = "true";
|
||||
|
||||
String compClientID = request.getParameter("CompClientID");
|
||||
// ASObjectModel doTemp = new ASObjectModel("RentNotify");
|
||||
ASObjectModel doTemp = new ASObjectModel("ContractInsuranceList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1";
|
||||
dwTemp.setPageSize(15);
|
||||
dwTemp.MultiSelect = true;
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] =null;
|
||||
sButtons=new String[][]{
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{falg,"All","Button","生成保险理赔委托书","生成保险理赔委托书","generateQuotation()","","","","btn_icon_generate"},
|
||||
{"true","All","Button","批量下载","批量下载","lotdown()","","","","btn_icon_down"},
|
||||
{falg,"All","Button","公司盖章","公司盖章","stamp()","","","",""},
|
||||
};
|
||||
%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%/*~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">
|
||||
//在加载完表格后调用
|
||||
function afterSearch(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
var html="";
|
||||
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"ID")+'\')><font color="blue">'+"下载     "+'</font></a>';
|
||||
getObj(0,i,"FILENAME").innerHTML=html+'<font >'+getObj(0,i,"FILENAME").innerHTML+'</font>';
|
||||
};
|
||||
|
||||
}
|
||||
function downloadFile(id){
|
||||
if(typeof(id)==undefined || id=='') {
|
||||
alert("请先生成保险理赔书再下载!");
|
||||
return;
|
||||
}
|
||||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
|
||||
}
|
||||
|
||||
function view(){
|
||||
var sUrl = "/Tenwa/insurance/insuranceInfo.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 newRecord(){
|
||||
var sUrl = "/Tenwa/insurance/insuranceInfo.jsp";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
|
||||
function lotdown(){
|
||||
var attrids=getItemValueArray(0,"ID");
|
||||
if(typeof(attrids)=="undefined"||attrids==null||attrids==""){alert("请选择");return;}
|
||||
for( var i=0;i<attrids.length;i++){
|
||||
if(typeof(attrids[i])=="undefined"||attrids[i]==null||attrids[i]==""){
|
||||
alert("请先生成保险理赔委托书再下载!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
lotdownloadFile(attrids);
|
||||
}
|
||||
function lotdownloadFile(id){
|
||||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||
window.open(sWebRootPath+"/servlet/view/DownloadZipServlet?CompClientID=<%=sCompClientID%>&id="+id, "downloadTemplate");
|
||||
}
|
||||
/**
|
||||
* 生成保险理赔模板
|
||||
*/
|
||||
function generateQuotation(){
|
||||
var contract_nos=getItemValueArray(0,"contract_no");
|
||||
var project_ids=getItemValueArray(0,"project_id");
|
||||
var customer_ids=getItemValueArray(0,"customer_id");
|
||||
var subject_ids=getItemValueArray(0,"subject_id");
|
||||
var contract_ids=getItemValueArray(0,"contract_id");
|
||||
var subject_ids=getItemValueArray(0,"subject_id");
|
||||
|
||||
var number = 0;
|
||||
if(typeof(contract_nos)=="undefined"||contract_nos==null||contract_nos==""){alert("请选择");return;}
|
||||
for(var i=0;i<contract_nos.length;i++){
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
//模板号
|
||||
//param["templateNo"]="ceaa18f72b0e4bbaa6e66dcfd7e32c87";
|
||||
var tempId = "2df36e40437211eb808300163e0e11e6";
|
||||
param["templateNo"]= tempId;
|
||||
//文件类型:保险授权委托书
|
||||
var objectType = "contractInsurance";
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]=objectType;
|
||||
tempParam["contract_no"]=contract_nos[i];
|
||||
tempParam["contract_id"]=contract_ids[i];
|
||||
tempParam["project_id"]=project_ids[i];
|
||||
tempParam["PROJ_ID"]=project_ids[i];//注意变量名,不要改
|
||||
tempParam["CONTRACT_ID"]=contract_ids[i];//注意变量名,不要改
|
||||
tempParam["CUST_ID"]=customer_ids[i];//注意变量名,不要改
|
||||
|
||||
//生成模板固定参数
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
|
||||
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||
|
||||
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
|
||||
for(var key in param){
|
||||
if(sparam.length>0){sparam+=",";}
|
||||
sparam+=key+"="+param[key];
|
||||
}
|
||||
|
||||
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","projectId="+project_ids[i]+",objecttype="+objectType);
|
||||
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||||
// word转pdf
|
||||
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractInsuranceSignAction","wordToPdfInsurance","contractNo="+contract_nos[i]+",contractId="+contract_ids[i]+",projectId="+project_ids[i]+",subjectId="+subject_ids[i]);
|
||||
if(typeof(id)=="undefined" || id.length <= 0 || id==""){
|
||||
RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","projectId="+project_ids[i]+",objecttype="+objectType);
|
||||
}else{
|
||||
number++;
|
||||
}
|
||||
}
|
||||
if(contract_nos.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}else if(number==0){
|
||||
alert("生成失败!!!");
|
||||
}else if(number==contract_nos.length){
|
||||
alert("生成成功!!!");
|
||||
}else{
|
||||
alert("部分生成成功!!!");
|
||||
}
|
||||
reloadSelf();
|
||||
}
|
||||
function stamp(){
|
||||
var tempId = "2df36e40437211eb808300163e0e11e6";
|
||||
var flie = getItemValue(0,getRow(0),"FILENAME");
|
||||
if(typeof(flie)=="undefined"||flie==null||flie==""){
|
||||
alert("请先生成保险委托授权书!");
|
||||
return;
|
||||
}
|
||||
var number = 0;
|
||||
var contract_nos=getItemValueArray(0,"contract_no");
|
||||
var project_ids=getItemValueArray(0,"project_id");
|
||||
var customer_ids=getItemValueArray(0,"customer_id");
|
||||
var subject_ids=getItemValueArray(0,"subject_id");
|
||||
var contract_ids=getItemValueArray(0,"contract_id");
|
||||
var subject_ids=getItemValueArray(0,"subject_id");
|
||||
|
||||
for(var i=0;i<contract_nos.length;i++){
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractInsuranceSignAction","claimSignInsuranceTwo",
|
||||
"contractNo="+contract_nos[i]+",contractId="+contract_ids[i]+",projectId="+project_ids[i]+",subjectId="+subject_ids[i]
|
||||
+",flagType=start,tempId="+tempId);
|
||||
if("success"==result){
|
||||
number++;
|
||||
}
|
||||
}
|
||||
|
||||
if(contract_nos.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}else if(number==0){
|
||||
alert("盖章失败!!!");
|
||||
}else if(number==contract_nos.length){
|
||||
alert("盖章成功!!!");
|
||||
}else{
|
||||
alert("部分盖章成功!!!");
|
||||
}
|
||||
location.reload();
|
||||
|
||||
}
|
||||
</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"%>
|
||||
11
WebContent/Tenwa/insurance/insuranceMain.jsp
Normal file
11
WebContent/Tenwa/insurance/insuranceMain.jsp
Normal 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("/Tenwa/insurance/insuranceList.jsp","","right","");
|
||||
</script>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
File diff suppressed because it is too large
Load Diff
@ -123,7 +123,7 @@ public class ContractInsuranceSignAction {
|
||||
* @throws Exception
|
||||
*/
|
||||
public String claimSignInsuranceTwo(JBOTransaction tx) throws Exception {
|
||||
logger.info("claimSignInsuranceTwo 保险委托申请书盖章:对接契约锁2.0 开始 1224 1935");
|
||||
logger.info("claimSignInsuranceTwo 保险委托申请书盖章:对接契约锁2.0 开始 0107 1013");
|
||||
String libraryid="";
|
||||
BizObjectManager bom=JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME);
|
||||
BizObject DOCRELATIVE=bom.createQuery("OBJECTTYPE='contractInsurance' and CONTRACT_ID=:contractid ").setParameter("contractid", contractId).getSingleResult(false);
|
||||
|
||||
@ -76,7 +76,9 @@ public class RentNotinyDeleteAction {
|
||||
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='LetterApprova'").setParameter("projectId",projectId).getSingleResult(false);
|
||||
}else if("LoanNotice".equals(objecttype)){
|
||||
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='LoanNotice'").setParameter("projectId",projectId).getSingleResult(false);
|
||||
}
|
||||
}else if("contractInsurance".equals(objecttype)){
|
||||
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='contractInsurance'").setParameter("projectId",projectId).getSingleResult(false);
|
||||
}
|
||||
else{
|
||||
DOCRELATIVE=bom.createQuery("plan_number=:plan_number and plan_list=:plan_list").setParameter("plan_number",plan_number).setParameter("plan_list", plan_list).getSingleResult(false);
|
||||
}
|
||||
|
||||
67
src_tenwa/com/tenwa/insurance/InsuranceInfo.java
Normal file
67
src_tenwa/com/tenwa/insurance/InsuranceInfo.java
Normal file
@ -0,0 +1,67 @@
|
||||
package com.tenwa.insurance;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.amarsoft.are.jbo.*;
|
||||
import com.amarsoft.awe.util.ASResultSet;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
|
||||
public class InsuranceInfo {
|
||||
|
||||
private String contractNo;
|
||||
|
||||
public String getContractNo() {
|
||||
return contractNo;
|
||||
}
|
||||
|
||||
public void setContractNo(String contractNo) {
|
||||
this.contractNo = contractNo;
|
||||
}
|
||||
|
||||
public String checkInsuranceInfo(JBOTransaction tx) throws JBOException{//УÑéÐÕÃûÊÇ·ñ´æÔÚ
|
||||
System.out.println("ºÏͬid="+ contractNo);
|
||||
Transaction Sqlca=null;
|
||||
JSONObject resJson = new JSONObject();
|
||||
try {
|
||||
Sqlca=Transaction.createTransaction(tx);
|
||||
String sql = "SELECT lec.id as equipmentId,lec.FRAME_NUMBER,lec.LICENSE_PLATE_NUMBER,lcp.plate_number, " +
|
||||
" ci.customerid,ci.customername,ci.certid, " +
|
||||
" di.distributor_no,di.DISTRIBUTOR_NAME, " +
|
||||
" lci.PRODUCT_ID,lci.PRODUCT_NAME,lci.SUBJECTID,lci.SUBJECTNAME,lci.PROJECT_ID,lci.PROJECT_NAME,lci.ID as contractId, lci.CONTRACT_NUMBER " +
|
||||
" FROM lb_contract_info lci " +
|
||||
" left join distributor_info di on di.distributor_no=lci.distributor_id " +
|
||||
" left join lb_union_lessee lul on lul.CONTRACT_ID=lci.id " +
|
||||
" left join customer_info ci on ci.customerid=lul.CUSTOMER_ID " +
|
||||
" left join lb_equipment_car lec on lec.CONTRACT_ID=lci.id " +
|
||||
" left join LB_CAR_LICENSE_PLATE_INFO lcp on lcp.CONTRACT_ID=lci.id " +
|
||||
" WHERE lci.CONTRACT_NUMBER='" + contractNo + "'";
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject(sql));
|
||||
while (res.next()) {
|
||||
resJson.put("equipmentId", res.getString("equipmentId"));
|
||||
resJson.put("FRAME_NUMBER", res.getString("FRAME_NUMBER"));
|
||||
resJson.put("LICENSE_PLATE_NUMBER", res.getString("LICENSE_PLATE_NUMBER"));
|
||||
resJson.put("plate_number", res.getString("plate_number"));
|
||||
resJson.put("customerid", res.getString("customerid"));
|
||||
resJson.put("PRODUCT_ID", res.getString("PRODUCT_ID"));
|
||||
resJson.put("PRODUCT_NAME", res.getString("PRODUCT_NAME"));
|
||||
resJson.put("SUBJECTID", res.getString("SUBJECTID"));
|
||||
resJson.put("SUBJECTNAME", res.getString("SUBJECTNAME"));
|
||||
resJson.put("PROJECT_ID", res.getString("PROJECT_ID"));
|
||||
resJson.put("PROJECT_NAME", res.getString("PROJECT_NAME"));
|
||||
resJson.put("contractId", res.getString("contractId"));
|
||||
resJson.put("distributor_no", res.getString("distributor_no"));
|
||||
resJson.put("DISTRIBUTOR_NAME", res.getString("DISTRIBUTOR_NAME"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "ERROR";
|
||||
}finally{
|
||||
if(Sqlca !=null){
|
||||
Sqlca.commit();
|
||||
}
|
||||
}
|
||||
return resJson.toJSONString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
56
src_tenwa/com/tenwa/insurance/InsuranceInfoHandler.java
Normal file
56
src_tenwa/com/tenwa/insurance/InsuranceInfoHandler.java
Normal file
@ -0,0 +1,56 @@
|
||||
package com.tenwa.insurance;
|
||||
|
||||
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;
|
||||
|
||||
public class InsuranceInfoHandler extends CommonHandler {
|
||||
|
||||
@Override
|
||||
protected void beforeInsert(JBOTransaction tx, BizObject bo)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
String contractNo = bo.getAttribute("contract_no").getString();
|
||||
System.out.println("beforeInsert -- contractNo=" + contractNo);
|
||||
// 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 contractNo = bo.getAttribute("contract_no").getString();
|
||||
System.out.println("beforeUpdate -- contractNo=" + contractNo);
|
||||
// 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(LB_CONTRACT_INSURANCE_INFO.CLASS_NAME, "insurance_no=:insurance_no").setParameter("insurance_no", bo.getAttribute("insurance_no").getString()).getSingleResult(false);
|
||||
if (bx != null) {
|
||||
this.errors = "保险单号重复";
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
BizObject bx = JBOFactory.createBizObjectQuery(LB_CONTRACT_INSURANCE_INFO.CLASS_NAME, "insurance_no=:insurance_no and id<>'" + bo.getAttribute("id").getString() + "'").setParameter("insurance_no", bo.getAttribute("insurance_no").getString()).getSingleResult(false);
|
||||
if (bx != null) {
|
||||
this.errors = "保险单号重复";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return super.validityCheck(bo, isInsert);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.tenwa.insurance;
|
||||
|
||||
/**
|
||||
* 保险理赔授权- JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface LB_CONTRACT_INSURANCE_INFO {
|
||||
/**
|
||||
* 保险理赔授权<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "com.tenwa.insurance.LB_CONTRACT_INSURANCE_INFO";
|
||||
/**
|
||||
* 编号 STRING(32)<br>
|
||||
*/
|
||||
public static final String id = "id";
|
||||
public static final String insurance_no = "insurance_no"; //保险单号
|
||||
public static final String contract_id = "contract_id";//合同id
|
||||
public static final String project_id = "project_id";//项目id
|
||||
public static final String customer_id = "customer_id";//客户id
|
||||
public static final String equipment_id = "equipment_id";//租赁物id
|
||||
public static final String contract_no = "contract_no";//合同编号
|
||||
public static final String project_name = "project_name";//订单编号
|
||||
public static final String FRAME_NUMBER = "FRAME_NUMBER";//车架号
|
||||
public static final String PLATE_NUMBER = "PLATE_NUMBER";//车牌号
|
||||
public static final String product_id = "product_id";//产品id
|
||||
public static final String product_name = "product_name";//产品名称
|
||||
public static final String distributor_no = "distributor_no";//经销商id
|
||||
public static final String distributor_name = "distributor_name";//经销商名称
|
||||
public static final String subject_id = "subject_id";//主体id
|
||||
public static final String subject_name = "subject_name";//主体名称
|
||||
public static final String username = "username";//客户名称
|
||||
public static final String cert_id = "cert_id";//身份证号
|
||||
public static final String insurance_company = "insurance_company";//保险公司名称
|
||||
public static final String insurance_amount_number = "insurance_amount_number";//赔偿金额
|
||||
public static final String insurance_account = "insurance_account";//户名
|
||||
public static final String bank_name = "bank_name";//银行名称
|
||||
public static final String bank_card = "bank_card";//银行账户
|
||||
/**
|
||||
* 登记人 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";
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user