diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/ApplyPassContract.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/ApplyPassContract.jsp
new file mode 100644
index 000000000..fff5aa801
--- /dev/null
+++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/ApplyPassContract.jsp
@@ -0,0 +1,38 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ /*
+ Author: undefined 2018-08-13
+ Content:
+ History Log:
+ */
+ String distributor_no = CurPage.getParameter("distributor_no");
+ ASObjectModel doTemp = new ASObjectModel("APPLY_PASS_CONTRACT");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="1"; //--设置为Grid风格--
+ dwTemp.ReadOnly = "1"; //只读模式
+ dwTemp.setPageSize(20);
+ dwTemp.genHTMLObjectWindow(distributor_no);
+
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] = {
+ //{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
+ //{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
+ //{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
+ };
+%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp
index 591c17634..81668be53 100644
--- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp
@@ -39,7 +39,7 @@
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
dwTemp.replaceColumn("customer_info", "", CurPage.getObjectWindowOutput());
String sButtons[][] = {
- {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","saves()","","","","btn_icon_saveNew",""}
+ {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""}
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
@@ -52,22 +52,24 @@
$(".info_td_left").css("width","150px");
$(".info_mid_line").css("width","50%");
})
- function saves(){
+ function save(){
+ if(!checkinputName()){
+ return;
+ }
if(!checkTel()){
return ;
}
- as_save("0","save();");
- }
- function save(){
var leasfrom = getItemValue(0,getRow(),"LEAS_FORM");
var projectSource = getItemValue(0,getRow(),"PROJECT_SOURCE");
+ var inputName = getItemValue(0,getRow(),"inputName");
+ var inputTel = getItemValue(0,getRow(),"inputTel");
var customerType = "<%=custype%>";
if(customerType=="01"){//法人
as_save("myiframe0","frame_list.window.as_save(0);");
//as_save(0);
}
if(customerType=="03"){//自然人
- frame_list.window.saveRecord(leasfrom,projectSource);
+ frame_list.window.saveRecord(leasfrom,projectSource,inputName,inputTel);
//as_save("myiframe0","frame_list.window.as_save(0);");
}
}
@@ -86,5 +88,16 @@
return false;
}
}
+
+ function checkinputName(){
+ var inputName = getItemValue(0,getRow(0),"inputName");
+ if(inputName==""){
+ setErrorTips("inputName","报单人不能为空!");
+ return false;
+ }else{
+ setErrorTips("inputName","");
+ return true;
+ }
+ }
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp
index f5ac244b3..a8ae0f3be 100644
--- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp
@@ -18,6 +18,7 @@
doTemp.setHtmlEvent("tel","onChange","checkTelRepeat");
doTemp.setHtmlEvent("certId","onChange","checkCertId");
doTemp.setHtmlEvent("suphone","onChange","checkSuphone");
+ doTemp.setHtmlEvent("certid","onChange","ValidityCheck");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
@@ -226,5 +227,17 @@
function returnList(){
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
}
+
+ //根据身份证号判断性别
+ function ValidityCheck(){
+ var certID = getItemValue(0,getRow(),"CERTID");
+ sex = certID.substring(16,17);
+ sex = parseInt(sex);
+ if(sex%2==0){//奇男偶女
+ setItemValue(0,getRow(),"SEX","2");
+ }else{
+ setItemValue(0,getRow(),"SEX","1");
+ }
+ }
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp
index 1315b2e21..9a876d6c9 100644
--- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp
@@ -17,6 +17,7 @@
doTemp.setHtmlEvent("Partner_","onChange","changePartner");
doTemp.setHtmlEvent("tel","onChange","checkTelRepeat");
doTemp.setHtmlEvent("sex","onChange","checkSex");
+ doTemp.setHtmlEvent("certid","onChange","ValidityCheck");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
@@ -304,5 +305,16 @@
}
return true;
}
+ //根据身份证号判断性别
+ function ValidityCheck(){
+ var certID = getItemValue(0,getRow(),"CERTID");
+ sex = certID.substring(16,17);
+ sex = parseInt(sex);
+ if(sex%2==0){//奇男偶女
+ setItemValue(0,getRow(),"SEX","2");
+ }else{
+ setItemValue(0,getRow(),"SEX","1");
+ }
+ }
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
index 1b2024cec..0fdcbbc7d 100644
--- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
@@ -254,8 +254,8 @@
$("#WORKTEL")[0].width = $("#WORKTEL").parent().parent().parent()[0].clientWidth/2+200;
if("ReadOnly" != "<%=rightType%>"){
checkDriver();
- //ValidityCheck();
}
+ ValidityCheck();
frame_list.window.onload = function(){//当页面加载完后调用子页面方法,不能去掉
changeChildrensNumber();
changeSex();
@@ -386,7 +386,7 @@
} */
}
- function saveRecord(leasfrom,projectSource){//保存
+ function saveRecord(leasfrom,projectSource,inputName,inputTel){//保存
var mobile = getItemValue(0,getRow(),"mobile");
var emergencyTel = getItemValue(0,getRow(),"EMERGENCY_CONTACT_TEL");
var remark = getItemValue(0,getRow(),"REMARK");
@@ -440,15 +440,16 @@
var certid=getItemValue(0,0,"CERTID");
<%-- var customerid=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","updateCustomerId",'certid='+certid+',flowunid=<%=flowunid%>'); --%>
// setItemValue(0,0,"customerid",customerid);
- as_save("0","saveCertInfo("+leasfrom+",'"+projectSource+"')");
+ as_save("0","saveCertInfo('"+inputName+"','"+inputTel+"','"+leasfrom+"','"+projectSource+"')");
+ return true;
};
}
- function saveCertInfo(leasfrom,projectSource){
+ function saveCertInfo(inputName,inputTel,leasfrom,projectSource){
- var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCertInfo",'project_source='+projectSource+',leas_from='+leasfrom+',idexpiry='+getItemValue(0,0,"idexpiry")+',certtype='+getItemValue(0,0,"certtype")+',customerid='+getItemValue(0,0,"customerid")+',flowunid=<%=flowunid%>,certid='+getItemValue(0,0,"certid")+',name='+getItemValue(0,0,"name")+',userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>');
+ var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCertInfo",'inputName='+inputName+',inputTel='+inputTel+',project_source='+projectSource+',leas_from='+leasfrom+',idexpiry='+getItemValue(0,0,"idexpiry")+',certtype='+getItemValue(0,0,"certtype")+',customerid='+getItemValue(0,0,"customerid")+',flowunid=<%=flowunid%>,certid='+getItemValue(0,0,"certid")+',name='+getItemValue(0,0,"name")+',userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>');
if(sResult == "SUCCESS"){
- reloadSelf();
+ parent.reloadSelf();
}
}
diff --git a/src_core/com/tenwa/comm/util/jboutil/SaveBusinessStatus.java b/src_core/com/tenwa/comm/util/jboutil/SaveBusinessStatus.java
index 9220c6bf7..b7a2aeae7 100644
--- a/src_core/com/tenwa/comm/util/jboutil/SaveBusinessStatus.java
+++ b/src_core/com/tenwa/comm/util/jboutil/SaveBusinessStatus.java
@@ -1,6 +1,7 @@
package com.tenwa.comm.util.jboutil;
import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS;
+import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import com.amarsoft.are.jbo.BizObject;
@@ -38,4 +39,24 @@ public class SaveBusinessStatus {
bsbo.setAttributeValue(BUSINESS_STATUS.inputtime, StringFunction.getTodayNow());
bsbom.saveObject(bsbo);
}
+ /**
+ * @param contractId
+ * @param tx
+ * @param statusCode 状态码
+ * @param userid
+ * @throws JBOException
+ */
+ public static void saveByContractId(String contractId ,JBOTransaction tx ,String statusCode,String userid) throws JBOException{
+ BizObject lcibo = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME).createQuery("ID=:ID").setParameter("ID", contractId).getSingleResult(false);
+ String cn = lcibo.getAttribute(LB_CONTRACT_INFO.CONTRACT_NUMBER).getString();
+ ASUser user = new ASUser(userid);
+ BizObjectManager bsbom = JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME, tx);
+ BizObject bsbo = bsbom.newObject();
+ bsbo.setAttributeValue(BUSINESS_STATUS.contract_number, cn);
+ bsbo.setAttributeValue(BUSINESS_STATUS.business_status, statusCode);
+ bsbo.setAttributeValue(BUSINESS_STATUS.inputuserid, userid);
+ bsbo.setAttributeValue(BUSINESS_STATUS.inputorgid, user.getOrgID());
+ bsbo.setAttributeValue(BUSINESS_STATUS.inputtime, StringFunction.getTodayNow());
+ bsbom.saveObject(bsbo);
+ }
}
diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/Commission.java b/src_tenwa/com/tenwa/lease/app/quartzmession/Commission.java
new file mode 100644
index 000000000..279e7ab05
--- /dev/null
+++ b/src_tenwa/com/tenwa/lease/app/quartzmession/Commission.java
@@ -0,0 +1,51 @@
+package com.tenwa.lease.app.quartzmession;
+
+
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+
+import com.amarsoft.are.ARE;
+import com.amarsoft.are.jbo.JBOException;
+import com.amarsoft.are.jbo.JBOFactory;
+import com.amarsoft.are.jbo.JBOTransaction;
+import com.amarsoft.are.log.Log;
+import com.amarsoft.are.util.StringFunction;
+import com.amarsoft.awe.util.SqlObject;
+import com.amarsoft.awe.util.Transaction;
+import com.base.util.QuartzUtil;
+
+public class Commission implements Job{
+
+ @Override
+ public void execute(JobExecutionContext arg0) throws JobExecutionException {
+ JBOTransaction tx=null;
+ Transaction Sqlca=null;
+ String startime =StringFunction.getTodayNow();
+ startime = startime.substring(0, 10);
+ try {
+ tx= JBOFactory.createJBOTransaction();
+ Sqlca=Transaction.createTransaction(tx);
+
+ //String sql="{CALL proc_insert_jlyj_his("+"'"+startime+"'"+","+"'"+startime+"'"+")};";
+ 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", "成功");
+ } catch (Exception e) {
+ QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.Commission", "success", "失败");
+ logger.error(e.getMessage());
+ e.printStackTrace();
+ }finally{
+ if(tx!=null){
+ try {
+ tx.rollback();
+ } catch (JBOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ private static Log logger=ARE.getLog();
+}
diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java
index 1b7caa20f..635012f7b 100644
--- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java
+++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java
@@ -44,6 +44,8 @@ public class CustomerInfoManage {
private String projectId;
private String workunit;
private String sex;
+ private String inputName;
+ private String inputTel;
public String getF_I_TYPE() {
return F_I_TYPE;
@@ -234,6 +236,21 @@ public class CustomerInfoManage {
public void setSex(String sex) {
this.sex = sex;
}
+ public String getInputName() {
+ return inputName;
+ }
+
+ public void setInputName(String inputName) {
+ this.inputName = inputName;
+ }
+
+ public String getInputTel() {
+ return inputTel;
+ }
+
+ public void setInputTel(String inputTel) {
+ this.inputTel = inputTel;
+ }
public String saveCustomerFamilyFormal(JBOTransaction tx){
try{
@@ -346,6 +363,8 @@ public class CustomerInfoManage {
proj.setAttributeValue("LEAS_FORM", lesa);
proj.setAttributeValue("PROJECT_SOURCE", projectSource);
proj.setAttributeValue("PROJECT_NAME", projName + "-" + fullname);
+ proj.setAttributeValue("inputName", inputName);
+ proj.setAttributeValue("inputTel", inputTel);
}
//update 项目名称
if(buss != null){
diff --git a/src_tenwa/quartz/ContractInfoForNomalEndSign.java b/src_tenwa/quartz/ContractInfoForNomalEndSign.java
index 29def86d7..2cbff61ec 100644
--- a/src_tenwa/quartz/ContractInfoForNomalEndSign.java
+++ b/src_tenwa/quartz/ContractInfoForNomalEndSign.java
@@ -22,6 +22,8 @@ import com.base.util.QuartzUtil;
//import com.tenwa.action.channelportal.ContractSignAction;
//import com.tenwa.action.channelportal.comm.ContractTransferRightForEnd;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
+import com.tenwa.comm.util.jboutil.SaveBusinessStatus;
+import com.tenwa.lease.app.quartzmession.JobInitUserName;
import com.tenwa.officetempalte.action.CreateOfficeAction;
//import com.tenwa.quartz.BeforeSerialTimingTask;
//import com.tenwa.quartz.service.BeforeSerialTimingTaskService;
@@ -31,13 +33,13 @@ import com.tenwa.reckon.util.UUIDUtil;
import org.apache.log4j.Logger;
public class ContractInfoForNomalEndSign implements Job{
-
+ private JobInitUserName jboName;
@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
String startime = StringFunction.getTodayNow();
try {
JBOTransaction tx = JBOFactory.createJBOTransaction();
- ownershipTransferSign(tx);
+ ownershipTransferSign(tx,arg0);
tx.commit();
QuartzUtil.insertLog(startime, "quartz.ContractInfoForNomalEndSign", "success", "成功");
} catch (Exception e) {
@@ -94,7 +96,7 @@ public class ContractInfoForNomalEndSign implements Job{
// }
// }
// }
- public void ownershipTransferSign(JBOTransaction tx ) throws Exception{
+ public void ownershipTransferSign(JBOTransaction tx ,JobExecutionContext arg0) throws Exception{
// MakeContractInfo makeContract = new MakeContractInfo();
String conInfo1 = getContractId(tx);
if(!(conInfo1 == null || conInfo1.length() <= 0)){
@@ -134,6 +136,7 @@ public class ContractInfoForNomalEndSign implements Job{
Transaction tran = Transaction.createTransaction("als");
BizObjectManager bm = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME, tran);
bm.createQuery("update O set contract_status = '105' where id = '"+contractId+"'").executeUpdate();
+ SaveBusinessStatus.saveByContractId(contractId, tx, "61", jboName.getUserId(arg0, tx));
tran.commit();
// }
}