多主体相关

This commit is contained in:
zhangjun 2019-11-13 20:34:18 +08:00
parent c6aad7efce
commit 0245890b1b
6 changed files with 83 additions and 9 deletions

View File

@ -5,14 +5,11 @@
ASObjectModel doTemp = new ASObjectModel("LB_MANY_SUBJECT_LIST");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
String PROJECT_NO = CurPage.getParameter("PROJECT_NO");
String BUSINESSTYPE = Sqlca.getString("select BUSINESSTYPE from LB_PROJECT_INFO_temp WHERE PROJECT_NO='"+PROJECT_NO+"'");
dwTemp.Style="1"; //--设置为Grid风格--
//dwTemp.MultiSelect = true; //多选
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(30);
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},

View File

@ -40,7 +40,9 @@
}else{
product_id=flow.getAttribute("productId").toString();
}
String businesstype = Sqlca.getString("select businesstype from LB_CONTRACT_INFO_TEMP where flowunid = '"+sFlowUnid+"'");
String SUBJECTID = Sqlca.getString("select SUBJECTID from LB_CONTRACT_INFO_TEMP where flowunid='"+sFlowUnid+"'");
String subject = Sqlca.getString("select subject_name from LB_MANY_SUBJECT where id='"+SUBJECTID+"'");
String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
String FlowNo=CurPage.getParameter("FlowNo");//流程名称
String NodeNo=CurPage.getParameter("NodeNo");//流程名称
@ -54,6 +56,7 @@
if(("0030".equals(sPhaseNo)&&("ContractApprovalFlow".equals(FlowNo)||"ContractChangeFlow".equals(FlowNo)))){
sTempletNo="LBContractInfoAtMakeTemp";
}
String orgid = CurUser.getOrgID();//当前用户部门id
String orgidname = CurUser.getOrgName();//当前用户部门
String userid = CurUser.getUserID();//用户id
@ -80,6 +83,18 @@
}else{
doTemp.setColInnerBtEvent("PROJECT_ASSIST_NAME", "");
}
/*
"2"传统
"3"汽车类传统
主题名称为"2","3"状态时字段必填,否则字段为只读并且对话框隐藏掉
*/
if("2".equals(businesstype) || "3".equals(businesstype)){
doTemp.setRequired("subject_name",true);
}else{
doTemp.setRequired("subject_name",false);
doTemp.setColInnerBtEvent("subject_name", "");
}
doTemp.setDefaultValue("FlowUnid", sFlowUnid);//赋值流程编号
if("TAssetsDisposalFeeFlow".equals(FlowNo)){
doTemp.setReadOnly("CONTRACT_NUMBER", true);
@ -95,6 +110,7 @@
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//只读模式
}
dwTemp.genHTMLObjectWindow(sFlowUnid + "," + sContractId + "," + businesstype + "," + SUBJECTID + "," + subject);
if(isShowForaml.equals("true")){
dwTemp.genHTMLObjectWindow(sContractId);
}else{
@ -167,6 +183,17 @@
setItemValue(0,getRow(),"PROJECT_ASSIST",sReturn[0]);
},"请选项目协办");
}
//请选择主题名称
function selectaaaa(){
AsDialog.OpenSelector("SelectAAAA","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");//"@"表示了向页面添加数据时的连续性
setItemValue(0,getRow(),"subject_name",sReturn[0]);//向页面的框中添加数据
},"请选择主题");
}
</script>
<%/*~END~*/%>

View File

@ -13,8 +13,12 @@
String flowunid = CurPage.getParameter("FlowUnid");
String FlowName = CurPage.getParameter("FlowName");//鳳龰霜最靡備
String IsHistory = CurPage.getParameter("IsHistory");//鳳龰霜最靡備
String FlowNo=CurPage.getParameter("FlowNo");//流程名称
String projectId = CurPage.getParameter("ProjectId");
String customerid = Sqlca.getString("select customer_id from lb_union_lessee_temp where flowunid='"+flowunid+"'");
String businesstype = Sqlca.getString("select businesstype from LB_PROJECT_INFO_TEMP where FlowUnid='"+flowunid+"'");
String SUBJECTID = Sqlca.getString("select SUBJECTID from LB_PROJECT_INFO_TEMP where FlowUnid='"+flowunid+"'");
String subject = Sqlca.getString("select subject_name from LB_MANY_SUBJECT where id='"+SUBJECTID+"'");
String sTempletNo = "";//--耀啣瘍--
String sexChange="";
if("磁肮秶釬霜最".equals(FlowName)||"磁肮曹載霜最".equals(FlowName)){
@ -35,6 +39,10 @@
}else{
doTemp.setReadOnly("SEX", true);
}
//数据状态为“汽车”字段为只读状态,不可修改
if("1".equals(businesstype)){
doTemp.setColInnerBtEvent("subject_name", "");//去掉选择对话框
}
doTemp.setHtmlEvent("MARRIAGE","onChange","changeChildrensNumber");
doTemp.setHtmlEvent("IS_NETCAR","onChange","changeNetCarInfo");
doTemp.setHtmlEvent("sex","onChange","changeSex");
@ -50,7 +58,7 @@
doTemp.setColInnerBtEvent("fulladdress", "");//扢离華硊偌聽
}
dwTemp.Style = "2";//freeform
dwTemp.genHTMLObjectWindow(flowunid + "," + customerid);
dwTemp.genHTMLObjectWindow(flowunid + "," + customerid + "," + businesstype + "," + SUBJECTID + "," + subject);
CurPage.getCurComp().setAttribute("RightType", rightType);
if(rightType.equals("ReadOnly")||FlowName.equals("磁肮秶釬霜最")){
dwTemp.ReadOnly = "-1";//硐黍耀宒
@ -219,7 +227,18 @@
return;
}
}
//请选择主题名称
function selectaaaa(){
AsDialog.OpenSelector("SelectAAAA","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");//"@"表示了向页面添加数据时的连续性
//setItemValue(0,getRow(),"titleName",sReturn[0]);//向页面的框中添加数据
setItemValue(0,getRow(),"subject_name",sReturn[0]);//向页面的框中添加数据
},"请选择主题");
}
// function checkRepeat(mobile,emergencyTel,remark){
// var result = "";
// var mobile = getItemValue(0,getRow(),"mobile");

View File

@ -156,10 +156,16 @@
alert("请输入证件号码");
return;
}
var messages = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","selectTitleName","");
message = messages.split("@");
if("error"==message[0]){
alert(message[1]);
return;
}
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
sParams =sParams+",ProductId="+productId+",ProductName="+productname+",CustomerType="+customerType+",carAttributes="+carAttributes+",leasehold="+leasehold+",carSystem="+carSystem+",custname="+custname+",certtype="+certtype+",certid="+certid+",CustomerId="+CustomerId+",productModel="+productModel+",carSeries="+carSeries+",versionid="+versionid+",modelid="+modelid+",businessType="+businessType+",price="+price+",liter="+liter+",geartype="+geartype+",sourcetype=web,operationType="+operationType;
//
sParams =sParams+",titleid="+message[0]+",titleName="+message[1]+",ProductId="+productId+",ProductName="+productname+",CustomerType="+customerType+",carAttributes="+carAttributes+",leasehold="+leasehold+",carSystem="+carSystem+",custname="+custname+",certtype="+certtype+",certid="+certid+",CustomerId="+CustomerId+",productModel="+productModel+",carSeries="+carSeries+",versionid="+versionid+",modelid="+modelid+",businessType="+businessType+",price="+price+",liter="+liter+",geartype="+geartype+",sourcetype=web,operationType="+operationType;
if("BAIC_MOTOR"==operationType){
sParams = sParams+",distributorNo="+getItemValue(0,getRow(),"distributorNo")+",distributorName="+getItemValue(0,getRow(),"distributorName");
}
@ -496,6 +502,7 @@
showItem(0,"product_id");//字段显示
}
}
//initRow();
</script>
<%/*~END~*/%>

View File

@ -10,9 +10,13 @@ import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
import jbo.com.tenwa.lease.comm.LB_MANY_SUBJECT;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
@ -481,4 +485,23 @@ public class CustomerInfoCheck {
}
return "false";
}
//根据当前系统时间获取主题id和名称
public String selectTitleName(JBOTransaction tx){
try {
Date date1 = new Date() ; //获取系统时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); //日期格式
String date = sdf.format(date1); //将系统时间转换成上方指定类型
BizObjectManager lmsManage = JBOFactory.getBizObjectManager(LB_MANY_SUBJECT.CLASS_NAME, tx);
BizObject lms = lmsManage.createQuery(" start_time < :newtime and :newtime1< end_time").setParameter("newtime", date).setParameter("newtime1", date).getSingleResult(false);
if( null != lms){
return lms.getAttribute("ID").getString()+"@"+lms.getAttribute("subject_name").getString();
}else{
return "error@没有查询符合要求的多主体!";
}
} catch (JBOException e) {
e.printStackTrace();
return "error@没有查询符合要求的多主体!";
}
}
}

View File

@ -325,6 +325,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
bo.setAttributeValue("source_type",this.getAttribute("sourcetype"));//ÉêÇëÀàÐÍ
bo.setAttributeValue("HaveCommission",haveCommission);
bo.setAttributeValue("is_netcar",isNetCar == null ? "" : isNetCar);
bo.setAttributeValue("subjectid",this.getAttribute("titleid"));
bomLPI.saveObject(bo);
}catch (Exception e){
tx.rollback();