添加中瑞gps支持
This commit is contained in:
parent
4b929ba65c
commit
0beea9bac6
@ -1,3 +1,4 @@
|
||||
<%@ page import="com.tenwa.apzl.comm.GpsEnum" %>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
@ -6,7 +7,18 @@
|
||||
History Log:
|
||||
*/
|
||||
String ProjectNo = CurPage.getParameter("ProjectNo");
|
||||
String source = CurPage.getParameter("source");
|
||||
ASObjectModel doTemp = new ASObjectModel("LmGpsLocationList");
|
||||
if(GpsEnum.ZR.getCode().equals(source)){
|
||||
doTemp.setDDDWCodeTable("RUN_STATUS","0,未启用,1,离线,2,禁止,3,行驶中");
|
||||
doTemp.setDDDWCodeTable("LOCATE_TYPE","0,GPS定位,1,基站定位");
|
||||
doTemp.setDDDWCodeTable("MODEL","0,无线,1,有线");
|
||||
doTemp.setColumnAttribute("STATUS", "COLVISIBLE", "0");
|
||||
doTemp.setColumnAttribute("STATUS_USING", "COLVISIBLE", "0");
|
||||
doTemp.setColumnAttribute("SPD", "COLVISIBLE", "0");
|
||||
doTemp.setColumnAttribute("DIR", "COLVISIBLE", "0");
|
||||
doTemp.setColumnAttribute("RECEIVE_TIME", "COLVISIBLE", "0");
|
||||
}
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ page import="java.math.BigDecimal"%>
|
||||
<%@ page import="com.tenwa.apzl.comm.GpsEnum" %>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2019-07-11
|
||||
@ -8,6 +9,8 @@
|
||||
*/
|
||||
String userId = CurUser.getUserID();
|
||||
String ProjectNo = CurPage.getParameter("ProjectNo");
|
||||
//gps来源 中瑞1 天易0
|
||||
String source = CurPage.getParameter("gpsVendor");
|
||||
String ProjectId = CurPage.getParameter("ProjectId");
|
||||
String PhaseNo = CurPage.getParameter("PhaseNo");
|
||||
String flowunid = CurPage.getParameter("ObjectNo");
|
||||
@ -15,14 +18,12 @@
|
||||
String frameNumber = Sqlca.getString("select FRAME_NUMBER from LB_EQUIPMENT_CAR_TEMP where FLOWUNID='"+flowunid+"'");
|
||||
String id = Sqlca.getString("select id from LM_GPS_ORDER_TEMP where APPLY_NO='"+ProjectNo+"'");
|
||||
|
||||
String contact_name = Sqlca.getString("select CONTACT_NAME from GPS_config_info where isenable='1' ");//现场联系人
|
||||
String contact_phone = Sqlca.getString("select CONTACT_PHONE from GPS_config_info where isenable='1' ");//现场联系人电话
|
||||
String contact_name = Sqlca.getString("select CONTACT_NAME from GPS_config_info where isenable='1' ");//派工联系人
|
||||
String contact_phone = Sqlca.getString("select CONTACT_PHONE from GPS_config_info where isenable='1' ");//派工联系人电话
|
||||
|
||||
String distributor_id = Sqlca.getString("select distributor_id from lb_project_info where id='"+ProjectId+"'");//获取经销商ID
|
||||
String distributor_name = Sqlca.getString("select distributor_name from distributor_info where distributor_no='"+distributor_id+"'");//获取经销名称
|
||||
|
||||
|
||||
|
||||
BigDecimal incomNuber = new BigDecimal(Sqlca.getString("select INCOME_NUMBER from LC_CALC_CONDITION_TEMP where FLOWUNID='"+flowunid+"'"));
|
||||
List<String> images = new ArrayList<String>();
|
||||
String sql = "select lgp.URL from lm_gps_photo lgp where APPLY_NO='"+ProjectNo+"'";
|
||||
@ -34,11 +35,17 @@
|
||||
String period = incomNuber.divide(new BigDecimal("12"),0,BigDecimal.ROUND_UP).toString();
|
||||
String sTempletNo = "LmGpsOrderInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
if(GpsEnum.ZR.getCode().equals(source)){
|
||||
doTemp.setColumnAttribute("CARTYPE", "COLVISIBLE", "0");
|
||||
doTemp.setColumnAttribute("USERNAME", "COLVISIBLE", "0");
|
||||
doTemp.setColumnAttribute("USERPHONE", "COLVISIBLE", "0");
|
||||
doTemp.setColumnAttribute("SHOPNAME", "COLVISIBLE", "0");
|
||||
}
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(ProjectNo);
|
||||
dwTemp.replaceColumn("LOCATION", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"280px\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Gps/LmGpsLocationList.jsp?CompClientID="+compClientID+"&ProjectNo="+ProjectNo+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
dwTemp.replaceColumn("LOCATION", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"280px\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Gps/LmGpsLocationList.jsp?CompClientID="+compClientID+"&ProjectNo="+ProjectNo+"&source="+source+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
String [][] sButtons;
|
||||
if("0010".equals(PhaseNo)){
|
||||
sButtons = new String[][]{
|
||||
@ -67,6 +74,7 @@
|
||||
setItemValue(0,getRow(0),"PICCONTACT_NAME",'<%=contact_name%>');
|
||||
setItemValue(0,getRow(0),"PICCONTACT_PHONE",'<%=contact_phone%>');
|
||||
setItemValue(0,getRow(0),"CAR_ACCOUNT",'<%=distributor_name%>');
|
||||
setItemValue(0,getRow(0),"SOURCE",'<%=source%>');
|
||||
|
||||
var status = getItemValue(0,getRow(),"STATUS");
|
||||
|
||||
@ -103,7 +111,7 @@
|
||||
})
|
||||
|
||||
function submitOrder(){
|
||||
var result =AsControl.RunJavaMethodTrans("com.tenwa.gps.GpsController","createOrder","applyNo=<%=ProjectNo%>,flowUnid=<%=flowunid%>,projectId=<%=ProjectId%>,userId=<%=userId%>");
|
||||
var result =AsControl.RunJavaMethodTrans("com.tenwa.gps.GpsController","createOrder","applyNo=<%=ProjectNo%>,flowUnid=<%=flowunid%>,projectId=<%=ProjectId%>,userId=<%=userId%>,source=<%=source%>");
|
||||
alert(result)
|
||||
location.reload();
|
||||
}
|
||||
@ -116,7 +124,7 @@
|
||||
alert("请先提交工单!");
|
||||
return;
|
||||
}
|
||||
var result =AsControl.RunJavaMethodTrans("com.tenwa.gps.GpsController","queryOrder","applyNo=<%=ProjectNo%>,projectId=<%=ProjectId%>,userId=<%=userId%>,flowUnid=<%=flowunid%>,tableName=LM_GPS_ORDER_TEMP,orderNo="+orderNo+",vin="+vin);
|
||||
var result =AsControl.RunJavaMethodTrans("com.tenwa.gps.GpsController","queryOrder","applyNo=<%=ProjectNo%>,projectId=<%=ProjectId%>,userId=<%=userId%>,flowUnid=<%=flowunid%>,tableName=LM_GPS_ORDER_TEMP,orderNo="+orderNo+",vin="+vin+",source=<%=source%>");
|
||||
alert(result)
|
||||
location.reload();
|
||||
}
|
||||
@ -150,6 +158,10 @@
|
||||
alert("请先提交工单!");
|
||||
return;
|
||||
}
|
||||
if('<%=source%>' == '1'){
|
||||
alert("中瑞GPS派单暂无此功能!");
|
||||
return;
|
||||
}
|
||||
window.parent.showImage();
|
||||
}
|
||||
|
||||
@ -159,6 +171,10 @@
|
||||
alert("请先提交工单!");
|
||||
return;
|
||||
}
|
||||
if('<%=source%>' == '1'){
|
||||
alert("中瑞GPS派单暂时无法修改!");
|
||||
return;
|
||||
}
|
||||
var params = getItemValue(0,getRow(),"CONTACT_NAME");
|
||||
params += "@"+getItemValue(0,getRow(),"CONTACT_PHONE");
|
||||
params += "@"+getItemValue(0,getRow(),"PICCONTACT_NAME");
|
||||
@ -186,7 +202,7 @@
|
||||
return;
|
||||
}
|
||||
if(confirm('取消工单后此申请编号无法重新派单!请谨慎操作!是否继续取消工单?')){
|
||||
var result =AsControl.RunJavaMethodTrans("com.tenwa.gps.GpsController","cancelOrder","applyNo=<%=ProjectNo%>,userId=<%=userId%>,projectId=<%=ProjectId%>,flowUnid=<%=flowunid%>");
|
||||
var result =AsControl.RunJavaMethodTrans("com.tenwa.gps.GpsController","cancelOrder","applyNo=<%=ProjectNo%>,userId=<%=userId%>,projectId=<%=ProjectId%>,flowUnid=<%=flowunid%>,source=<%=source%>");
|
||||
alert(result)
|
||||
location.reload();
|
||||
}
|
||||
|
||||
@ -2145,235 +2145,198 @@
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="FLOW_OPINION" label="" keyAttributes="opinionno,serialno">
|
||||
<attributes>
|
||||
<attribute name="serialno" label="流程任务流水号" type="STRING" length="32"/>
|
||||
<attribute name="opinionno" label="见序号" type="STRING" length="32"/>
|
||||
<attribute name="objecttype" label="对象类型" type="STRING" length="18"/>
|
||||
<attribute name="objectno" label="对象编号" type="STRING" length="32"/>
|
||||
<attribute name="customerid" label="客户编号" type="STRING" length="32"/>
|
||||
<attribute name="customername" label="客户名称" type="STRING" length="80"/>
|
||||
<attribute name="businesscurrency" label="币种" type="STRING" length="18"/>
|
||||
<attribute name="businesssum" label="金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="termyear" label="期限(年)" type="INT" length="10"/>
|
||||
<attribute name="termmonth" label="期限(月)" type="INT" length="10"/>
|
||||
<attribute name="termday" label="期限(日)" type="INT" length="10"/>
|
||||
<attribute name="baseratetype" label="基准利率类型" type="STRING" length="18"/>
|
||||
<attribute name="ratefloattype" label="利率浮动方式" type="STRING" length="18"/>
|
||||
<attribute name="ratefloat" label="利率浮动" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailcurrency" label="保证金币种" type="STRING" length="18"/>
|
||||
<attribute name="businessrate" label="执行利率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailratio" label="保证金比率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailsum" label="保证金金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="pdgratio" label="手续费比率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="pdgsum" label="手续费金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="baserate" label="基准利率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="phasechoice" label="阶段意见" type="STRING" length="800"/>
|
||||
<attribute name="phaseopinion" label="意见详情" type="STRING" length="2000"/>
|
||||
<attribute name="InterOpinion1" label="内部意见1" type="STRING" length="400"/>
|
||||
<attribute name="DistriOpinion1" label="经销商意见1" type="STRING" length="400"/>
|
||||
<attribute name="InterOpinion2" label="内部意见2" type="STRING" length="400"/>
|
||||
<attribute name="DistriOpinion2" label="经销商意见2" type="STRING" length="400"/>
|
||||
<attribute name="InterOpinion3" label="内部意见3" type="STRING" length="400"/>
|
||||
<attribute name="DistriOpinion3" label="经销商意见3" type="STRING" length="400"/>
|
||||
<attribute name="InterOpinion4" label="内部意见4" type="STRING" length="400"/>
|
||||
<attribute name="DistriOpinion4" label="经销商意见4" type="STRING" length="400"/>
|
||||
<attribute name="opinionType" label="意见类型" type="STRING" length="10"/>
|
||||
<attribute name="phaseopinion1" label="意见详情1" type="STRING" length="400"/>
|
||||
<attribute name="phaseopinion2" label="意见详情2" type="STRING" length="400"/>
|
||||
<attribute name="phaseopinion3" label="意见详情3" type="STRING" length="400"/>
|
||||
<attribute name="inputorg" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="inputuser" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="20"/>
|
||||
<attribute name="updateuser" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="变更时间" type="STRING" length="20"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="flow_opinion" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PRODUCT_LOG" label="" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="name" label="名称" type="STRING" length="50"/>
|
||||
<attribute name="information" label="信息" type="STRING" length="50"/>
|
||||
<attribute name="operation" label="操作" type="STRING" length="32"/>
|
||||
<attribute name="target" label="操作目标" type="STRING" length="32"/>
|
||||
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="inputorgid" label="登记部门" type="STRING" length="32"/>
|
||||
<class name="FLOW_OPINION" label="" keyAttributes="opinionno,serialno">
|
||||
<attributes>
|
||||
<attribute name="serialno" label="流程任务流水号" type="STRING" length="32"/>
|
||||
<attribute name="opinionno" label="见序号" type="STRING" length="32"/>
|
||||
<attribute name="objecttype" label="对象类型" type="STRING" length="18"/>
|
||||
<attribute name="objectno" label="对象编号" type="STRING" length="32"/>
|
||||
<attribute name="customerid" label="客户编号" type="STRING" length="32"/>
|
||||
<attribute name="customername" label="客户名称" type="STRING" length="80"/>
|
||||
<attribute name="businesscurrency" label="币种" type="STRING" length="18"/>
|
||||
<attribute name="businesssum" label="金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="termyear" label="期限(年)" type="INT" length="10"/>
|
||||
<attribute name="termmonth" label="期限(月)" type="INT" length="10"/>
|
||||
<attribute name="termday" label="期限(日)" type="INT" length="10"/>
|
||||
<attribute name="baseratetype" label="基准利率类型" type="STRING" length="18"/>
|
||||
<attribute name="ratefloattype" label="利率浮动方式" type="STRING" length="18"/>
|
||||
<attribute name="ratefloat" label="利率浮动" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailcurrency" label="保证金币种" type="STRING" length="18"/>
|
||||
<attribute name="businessrate" label="执行利率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailratio" label="保证金比率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailsum" label="保证金金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="pdgratio" label="手续费比率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="pdgsum" label="手续费金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="baserate" label="基准利率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="phasechoice" label="阶段意见" type="STRING" length="800"/>
|
||||
<attribute name="phaseopinion" label="意见详情" type="STRING" length="2000"/>
|
||||
<attribute name="InterOpinion1" label="内部意见1" type="STRING" length="400"/>
|
||||
<attribute name="DistriOpinion1" label="经销商意见1" type="STRING" length="400"/>
|
||||
<attribute name="InterOpinion2" label="内部意见2" type="STRING" length="400"/>
|
||||
<attribute name="DistriOpinion2" label="经销商意见2" type="STRING" length="400"/>
|
||||
<attribute name="InterOpinion3" label="内部意见3" type="STRING" length="400"/>
|
||||
<attribute name="DistriOpinion3" label="经销商意见3" type="STRING" length="400"/>
|
||||
<attribute name="InterOpinion4" label="内部意见4" type="STRING" length="400"/>
|
||||
<attribute name="DistriOpinion4" label="经销商意见4" type="STRING" length="400"/>
|
||||
<attribute name="opinionType" label="意见类型" type="STRING" length="10"/>
|
||||
<attribute name="phaseopinion1" label="意见详情1" type="STRING" length="400"/>
|
||||
<attribute name="phaseopinion2" label="意见详情2" type="STRING" length="400"/>
|
||||
<attribute name="phaseopinion3" label="意见详情3" type="STRING" length="400"/>
|
||||
<attribute name="inputorg" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="inputuser" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="20"/>
|
||||
<attribute name="updateuser" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="变更时间" type="STRING" length="20"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="flow_opinion" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PRODUCT_LOG" label="" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="name" label="名称" type="STRING" length="50"/>
|
||||
<attribute name="information" label="信息" type="STRING" length="50"/>
|
||||
<attribute name="operation" label="操作" type="STRING" length="32"/>
|
||||
<attribute name="target" label="操作目标" type="STRING" length="32"/>
|
||||
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="inputorgid" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="product_name" label="产品名称" type="STRING" length="100"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="product_log" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="USER_TASK_DATA" label="" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="id" type="STRING" length="32"/>
|
||||
<attribute name="userid" label="userid" type="STRING" length="32"/>
|
||||
<attribute name="roleid" label="roleid" type="STRING" length="32"/>
|
||||
<attribute name="flowno" label="flowno" type="STRING" length="32"/>
|
||||
<attribute name="flowunid" label="flowunid" type="STRING" length="32"/>
|
||||
<attribute name="project_id" label="project_id" type="STRING" length="32"/>
|
||||
<attribute name="contract_id" label="contract_id" type="STRING" length="32"/>
|
||||
<attribute name="begintime" label="begintime" type="STRING" length="32"/>
|
||||
<attribute name="endtime" label="endtime" type="STRING" length="32"/>
|
||||
<attribute name="status" label="status" type="STRING" length="32"/>
|
||||
<attribute name="taskno" label="taskno" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="user_task_data" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="USER_TASK_INFO" label="" keyAttributes="roleid,userid">
|
||||
<attributes>
|
||||
<attribute name="userid" label="userid" type="STRING" length="32"/>
|
||||
<attribute name="roleid" label="roleid" type="STRING" length="32"/>
|
||||
<attribute name="task_weight" label="task_weight" type="STRING" length="32"/>
|
||||
<attribute name="task_number" label="task_number" type="STRING" length="32"/>
|
||||
<attribute name="induction_state" label="induction_state" type="STRING" length="32"/>
|
||||
<attribute name="inputuserid" label="inputuserid" type="STRING" length="32"/>
|
||||
<attribute name="inputorgid" label="inputorgid" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="inputtime" type="STRING" length="32"/>
|
||||
<attribute name="updateuserid" label="updateuserid" type="STRING" length="32"/>
|
||||
<attribute name="updateorgid" label="updateorgid" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="updatetime" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="user_task_info" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="FLOW_OPINION_BUSINESS" label="" keyAttributes="opinionno,serialno">
|
||||
<attributes>
|
||||
<attribute name="serialno" label="流程任务流水号" type="STRING" length="32"/>
|
||||
<attribute name="opinionno" label="见序号" type="STRING" length="32"/>
|
||||
<attribute name="objecttype" label="对象类型" type="STRING" length="18"/>
|
||||
<attribute name="objectno" label="对象编号" type="STRING" length="32"/>
|
||||
<attribute name="customerid" label="客户编号" type="STRING" length="32"/>
|
||||
<attribute name="customername" label="客户名称" type="STRING" length="80"/>
|
||||
<attribute name="businesscurrency" label="币种" type="STRING" length="18"/>
|
||||
<attribute name="businesssum" label="金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="termyear" label="期限(年)" type="INT" length="10"/>
|
||||
<attribute name="termmonth" label="期限(月)" type="INT" length="10"/>
|
||||
<attribute name="termday" label="期限(日)" type="INT" length="10"/>
|
||||
<attribute name="baseratetype" label="基准利率类型" type="STRING" length="18"/>
|
||||
<attribute name="ratefloattype" label="利率浮动方式" type="STRING" length="18"/>
|
||||
<attribute name="ratefloat" label="利率浮动" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailcurrency" label="保证金币种" type="STRING" length="18"/>
|
||||
<attribute name="businessrate" label="执行利率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailratio" label="保证金比率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailsum" label="保证金金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="pdgratio" label="手续费比率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="pdgsum" label="手续费金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="baserate" label="基准利率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="phasechoice" label="阶段意见" type="STRING" length="800"/>
|
||||
<attribute name="phaseopinion" label="意见详情" type="STRING" length="2000"/>
|
||||
<attribute name="InterOpinion1" label="内部意见1" type="STRING" length="600"/>
|
||||
<attribute name="DistriOpinion1" label="经销商意见1" type="STRING" length="600"/>
|
||||
<attribute name="InterOpinion2" label="内部意见2" type="STRING" length="600"/>
|
||||
<attribute name="DistriOpinion2" label="经销商意见2" type="STRING" length="600"/>
|
||||
<attribute name="InterOpinion3" label="内部意见3" type="STRING" length="600"/>
|
||||
<attribute name="DistriOpinion3" label="经销商意见3" type="STRING" length="600"/>
|
||||
<attribute name="InterOpinion4" label="内部意见4" type="STRING" length="600"/>
|
||||
<attribute name="DistriOpinion4" label="经销商意见4" type="STRING" length="600"/>
|
||||
<attribute name="opinionType" label="意见类型" type="STRING" length="10"/>
|
||||
<attribute name="phaseopinion1" label="意见详情1" type="STRING" length="400"/>
|
||||
<attribute name="phaseopinion2" label="意见详情2" type="STRING" length="400"/>
|
||||
<attribute name="phaseopinion3" label="意见详情3" type="STRING" length="400"/>
|
||||
<attribute name="inputorg" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="inputuser" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="20"/>
|
||||
<attribute name="updateuser" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="变更时间" type="STRING" length="20"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="flow_opinion_business" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="LM_GPS_LOCATION" label="GPS定位信息" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="ID" type="STRING" length="32"/>
|
||||
<attribute name="APPLY_NO" label="申请编号" type="STRING" length="32"/>
|
||||
<attribute name="MODEL" label="设备类型" type="STRING" length="32"/>
|
||||
<attribute name="RUN_STATUS" label="运行状态" type="STRING" length="32"/>
|
||||
<attribute name="product_name" label="产品名称" type="STRING" length="100"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="product_log" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="USER_TASK_DATA" label="" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="id" type="STRING" length="32"/>
|
||||
<attribute name="userid" label="userid" type="STRING" length="32"/>
|
||||
<attribute name="roleid" label="roleid" type="STRING" length="32"/>
|
||||
<attribute name="flowno" label="flowno" type="STRING" length="32"/>
|
||||
<attribute name="flowunid" label="flowunid" type="STRING" length="32"/>
|
||||
<attribute name="project_id" label="project_id" type="STRING" length="32"/>
|
||||
<attribute name="contract_id" label="contract_id" type="STRING" length="32"/>
|
||||
<attribute name="begintime" label="begintime" type="STRING" length="32"/>
|
||||
<attribute name="endtime" label="endtime" type="STRING" length="32"/>
|
||||
<attribute name="status" label="status" type="STRING" length="32"/>
|
||||
<attribute name="taskno" label="taskno" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="user_task_data" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="USER_TASK_INFO" label="" keyAttributes="roleid,userid">
|
||||
<attributes>
|
||||
<attribute name="userid" label="userid" type="STRING" length="32"/>
|
||||
<attribute name="roleid" label="roleid" type="STRING" length="32"/>
|
||||
<attribute name="task_weight" label="task_weight" type="STRING" length="32"/>
|
||||
<attribute name="task_number" label="task_number" type="STRING" length="32"/>
|
||||
<attribute name="induction_state" label="induction_state" type="STRING" length="32"/>
|
||||
<attribute name="inputuserid" label="inputuserid" type="STRING" length="32"/>
|
||||
<attribute name="inputorgid" label="inputorgid" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="inputtime" type="STRING" length="32"/>
|
||||
<attribute name="updateuserid" label="updateuserid" type="STRING" length="32"/>
|
||||
<attribute name="updateorgid" label="updateorgid" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="updatetime" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="user_task_info" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="FLOW_OPINION_BUSINESS" label="" keyAttributes="opinionno,serialno">
|
||||
<attributes>
|
||||
<attribute name="serialno" label="流程任务流水号" type="STRING" length="32"/>
|
||||
<attribute name="opinionno" label="见序号" type="STRING" length="32"/>
|
||||
<attribute name="objecttype" label="对象类型" type="STRING" length="18"/>
|
||||
<attribute name="objectno" label="对象编号" type="STRING" length="32"/>
|
||||
<attribute name="customerid" label="客户编号" type="STRING" length="32"/>
|
||||
<attribute name="customername" label="客户名称" type="STRING" length="80"/>
|
||||
<attribute name="businesscurrency" label="币种" type="STRING" length="18"/>
|
||||
<attribute name="businesssum" label="金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="termyear" label="期限(年)" type="INT" length="10"/>
|
||||
<attribute name="termmonth" label="期限(月)" type="INT" length="10"/>
|
||||
<attribute name="termday" label="期限(日)" type="INT" length="10"/>
|
||||
<attribute name="baseratetype" label="基准利率类型" type="STRING" length="18"/>
|
||||
<attribute name="ratefloattype" label="利率浮动方式" type="STRING" length="18"/>
|
||||
<attribute name="ratefloat" label="利率浮动" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailcurrency" label="保证金币种" type="STRING" length="18"/>
|
||||
<attribute name="businessrate" label="执行利率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailratio" label="保证金比率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="bailsum" label="保证金金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="pdgratio" label="手续费比率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="pdgsum" label="手续费金额" type="DOUBLE" length="24" scale="6"/>
|
||||
<attribute name="baserate" label="基准利率" type="DOUBLE" length="10" scale="6"/>
|
||||
<attribute name="phasechoice" label="阶段意见" type="STRING" length="800"/>
|
||||
<attribute name="phaseopinion" label="意见详情" type="STRING" length="2000"/>
|
||||
<attribute name="InterOpinion1" label="内部意见1" type="STRING" length="600"/>
|
||||
<attribute name="DistriOpinion1" label="经销商意见1" type="STRING" length="600"/>
|
||||
<attribute name="InterOpinion2" label="内部意见2" type="STRING" length="600"/>
|
||||
<attribute name="DistriOpinion2" label="经销商意见2" type="STRING" length="600"/>
|
||||
<attribute name="InterOpinion3" label="内部意见3" type="STRING" length="600"/>
|
||||
<attribute name="DistriOpinion3" label="经销商意见3" type="STRING" length="600"/>
|
||||
<attribute name="InterOpinion4" label="内部意见4" type="STRING" length="600"/>
|
||||
<attribute name="DistriOpinion4" label="经销商意见4" type="STRING" length="600"/>
|
||||
<attribute name="opinionType" label="意见类型" type="STRING" length="10"/>
|
||||
<attribute name="phaseopinion1" label="意见详情1" type="STRING" length="400"/>
|
||||
<attribute name="phaseopinion2" label="意见详情2" type="STRING" length="400"/>
|
||||
<attribute name="phaseopinion3" label="意见详情3" type="STRING" length="400"/>
|
||||
<attribute name="inputorg" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="inputuser" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="20"/>
|
||||
<attribute name="updateuser" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="变更时间" type="STRING" length="20"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="flow_opinion_business" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="LM_GPS_LOCATION" label="GPS定位信息" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="ID" type="STRING" length="32"/>
|
||||
<attribute name="APPLY_NO" label="申请编号" type="STRING" length="32"/>
|
||||
<attribute name="MODEL" label="设备类型" type="STRING" length="32"/>
|
||||
<attribute name="RUN_STATUS" label="运行状态" type="STRING" length="32"/>
|
||||
<attribute name="STATUS" label="设备状态" type="STRING" length="32"/>
|
||||
<attribute name="STATUS_USING" label="设备启用状态" type="STRING" length="32"/>
|
||||
<attribute name="STATUS_USING" label="设备启用状态" type="STRING" length="32"/>
|
||||
<attribute name="IMEI" label="设备号" type="STRING" length="32"/>
|
||||
<attribute name="CAR_VIN" label="车架号" type="STRING" length="32"/>
|
||||
<attribute name="RECEIVE_TIME" label="数据接收时间" type="STRING" length="32"/>
|
||||
<attribute name="GPS_TIME" label="GPS时间" type="STRING" length="32"/>
|
||||
<attribute name="LNG" label="经度" type="STRING" length="32"/>
|
||||
<attribute name="CAR_VIN" label="车架号" type="STRING" length="32"/>
|
||||
<attribute name="RECEIVE_TIME" label="数据接收时间" type="STRING" length="32"/>
|
||||
<attribute name="GPS_TIME" label="GPS时间" type="STRING" length="32"/>
|
||||
<attribute name="LNG" label="经度" type="STRING" length="32"/>
|
||||
<attribute name="LAT" label="纬度" type="STRING" length="32"/>
|
||||
<attribute name="SPD" label="速度(单位:千米/小时)" type="STRING" length="32"/>
|
||||
<attribute name="DIR" label="方向(0-360,0为正北向)" type="STRING" length="32"/>
|
||||
<attribute name="LOCATE_TYPE" label="定位类型" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_gps_location" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="LM_GPS_ORDER" label="GPS工单信息正式表" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="主键" type="STRING" length="32"/>
|
||||
<attribute name="APPLY_NO" label="申请编号" type="STRING" length="32"/>
|
||||
<attribute name="ORDER_NO" label="工单编号" type="STRING" length="32"/>
|
||||
<attribute name="CONTACT_NAME" label="现场联系人" type="STRING" length="256"/>
|
||||
<attribute name="CONTACT_PHONE" label="现场联系人电话" type="STRING" length="32"/>
|
||||
<attribute name="PICCONTACT_NAME" label="派工联系人" type="STRING" length="256"/>
|
||||
<attribute name="PICCONTACT_PHONE" label="派工联系人电话" type="STRING" length="32"/>
|
||||
<attribute name="INSTALL_TIME" label="上门时间" type="STRING" length="32"/>
|
||||
<attribute name="ADDRESS_CODE" label="上门地址最新国标编码" type="STRING" length="32"/>
|
||||
<attribute name="ADDRESS_DETAIL" label="详细地址" type="STRING" length="512"/>
|
||||
<attribute name="CAR_VIN" label="车架号" type="STRING" length="32"/>
|
||||
<attribute name="WIRED_NUM" label="有线设备数量" type="STRING" length="32"/>
|
||||
<attribute name="WIRED_PERIOD" label="有线设备使用年限" type="STRING" length="32"/>
|
||||
<attribute name="WIRELESS_NUM" label="无线设备数量" type="STRING" length="32"/>
|
||||
<attribute name="WIRELESS_PERIOD" label="无线设备使用年限" type="STRING" length="32"/>
|
||||
<attribute name="CAR_ACCOUNT" label="拉车账号" type="STRING" length="128"/>
|
||||
<attribute name="RESULT" label="调用返回值" type="STRING" length="32"/>
|
||||
<attribute name="MESSAGE" label="信息" type="STRING" length="512"/>
|
||||
<attribute name="STATUS" label="订单状态" type="STRING" length="32"/>
|
||||
<attribute name="PROJECT_ID" label="项目编号" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="录入人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORGID" label="录入部门" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_gps_order" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
<attribute name="LOCATE_TYPE" label="定位类型" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_gps_location" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
<class name="LM_GPS_ORDER_TEMP" label="GPS工单信息临时表" keyAttributes="ID">
|
||||
<class name="LM_GPS_ORDER" label="GPS工单信息正式表" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="主键" type="STRING" length="32"/>
|
||||
<attribute name="APPLY_NO" label="申请编号" type="STRING" length="32"/>
|
||||
<attribute name="ORDER_NO" label="工单编号" type="STRING" length="32"/>
|
||||
<attribute name="ORDER_NO" label="工单编号" type="STRING" length="40"/>
|
||||
<attribute name="CONTACT_NAME" label="现场联系人" type="STRING" length="256"/>
|
||||
<attribute name="CONTACT_PHONE" label="现场联系人电话" type="STRING" length="32"/>
|
||||
<attribute name="PICCONTACT_NAME" label="派工联系人" type="STRING" length="256"/>
|
||||
@ -2392,12 +2355,59 @@
|
||||
<attribute name="STATUS" label="订单状态" type="STRING" length="32"/>
|
||||
<attribute name="PROJECT_ID" label="项目编号" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="CARTYPE" label="车型" type="STRING" length="100"/>
|
||||
<attribute name="USERNAME" label="车主名称" type="STRING" length="32"/>
|
||||
<attribute name="USERPHONE" label="车主电话" type="STRING" length="11"/>
|
||||
<attribute name="SHOPNAME" label="安装店面" type="STRING" length="100"/>
|
||||
<attribute name="SOURCE" label="GPS来源" type="STRING" length="10"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="录入人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORGID" label="录入部门" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_gps_order" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
<class name="LM_GPS_ORDER_TEMP" label="GPS工单信息临时表" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="主键" type="STRING" length="32"/>
|
||||
<attribute name="APPLY_NO" label="申请编号" type="STRING" length="32"/>
|
||||
<attribute name="ORDER_NO" label="工单编号" type="STRING" length="40"/>
|
||||
<attribute name="CONTACT_NAME" label="现场联系人" type="STRING" length="256"/>
|
||||
<attribute name="CONTACT_PHONE" label="现场联系人电话" type="STRING" length="32"/>
|
||||
<attribute name="PICCONTACT_NAME" label="派工联系人" type="STRING" length="256"/>
|
||||
<attribute name="PICCONTACT_PHONE" label="派工联系人电话" type="STRING" length="32"/>
|
||||
<attribute name="INSTALL_TIME" label="上门时间" type="STRING" length="32"/>
|
||||
<attribute name="ADDRESS_CODE" label="上门地址最新国标编码" type="STRING" length="32"/>
|
||||
<attribute name="ADDRESS_DETAIL" label="详细地址" type="STRING" length="512"/>
|
||||
<attribute name="CAR_VIN" label="车架号" type="STRING" length="32"/>
|
||||
<attribute name="WIRED_NUM" label="有线设备数量" type="STRING" length="32"/>
|
||||
<attribute name="WIRED_PERIOD" label="有线设备使用年限" type="STRING" length="32"/>
|
||||
<attribute name="WIRELESS_NUM" label="无线设备数量" type="STRING" length="32"/>
|
||||
<attribute name="WIRELESS_PERIOD" label="无线设备使用年限" type="STRING" length="32"/>
|
||||
<attribute name="CAR_ACCOUNT" label="拉车账号" type="STRING" length="128"/>
|
||||
<attribute name="RESULT" label="调用返回值" type="STRING" length="32"/>
|
||||
<attribute name="MESSAGE" label="信息" type="STRING" length="512"/>
|
||||
<attribute name="STATUS" label="订单状态" type="STRING" length="32"/>
|
||||
<attribute name="PROJECT_ID" label="项目编号" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="CARTYPE" label="车型" type="STRING" length="100"/>
|
||||
<attribute name="USERNAME" label="车主名称" type="STRING" length="32"/>
|
||||
<attribute name="USERPHONE" label="车主电话" type="STRING" length="11"/>
|
||||
<attribute name="SHOPNAME" label="安装店面" type="STRING" length="100"/>
|
||||
<attribute name="SOURCE" label="GPS来源" type="STRING" length="10"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="录入人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORGID" label="录入部门" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_gps_order_temp" />
|
||||
@ -2405,53 +2415,53 @@
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
<class name="LM_GPS_PHOTO" label="GPS安装图" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="ID" type="STRING" length="32"/>
|
||||
<attribute name="APPLY_NO" label="申请编号" type="STRING" length="32"/>
|
||||
<attribute name="PHOTO_NAME" label="照片名称" type="STRING" length="64"/>
|
||||
<attribute name="URL" label="路径" type="STRING" length="1024"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_gps_photo" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PF_CUSTOMER_ADDRESS" label="客户居住地址" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="序列号" type="STRING" length="32"/>
|
||||
<attribute name="APPLICATION_NO" label="渠道申请编号" type="STRING" length="32"/>
|
||||
<attribute name="SERIAL" label="单次请求流水号" type="STRING" length="32"/>
|
||||
<attribute name="customerid" label="客户编号" type="STRING" length="32"/>
|
||||
<attribute name="languagetype" label="显示语言类型" type="STRING" length="10"/>
|
||||
<attribute name="addtype" label="地址类型" type="STRING" length="18"/>
|
||||
<attribute name="isadd" label="是否通讯地址" type="STRING" length="10"/>
|
||||
<attribute name="isnew" label="是否最新" type="STRING" length="10"/>
|
||||
<attribute name="status" label="状态" type="STRING" length="10"/>
|
||||
<attribute name="country" label="地址所属国家/地区" type="STRING" length="20"/>
|
||||
<attribute name="province" label="地址所属省/市/区县" type="STRING" length="32"/>
|
||||
<attribute name="dressdetail" label="地址详情" type="STRING" length="400"/>
|
||||
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="inputorgid" label="登记机构" type="STRING" length="32"/>
|
||||
<attribute name="updateuserid" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="updateorgid" label="更新机构" type="STRING" length="32"/>
|
||||
<attribute name="zipcode" label="邮政编码" type="STRING" length="18"/>
|
||||
<attribute name="owner" label="电话所有人" type="STRING" length="10"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程标识" type="STRING" length="32"/>
|
||||
<attribute name="FULLADDRESS" label="地址全名" type="STRING" length="400"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="pf_customer_address" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
|
||||
<class name="LM_GPS_PHOTO" label="GPS安装图" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="ID" type="STRING" length="32"/>
|
||||
<attribute name="APPLY_NO" label="申请编号" type="STRING" length="32"/>
|
||||
<attribute name="PHOTO_NAME" label="照片名称" type="STRING" length="64"/>
|
||||
<attribute name="URL" label="路径" type="STRING" length="1024"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_gps_photo" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PF_CUSTOMER_ADDRESS" label="客户居住地址" keyAttributes="id">
|
||||
<attributes>
|
||||
<attribute name="id" label="序列号" type="STRING" length="32"/>
|
||||
<attribute name="APPLICATION_NO" label="渠道申请编号" type="STRING" length="32"/>
|
||||
<attribute name="SERIAL" label="单次请求流水号" type="STRING" length="32"/>
|
||||
<attribute name="customerid" label="客户编号" type="STRING" length="32"/>
|
||||
<attribute name="languagetype" label="显示语言类型" type="STRING" length="10"/>
|
||||
<attribute name="addtype" label="地址类型" type="STRING" length="18"/>
|
||||
<attribute name="isadd" label="是否通讯地址" type="STRING" length="10"/>
|
||||
<attribute name="isnew" label="是否最新" type="STRING" length="10"/>
|
||||
<attribute name="status" label="状态" type="STRING" length="10"/>
|
||||
<attribute name="country" label="地址所属国家/地区" type="STRING" length="20"/>
|
||||
<attribute name="province" label="地址所属省/市/区县" type="STRING" length="32"/>
|
||||
<attribute name="dressdetail" label="地址详情" type="STRING" length="400"/>
|
||||
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="inputorgid" label="登记机构" type="STRING" length="32"/>
|
||||
<attribute name="updateuserid" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="updateorgid" label="更新机构" type="STRING" length="32"/>
|
||||
<attribute name="zipcode" label="邮政编码" type="STRING" length="18"/>
|
||||
<attribute name="owner" label="电话所有人" type="STRING" length="10"/>
|
||||
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="updatetime" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程标识" type="STRING" length="32"/>
|
||||
<attribute name="FULLADDRESS" label="地址全名" type="STRING" length="400"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="pf_customer_address" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PF_CALC_CONDITION" label="接口平台商务条件表" keyAttributes="ID">
|
||||
<attributes>
|
||||
@ -3104,128 +3114,128 @@
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="LM_APPROVAL_OPINION_LOG" label="审批意见推送日志" keyAttributes="ID">
|
||||
<attributes>
|
||||
<class name="LM_APPROVAL_OPINION_LOG" label="审批意见推送日志" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="主键" type="STRING" length="32"/>
|
||||
<attribute name="CHANNEL" label="渠道编号" type="STRING" length="32"/>
|
||||
<attribute name="APPLICATION_NO" label="渠道申请编号" type="STRING" length="32"/>
|
||||
<attribute name="PROJECT_NO" label="项目编号" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="CHANNEL" label="渠道编号" type="STRING" length="32"/>
|
||||
<attribute name="APPLICATION_NO" label="渠道申请编号" type="STRING" length="32"/>
|
||||
<attribute name="PROJECT_NO" label="项目编号" type="STRING" length="32"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="PROCESS_NODE" label="申请类型编号(接口平台)" type="STRING" length="32"/>
|
||||
<attribute name="ITEMNO" label="申请类型编号" type="STRING" length="32"/>
|
||||
<attribute name="APPROVE_OPINION" label="审批意见信息" type="STRING" length="512"/>
|
||||
<attribute name="APPROVE_STATUS" label="审核状态" type="STRING" length="32"/>
|
||||
<attribute name="ITEMNO" label="申请类型编号" type="STRING" length="32"/>
|
||||
<attribute name="APPROVE_OPINION" label="审批意见信息" type="STRING" length="512"/>
|
||||
<attribute name="APPROVE_STATUS" label="审核状态" type="STRING" length="32"/>
|
||||
<attribute name="APPROVE_BEGINTIME" label="审核开始时间" type="STRING" length="32"/>
|
||||
<attribute name="APPROVE_ENDTIME" label="审核结束时间" type="STRING" length="32"/>
|
||||
<attribute name="PUSH_NUMBER" label="推送次数" type="STRING" length="32"/>
|
||||
<attribute name="PUSH_STATUS" label="推送结果" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="录入人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORGID" label="录入部门" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEORGID" label="修改时间" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_approval_opinion_log" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
<attribute name="APPROVE_ENDTIME" label="审核结束时间" type="STRING" length="32"/>
|
||||
<attribute name="PUSH_NUMBER" label="推送次数" type="STRING" length="32"/>
|
||||
<attribute name="PUSH_STATUS" label="推送结果" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="录入时间" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="录入人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORGID" label="录入部门" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEORGID" label="修改时间" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lm_approval_opinion_log" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
<!-- <class name="VI_FLOW_MONITORING" label="流程监控视图" keyAttributes="`OBJECTNO`">
|
||||
<attributes>
|
||||
<attribute name="OBJECTNO" label="对象编号" type="STRING"/>
|
||||
<attribute name="FLOW_KEY" label="项目/合同号" type="STRING"/>
|
||||
<attribute name="PROJ_NAME" label="项目名称" type="STRING"/>
|
||||
<attribute name="FLOW_NAME" label="流程名称" type="STRING"/>
|
||||
<attribute name="PHASENAME" label="当前任务名称" type="STRING"/>
|
||||
<attribute name="USERNAME" label="当前处理人" type="STRING"/>
|
||||
<attribute name="BEGINTIME" label="任务开始时间" type="STRING"/>
|
||||
<attribute name="ENDTIME" label="任务结束时间" type="STRING"/>
|
||||
<attribute name="PHASENO" label="当前阶段号" type="STRING"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="vi_flow_monitoring" />
|
||||
<property name="createKey" value="false" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class> -->
|
||||
|
||||
<class name="VI_FLOW_MONITORING" label="流程监控视图" keyAttributes="OBJECTNO">
|
||||
<attributes>
|
||||
<attribute name="OBJECTNO" label="对象编号" type="STRING"/>
|
||||
<attribute name="FLOW_KEY" label="项目/合同号" type="STRING"/>
|
||||
<attribute name="PROJ_NAME" label="项目名称" type="STRING"/>
|
||||
<attribute name="FLOW_NAME" label="流程名称" type="STRING"/>
|
||||
<attribute name="PHASENAME" label="当前任务名称" type="STRING"/>
|
||||
<attribute name="USERNAME" label="当前处理人" type="STRING"/>
|
||||
<attribute name="BEGINTIME" label="任务开始时间" type="STRING"/>
|
||||
<attribute name="ENDTIME" label="任务结束时间" type="STRING"/>
|
||||
<attribute name="OBJECTTYPE" label="当前阶段号" type="STRING"/>
|
||||
<attribute name="PHASETYPE" label="阶段类型" type="STRING"/>
|
||||
<attribute name="APPLYTYPE" label="申请类型" type="STRING"/>
|
||||
<attribute name="FLOWNO" label="当前流程号" type="STRING"/>
|
||||
<attribute name="FLOWNAME" label="当前流程名称" type="STRING"/>
|
||||
<attribute name="PHASENO" label="PHASENO" type="STRING"/>
|
||||
<attribute name="flow_unid" label="流程编号" type="STRING"/>
|
||||
<attribute name="proj_id" label="项目编号" type="STRING"/>
|
||||
<attribute name="contract_id" label="合同编号" type="STRING"/>
|
||||
<attribute name="SERIALNO" label="流水号" type="STRING"/>
|
||||
<attribute name="RELATIVESERIALNO" label="上一流水号" type="STRING"/>
|
||||
<attribute name="USERID" label="承办人编号" type="STRING"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="vi_flow_monitoring" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PF_TASK_ALLOCATION_ROLE" label="" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="ROLEID" label="角色编号" type="STRING" length="32"/>
|
||||
<attribute name="ROLENAME" label="角色名" type="STRING" length="80"/>
|
||||
<attribute name="STATUS" label="状态" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSER" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORG" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSER" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEORG" label="更新部门" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="pf_task_allocation_role" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PF_TASK_ALLOCATION_USER" label="" keyAttributes="ID">
|
||||
<attributes>
|
||||
|
||||
<!-- <class name="VI_FLOW_MONITORING" label="流程监控视图" keyAttributes="`OBJECTNO`">
|
||||
<attributes>
|
||||
<attribute name="OBJECTNO" label="对象编号" type="STRING"/>
|
||||
<attribute name="FLOW_KEY" label="项目/合同号" type="STRING"/>
|
||||
<attribute name="PROJ_NAME" label="项目名称" type="STRING"/>
|
||||
<attribute name="FLOW_NAME" label="流程名称" type="STRING"/>
|
||||
<attribute name="PHASENAME" label="当前任务名称" type="STRING"/>
|
||||
<attribute name="USERNAME" label="当前处理人" type="STRING"/>
|
||||
<attribute name="BEGINTIME" label="任务开始时间" type="STRING"/>
|
||||
<attribute name="ENDTIME" label="任务结束时间" type="STRING"/>
|
||||
<attribute name="PHASENO" label="当前阶段号" type="STRING"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="vi_flow_monitoring" />
|
||||
<property name="createKey" value="false" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class> -->
|
||||
|
||||
<class name="VI_FLOW_MONITORING" label="流程监控视图" keyAttributes="OBJECTNO">
|
||||
<attributes>
|
||||
<attribute name="OBJECTNO" label="对象编号" type="STRING"/>
|
||||
<attribute name="FLOW_KEY" label="项目/合同号" type="STRING"/>
|
||||
<attribute name="PROJ_NAME" label="项目名称" type="STRING"/>
|
||||
<attribute name="FLOW_NAME" label="流程名称" type="STRING"/>
|
||||
<attribute name="PHASENAME" label="当前任务名称" type="STRING"/>
|
||||
<attribute name="USERNAME" label="当前处理人" type="STRING"/>
|
||||
<attribute name="BEGINTIME" label="任务开始时间" type="STRING"/>
|
||||
<attribute name="ENDTIME" label="任务结束时间" type="STRING"/>
|
||||
<attribute name="OBJECTTYPE" label="当前阶段号" type="STRING"/>
|
||||
<attribute name="PHASETYPE" label="阶段类型" type="STRING"/>
|
||||
<attribute name="APPLYTYPE" label="申请类型" type="STRING"/>
|
||||
<attribute name="FLOWNO" label="当前流程号" type="STRING"/>
|
||||
<attribute name="FLOWNAME" label="当前流程名称" type="STRING"/>
|
||||
<attribute name="PHASENO" label="PHASENO" type="STRING"/>
|
||||
<attribute name="flow_unid" label="流程编号" type="STRING"/>
|
||||
<attribute name="proj_id" label="项目编号" type="STRING"/>
|
||||
<attribute name="contract_id" label="合同编号" type="STRING"/>
|
||||
<attribute name="SERIALNO" label="流水号" type="STRING"/>
|
||||
<attribute name="RELATIVESERIALNO" label="上一流水号" type="STRING"/>
|
||||
<attribute name="USERID" label="承办人编号" type="STRING"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="vi_flow_monitoring" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PF_TASK_ALLOCATION_ROLE" label="" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="ROLEID" label="角色编号" type="STRING" length="32"/>
|
||||
<attribute name="USERID" label="用户编号" type="STRING" length="32"/>
|
||||
<attribute name="USERNAME" label="用户姓名" type="STRING" length="32"/>
|
||||
<attribute name="STATUS" label="状态" type="STRING" length="32"/>
|
||||
<attribute name="WEIGHT" label="权重" type="STRING" length="32"/>
|
||||
<attribute name="NUMBER_OF_TASKS" label="任务数量" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSER" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORG" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSER" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEORG" label="更新部门" type="STRING" length="32"/>
|
||||
<attribute name="ROLEID" label="角色编号" type="STRING" length="32"/>
|
||||
<attribute name="ROLENAME" label="角色名" type="STRING" length="80"/>
|
||||
<attribute name="STATUS" label="状态" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSER" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORG" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSER" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="TASKSSUM" label="用户加入后任务总数" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="pf_task_allocation_user" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<attribute name="UPDATEORG" label="更新部门" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="pf_task_allocation_role" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="PF_TASK_ALLOCATION_USER" label="" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="ROLEID" label="角色编号" type="STRING" length="32"/>
|
||||
<attribute name="USERID" label="用户编号" type="STRING" length="32"/>
|
||||
<attribute name="USERNAME" label="用户姓名" type="STRING" length="32"/>
|
||||
<attribute name="STATUS" label="状态" type="STRING" length="32"/>
|
||||
<attribute name="WEIGHT" label="权重" type="STRING" length="32"/>
|
||||
<attribute name="NUMBER_OF_TASKS" label="任务数量" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSER" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORG" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSER" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEORG" label="更新部门" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="TASKSSUM" label="用户加入后任务总数" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="pf_task_allocation_user" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
</package>
|
||||
</jbo>
|
||||
|
||||
@ -3,4 +3,14 @@ TYtoken=9999
|
||||
TYsign=3474A2D7CFEC5DECD54DE8A263F7A4A9
|
||||
TYsign2=3474a2d7cfec5decd54de8a263f7a4a9
|
||||
TYUrl=http://121.43.178.183:9989/dispatch_intf/apiController/order
|
||||
TYQueryOrderToVin=http://121.43.178.183:80/gps-intf/api2/getGpsInfosByCarVin
|
||||
TYQueryOrderToVin=http://121.43.178.183:80/gps-intf/api2/getGpsInfosByCarVin
|
||||
# \u4E2D\u745EProductId
|
||||
ZR_ProfuctId=d5e89c74-6014-11e9-bdb3-6c92bf61e2
|
||||
# \u4E2D\u745EappKey
|
||||
ZR_AppKey=2C6074D0-C8E4-4BA4-A50A-E3A46EAD394A
|
||||
# \u65b0\u589e\u5de5\u5355
|
||||
ZR_create_url=http://gatewayapi.lunztech.cn/api/ApiPlat/AddOrderWithVpsInfos
|
||||
# \u67e5\u8be2\u5de5\u5355
|
||||
ZR_query_url=http://gatewayapi.lunztech.cn/api/ApiPlat/GetAllEqPositionsByVIN
|
||||
# \u53d6\u6d88\u5de5\u5355
|
||||
ZR_cancel_url=http://gatewayapi.lunztech.cn/api/ApiPlat/CancelVpsAddOrder
|
||||
@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import apx.com.amarsoft.als.apzl.apply.business.doc.detail.process.DocLibraryStateUpdate;
|
||||
import com.tenwa.apzl.comm.GpsEnum;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_HIS;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_TEMP;
|
||||
@ -52,7 +53,7 @@ import apx.com.amarsoft.als.apzl.flow.data.service.FlowDataService;
|
||||
|
||||
public class FlowDataServiceImpl implements FlowDataService{
|
||||
private Map<String, Object> fieldMap;
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getFlowBankCard(HttpServletRequest request,
|
||||
HttpServletResponse response, JBOTransaction tx, Transaction sqlca,
|
||||
@ -104,7 +105,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
public Map<String, Object> saveFlowBankCard(HttpServletRequest request,
|
||||
HttpServletResponse response, JBOTransaction tx, Transaction sqlca,
|
||||
ReturnMapUtil ReturnMapUtil) throws Exception {
|
||||
|
||||
|
||||
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil.readRequestParam(request, "UTF-8");
|
||||
BizObjectManager catManage = JBOFactory.getBizObjectManager(CUSTOMER_ACCOUNT_TEMP.CLASS_NAME,sqlca);
|
||||
System.out.println("============业务申请扣款卡信息保存参数=====================");
|
||||
@ -148,7 +149,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
cat.setAttributeValue("updateuserid", userid);
|
||||
cat.setAttributeValue("updateorgid", CurUser.getOrgID());
|
||||
cat.setAttributeValue("updatetime", DateUtil.getSystemTimeByFormat("yyyy/MM/dd HH:mm:ss"));
|
||||
|
||||
|
||||
}
|
||||
String acc_number = fieldMap.get("acc_number") == null ? "" : fieldMap.get("acc_number").toString();
|
||||
String bank_name = fieldMap.get("bank_name") == null ? "" : fieldMap.get("bank_name").toString();
|
||||
@ -177,7 +178,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
}
|
||||
//项目扣款卡中间表插入数据
|
||||
public String savaCustomerAccountTomiddle(String projectid,String acc_number,String bank_name,String account,String mobile,String flowUnid,String contractid,Transaction Sqlca) {
|
||||
|
||||
|
||||
String selectSql="";// 查询SQL
|
||||
String updateSql="";// 变更SQL
|
||||
String insertSql="";// 新增SQL
|
||||
@ -185,16 +186,16 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
String sign_status = "N";
|
||||
String trueOrfalse="true";
|
||||
String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
try {
|
||||
try {
|
||||
// 查询页面上的数据是否与正式表匹配
|
||||
selectSql="SELECT PROJECT_ID FROM CUSTOMER_ACCOUNT WHERE PROJECT_ID='"+projectid+"' AND ACC_NUMBER='"+acc_number+"' AND BANK_NAME='"+bank_name+"' AND ACCOUNT='"+account+"' AND MOBILE='"+mobile+"' and SIGN_STATUS='Y'";
|
||||
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql(Sqlca, selectSql, null);
|
||||
|
||||
|
||||
// 如果不匹配, 说明是变更的, 判断数据在中间表是否已存在;
|
||||
if(dataList ==null || dataList.size()==0){
|
||||
selectSql="SELECT PROJECT_ID FROM CUSTOMER_ACCOUNT_MIDDLE WHERE PROJECT_ID='"+projectid+"'";
|
||||
List<Map<String,String>> dataList2=DataOperatorUtil.getDataBySql(Sqlca, selectSql, null);
|
||||
|
||||
|
||||
//检查历史表
|
||||
String selectHis = "SELECT SIGN_STATUS FROM CUSTOMER_ACCOUNT_HIS WHERE PROJECT_ID='"+projectid+"' AND ACC_NUMBER='"+acc_number+"' AND BANK_NAME='"+bank_name+"' AND ACCOUNT='"+account+"' AND MOBILE='"+mobile+"'";
|
||||
List<Map<String,String>> HisList=DataOperatorUtil.getDataBySql(Sqlca, selectHis, null);
|
||||
@ -219,12 +220,12 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
Sqlca.executeSQL(deleteSql);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return trueOrfalse;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getContractMakeBankCard(
|
||||
HttpServletRequest request, HttpServletResponse response,
|
||||
@ -267,7 +268,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
data.put("project_id", projectid);
|
||||
data.put("mobile", "");
|
||||
data.put("certid", "");
|
||||
|
||||
|
||||
body.put("statusCode", "01");
|
||||
}
|
||||
data.put("contract_id", ContractId);
|
||||
@ -290,7 +291,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
System.out.println("====================");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap"); // 参数
|
||||
List<Map<String, Object>> fileList = (List<Map<String, Object>>) testMap.get("fileList");
|
||||
|
||||
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
String projectId = fieldMap.get("project_id") == null ? "" : fieldMap.get("project_id").toString();
|
||||
String ContractId = fieldMap.get("contract_id") == null ? "" : fieldMap.get("contract_id").toString();
|
||||
@ -310,7 +311,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
if(fileList!=null&&fileList.size()>0){
|
||||
this.savaBankCardFile(flowParms.get("ProjectId"), flowParms.get("ApplyType"), fileList, CurUser, tx);
|
||||
}
|
||||
|
||||
|
||||
BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME);
|
||||
List<BizObject> ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and ( flow_unid=:flowunid or contract_id=:contractid ) ").setParameter("flowunid", FlowUnid).setParameter("contractid", ContractId).getResultList(false);
|
||||
body.put("FlowUnid", FlowUnid);
|
||||
@ -330,7 +331,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
.setParameter("account", ca.getAttribute("account").toString()).setParameter("acc_number", ca.getAttribute("acc_number").toString()).setParameter("bank_name", ca.getAttribute("bank_name").toString()).setParameter("mobile", ca.getAttribute("mobile").toString()).getSingleResult(false);
|
||||
if(cah == null ){
|
||||
Map<String,String> signFromCondtion=new HashMap<String,String>();
|
||||
signFromCondtion.put("PROJECT_ID",projectId);
|
||||
signFromCondtion.put("PROJECT_ID",projectId);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_ACCOUNT.CLASS_NAME, signFromCondtion,CUSTOMER_ACCOUNT_HIS.CLASS_NAME, null, null,null, tx);
|
||||
}
|
||||
}
|
||||
@ -351,7 +352,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
RestfullConstant.baseProperty.get("success").toString(), "");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
|
||||
public String getSigStatus(String account,String acc_number,String bank_name,String mobile) throws Exception{
|
||||
BizObjectManager cahManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT_HIS.CLASS_NAME);
|
||||
BizObject cah = cahManage.createQuery(" account=:account and acc_number=:acc_number and bank_name=:bank_name and mobile=:mobile and sign_status='Y'")
|
||||
@ -385,7 +386,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
public Map<String, Object> getGpsInfo(HttpServletRequest request,
|
||||
HttpServletResponse response, JBOTransaction tx, Transaction sqlca,
|
||||
ReturnMapUtil ReturnMapUtil) throws Exception {
|
||||
|
||||
|
||||
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
|
||||
.readRequestParam(request, "UTF-8");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap"); // 参数
|
||||
@ -401,13 +402,12 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
BizObjectManager lectManage = JBOFactory.getFactory().getManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME);
|
||||
BizObject lect = lectManage.createQuery(" FLOWUNID=:FlowUnid ").setParameter("FlowUnid", flowunid).getSingleResult(false);
|
||||
String distributor_id = sqlca.getString("select distributor_id from lb_project_info where id='"+projectId+"'");//获取经销商ID
|
||||
|
||||
|
||||
|
||||
BizObjectManager lgtManage = JBOFactory.getFactory().getManager(LM_GPS_ORDER_TEMP.CLASS_NAME);
|
||||
BizObject lgt = lgtManage.createQuery(" APPLY_NO=:APPLY_NO ").setParameter("APPLY_NO", projectNo).getSingleResult(false);
|
||||
|
||||
|
||||
if(lgt == null){
|
||||
//gps来源
|
||||
String gpsVendor = sqlca.getString("select psl.GPS_VENDOR from prd_specific_library psl join flow_bussiness_object fbo on psl.PRODUCTID = fbo.productId where fbo.flow_unid = '"+flowunid+"'");
|
||||
body.put("APPLY_NO", flowParms.get("ProjectNo"));//申请编号
|
||||
body.put("CAR_VIN", lect == null ? "": lect.getAttribute("FRAME_NUMBER").toString());//车架号
|
||||
body.put("CONTACT_NAME", "");//现场联系人
|
||||
@ -418,12 +418,19 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
body.put("ADDRESS_DETAIL", "");//详细地址
|
||||
body.put("WIRED_NUM", "1");//有线设备数量
|
||||
body.put("WIRELESS_NUM", "1");//无线设备数量
|
||||
body.put("CAR_ACCOUNT", "");//ŔłľŐËşĹ
|
||||
body.put("RESULT", "");//请求结果 MESSAGE
|
||||
body.put("MESSAGE", "");//处理信息
|
||||
body.put("STATUS", "未提交");//订单状态
|
||||
body.put("PROJECT_ID", projectId);//项目id
|
||||
body.put("CAR_ACCOUNT", sqlca.getString("select distributor_name from distributor_info where distributor_no='"+distributor_id+"'"));//ĎîÄżid
|
||||
body.put("CAR_ACCOUNT", sqlca.getString("select distributor_name from distributor_info where distributor_no='"+distributor_id+"'"));//拉车账号
|
||||
if(GpsEnum.ZR.getCode().equals(gpsVendor)){
|
||||
body.put("CARTYPE","");
|
||||
body.put("USERNAME","");
|
||||
body.put("USERPHONE","");
|
||||
body.put("SHOPNAME","");
|
||||
}
|
||||
body.put("SOURCE", GpsEnum.ZR.getCode().equals(gpsVendor)?GpsEnum.ZR.getCode():GpsEnum.TY.getCode());//GPS来源
|
||||
body.put("SOURCEDESCRIP", GpsEnum.ZR.getCode().equals(gpsVendor)?GpsEnum.ZR.getName():GpsEnum.TY.getName());//GPS来源描述
|
||||
}else{
|
||||
body.put("APPLY_NO", lgt.getAttribute("APPLY_NO").toString());//申请编号
|
||||
body.put("CAR_VIN", lgt.getAttribute("CAR_VIN").toString());//车架号
|
||||
@ -441,7 +448,17 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
body.put("STATUS", NameManager.getItemName("gps_status",lgt.getAttribute("STATUS").toString()));//订单状态
|
||||
body.put("PROJECT_ID", lgt.getAttribute("PROJECT_ID").toString());//项目id
|
||||
body.put("CAR_ACCOUNT", lgt.getAttribute("CAR_ACCOUNT").toString());//项目id
|
||||
|
||||
if(GpsEnum.ZR.getCode().equals(String.valueOf(lgt.getAttribute("SOURCE")))){
|
||||
body.put("CARTYPE",lgt.getAttribute("CARTYPE").toString());
|
||||
body.put("USERNAME",lgt.getAttribute("USERNAME").toString());
|
||||
body.put("USERPHONE",lgt.getAttribute("USERPHONE").toString());
|
||||
body.put("SHOPNAME",lgt.getAttribute("SHOPNAME").toString());
|
||||
body.put("SOURCE",GpsEnum.ZR.getCode());
|
||||
body.put("SOURCEDESCRIP",GpsEnum.ZR.getName());
|
||||
}else{
|
||||
body.put("SOURCE",GpsEnum.TY.getCode());
|
||||
body.put("SOURCEDESCRIP",GpsEnum.TY.getName());
|
||||
}
|
||||
}
|
||||
body.put("flowunid", flowunid);//流程id
|
||||
System.out.println("GPS返回参数"+body);
|
||||
@ -454,7 +471,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
public Map<String, Object> submitOrder(HttpServletRequest request,
|
||||
HttpServletResponse response, JBOTransaction tx, Transaction sqlca,
|
||||
ReturnMapUtil ReturnMapUtil) throws Exception {
|
||||
|
||||
|
||||
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
|
||||
.readRequestParam(request, "UTF-8");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap"); // 参数
|
||||
@ -469,7 +486,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
|
||||
BizObjectManager lgtManage = JBOFactory.getFactory().getManager(LM_GPS_ORDER_TEMP.CLASS_NAME,tx);
|
||||
BizObject lgt = lgtManage.createQuery(" flowunid=:flowunid ").setParameter("flowunid", flowunid).getSingleResult(true);
|
||||
|
||||
|
||||
if(lgt != null){
|
||||
String gpsStatus = lgt.getAttribute("STATUS")==null?"":lgt.getAttribute("STATUS").getString();
|
||||
if(gpsStatus.length() == 0 || "7".equals(gpsStatus)){
|
||||
@ -480,6 +497,11 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
lgt.setAttributeValue("ADDRESS_DETAIL", fieldMap.get("ADDRESS_DETAIL") == null ? "" : fieldMap.get("ADDRESS_DETAIL").toString());//详细地址
|
||||
lgt.setAttributeValue("WIRED_NUM", fieldMap.get("WIRED_NUM") == null ? "" : fieldMap.get("WIRED_NUM").toString());//有线设备数量
|
||||
lgt.setAttributeValue("WIRELESS_NUM", fieldMap.get("WIRELESS_NUM") == null ? "" : fieldMap.get("WIRELESS_NUM").toString());//无线设备数量
|
||||
lgt.setAttributeValue("CARTYPE", fieldMap.get("CARTYPE") == null ? "" : fieldMap.get("CARTYPE").toString());//车型
|
||||
lgt.setAttributeValue("USERNAME", fieldMap.get("USERNAME") == null ? "" : fieldMap.get("USERNAME").toString());//车主名称
|
||||
lgt.setAttributeValue("USERPHONE", fieldMap.get("USERPHONE") == null ? "" : fieldMap.get("USERPHONE").toString());//车主电话
|
||||
lgt.setAttributeValue("SHOPNAME", fieldMap.get("SHOPNAME") == null ? "" : fieldMap.get("SHOPNAME").toString());//安装店面
|
||||
|
||||
}else{
|
||||
body.put("statusCode", "01");
|
||||
body.put("flowunid", flowunid);//流程id
|
||||
@ -506,6 +528,11 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
lgt.setAttributeValue("WIRELESS_PERIOD",period);
|
||||
lgt.setAttributeValue("FLOWUNID",flowunid);
|
||||
lgt.setAttributeValue("PROJECT_ID", projectId );//项目id
|
||||
lgt.setAttributeValue("CARTYPE", fieldMap.get("CARTYPE") == null ? "" : fieldMap.get("CARTYPE").toString());//车型
|
||||
lgt.setAttributeValue("USERNAME", fieldMap.get("USERNAME") == null ? "" : fieldMap.get("USERNAME").toString());//车主名称
|
||||
lgt.setAttributeValue("USERPHONE", fieldMap.get("USERPHONE") == null ? "" : fieldMap.get("USERPHONE").toString());//车主电话
|
||||
lgt.setAttributeValue("SHOPNAME", fieldMap.get("SHOPNAME") == null ? "" : fieldMap.get("SHOPNAME").toString());//安装店面
|
||||
lgt.setAttributeValue("SOURCE", fieldMap.get("SOURCE") == null ? "" : fieldMap.get("SOURCE").toString());
|
||||
if(GpsConfig.size()>0){
|
||||
lgt.setAttributeValue("PICCONTACT_NAME",GpsConfig.get(0).get("CONTACT_NAME"));
|
||||
lgt.setAttributeValue("PICCONTACT_PHONE",GpsConfig.get(0).get("CONTACT_PHONE"));
|
||||
@ -523,6 +550,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
gpsC.setFlowUnid(flowunid);
|
||||
gpsC.setProjectId(projectId);
|
||||
gpsC.setUserId(userid);
|
||||
gpsC.setSource(fieldMap.get("SOURCE").toString());
|
||||
String message = gpsC.createOrder(tx);
|
||||
if("提交成功!".equals(message)){
|
||||
body.put("statusCode", "00");
|
||||
@ -557,6 +585,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
gpsC.setTableName("LM_GPS_ORDER_TEMP");
|
||||
gpsC.setOrderNo(gpslgot.getAttribute("ORDER_NO").getString());
|
||||
gpsC.setVin(gpslgot.getAttribute("CAR_VIN").getString());
|
||||
gpsC.setSource(gpslgot.getAttribute("SOURCE").getString());
|
||||
String queryOrder = gpsC.queryOrder(tx);
|
||||
body.put("statusCode", "00");
|
||||
body.put("msg", queryOrder);
|
||||
@ -589,8 +618,6 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
String address_detail = fieldMap.get("ADDRESS_DETAIL") == null ? "" : fieldMap.get("ADDRESS_DETAIL").toString();//详细地址
|
||||
String wired_num = fieldMap.get("WIRED_NUM") == null ? "" : fieldMap.get("WIRED_NUM").toString();//有线设备数量
|
||||
String wireless_num = fieldMap.get("WIRELESS_NUM") == null ? "" : fieldMap.get("WIRELESS_NUM").toString();//无线设备数量
|
||||
|
||||
|
||||
BizObjectManager lgtManage = JBOFactory.getFactory().getManager(LM_GPS_ORDER_TEMP.CLASS_NAME,tx);
|
||||
BizObject gpslgot =lgtManage.createQuery(" flowunid=:flowunid ").setParameter("flowunid", flowunid).getSingleResult(true);
|
||||
GpsController gpsC = new GpsController();
|
||||
@ -608,7 +635,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
params.append("@"+wireless_num);
|
||||
params.append("@"+gpslgot.getAttribute("WIRELESS_PERIOD"));
|
||||
params.append("@"+gpslgot.getAttribute("CAR_ACCOUNT"));
|
||||
|
||||
|
||||
gpsC.setApplyNo(gpslgot.getAttribute("APPLY_NO").getString());
|
||||
gpsC.setProjectId(gpslgot.getAttribute("PROJECT_ID").getString());
|
||||
gpsC.setUserId(userid);
|
||||
@ -631,7 +658,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
body.put("statusCode", "01");
|
||||
body.put("msg", alterOrder);
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
body.put("statusCode", "01");
|
||||
body.put("msg", checkGPSStatus);
|
||||
@ -656,12 +683,13 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
if("true".equals(checkGPSStatus)){
|
||||
BizObject gpslgot = this.gpsBizObject(flowunid);
|
||||
GpsController gpsC = new GpsController();
|
||||
|
||||
|
||||
gpsC.setApplyNo(gpslgot.getAttribute("APPLY_NO").getString());
|
||||
gpsC.setProjectId(gpslgot.getAttribute("PROJECT_ID").getString());
|
||||
gpsC.setUserId(userid);
|
||||
gpsC.setFlowUnid(flowunid);
|
||||
|
||||
gpsC.setSource(gpslgot.getAttribute("SOURCE").getString());
|
||||
|
||||
String cancelOrder = gpsC.cancelOrder(tx);
|
||||
body.put("statusCode", "00");
|
||||
body.put("msg", cancelOrder);
|
||||
@ -684,16 +712,16 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap"); // 参数
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
String flowunid = fieldMap.get("flowunid") == null ? "" : fieldMap.get("flowunid").toString();
|
||||
|
||||
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
RestfullConstant.baseProperty.get("success").toString(), "");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
|
||||
public BizObject gpsBizObject(String flowunid) throws Exception{
|
||||
BizObjectManager lgtManage = JBOFactory.getFactory().getManager(LM_GPS_ORDER_TEMP.CLASS_NAME);
|
||||
return lgtManage.createQuery(" flowunid=:flowunid ").setParameter("flowunid", flowunid).getSingleResult(true);
|
||||
|
||||
|
||||
}
|
||||
public String checkGPSStatus(String flowUnid) throws Exception{
|
||||
String message = "true";
|
||||
@ -705,12 +733,12 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
if("7".equals(gpsStatus)){
|
||||
message = "请先提交工单!";
|
||||
}else{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> isGPS(HttpServletRequest request,
|
||||
HttpServletResponse response, JBOTransaction tx, Transaction sqlca,
|
||||
@ -734,16 +762,16 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
ReturnMapUtil.setReturnMap(null,
|
||||
RestfullConstant.baseProperty.get("fail").toString(), "没有查询到对应的流程实例!");
|
||||
}
|
||||
|
||||
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
|
||||
public void savaBankCardFile(String projectId,String applyFlow,List<Map<String, Object>> fileList,ASUser user,JBOTransaction tx) throws Exception{
|
||||
BizObjectManager relaManage = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME);
|
||||
BizObject rela = null;
|
||||
if("BusinessApplyApply".equals(applyFlow)||"BusinessChangeApply".equals(applyFlow)||"BusinessCancelApply".equals(applyFlow)||"BContractApproveApply".equals(applyFlow)||"BContractCancelApply".equals(applyFlow)||"BContractChangeApply".equals(applyFlow)){
|
||||
rela = relaManage.createQuery(" objecttype='BusinessApplyFlow' AND proj_id=:projectId ").setParameter("projectId", projectId).getSingleResult(false);
|
||||
|
||||
|
||||
}else{
|
||||
rela = relaManage.createQuery(" objecttype=:objecttype AND proj_id=:projectId ").setParameter("objecttype", applyFlow).setParameter("projectId", projectId).getSingleResult(false);
|
||||
}
|
||||
@ -774,14 +802,14 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
attr.setAttributeValue("InputOrgId", user.getOrgID());
|
||||
attr.setAttributeValue("InputTime",StringFunction.getTodayNow());
|
||||
attr.setAttributeValue("objectType", applyFlow);
|
||||
|
||||
|
||||
//得到不带路径的文件名
|
||||
String sFileName = StringFunction.getFileName(file.get("fileName").toString());
|
||||
sFileName = URLDecoder.decode(URLDecoder.decode(sFileName,"UTF-8"),"UTF-8");
|
||||
|
||||
sFileName = URLDecoder.decode(URLDecoder.decode(sFileName,"UTF-8"),"UTF-8");
|
||||
|
||||
//定义数据库操作变量
|
||||
String sFileSavePath = CurConfig.getConfigure("FileSavePath");
|
||||
|
||||
|
||||
String uuid=java.util.UUID.randomUUID().toString().replaceAll("-", "");
|
||||
String sFullPath =com.tenwa.officetempalte.util.FileOperatorUtil.getuploadFileDir(sFileSavePath) +uuid+"_"+sFileName;
|
||||
InputStream is = (InputStream) file.get("file");
|
||||
@ -794,10 +822,10 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
int i = is.read(b, 0, Integer.valueOf(sFileSize) - 1);
|
||||
fileout.write(b, 0, b.length); // 将文件数据存盘
|
||||
fileout.close();
|
||||
|
||||
|
||||
//得到带相对路径的文件名
|
||||
String sFilePath = sFullPath.replace(sFileSavePath, "");
|
||||
attr.setAttributeValue("FilePath",sFilePath);
|
||||
attr.setAttributeValue("FilePath",sFilePath);
|
||||
attr.setAttributeValue("FullPath",sFullPath);
|
||||
attr.setAttributeValue("Content_Type", isImage(f,file.get("fileContentType")));
|
||||
attr.setAttributeValue("FileSize", file.get("fileSize"));
|
||||
@ -808,7 +836,7 @@ public class FlowDataServiceImpl implements FlowDataService{
|
||||
String time = StringFunction.getTodayNow();
|
||||
DocLibraryStateUpdate.update(libraryId, "1", user, time, tx);
|
||||
}
|
||||
|
||||
|
||||
public Object isImage(File file,Object object) throws Exception{
|
||||
String reg = "(mp4|flv|avi|rm|rmvb|wmv)";
|
||||
Pattern p = Pattern.compile(reg);
|
||||
|
||||
@ -22,7 +22,7 @@ public interface LM_GPS_ORDER{
|
||||
*/
|
||||
public static final String APPLY_NO = "APPLY_NO";
|
||||
/**
|
||||
* 묏데긍뵀 STRING(32)<br>
|
||||
* 工单编号 STRING(40)<br>
|
||||
*/
|
||||
public static final String ORDER_NO = "ORDER_NO";
|
||||
/**
|
||||
@ -98,6 +98,26 @@ public interface LM_GPS_ORDER{
|
||||
*/
|
||||
public static final String FLOWUNID = "FLOWUNID";
|
||||
/**
|
||||
* 车型 STRING(100)<br>
|
||||
*/
|
||||
public static final String CARTYPE = "CARTYPE";
|
||||
/**
|
||||
* 车主名称 STRING(32)<br>
|
||||
*/
|
||||
public static final String USERNAME = "USERNAME";
|
||||
/**
|
||||
* 车主电话 STRING(11)<br>
|
||||
*/
|
||||
public static final String USERPHONE = "USERPHONE";
|
||||
/**
|
||||
* 安装店面 STRING(100)<br>
|
||||
*/
|
||||
public static final String SHOPNAME = "SHOPNAME";
|
||||
/**
|
||||
* GPS来源 STRING(10)<br>
|
||||
*/
|
||||
public static final String SOURCE = "SOURCE";
|
||||
/**
|
||||
* 录入时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String INPUTTIME = "INPUTTIME";
|
||||
|
||||
@ -22,7 +22,7 @@ public interface LM_GPS_ORDER_TEMP{
|
||||
*/
|
||||
public static final String APPLY_NO = "APPLY_NO";
|
||||
/**
|
||||
* 묏데긍뵀 STRING(32)<br>
|
||||
* 工单编号 STRING(40)<br>
|
||||
*/
|
||||
public static final String ORDER_NO = "ORDER_NO";
|
||||
/**
|
||||
@ -98,6 +98,26 @@ public interface LM_GPS_ORDER_TEMP{
|
||||
*/
|
||||
public static final String FLOWUNID = "FLOWUNID";
|
||||
/**
|
||||
* 车型 STRING(100)<br>
|
||||
*/
|
||||
public static final String CARTYPE = "CARTYPE";
|
||||
/**
|
||||
* 车主名称 STRING(32)<br>
|
||||
*/
|
||||
public static final String USERNAME = "USERNAME";
|
||||
/**
|
||||
* 车主电话 STRING(11)<br>
|
||||
*/
|
||||
public static final String USERPHONE = "USERPHONE";
|
||||
/**
|
||||
* 安装店面 STRING(100)<br>
|
||||
*/
|
||||
public static final String SHOPNAME = "SHOPNAME";
|
||||
/**
|
||||
* GPS来源 STRING(10)<br>
|
||||
*/
|
||||
public static final String SOURCE = "SOURCE";
|
||||
/**
|
||||
* 录入时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String INPUTTIME = "INPUTTIME";
|
||||
|
||||
27
src_tenwa/com/tenwa/apzl/comm/GpsEnum.java
Normal file
27
src_tenwa/com/tenwa/apzl/comm/GpsEnum.java
Normal file
@ -0,0 +1,27 @@
|
||||
package com.tenwa.apzl.comm;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2020/8/19.
|
||||
* gps 分类
|
||||
*/
|
||||
public enum GpsEnum {
|
||||
|
||||
TY("0","天易"),
|
||||
ZR("1","中瑞");
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
GpsEnum(String code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@ -1,203 +1,270 @@
|
||||
package com.tenwa.gps;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.awe.util.ASResultSet;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.httpclient.resources.GPSConfigure;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class GpsCommon {
|
||||
|
||||
private static String TYuserAccount = GPSConfigure.get("TYuserAccount");
|
||||
private static String TYtoken = GPSConfigure.get("TYtoken");
|
||||
private static String TYsign = GPSConfigure.get("TYsign");
|
||||
private static String TYsign2 = GPSConfigure.get("TYsign2");
|
||||
/**
|
||||
*
|
||||
* 天易--编辑新增工单请求参数
|
||||
* @param flowUnid
|
||||
* @param applyNo
|
||||
* @param tx
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String tyEditCreateParameter(String applyNo,Transaction Sqlca) throws Exception{
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject("select CONTACT_NAME,CONTACT_PHONE,PICCONTACT_NAME,PICCONTACT_PHONE,INSTALL_TIME,ADDRESS_CODE,ADDRESS_DETAIL,CAR_VIN,WIRED_NUM,WIRED_PERIOD,WIRELESS_NUM,WIRELESS_PERIOD,CAR_ACCOUNT from LM_GPS_ORDER_TEMP where APPLY_NO='"+applyNo+"'"));
|
||||
JSONObject params = new JSONObject();
|
||||
while(res.next()){
|
||||
params.put("userAccount",TYuserAccount);
|
||||
params.put("token",TYtoken);
|
||||
params.put("sign",TYsign);
|
||||
params.put("applyNo",applyNo);
|
||||
params.put("contactName",res.getString("CONTACT_NAME"));
|
||||
params.put("contactPhone",res.getString("CONTACT_PHONE"));
|
||||
params.put("piccontactName",res.getString("PICCONTACT_NAME"));
|
||||
params.put("piccontactPhone",res.getString("PICCONTACT_PHONE"));
|
||||
params.put("installtime",res.getString("INSTALL_TIME"));
|
||||
params.put("addressCode",res.getString("ADDRESS_CODE"));
|
||||
params.put("addressDetail",res.getString("ADDRESS_DETAIL"));
|
||||
params.put("carVin",res.getString("CAR_VIN"));
|
||||
params.put("wiredNum",res.getString("WIRED_NUM"));
|
||||
params.put("wiredPeriod",res.getString("WIRED_PERIOD"));
|
||||
params.put("wirelessNum",res.getString("WIRELESS_NUM"));
|
||||
params.put("wirelessPeriod",res.getString("WIRELESS_PERIOD"));
|
||||
params.put("carAccount",res.getString("CAR_ACCOUNT"));
|
||||
}
|
||||
res.close();
|
||||
return params.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 天易--编辑修改工单请求参数
|
||||
* @param applyNo
|
||||
* @param params
|
||||
* @param sqlca
|
||||
* @return
|
||||
*/
|
||||
public static String tyEditAlterParameter(String applyNo, String params,Transaction sqlca) {
|
||||
String [] paramArr = params.split("@");
|
||||
int i=0;
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("userAccount",TYuserAccount);
|
||||
json.put("token",TYtoken);
|
||||
json.put("sign",TYsign);
|
||||
json.put("applyNo",applyNo);
|
||||
json.put("contactName",paramArr[i++]);
|
||||
json.put("contactPhone",paramArr[i++]);
|
||||
json.put("piccontactName",paramArr[i++]);
|
||||
json.put("piccontactPhone",paramArr[i++]);
|
||||
json.put("installtime",paramArr[i++]);
|
||||
json.put("addressCode",paramArr[i++]);
|
||||
json.put("addressDetail",paramArr[i++]);
|
||||
json.put("carVin",paramArr[i++]);
|
||||
json.put("wiredNum",paramArr[i++]);
|
||||
json.put("wiredPeriod",paramArr[i++]);
|
||||
json.put("wirelessNum",paramArr[i++]);
|
||||
json.put("wirelessPeriod",paramArr[i++]);
|
||||
json.put("carAccount",paramArr[i++]);
|
||||
return json.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 天易--编辑查询/取消工单请求参数
|
||||
* @param applyNo
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,String> tyEditQueryParameter(String applyNo){
|
||||
Map<String,String> params = new HashMap<String,String>();
|
||||
params.put("userAccount",TYuserAccount);
|
||||
params.put("token",TYtoken);
|
||||
params.put("sign",TYsign);
|
||||
params.put("applyNo",applyNo);
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 天易--编辑车架号查询工单请求参数
|
||||
* @param applyNo
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,String> tyEditQueryToVinParameter(String vin){
|
||||
Map<String,String> params = new HashMap<String,String>();
|
||||
params.put("userAccount",TYuserAccount);
|
||||
params.put("token",TYtoken);
|
||||
params.put("sign",TYsign2);
|
||||
params.put("carVin",vin);
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 天易--查询订单结果入表
|
||||
* @param tableName
|
||||
* @param flowUnid
|
||||
* @return
|
||||
* @throws JBOException
|
||||
*/
|
||||
public static String tyQueryDataPersistence(String data,String applyNo, String tableName,Transaction Sqlca) throws Exception{
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
String thisDate = sdf.format(new Date());
|
||||
String result = job.getString("result");
|
||||
if(!"0".equals(result)){
|
||||
Sqlca.executeSQL("update "+tableName+" set RESULT='"+result+"',MESSAGE='查询失败,"+job.getString("message")+"' where APPLY_NO='"+applyNo+"'");
|
||||
return job.getString("message");
|
||||
}
|
||||
String status = job.getJSONObject("data").getString("status");
|
||||
if("3".equals(status)){
|
||||
JSONArray terminals = job.getJSONObject("data").getJSONArray("terminal");
|
||||
Sqlca.executeSQL("delete from lm_gps_location where APPLY_NO='"+applyNo+"'");
|
||||
for(int i=0;i<terminals.size();i++){
|
||||
JSONObject terminal = terminals.getJSONObject(i);
|
||||
//定位信息入表
|
||||
Sqlca.executeSQL("insert into lm_gps_location(ID,APPLY_NO,MODEL,RUN_STATUS,STATUS,IMEI,CAR_VIN,RECEIVE_TIME,GPS_TIME,LNG,LAT,INPUTTIME) value(replace(uuid(),\"-\",\"\"),'"+applyNo+"','"+terminal.getString("model")+"','"+terminal.getString("runStatus")+"','"+terminal.getString("status")+"','"+terminal.getString("imei")
|
||||
+"','"+terminal.getString("carVin")+"','"+terminal.getString("receiveTime")+"','"+terminal.getString("gpsTime")+"','"+(terminal.containsKey("lng")?terminal.getString("lng"):"")+"','"+(terminal.containsKey("lat")?terminal.getString("lat"):"")+"','"+thisDate+"')");
|
||||
//安装图入表
|
||||
int number = Integer.valueOf(Sqlca.getString("select COUNT(1) as number from LM_GPS_PHOTO lgp where lgp.APPLY_NO='"+applyNo+"'"));
|
||||
if(number>0) continue;
|
||||
JSONArray photoMsgs = terminal.getJSONArray("photoMsg");
|
||||
for(int j=0;j<photoMsgs.size();j++){
|
||||
JSONObject photoMsg = photoMsgs.getJSONObject(j);
|
||||
Sqlca.executeSQL("insert into LM_GPS_PHOTO value(replace(uuid(),\"-\",\"\"),'"+applyNo+"','"+photoMsg.getString("photoId")+"','"+photoMsg.getString("url")+"','"+thisDate+"')");
|
||||
}
|
||||
}
|
||||
}
|
||||
Sqlca.executeSQL("update "+tableName+" set RESULT='"+result+"',STATUS='"+status+"',MESSAGE='查询成功' where APPLY_NO='"+applyNo+"'");
|
||||
return "查询成功!";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 天易--根据车架查询订单结果解析
|
||||
* @param tableName
|
||||
* @param flowUnid
|
||||
* @return
|
||||
* @throws JBOException
|
||||
*/
|
||||
public static boolean tyQueryToVinDataPersistence(String data,Transaction Sqlca) throws Exception{
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
String result = job.getString("result");
|
||||
if(!"0".equals(result)){
|
||||
System.err.println("********************result****************");
|
||||
System.err.println(result);
|
||||
System.err.println("********************result****************");
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean startUsing = true;
|
||||
JSONArray dataArr = job.getJSONArray("data");
|
||||
for(int i=0;i<dataArr.size();i++){
|
||||
Sqlca.executeSQL("update lm_gps_location set SPD='"+dataArr.getJSONObject(i).getString("spd")+"',DIR='"+dataArr.getJSONObject(i).getString("dir")+"',LOCATE_TYPE='"+dataArr.getJSONObject(i).getString("locateType")+"',STATUS_USING='"+dataArr.getJSONObject(i).getString("status")+"' where IMEI='"+dataArr.getJSONObject(i).getString("imei")+"'");
|
||||
if("0".equals(dataArr.getJSONObject(i).getString("status"))){
|
||||
System.err.println("********************status****************");
|
||||
System.err.println(dataArr.getJSONObject(i).getString("status"));
|
||||
System.err.println("********************status****************");
|
||||
startUsing = false;
|
||||
}
|
||||
}
|
||||
return startUsing;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 调用日志
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void callRecord(Map<String,String> params,Transaction Sqlca) throws Exception{
|
||||
Sqlca.executeSQL(" insert into lm_gps_log values(replace(uuid(),\"-\",\"\"),'"+params.get("UPLOAD_PARAMETER")+"','"+params.get("RETURN_PARAMETER")+"',DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'"+params.get("CALL_USERID")+"','"+params.get("FLOWUNID")+"','"+params.get("PROJECT_ID")+"','"+params.get("URL")+"','"+params.get("CALL_PURPOSE")+"','"+params.get("CALL_STATUS")+"')");
|
||||
}
|
||||
|
||||
private static String TYuserAccount = GPSConfigure.get("TYuserAccount");
|
||||
private static String TYtoken = GPSConfigure.get("TYtoken");
|
||||
private static String TYsign = GPSConfigure.get("TYsign");
|
||||
private static String TYsign2 = GPSConfigure.get("TYsign2");
|
||||
|
||||
/**
|
||||
* 天易--编辑新增工单请求参数
|
||||
*
|
||||
* @param flowUnid
|
||||
* @param applyNo
|
||||
* @param tx
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String tyEditCreateParameter(String applyNo, Transaction Sqlca) throws Exception {
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject("select CONTACT_NAME,CONTACT_PHONE,PICCONTACT_NAME,PICCONTACT_PHONE,INSTALL_TIME,ADDRESS_CODE,ADDRESS_DETAIL,CAR_VIN,WIRED_NUM,WIRED_PERIOD,WIRELESS_NUM,WIRELESS_PERIOD,CAR_ACCOUNT from LM_GPS_ORDER_TEMP where APPLY_NO ='" + applyNo + "'"));
|
||||
JSONObject params = new JSONObject();
|
||||
if (res.next()) {
|
||||
params.put("userAccount", TYuserAccount);
|
||||
params.put("token", TYtoken);
|
||||
params.put("sign", TYsign);
|
||||
params.put("applyNo", applyNo);
|
||||
params.put("contactName", res.getString("CONTACT_NAME"));
|
||||
params.put("contactPhone", res.getString("CONTACT_PHONE"));
|
||||
params.put("piccontactName", res.getString("PICCONTACT_NAME"));
|
||||
params.put("piccontactPhone", res.getString("PICCONTACT_PHONE"));
|
||||
params.put("installtime", res.getString("INSTALL_TIME"));
|
||||
params.put("addressCode", res.getString("ADDRESS_CODE"));
|
||||
params.put("addressDetail", res.getString("ADDRESS_DETAIL"));
|
||||
params.put("carVin", res.getString("CAR_VIN"));
|
||||
params.put("wiredNum", res.getString("WIRED_NUM"));
|
||||
params.put("wiredPeriod", res.getString("WIRED_PERIOD"));
|
||||
params.put("wirelessNum", res.getString("WIRELESS_NUM"));
|
||||
params.put("wirelessPeriod", res.getString("WIRELESS_PERIOD"));
|
||||
params.put("carAccount", res.getString("CAR_ACCOUNT"));
|
||||
}
|
||||
res.close();
|
||||
return params.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 天易--编辑修改工单请求参数
|
||||
*
|
||||
* @param applyNo
|
||||
* @param params
|
||||
* @param sqlca
|
||||
* @return
|
||||
*/
|
||||
public static String tyEditAlterParameter(String applyNo, String params, Transaction sqlca) {
|
||||
String[] paramArr = params.split("@");
|
||||
int i = 0;
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("userAccount", TYuserAccount);
|
||||
json.put("token", TYtoken);
|
||||
json.put("sign", TYsign);
|
||||
json.put("applyNo", applyNo);
|
||||
json.put("contactName", paramArr[i++]);
|
||||
json.put("contactPhone", paramArr[i++]);
|
||||
json.put("piccontactName", paramArr[i++]);
|
||||
json.put("piccontactPhone", paramArr[i++]);
|
||||
json.put("installtime", paramArr[i++]);
|
||||
json.put("addressCode", paramArr[i++]);
|
||||
json.put("addressDetail", paramArr[i++]);
|
||||
json.put("carVin", paramArr[i++]);
|
||||
json.put("wiredNum", paramArr[i++]);
|
||||
json.put("wiredPeriod", paramArr[i++]);
|
||||
json.put("wirelessNum", paramArr[i++]);
|
||||
json.put("wirelessPeriod", paramArr[i++]);
|
||||
json.put("carAccount", paramArr[i++]);
|
||||
return json.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 天易--编辑查询/取消工单请求参数
|
||||
*
|
||||
* @param applyNo
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> tyEditQueryParameter(String applyNo) {
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("userAccount", TYuserAccount);
|
||||
params.put("token", TYtoken);
|
||||
params.put("sign", TYsign);
|
||||
params.put("applyNo", applyNo);
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
* 天易--编辑车架号查询工单请求参数
|
||||
*
|
||||
* @param applyNo
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> tyEditQueryToVinParameter(String vin) {
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("userAccount", TYuserAccount);
|
||||
params.put("token", TYtoken);
|
||||
params.put("sign", TYsign2);
|
||||
params.put("carVin", vin);
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
* 天易--查询订单结果入表
|
||||
*
|
||||
* @param tableName
|
||||
* @param flowUnid
|
||||
* @return
|
||||
* @throws JBOException
|
||||
*/
|
||||
public static String tyQueryDataPersistence(String data, String applyNo, String tableName, Transaction Sqlca) throws Exception {
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
String thisDate = sdf.format(new Date());
|
||||
String result = job.getString("result");
|
||||
if (!"0".equals(result)) {
|
||||
Sqlca.executeSQL("update " + tableName + " set RESULT='" + result + "',MESSAGE='查询失败," + job.getString("message") + "' where APPLY_NO='" + applyNo + "'");
|
||||
return job.getString("message");
|
||||
}
|
||||
String status = job.getJSONObject("data").getString("status");
|
||||
if ("3".equals(status)) {
|
||||
JSONArray terminals = job.getJSONObject("data").getJSONArray("terminal");
|
||||
Sqlca.executeSQL("delete from lm_gps_location where APPLY_NO='" + applyNo + "'");
|
||||
for (int i = 0; i < terminals.size(); i++) {
|
||||
JSONObject terminal = terminals.getJSONObject(i);
|
||||
//定位信息入表
|
||||
Sqlca.executeSQL("insert into lm_gps_location(ID,APPLY_NO,MODEL,RUN_STATUS,STATUS,IMEI,CAR_VIN,RECEIVE_TIME,GPS_TIME,LNG,LAT,INPUTTIME) value(replace(uuid(),\"-\",\"\"),'" + applyNo + "','" + terminal.getString("model") + "','" + terminal.getString("runStatus") + "','" + terminal.getString("status") + "','" + terminal.getString("imei") + "','" + terminal.getString("carVin") + "','" + terminal.getString("receiveTime") + "','" + terminal.getString("gpsTime") + "','" + (terminal.containsKey("lng") ? terminal.getString("lng") : "") + "','" + (terminal.containsKey("lat") ? terminal.getString("lat") : "") + "','" + thisDate + "')");
|
||||
//安装图入表
|
||||
int number = Integer.valueOf(Sqlca.getString("select COUNT(1) as number from LM_GPS_PHOTO lgp where lgp.APPLY_NO='" + applyNo + "'"));
|
||||
if (number > 0) continue;
|
||||
JSONArray photoMsgs = terminal.getJSONArray("photoMsg");
|
||||
for (int j = 0; j < photoMsgs.size(); j++) {
|
||||
JSONObject photoMsg = photoMsgs.getJSONObject(j);
|
||||
Sqlca.executeSQL("insert into LM_GPS_PHOTO value(replace(uuid(),\"-\",\"\"),'" + applyNo + "','" + photoMsg.getString("photoId") + "','" + photoMsg.getString("url") + "','" + thisDate + "')");
|
||||
}
|
||||
}
|
||||
}
|
||||
Sqlca.executeSQL("update " + tableName + " set RESULT='" + result + "',STATUS='" + status + "',MESSAGE='查询成功' where APPLY_NO='" + applyNo + "'");
|
||||
return "查询成功!";
|
||||
}
|
||||
|
||||
/**
|
||||
* 天易--根据车架查询订单结果解析
|
||||
*
|
||||
* @param tableName
|
||||
* @param flowUnid
|
||||
* @return
|
||||
* @throws JBOException
|
||||
*/
|
||||
public static boolean tyQueryToVinDataPersistence(String data, Transaction Sqlca) throws Exception {
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
String result = job.getString("result");
|
||||
if (!"0".equals(result)) {
|
||||
System.err.println("********************result****************");
|
||||
System.err.println(result);
|
||||
System.err.println("********************result****************");
|
||||
return false;
|
||||
}
|
||||
boolean startUsing = true;
|
||||
JSONArray dataArr = job.getJSONArray("data");
|
||||
for (int i = 0; i < dataArr.size(); i++) {
|
||||
Sqlca.executeSQL("update lm_gps_location set SPD='" + dataArr.getJSONObject(i).getString("spd") + "',DIR='" + dataArr.getJSONObject(i).getString("dir") + "',LOCATE_TYPE='" + dataArr.getJSONObject(i).getString("locateType") + "',STATUS_USING='" + dataArr.getJSONObject(i).getString("status") + "' where IMEI='" + dataArr.getJSONObject(i).getString("imei") + "'");
|
||||
if ("0".equals(dataArr.getJSONObject(i).getString("status"))) {
|
||||
System.err.println("********************status****************");
|
||||
System.err.println(dataArr.getJSONObject(i).getString("status"));
|
||||
System.err.println("********************status****************");
|
||||
startUsing = false;
|
||||
}
|
||||
}
|
||||
return startUsing;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 中瑞--新增工单请求参数
|
||||
*
|
||||
* @param flowUnid
|
||||
* @param applyNo
|
||||
* @param tx
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String zrEditCreateParameter(String applyNo, Transaction Sqlca) throws Exception {
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject("select CAR_VIN,ADDRESS_CODE,SHOPNAME,CONTACT_NAME,CONTACT_PHONE,INSTALL_TIME,ADDRESS_DETAIL,CARTYPE,USERNAME,USERPHONE from LM_GPS_ORDER_TEMP where APPLY_NO='" + applyNo + "'"));
|
||||
JSONObject params = new JSONObject();
|
||||
while (res.next()) {
|
||||
params.put("AppCode", applyNo);
|
||||
params.put("ProductId", GPSConfigure.get("ZR_ProfuctId"));
|
||||
params.put("VIN", res.getString("CAR_VIN"));
|
||||
params.put("DistrictCode", res.getString("ADDRESS_CODE"));
|
||||
params.put("ShopName", res.getString("SHOPNAME"));
|
||||
params.put("LinkMan", res.getString("CONTACT_NAME"));
|
||||
params.put("LinkPhone", res.getString("CONTACT_PHONE"));
|
||||
params.put("InstallTime", res.getString("INSTALL_TIME"));
|
||||
params.put("InstallAdd", res.getString("ADDRESS_DETAIL"));
|
||||
params.put("CarType", res.getString("CARTYPE"));
|
||||
params.put("UserName", res.getString("USERNAME"));
|
||||
params.put("UserPhone", res.getString("USERPHONE"));
|
||||
}
|
||||
res.close();
|
||||
return params.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 中瑞--车架号查询工单请求参数
|
||||
*
|
||||
* @param applyNo
|
||||
* @return
|
||||
*/
|
||||
public static boolean zrQueryToVinDataPersistence(String data, String vin, Transaction Sqlca) throws Exception {
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
boolean startUsing = job.getBoolean("Success");
|
||||
if (!startUsing) {
|
||||
System.err.println("********************AllMessages****************");
|
||||
System.err.println(job.getString("AllMessages"));
|
||||
System.err.println("********************AllMessages****************");
|
||||
return false;
|
||||
}
|
||||
//有GPS终端设备运行异常
|
||||
if (!job.getJSONObject("Data").getBoolean("allnormal")) {
|
||||
startUsing = false;
|
||||
}
|
||||
JSONArray dataArr = job.getJSONObject("Data").getJSONArray("postions");
|
||||
Sqlca.executeSQL("delete from lm_gps_location where car_vin = '" + vin + "'");
|
||||
StringBuilder sb = new StringBuilder("insert into lm_gps_location (ID,APPLY_NO,MODEL,RUN_STATUS,IMEI,CAR_VIN,GPS_TIME,LNG,LAT,LOCATE_TYPE,INPUTTIME) values ");
|
||||
String insertVal = null;
|
||||
for (int i = 0; i < dataArr.size(); i++) {
|
||||
job = dataArr.getJSONObject(i);
|
||||
if (i > 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
insertVal = "replace(uuid(),'-',''),'" + job.getString("appcode") + "','"+job.getString("flag")+"','" + job.getString("sbcstatus") + "'"
|
||||
+ ",'" + job.getString("imei") + "','" + job.getString("vin") + "','" + job.getString("locationTime") + "'"
|
||||
+ ",'" + job.getString("lng") + "','" + job.getString("lat") + "','" + job.getString("LocateMode") + "',date_format(now(),'%Y/%m/%d %H:%i:%s')";
|
||||
sb.append("(").append(insertVal).append(")");
|
||||
}
|
||||
if (insertVal != null) Sqlca.executeSQL(sb.toString());
|
||||
if (startUsing)Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='0',STATUS='3',MESSAGE='查询成功' where CAR_VIN='" + vin + "'");
|
||||
return startUsing;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 调用日志
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void callRecord(Map<String, String> params, Transaction Sqlca) throws Exception {
|
||||
Sqlca.executeSQL(" insert into lm_gps_log values(replace(uuid(),\"-\",\"\"),'" + params.get("UPLOAD_PARAMETER") + "','" + params.get("RETURN_PARAMETER") + "',DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'" + params.get("CALL_USERID") + "','" + params.get("FLOWUNID") + "','" + params.get("PROJECT_ID") + "','" + params.get("URL") + "','" + params.get("CALL_PURPOSE") + "','" + params.get("CALL_STATUS") + "')");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,329 +1,418 @@
|
||||
package com.tenwa.gps;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.sf.json.JSONObject;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.lang.StringX;
|
||||
import com.amarsoft.awe.util.ASResultSet;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.tenwa.apzl.comm.GpsEnum;
|
||||
import com.tenwa.httpclient.resources.GPSConfigure;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class GpsController {
|
||||
|
||||
private String applyNo;
|
||||
private String orderNo;
|
||||
private String flowUnid;
|
||||
private String tableName;
|
||||
private String vin;
|
||||
private String projectId;
|
||||
private String userId;
|
||||
private String params;
|
||||
|
||||
public String getParams() {
|
||||
return params;
|
||||
}
|
||||
private String applyNo;
|
||||
private String orderNo;
|
||||
private String flowUnid;
|
||||
private String tableName;
|
||||
private String vin;
|
||||
private String projectId;
|
||||
private String userId;
|
||||
private String params;
|
||||
private String source;
|
||||
|
||||
public void setParams(String params) {
|
||||
this.params = params;
|
||||
}
|
||||
/**
|
||||
* 新增工单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public String createOrder(JBOTransaction tx) throws Exception {
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
String url, params, tips = null;
|
||||
Map<String, String> header = null;
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
url = GPSConfigure.get("ZR_create_url");
|
||||
params = GpsCommon.zrEditCreateParameter(applyNo, Sqlca);
|
||||
header = ImmutableMap.of("appKey", GPSConfigure.get("ZR_AppKey"));
|
||||
tips = GpsEnum.ZR.getName();
|
||||
} else {
|
||||
url = GPSConfigure.get("TYUrl");
|
||||
params = GpsCommon.tyEditCreateParameter(applyNo, Sqlca);
|
||||
tips = GpsEnum.TY.getName();
|
||||
}
|
||||
if (url == null || params == null) return "组装请求工单信息失败,联系管理员!";
|
||||
System.err.println("***************" + tips + "--新增工单上传参数*****************");
|
||||
System.err.println(params);
|
||||
System.err.println("***************" + tips + "--新增工单上传参数*****************");
|
||||
Map<String, String> resultMap = HttpClientSUtil.doPostJson(url, params, header);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************" + tips + "--新增返回上传参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************" + tips + "--新增返回上传参数*****************");
|
||||
//日志参数
|
||||
Map<String, String> logMap = new HashMap<String, String>();
|
||||
logMap.put("URL", url);
|
||||
logMap.put("UPLOAD_PARAMETER", params);
|
||||
logMap.put("RETURN_PARAMETER", data);
|
||||
logMap.put("CALL_USERID", userId);
|
||||
logMap.put("FLOWUNID", flowUnid);
|
||||
logMap.put("PROJECT_ID", projectId);
|
||||
logMap.put("CALL_PURPOSE", tips + "--新增工单");
|
||||
logMap.put("CALL_STATUS", resultMap.get("status"));//http请求状态
|
||||
//添加日志记录
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
String result = null;
|
||||
boolean orderStatus = false;//订单是否成功状态
|
||||
String orderNo = "";//工单ID
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
orderStatus = job.getBoolean("Success");
|
||||
result = orderStatus ? "0" : "9";
|
||||
if(orderStatus){
|
||||
orderNo = job.getJSONObject("Data").getString("Id");
|
||||
}
|
||||
} else {
|
||||
result = job.getString("result");
|
||||
orderStatus = !StringX.isSpace(result) && "0".equals(result) ? true : false;
|
||||
if(orderStatus){
|
||||
orderNo = job.getString("orderNo");
|
||||
}
|
||||
}
|
||||
if (orderStatus) {
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='" + result + "',ORDER_NO='" + orderNo + "',STATUS='8',MESSAGE='提交成功' where APPLY_NO='" + applyNo + "'");
|
||||
return "提交成功!";
|
||||
} else {
|
||||
String errorMsg = "新增工单失败,";
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
errorMsg += job.getString("AllMessages");
|
||||
} else {
|
||||
errorMsg += job.getString("message");
|
||||
}
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='" + result + "',MESSAGE='" + errorMsg + "' where APPLY_NO='" + applyNo + "'");
|
||||
return errorMsg;
|
||||
}
|
||||
}
|
||||
|
||||
public String getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
/**
|
||||
* 取消工单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public String cancelOrder(JBOTransaction tx) throws Exception {
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
String url, tips = null;
|
||||
Map<String, String> params = null;
|
||||
Map<String, String> header = null;
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
params = ImmutableMap.of("Appcode", applyNo);
|
||||
url = GPSConfigure.get("ZR_cancel_url");
|
||||
tips = GpsEnum.ZR.getName();
|
||||
header = ImmutableMap.of("appKey", GPSConfigure.get("ZR_AppKey"));
|
||||
} else {
|
||||
params = params = GpsCommon.tyEditQueryParameter(applyNo);
|
||||
url = GPSConfigure.get("TYUrl");
|
||||
tips = GpsEnum.TY.getName();
|
||||
}
|
||||
System.err.println("***************" + tips + "--取消工单URL*****************");
|
||||
System.err.println(url);
|
||||
System.err.println("***************" + tips + "--取消工单URL*****************");
|
||||
String params2 = JSON.toJSONString(params);
|
||||
System.err.println("***************" + tips + "--取消工单上传参数*****************");
|
||||
System.err.println(params2);
|
||||
System.err.println("***************" + tips + "--取消工单上传参数*****************");
|
||||
Map<String, String> resultMap = null;
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
resultMap = HttpClientSUtil.doPostJson(url, params2, header);
|
||||
}else{
|
||||
resultMap = HttpClientSUtil.doPatchJson(url, params2);
|
||||
}
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************" + tips + "--取消工单返回参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************" + tips + "--取消工单返回参数*****************");
|
||||
|
||||
public void setProjectId(String projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
Map<String, String> logMap = new HashMap<String, String>();
|
||||
logMap.put("URL", url);
|
||||
logMap.put("UPLOAD_PARAMETER", params.toString());
|
||||
logMap.put("RETURN_PARAMETER", data);
|
||||
logMap.put("CALL_USERID", userId);
|
||||
logMap.put("FLOWUNID", flowUnid);
|
||||
logMap.put("PROJECT_ID", projectId);
|
||||
logMap.put("CALL_PURPOSE", tips + "--取消工单");
|
||||
logMap.put("CALL_STATUS", resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
String result = null;
|
||||
boolean orderStatus = false;//订单是否成功状态
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
orderStatus = job.getBoolean("Success");
|
||||
result = orderStatus ? "0" : "9";
|
||||
} else {
|
||||
result = job.getString("result");
|
||||
orderStatus = !StringX.isSpace(result) && "0".equals(result) ? true : false;
|
||||
}
|
||||
if (orderStatus) {
|
||||
boolean succ = job.containsKey("success") ? job.getBoolean("success") : false;
|
||||
//中瑞或天易[succ=true]
|
||||
if (succ || GpsEnum.ZR.getCode().equals(source)) {
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='" + result + "',MESSAGE='取消成功' where APPLY_NO='" + applyNo + "'");
|
||||
return "取消成功!";
|
||||
} else {
|
||||
String orderStep = job.getString("orderStep");
|
||||
String itemname = Sqlca.getString("select cl.itemname from code_library cl where cl.codeno='gps_order_step' and cl.itemno='" + orderStep + "'");
|
||||
return "取消失败,当前订单状态为" + itemname;
|
||||
}
|
||||
} else {
|
||||
String errorMsg = "取消失败,";
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
errorMsg += job.getString("AllMessages");
|
||||
} else {
|
||||
errorMsg += job.getString("message");
|
||||
}
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='" + result + "',MESSAGE='" + errorMsg + "' where APPLY_NO='" + applyNo + "'");
|
||||
return errorMsg;
|
||||
}
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
/**
|
||||
* 根据车架号查询工单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean queryOrderToVin(Transaction Sqlca) throws Exception {
|
||||
String url, tips = null;
|
||||
Map<String, String> params = null;
|
||||
if(StringX.isSpace(source)) source = Sqlca.getString("select source from LM_GPS_ORDER_TEMP where FLOWUNID ='"+flowUnid+"'");
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
params = ImmutableMap.of("VIN", vin);
|
||||
url = GPSConfigure.get("ZR_query_url");
|
||||
tips = GpsEnum.ZR.getName();
|
||||
} else {
|
||||
params = GpsCommon.tyEditQueryToVinParameter(vin);
|
||||
url = GPSConfigure.get("TYQueryOrderToVin");
|
||||
tips = GpsEnum.TY.getName();
|
||||
}
|
||||
System.err.println("***************" + tips + "--根据车架号查询工单URL*****************");
|
||||
System.err.println(url);
|
||||
System.err.println("***************" + tips + "--根据车架号查询工单URL*****************");
|
||||
System.err.println("***************" + tips + "--根据车架号查询工单上传参数*****************");
|
||||
System.err.println(params);
|
||||
System.err.println("***************" + tips + "--根据车架号查询工单上传参数*****************");
|
||||
Map<String, String> resultMap = HttpClientSUtil.doGet(url, params, GpsEnum.ZR.getCode().equals(source) ? GPSConfigure.get("ZR_AppKey") : null);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************" + tips + "--根据车架号查询工单返回参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************" + tips + "--根据车架号查询工单返回参数*****************");
|
||||
//日志参数
|
||||
Map<String, String> logMap = new HashMap<String, String>();
|
||||
logMap.put("URL", url);
|
||||
logMap.put("UPLOAD_PARAMETER", params.toString());
|
||||
logMap.put("RETURN_PARAMETER", data);
|
||||
logMap.put("CALL_USERID", userId);
|
||||
logMap.put("FLOWUNID", flowUnid);
|
||||
logMap.put("PROJECT_ID", projectId);
|
||||
logMap.put("CALL_PURPOSE", tips + "--根据车架号查询工单");
|
||||
logMap.put("CALL_STATUS", resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
if (GpsEnum.ZR.getCode().equals(source)) {
|
||||
return GpsCommon.zrQueryToVinDataPersistence(data, vin, Sqlca);
|
||||
}
|
||||
return GpsCommon.tyQueryToVinDataPersistence(data, Sqlca);
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
/**
|
||||
* 根据申请编号查询工单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public String queryOrder(JBOTransaction tx) throws Exception {
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
if(GpsEnum.ZR.getCode().equals(source)){
|
||||
String result2 = queryOrderToVin(Sqlca) == true ? "查询成功!" : "查询失败!";
|
||||
return "车架号查询定位信息:" + result2;
|
||||
}
|
||||
String url = GPSConfigure.get("TYUrl") + "/" + orderNo + "," + applyNo;
|
||||
System.err.println("***************天易--根据申请编号查询工单URL*****************");
|
||||
System.err.println(url);
|
||||
System.err.println("***************天易--根据申请编号查询工单URL*****************");
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
Map<String, String> params = GpsCommon.tyEditQueryParameter(applyNo);
|
||||
System.err.println("***************天易--根据申请编号查询工单上传参数*****************");
|
||||
System.err.println(params);
|
||||
System.err.println("***************天易--根据申请编号查询工单上传参数*****************");
|
||||
|
||||
public String getApplyNo() {
|
||||
return applyNo;
|
||||
}
|
||||
Map<String, String> resultMap = HttpClientSUtil.doGet(url, params, null);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************天易--根据申请编号查询工单返回参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************天易--根据申请编号查询工单返回参数*****************");
|
||||
|
||||
public void setApplyNo(String applyNo) {
|
||||
this.applyNo = applyNo;
|
||||
}
|
||||
//日志参数
|
||||
Map<String, String> logMap = new HashMap<String, String>();
|
||||
logMap.put("URL", url);
|
||||
logMap.put("UPLOAD_PARAMETER", params.toString());
|
||||
logMap.put("RETURN_PARAMETER", data);
|
||||
logMap.put("CALL_USERID", userId);
|
||||
logMap.put("FLOWUNID", flowUnid);
|
||||
logMap.put("PROJECT_ID", projectId);
|
||||
logMap.put("CALL_PURPOSE", "天易--根据申请编号查询工单");
|
||||
logMap.put("CALL_STATUS", resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
String result1 = GpsCommon.tyQueryDataPersistence(data, applyNo, tableName, Sqlca);
|
||||
String result2 = queryOrderToVin(Sqlca) == true ? "查询成功!" : "查询失败!";
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getFlowUnid() {
|
||||
return flowUnid;
|
||||
}
|
||||
return "申请编号查询定位信息:" + result1 + ",车架号查询定位信息:" + result2;
|
||||
}
|
||||
|
||||
public void setFlowUnid(String flowUnid) {
|
||||
this.flowUnid = flowUnid;
|
||||
}
|
||||
/**
|
||||
* 天易--修改工单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public String alterOrder(JBOTransaction tx) throws Exception {
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
String url = GPSConfigure.get("TYUrl");
|
||||
String params = GpsCommon.tyEditAlterParameter(applyNo, this.params, Sqlca);
|
||||
System.err.println("***************天易--修改工单上传参数*****************");
|
||||
System.err.println(params);
|
||||
System.err.println("***************天易--修改工单上传参数*****************");
|
||||
|
||||
/**
|
||||
* 天易--新增工单
|
||||
* @throws Exception
|
||||
*/
|
||||
public String createOrder(JBOTransaction tx) throws Exception{
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
String url = GPSConfigure.get("TYUrl");
|
||||
String params = GpsCommon.tyEditCreateParameter(applyNo,Sqlca);
|
||||
System.err.println("***************天易--新增工单上传参数*****************");
|
||||
System.err.println(params);
|
||||
System.err.println("***************天易--新增工单上传参数*****************");
|
||||
Map<String,String> resultMap = HttpClientSUtil.doPostJson(url,params);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************天易--新增返回上传参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************天易--新增返回上传参数*****************");
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
String result = job.getString("result");
|
||||
//日志参数
|
||||
Map<String,String> logMap = new HashMap<String,String>();
|
||||
logMap.put("URL",url);
|
||||
logMap.put("UPLOAD_PARAMETER",params);
|
||||
logMap.put("RETURN_PARAMETER",data);
|
||||
logMap.put("CALL_USERID",userId);
|
||||
logMap.put("FLOWUNID",flowUnid);
|
||||
logMap.put("PROJECT_ID",projectId);
|
||||
logMap.put("CALL_PURPOSE","天易--新增工单");
|
||||
logMap.put("CALL_STATUS",resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
|
||||
if("0".equals(result)){
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='"+result+"',ORDER_NO='"+job.getString("orderNo")+"',STATUS='8',MESSAGE='提交成功' where APPLY_NO='"+applyNo+"'");
|
||||
return "提交成功!";
|
||||
}else{
|
||||
String message = job.getString("message");
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='"+result+"',MESSAGE='新增工单失败,"+message+"' where APPLY_NO='"+applyNo+"'");
|
||||
return StringUtils.isNotBlank(message) ? message:"提交失败!";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 天易--根据申请编号查询工单
|
||||
* @throws Exception
|
||||
*/
|
||||
public String queryOrder(JBOTransaction tx) throws Exception{
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
String url = GPSConfigure.get("TYUrl")+"/"+orderNo+","+applyNo;
|
||||
|
||||
System.err.println("***************天易--根据申请编号查询工单URL*****************");
|
||||
System.err.println(url);
|
||||
System.err.println("***************天易--根据申请编号查询工单URL*****************");
|
||||
|
||||
Map<String,String> params = GpsCommon.tyEditQueryParameter(applyNo);
|
||||
System.err.println("***************天易--根据申请编号查询工单上传参数*****************");
|
||||
System.err.println(params);
|
||||
System.err.println("***************天易--根据申请编号查询工单上传参数*****************");
|
||||
|
||||
Map<String,String> resultMap = HttpClientSUtil.doGet(url, params, null);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************天易--根据申请编号查询工单返回参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************天易--根据申请编号查询工单返回参数*****************");
|
||||
|
||||
//日志参数
|
||||
Map<String,String> logMap = new HashMap<String,String>();
|
||||
logMap.put("URL",url);
|
||||
logMap.put("UPLOAD_PARAMETER",params.toString());
|
||||
logMap.put("RETURN_PARAMETER",data);
|
||||
logMap.put("CALL_USERID",userId);
|
||||
logMap.put("FLOWUNID",flowUnid);
|
||||
logMap.put("PROJECT_ID",projectId);
|
||||
logMap.put("CALL_PURPOSE","天易--根据申请编号查询工单");
|
||||
logMap.put("CALL_STATUS",resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
|
||||
String result1 = GpsCommon.tyQueryDataPersistence(data,applyNo,tableName,Sqlca);
|
||||
String result2 = queryOrderToVin(Sqlca)==true?"查询成功!":"查询失败!";
|
||||
|
||||
return "申请编号查询定位信息:"+result1+",车架号查询定位信息:"+result2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 天易--根据车架号查询工单
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean queryOrderToVin(Transaction Sqlca) throws Exception {
|
||||
String url = GPSConfigure.get("TYQueryOrderToVin");
|
||||
|
||||
System.err.println("***************天易--根据车架号查询工单URL*****************");
|
||||
System.err.println(url);
|
||||
System.err.println("***************天易--根据车架号查询工单URL*****************");
|
||||
|
||||
Map<String,String> params = GpsCommon.tyEditQueryToVinParameter(vin);
|
||||
System.err.println("***************天易--根据车架号查询工单上传参数*****************");
|
||||
System.err.println(params);
|
||||
System.err.println("***************天易--根据车架号查询工单上传参数*****************");
|
||||
|
||||
Map<String,String> resultMap = HttpClientSUtil.doGet(url, params, null);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************天易--根据车架号查询工单返回参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************天易--根据车架号查询工单返回参数*****************");
|
||||
|
||||
//日志参数
|
||||
Map<String,String> logMap = new HashMap<String,String>();
|
||||
logMap.put("URL",url);
|
||||
logMap.put("UPLOAD_PARAMETER",params.toString());
|
||||
logMap.put("RETURN_PARAMETER",data);
|
||||
logMap.put("CALL_USERID",userId);
|
||||
logMap.put("FLOWUNID",flowUnid);
|
||||
logMap.put("PROJECT_ID",projectId);
|
||||
logMap.put("CALL_PURPOSE","天易--根据车架号查询工单");
|
||||
logMap.put("CALL_STATUS",resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
return GpsCommon.tyQueryToVinDataPersistence(data,Sqlca);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 天易--修改工单
|
||||
* @throws Exception
|
||||
*/
|
||||
public String alterOrder(JBOTransaction tx) throws Exception{
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
String url = GPSConfigure.get("TYUrl");
|
||||
String params = GpsCommon.tyEditAlterParameter(applyNo,this.params,Sqlca);
|
||||
System.err.println("***************天易--修改工单上传参数*****************");
|
||||
System.err.println(params);
|
||||
System.err.println("***************天易--修改工单上传参数*****************");
|
||||
|
||||
Map<String,String> resultMap = HttpClientSUtil.doPutJson(url, params);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************天易--修改工单返回参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************天易--修改工单返回参数*****************");
|
||||
|
||||
Map<String,String> logMap = new HashMap<String,String>();
|
||||
logMap.put("URL",url);
|
||||
logMap.put("UPLOAD_PARAMETER",params.toString());
|
||||
logMap.put("RETURN_PARAMETER",data);
|
||||
logMap.put("CALL_USERID",userId);
|
||||
logMap.put("FLOWUNID",flowUnid);
|
||||
logMap.put("PROJECT_ID",projectId);
|
||||
logMap.put("CALL_PURPOSE","天易--修改工单");
|
||||
logMap.put("CALL_STATUS",resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
String result = job.getString("result");
|
||||
if("0".equals(result)){
|
||||
String success = job.getString("success");
|
||||
if("true".equals(success)){
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='"+result+"',MESSAGE='修改成功' where APPLY_NO='"+applyNo+"'");
|
||||
return "修改成功!";
|
||||
}else{
|
||||
String orderStep = job.getString("orderStep");
|
||||
String itemname = Sqlca.getString("select cl.itemname from code_library cl where cl.codeno='gps_order_step' and cl.itemno='"+orderStep+"'");
|
||||
return "修改失败,当前订单状态为"+itemname;
|
||||
}
|
||||
}else{
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='"+result+"',MESSAGE='修改失败,"+job.getString("message")+"' where APPLY_NO='"+applyNo+"'");
|
||||
return "修改失败,"+job.getString("message");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 天易--取消工单
|
||||
* @throws Exception
|
||||
*/
|
||||
public String cancelOrder(JBOTransaction tx) throws Exception{
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
String url = GPSConfigure.get("TYUrl");
|
||||
System.err.println("***************天易--取消工单URL*****************");
|
||||
System.err.println(url);
|
||||
System.err.println("***************天易--取消工单URL*****************");
|
||||
|
||||
Map<String,String> params = GpsCommon.tyEditQueryParameter(applyNo);
|
||||
String params2 = JSON.toJSONString(params);
|
||||
System.err.println("***************天易--取消工单上传参数*****************");
|
||||
System.err.println(params2);
|
||||
System.err.println("***************天易--取消工单上传参数*****************");
|
||||
|
||||
Map<String,String> resultMap = HttpClientSUtil.doPatchJson(url, params2);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************天易--查询工单返回参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************天易--查询工单返回参数*****************");
|
||||
Map<String, String> resultMap = HttpClientSUtil.doPutJson(url, params);
|
||||
String data = resultMap.get("data");
|
||||
System.err.println("***************天易--修改工单返回参数*****************");
|
||||
System.err.println(data);
|
||||
System.err.println("***************天易--修改工单返回参数*****************");
|
||||
|
||||
Map<String,String> logMap = new HashMap<String,String>();
|
||||
logMap.put("URL",url);
|
||||
logMap.put("UPLOAD_PARAMETER",params.toString());
|
||||
logMap.put("RETURN_PARAMETER",data);
|
||||
logMap.put("CALL_USERID",userId);
|
||||
logMap.put("FLOWUNID",flowUnid);
|
||||
logMap.put("PROJECT_ID",projectId);
|
||||
logMap.put("CALL_PURPOSE","天易--取消工单");
|
||||
logMap.put("CALL_STATUS",resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
String result = job.getString("result");
|
||||
if("0".equals(result)){
|
||||
String success = job.getString("success");
|
||||
if("true".equals(success)){
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='"+result+"',MESSAGE='取消成功' where APPLY_NO='"+applyNo+"'");
|
||||
return "取消成功!";
|
||||
}else{
|
||||
String orderStep = job.getString("orderStep");
|
||||
String itemname = Sqlca.getString("select cl.itemname from code_library cl where cl.codeno='gps_order_step' and cl.itemno='"+orderStep+"'");
|
||||
return "取消失败,当前订单状态为"+itemname;
|
||||
}
|
||||
}else{
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='"+result+"',MESSAGE='取消失败,"+job.getString("message")+"' where APPLY_NO='"+applyNo+"'");
|
||||
return "取消失败,"+job.getString("message");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 天易--获取图片
|
||||
* @throws Exception
|
||||
*/
|
||||
public String getImage(JBOTransaction tx) throws Exception{
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject("SELECT url FROM lm_gps_photo WHERE apply_no='"+applyNo+"'"));
|
||||
StringBuffer strb = null;
|
||||
while(res.next()){
|
||||
if(strb==null){
|
||||
strb = new StringBuffer(res.getString("url"));
|
||||
}else{
|
||||
strb.append(","+res.getString("url"));
|
||||
}
|
||||
}
|
||||
res.close();
|
||||
if(strb==null)
|
||||
return "null";
|
||||
return strb.toString();
|
||||
}
|
||||
Map<String, String> logMap = new HashMap<String, String>();
|
||||
logMap.put("URL", url);
|
||||
logMap.put("UPLOAD_PARAMETER", params.toString());
|
||||
logMap.put("RETURN_PARAMETER", data);
|
||||
logMap.put("CALL_USERID", userId);
|
||||
logMap.put("FLOWUNID", flowUnid);
|
||||
logMap.put("PROJECT_ID", projectId);
|
||||
logMap.put("CALL_PURPOSE", "天易--修改工单");
|
||||
logMap.put("CALL_STATUS", resultMap.get("status"));
|
||||
GpsCommon.callRecord(logMap, Sqlca);
|
||||
|
||||
JSONObject job = JSONObject.fromObject(data);
|
||||
String result = job.getString("result");
|
||||
if ("0".equals(result)) {
|
||||
String success = job.getString("success");
|
||||
if ("true".equals(success)) {
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='" + result + "',MESSAGE='修改成功' where APPLY_NO='" + applyNo + "'");
|
||||
return "修改成功!";
|
||||
} else {
|
||||
String orderStep = job.getString("orderStep");
|
||||
String itemname = Sqlca.getString("select cl.itemname from code_library cl where cl.codeno='gps_order_step' and cl.itemno='" + orderStep + "'");
|
||||
return "修改失败,当前订单状态为" + itemname;
|
||||
}
|
||||
} else {
|
||||
Sqlca.executeSQL("update LM_GPS_ORDER_TEMP set RESULT='" + result + "',MESSAGE='修改失败," + job.getString("message") + "' where APPLY_NO='" + applyNo + "'");
|
||||
return "修改失败," + job.getString("message");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 天易--获取图片
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public String getImage(JBOTransaction tx) throws Exception {
|
||||
Transaction Sqlca = Transaction.createTransaction(tx);
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject("SELECT url FROM lm_gps_photo WHERE apply_no='" + applyNo + "'"));
|
||||
StringBuffer strb = null;
|
||||
while (res.next()) {
|
||||
if (strb == null) {
|
||||
strb = new StringBuffer(res.getString("url"));
|
||||
} else {
|
||||
strb.append("," + res.getString("url"));
|
||||
}
|
||||
}
|
||||
res.close();
|
||||
if (strb == null)
|
||||
return "null";
|
||||
return strb.toString();
|
||||
}
|
||||
|
||||
|
||||
public String getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(String params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public String getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(String projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public String getApplyNo() {
|
||||
return applyNo;
|
||||
}
|
||||
|
||||
public void setApplyNo(String applyNo) {
|
||||
this.applyNo = applyNo;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getFlowUnid() {
|
||||
return flowUnid;
|
||||
}
|
||||
|
||||
public void setFlowUnid(String flowUnid) {
|
||||
this.flowUnid = flowUnid;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
package com.tenwa.gps;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.HttpDelete;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPatch;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
@ -20,6 +14,11 @@ import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
public class HttpClientSUtil {
|
||||
|
||||
private static HttpClient httpClient = HttpClientBuilder.create().build();;
|
||||
@ -80,7 +79,30 @@ public class HttpClientSUtil {
|
||||
resultMap.put("status",String.valueOf(response.getStatusLine().getStatusCode()));
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
//Post请求,参数为json,加header
|
||||
public static Map<String, String> doPostJson(String url, String json,Map<String,String> header) throws Exception{
|
||||
HttpPost post = new HttpPost(url);
|
||||
if(header!=null) {
|
||||
for (Map.Entry<String, String> entry: header.entrySet()) {
|
||||
post.setHeader(entry.getKey(),entry.getValue());
|
||||
}
|
||||
}
|
||||
//设置参数以及编码
|
||||
StringEntity entity = new StringEntity(json,"UTF-8");
|
||||
//设置请求头,服务器接收参数的格式以及编码格式
|
||||
entity.setContentType("application/json;charset=UTF-8");
|
||||
//发起httpPost请求
|
||||
post.setEntity(entity);
|
||||
HttpResponse response = httpClient.execute(post);
|
||||
//返回结果解析
|
||||
HttpEntity httpEntity =response.getEntity();
|
||||
Map<String,String> resultMap = new HashMap<String, String>();
|
||||
resultMap.put("data",EntityUtils.toString(response.getEntity(),"UTF-8"));
|
||||
resultMap.put("status",String.valueOf(response.getStatusLine().getStatusCode()));
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
//PostÇëÇ󣬲ÎÊýΪxml
|
||||
public static Map<String, String> doPostXml(String url, String xml) throws Exception{
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user