保险理赔模块修改

This commit is contained in:
zhanglei 2021-01-27 10:15:13 +08:00
parent f621ab2852
commit 192f8ebf01
2 changed files with 16 additions and 22 deletions

View File

@ -67,7 +67,7 @@
function view(){
var sUrl = "/Tenwa/insurance/insuranceInfo.jsp";
var id = getItemValue(0,getRow(0),'id');
var id = getItemValue(0,getRow(0),'insurance_id');
if(typeof(id)=="undefined" || id.length==0 ){
alert("请选择一条信息!");
return ;
@ -101,7 +101,7 @@
* 生成保险理赔模板
*/
function generateQuotation(){
var insurance_nos=getItemValueArray(0,"insurance_no");
var insurance_ids=getItemValueArray(0,"insurance_id");
var contract_nos=getItemValueArray(0,"contract_no");
var project_ids=getItemValueArray(0,"project_id");
var customer_ids=getItemValueArray(0,"customer_id");
@ -123,14 +123,14 @@
var objectType = "contractInsurance";
//生成文件关联关系
tempParam["OBJECTTYPE"]=objectType;
tempParam["insurance_no"]=insurance_nos[i];
tempParam["insurance_no"]=insurance_ids[i];
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["PLAN_NUMBER"]=insurance_nos[i];//×¢Òâ±äÁ¿Ãû£¬²»Òª¸Ä
tempParam["PLAN_NUMBER"]=insurance_ids[i];//×¢Òâ±äÁ¿Ãû£¬²»Òª¸Ä
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
@ -143,12 +143,12 @@
sparam+=key+"="+param[key];
}
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","projectId="+project_ids[i]+",plan_number="+insurance_nos[i]+",objecttype="+objectType);
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","projectId="+project_ids[i]+",plan_number="+insurance_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]+",planNumber="+insurance_nos[i]);
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]+",planNumber="+insurance_ids[i]);
if(typeof(id)=="undefined" || id.length <= 0 || id==""){
RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","projectId="+project_ids[i]+",plan_number="+insurance_nos[i]+",objecttype="+objectType);
RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","projectId="+project_ids[i]+",plan_number="+insurance_ids[i]+",objecttype="+objectType);
}else{
number++;
}
@ -179,12 +179,12 @@
var subject_ids=getItemValueArray(0,"subject_id");
var contract_ids=getItemValueArray(0,"contract_id");
var subject_ids=getItemValueArray(0,"subject_id");
var insurance_nos=getItemValueArray(0,"insurance_no");
var insurance_ids=getItemValueArray(0,"insurance_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+",planNumber="+insurance_nos[i]);
+",flagType=start,tempId="+tempId+",planNumber="+insurance_ids[i]);
if("success"==result){
number++;
}

View File

@ -33,19 +33,13 @@ public class InsuranceInfoHandler extends CommonHandler {
@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;
}
}
// if (!isInsert) {
// 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();
}