产品配置
This commit is contained in:
parent
573764acde
commit
0860c1824b
@ -2,6 +2,7 @@
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
String sTempletNo = "DistrictInfoRegister";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
String typeno= CurPage.getParameter("TYPENO");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
|
||||
@ -16,7 +17,7 @@
|
||||
//保存
|
||||
function saveRecord(){
|
||||
var districtcode = getItemValue(0,getRow(0),'district_code');
|
||||
|
||||
setItemValue(0, 0, "productid", "<%=typeno%>")
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","checkCode","group_name="+districtcode);
|
||||
if(sReturnInfo == "false"){
|
||||
alert("区域编码已存在");
|
||||
|
||||
39
WebContent/Tenwa/Apzl/DistributorToArea/EditProvince.jsp
Normal file
39
WebContent/Tenwa/Apzl/DistributorToArea/EditProvince.jsp
Normal file
@ -0,0 +1,39 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-20
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
String DISTRICT_CODE=CurPage.getParameter("disCode");
|
||||
ASObjectModel doTemp = new ASObjectModel("districtProvinceRelation");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.MultiSelect = true; //多选
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow(DISTRICT_CODE);
|
||||
|
||||
//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,'')","","","","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"%>
|
||||
@ -5,33 +5,60 @@
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
String typeno= CurPage.getParameter("TYPENO");
|
||||
ASObjectModel doTemp = new ASObjectModel("COUNTRY_DISTRICT_INFO");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
dwTemp.genHTMLObjectWindow(typeno);
|
||||
|
||||
//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",""},
|
||||
//{"true","","Button","关联省份","关联省份","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","区域信息维护","区域信息维护","Edit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'')","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Apzl/DistributorToArea/DistributorCustomerGroupCompanyRegister.jsp";
|
||||
AsDialog.PopView(sUrl,"","resizable=yes;dialogWidth=500px;dialogHeight=200px;center:yes;status:no;statusbar:no",function(sReturnValue){
|
||||
AsDialog.PopView(sUrl,"typeno=<%=typeno%>","resizable=yes;dialogWidth=500px;dialogHeight=200px;center:yes;status:no;statusbar:no",function(sReturnValue){
|
||||
reloadSelf();
|
||||
},"新增集团");
|
||||
},"新增区域");
|
||||
}
|
||||
function viewAndEdit(){
|
||||
|
||||
var sUrl="/Tenwa/Apzl/DistributorToArea/LmProductDistributorCar.jsp";
|
||||
var districtno=getItemValue(0,getRow(0),'district_code');
|
||||
var sPara = "districtno="+districtno;
|
||||
AsDialog.PopView(sUrl,sPara,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"配置经销商");
|
||||
var disCode=getItemValue(0, getRow(0),"district_code");
|
||||
AsDialog.OpenSelector("selectProvinceForDistrict","","dialogWidth=" + parseInt(window.screen.width * 0.3) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
Return =disCode+"@~"+sReturn;
|
||||
var sParams="CarBrandId="+Return;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.apzl.saveunioncar.saveUnionCarUtil","saveLmDistributorToDistrict",sParams);
|
||||
if(sReturnInfo!="success"){
|
||||
alert(sReturnInfo);
|
||||
}
|
||||
reloadSelf();
|
||||
},"请选择省份");
|
||||
}
|
||||
|
||||
function afterSearch(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
if(getObj(0,i,"doaction")!=null){
|
||||
getObj(0,i,"doaction").innerHTML='<a class="box" style="text-align:center;" onclick="viewAndEdit()" style={color:#000;text-decoration:underline;}><font color="blue">   关联省份</font></ a>';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function Edit(){
|
||||
var disCode=getItemValue(0, getRow(0),"district_code");
|
||||
var sUrl = "/Tenwa/Apzl/DistributorToArea/EditProvince.jsp";
|
||||
AsDialog.PopView(sUrl,"disCode="+disCode,"resizable=yes;dialogWidth=400px;dialogHeight=400px;center:yes;status:no;statusbar:no",function(sReturnValue){
|
||||
reloadSelf();
|
||||
},"维护省份");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -37,7 +37,7 @@
|
||||
00303ba448074b0792bd465dd2359b7c@
|
||||
*/
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.apzl.saveunioncar.saveUnionCarUtil","saveLmDistributorToProduct",sParams);
|
||||
if(sReturnInfo=="error"){
|
||||
if(sReturnInfo!="error"){
|
||||
alert("该经销商已绑定!");
|
||||
}
|
||||
reloadSelf();
|
||||
|
||||
@ -0,0 +1,74 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||
include file="/IncludeBegin.jsp"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-20
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
String PG_TITLE = "生成树图"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||
String PG_CONTENT_TITLE = " 生成树图 "; //默认的内容区标题
|
||||
String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
|
||||
String PG_LEFT_WIDTH = "200";//默认的treeview宽度
|
||||
|
||||
//获得页面参数
|
||||
//String sExampleId = CurComp.getParameter("ObjectNo");
|
||||
String typeNo = CurComp.getParameter("TYPENO");
|
||||
|
||||
//定义Treeview
|
||||
OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage, "生成树图","right");
|
||||
tviTemp.init("productConfig",null);
|
||||
|
||||
%><%@include file="/Resources/CodeParts/View04.jsp"%>
|
||||
<script type="text/javascript">
|
||||
function openChildComp(sURL,sParameterString){
|
||||
sParaStringTmp = "";
|
||||
sLastChar=sParameterString.substring(sParameterString.length-1);
|
||||
if(sLastChar=="&") sParaStringTmp=sParameterString;
|
||||
else sParaStringTmp=sParameterString+"&";
|
||||
|
||||
/*
|
||||
* 附加两个参数
|
||||
* ToInheritObj:是否将对象的权限状态相关变量复制至子组件
|
||||
*/
|
||||
sParaStringTmp += "ToInheritObj=y&OpenerFunctionName="+getCurTVItem().name;
|
||||
sParaStringTmp += "&TYPENO=<%=typeNo%>";
|
||||
AsControl.OpenView(sURL,sParaStringTmp,"right");
|
||||
}
|
||||
|
||||
//treeview单击选中事件
|
||||
function TreeViewOnClick(){
|
||||
var sCurItemID = getCurTVItem().id;
|
||||
var sCurItemname = getCurTVItem().name;
|
||||
var sCurItemDescribe = getCurTVItem().url;//--获得连接下个页面的路径及相关的参数
|
||||
openChildComp(sCurItemDescribe,"");
|
||||
setTitle(getCurTVItem().name);
|
||||
|
||||
<%--var sCurItemName = getCurTVItem().name;//--获得树图的节点名称
|
||||
alert(sCurItemDescribe);
|
||||
sCurItemDescribe = sCurItemDescribe.split("@");
|
||||
sCurItemDescribe1=sCurItemDescribe[0];//--获得连接下个页面的路径
|
||||
alert(sCurItemDescribe);
|
||||
alert(sCurItemDescribe1);
|
||||
if(!sCurItemDescribe1) return false;
|
||||
sCurItemDescribe2=sCurItemDescribe[1];//--存放下个页面的的页面名
|
||||
sCurItemDescribe3=sCurItemDescribe[2];//--现在没有
|
||||
sCurItemDescribe4=sCurItemDescribe[3];//--现在没有
|
||||
sCustomerID = "<%=sCustomerID%>";//--获得客户代码
|
||||
if(sCurItemDescribe2 == "Back"){
|
||||
top.close();
|
||||
}else{
|
||||
openChildComp(sCurItemDescribe2,sCurItemDescribe1,"ModelType="+sCurItemDescribe4+"&ObjectNo="+sCustomerID+"&ComponentName="+sCurItemName+"&customerId="+sCustomerID+"&ObjectType=Customer&NoteType="+sCurItemDescribe3);
|
||||
setTitle(getCurTVItem().name);
|
||||
} --%>
|
||||
}
|
||||
|
||||
function initTreeView(){
|
||||
<%=tviTemp.generateHTMLTreeView()%>
|
||||
expandNode('root');
|
||||
//selectItemByName("基本信息");
|
||||
selectItem('0010');
|
||||
}
|
||||
|
||||
initTreeView();
|
||||
</script>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
@ -43,9 +43,11 @@
|
||||
};
|
||||
}
|
||||
function showCar(TYPENO){
|
||||
var sUrl="/Tenwa/Apzl/PortalToCarType/LmProductDistributorCar.jsp";
|
||||
//var sUrl="/Tenwa/Apzl/PortalToCarType/LmProductDistributorCar.jsp";
|
||||
var sUrl="/Tenwa/Apzl/PortalToCarType/LmProductConfigurate.jsp";
|
||||
var sPara = "TYPENO="+TYPENO;
|
||||
AsDialog.PopView(sUrl,sPara,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"ÅäÖóµÁ¾");
|
||||
AsControl.OpenView(sUrl,sPara ,'_self','');
|
||||
//AsDialog.PopView(sUrl,sPara,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"ÅäÖóµÁ¾");
|
||||
}
|
||||
/*
|
||||
function mySelectRow(){
|
||||
|
||||
@ -92,8 +92,7 @@ WHERE (
|
||||
flow_object fo
|
||||
WHERE fbo.flow_unid = fo.objectno
|
||||
AND fbo.flow_name = '资金付款'
|
||||
AND fo.phaseno NOT IN ('1000', '8000')) { lci,
|
||||
contract }) tab where tab.overmoney>0
|
||||
AND fo.phaseno NOT IN ('1000', '8000'))) tab where tab.overmoney>0
|
||||
]]>
|
||||
</table_sql>
|
||||
</MYSQL>
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
String sTempletNo = "DistributorGroupCompanyRegister";//--模板号--
|
||||
String typeno=CurPage.getParameter("typeno");
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
|
||||
dwTemp.genHTMLObjectWindow(typeno);
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","确定","注册集团信息","saveRecord()","","","","btn_icon_submit"},
|
||||
@ -17,6 +18,7 @@
|
||||
function saveRecord(){
|
||||
if(!iV_all("0")) return;//先检查填写完整性
|
||||
var group_no = getItemValue(0,getRow(0),'group_no');
|
||||
setItemValue(0, 0, "productid", "<%=typeno%>");
|
||||
var group_name = getItemValue(0,getRow(0),'group_name');
|
||||
for(var i = 0;i < group_name.length;i++){
|
||||
if(group_name.charAt(i) == "'" || group_name.charAt(i) == "<" || group_name.charAt(i) == ">"){
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<%@page import="com.tenwa.comm.dataRightmanager.DataRightManager"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
String typeno= CurPage.getParameter("TYPENO");
|
||||
ASObjectModel doTemp = new ASObjectModel("DistributorGroupCompanyList");
|
||||
String otherWhere=DataRightManager.getRightCondition(CurUser,"O");
|
||||
//doTemp.appendJboWhere(otherWhere);
|
||||
@ -8,7 +9,7 @@
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
dwTemp.genHTMLObjectWindow(typeno);
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","All","Button","修改","修改","edit()","","","","btn_icon_edit",""},
|
||||
@ -20,7 +21,7 @@
|
||||
//新增
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Customer/Group/GroupCompany/DistributorCustomerGroupCompanyRegister.jsp";
|
||||
AsDialog.PopView(sUrl,"","resizable=yes;dialogWidth=500px;dialogHeight=200px;center:yes;status:no;statusbar:no",function(sReturnValue){
|
||||
AsDialog.PopView(sUrl,"typeno=<%=typeno%>","resizable=yes;dialogWidth=500px;dialogHeight=200px;center:yes;status:no;statusbar:no",function(sReturnValue){
|
||||
if(typeof(sReturnValue)!=undefined && sReturnValue!=''){
|
||||
var result = sReturnValue.split('&');
|
||||
var group_no = result[0];
|
||||
|
||||
@ -26,7 +26,8 @@ function newgo(){
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Customer/Group/Subcompany/DistributorCustomerGroupRelation.jsp";
|
||||
AsDialog.PopView(sUrl,"group_id="+'<%=group_id%>',"resizable=yes;dialogWidth=600px;dialogHeight=250px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
//reloadSelf();
|
||||
parent.reloadSelf();
|
||||
},"新增集团下属公司信息");
|
||||
}
|
||||
//修改
|
||||
@ -66,6 +67,7 @@ function deleteRecord(){
|
||||
as_delete('myiframe0');
|
||||
}
|
||||
}
|
||||
parent.reloadSelf();
|
||||
}
|
||||
function detail(){
|
||||
var customerId=getItemValue(0, getRow(), "customer_id");
|
||||
|
||||
@ -218,7 +218,8 @@
|
||||
<attribute name="id" label="主键" type="STRING" length="100"/>
|
||||
<attribute name="district_code" label="区域编号" type="STRING" length="32"/>
|
||||
<attribute name="district_name" label="区域名称" type="STRING" length="32"/>
|
||||
<attribute name="include_province" label="包含省份" type="STRING" length="500"/>
|
||||
<attribute name="include_province" label="包含省份" type="STRING" length="500"/>
|
||||
<attribute name="productid" label="产品编号" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
@ -235,7 +236,7 @@
|
||||
<attribute name="DISTRICT_ID" label="区域ID" type="STRING" length="32"/>
|
||||
<attribute name="DISTRIBUTOR_ID" label="经销商ID" type="STRING" length="32"/>
|
||||
<attribute name="DISTRIBUTOR_NO" label="机构" type="STRING" length="32"/>
|
||||
<attribute name="DISTRIBUTOR_NAME" label="借方余额" type="DOUBLE" length="20" scale="2"/>
|
||||
<attribute name="DISTRIBUTOR_NAME" label="借方余额" type="STRING" length="32"/>
|
||||
<attribute name="ITEM2" label="扩展属性2" type="STRING" length="10"/>
|
||||
<attribute name="ITEM3" label="扩展属性3" type="STRING" length="10"/>
|
||||
<attribute name="ITEM4" label="扩展属性4" type="STRING" length="10"/>
|
||||
|
||||
@ -2375,7 +2375,8 @@
|
||||
<attribute name="inputtime" label="登记日期" type="STRING" length="20"/>
|
||||
<attribute name="updateuserid" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="updateorgid" label="更新机构" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="更新日期" type="STRING" length="20"/>
|
||||
<attribute name="updatetime" label="更新日期" type="STRING" length="20"/>
|
||||
<attribute name="productid" label="产品id" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
|
||||
@ -14,6 +14,7 @@ import jbo.app.tenwa.calc.LC_RENT_PLAN;
|
||||
import jbo.app.tenwa.calc.VI_LC_FUND_PLAN;
|
||||
import jbo.app.tenwa.calc.VI_LC_RENT_PLAN;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT;
|
||||
import jbo.com.tenwa.entity.comm.own.DISTRICT_DISTRIBUTOR_RELATION;
|
||||
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
|
||||
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE;
|
||||
|
||||
@ -237,4 +238,19 @@ public class ColRelativeInfo {
|
||||
}
|
||||
return money.setScale(2).toString();
|
||||
}
|
||||
public static String getProvinceByDistrict(String districode)throws JBOException{
|
||||
String provices="";
|
||||
if(districode!=null&&!"".equals(districode)){
|
||||
List<BizObject> boLRITs = JBOFactory.createBizObjectQuery(DISTRICT_DISTRIBUTOR_RELATION.CLASS_NAME, "DISTRICT_CODE=:DISTRICT_CODE")
|
||||
.setParameter("DISTRICT_CODE", districode).getResultList(false);
|
||||
for(int i=0;i<boLRITs.size();i++){
|
||||
if(i==boLRITs.size()-1){
|
||||
provices+=boLRITs.get(i).getAttribute("DISTRIBUTOR_NAME")==null?"":boLRITs.get(i).getAttribute("DISTRIBUTOR_NAME").getString();
|
||||
}else{
|
||||
provices+=boLRITs.get(i).getAttribute("DISTRIBUTOR_NAME")==null?"":boLRITs.get(i).getAttribute("DISTRIBUTOR_NAME").getString()+",";
|
||||
}
|
||||
}
|
||||
}
|
||||
return provices;
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,12 +139,12 @@ public String getCarBrandId() {
|
||||
int i;
|
||||
try{
|
||||
BizObjectManager Lmcheck = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
|
||||
for(i=3;i<params.length;i++){
|
||||
for(i=4;i<params.length;i++){
|
||||
String brandid = params[i];
|
||||
BizObject obcheck=Lmcheck.createQuery("DISTRIBUTOR_ID=:DISTRIBUTOR_ID and PRODUCT_ID=:PRODUCT_ID")
|
||||
.setParameter("DISTRIBUTOR_ID", brandid).setParameter("PRODUCT_ID",typeno).getSingleResult(false);
|
||||
if(obcheck!=null){
|
||||
return "error";
|
||||
return "success";
|
||||
}
|
||||
String PortalToCarId=UUID.randomUUID().toString().replaceAll("-", "");
|
||||
BizObjectManager Lmpc = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
|
||||
@ -164,56 +164,49 @@ public String getCarBrandId() {
|
||||
e.printStackTrace();
|
||||
tx.rollback();
|
||||
}
|
||||
if(lle>=0){
|
||||
if(lle>0){
|
||||
return "success";
|
||||
}
|
||||
return "error";
|
||||
}
|
||||
public String saveLmDistributorToDistrict(JBOTransaction tx)throws Exception {
|
||||
/*
|
||||
CarBrandId=admin@~
|
||||
8009002@~
|
||||
2018/06/12 15:03:50@~
|
||||
7c7624a558594bff8387ca6949982b21@~
|
||||
00303ba448074b0792bd465dd2359b7c@
|
||||
*/
|
||||
* 备注:之前的需求是区域和经销商关联,后来又改成区域不和经销商关联 而是和省份关联,
|
||||
* 之前建的关联表不动,将省份的编号和名称分别存到关联表的经销商编号和经销商名称中
|
||||
* */
|
||||
String returnmess="";
|
||||
String[] params = CarBrandId.split("@~");
|
||||
String DISTRICT_CODE = params[0];
|
||||
//String DISTRICT_NAME = params[1];
|
||||
//String DISTRIBUTOR_ID = params[1];
|
||||
//String DISTRIBUTOR_NO = params[3];
|
||||
//String DISTRIBUTOR_NAME = params[4];
|
||||
//String productid=params[4];
|
||||
String districtCode = params[0];
|
||||
int lle=0;
|
||||
int i;
|
||||
try{
|
||||
BizObjectManager Lmcheck = JBOFactory.getBizObjectManager(DISTRICT_DISTRIBUTOR_RELATION.CLASS_NAME,tx);
|
||||
for(i=1;i<params.length;i++){
|
||||
String DISTRIBUTOR_ID = params[i];
|
||||
BizObject obcheck=Lmcheck.createQuery("DISTRIBUTOR_ID=:DISTRIBUTOR_ID and DISTRICT_CODE=:DISTRICT_CODE")
|
||||
.setParameter("DISTRIBUTOR_ID", DISTRIBUTOR_ID).setParameter("DISTRICT_CODE",DISTRICT_CODE).getSingleResult(false);
|
||||
String provinceCode = params[i].split("@")[0];
|
||||
String provinceName = params[i].split("@")[1];
|
||||
BizObject obcheck=Lmcheck.createQuery("DISTRICT_CODE=:DISTRICT_CODE and DISTRIBUTOR_NO=:DISTRIBUTOR_NO")
|
||||
.setParameter("DISTRICT_CODE", districtCode).setParameter("DISTRIBUTOR_NO",provinceCode).getSingleResult(false);
|
||||
if(obcheck!=null){
|
||||
return "error";
|
||||
returnmess +=provinceName+"已绑定该区域!";
|
||||
continue;
|
||||
}
|
||||
String PortalToCarId=UUID.randomUUID().toString().replaceAll("-", "");
|
||||
BizObjectManager Lmpc = JBOFactory.getBizObjectManager(DISTRICT_DISTRIBUTOR_RELATION.CLASS_NAME,tx);
|
||||
BizObject NewLmpc = Lmpc.newObject();
|
||||
NewLmpc.setAttributeValue("ID", PortalToCarId);
|
||||
NewLmpc.setAttributeValue("DISTRICT_CODE", DISTRICT_CODE);
|
||||
//NewLmpc.setAttributeValue("DISTRICT_NAME", DISTRICT_NAME);
|
||||
NewLmpc.setAttributeValue("DISTRIBUTOR_ID", DISTRIBUTOR_ID);
|
||||
//NewLmpc.setAttributeValue("DISTRIBUTOR_NO", DISTRIBUTOR_NO);
|
||||
//NewLmpc.setAttributeValue("DISTRIBUTOR_NAME", DISTRIBUTOR_NAME);
|
||||
NewLmpc.setAttributeValue("DISTRICT_CODE", districtCode);
|
||||
NewLmpc.setAttributeValue("DISTRIBUTOR_NO", provinceCode);
|
||||
NewLmpc.setAttributeValue("DISTRIBUTOR_NAME", provinceName);
|
||||
Lmpc.saveObject(NewLmpc);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
tx.rollback();
|
||||
}
|
||||
if(lle>=0){
|
||||
return "success";
|
||||
}
|
||||
return "error";
|
||||
|
||||
if("".equals(returnmess))returnmess= "success";
|
||||
|
||||
return returnmess;
|
||||
}
|
||||
/**
|
||||
* 删除经销商车型关联表的关联
|
||||
|
||||
@ -34,7 +34,7 @@ public class CopyFundIncomeTempToFormal extends BaseBussiness{
|
||||
fromCondition.put("ID", bo.getAttribute("ID").getString());
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
otherProperty.put("FLOWUNID", "");
|
||||
otherProperty.put("PAY_STATUS", "have_paid");
|
||||
otherProperty.put("PAY_STATUS", "apply_pass");
|
||||
String incomeID = DataOperatorUtil.copySingleJBO(LC_FUND_INCOME_TEMP.CLASS_NAME, fromCondition,LC_FUND_INCOME.CLASS_NAME, null, otherProperty,Sqlca.getTransaction());
|
||||
if("feetype10".equals(bo.getAttribute("FEE_TYPE").getString())){
|
||||
List<BizObject> boRs = bomLFIT.createQuery("flowunid=:FLOWUNID and relative_id=:RELATIVE_ID")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user