Merge branch 'develop' of git@git2.tenwa.com.cn:ApzlDev/apzl_leasing.git into like

This commit is contained in:
admin 2018-08-13 19:45:04 +08:00
commit cdb9a544e4
9 changed files with 186 additions and 15 deletions

View File

@ -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"%>
<script type="text/javascript">
function newRecord(){
var sUrl = "";
AsControl.OpenView(sUrl,'','_self','');
}
function viewAndEdit(){
var sUrl = "";
var sPara = getItemValue(0,getRow(0),'SerialNo');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -39,7 +39,7 @@
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
dwTemp.replaceColumn("customer_info", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+userll+compClientID+"&sPhaseNo="+sPhaseNo+"\"></iframe>", 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;
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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");
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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");
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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();
}
}

View File

@ -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);
}
}

View File

@ -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();
}

View File

@ -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){

View File

@ -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();
// }
}