소스 검색

清除bng对接的代码

hu 7 달 전
부모
커밋
b5eb22ee31
29개의 변경된 파일319개의 추가작업 그리고 5008개의 파일을 삭제
  1. 2 240
      src/custom/beans/uploaderpdata/UploadDataToERP.java
  2. 0 867
      src/custom/beans/uploaderpdata/UploadDataToERP_HY.java
  3. 0 891
      src/custom/beans/uploaderpdata/UploadDataToERP_NB.java
  4. 0 904
      src/custom/beans/uploaderpdata/UploadDataToERP_TZ.java
  5. 0 62
      src/custom/beans/uploaderpdata/erpservice/ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest.java
  6. 0 62
      src/custom/beans/uploaderpdata/erpservice/ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse.java
  7. 0 62
      src/custom/beans/uploaderpdata/erpservice/CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest.java
  8. 0 62
      src/custom/beans/uploaderpdata/erpservice/CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse.java
  9. 0 62
      src/custom/beans/uploaderpdata/erpservice/CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest.java
  10. 0 62
      src/custom/beans/uploaderpdata/erpservice/CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse.java
  11. 0 62
      src/custom/beans/uploaderpdata/erpservice/CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest.java
  12. 0 62
      src/custom/beans/uploaderpdata/erpservice/CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse.java
  13. 0 62
      src/custom/beans/uploaderpdata/erpservice/CreateShippingNoticeESORequestCreateShippingNoticeESORequest.java
  14. 0 62
      src/custom/beans/uploaderpdata/erpservice/CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse.java
  15. 0 215
      src/custom/beans/uploaderpdata/erpservice/ObjectFactory.java
  16. 0 109
      src/custom/beans/uploaderpdata/erpservice/TIPTOPServiceGateWay.java
  17. 0 86
      src/custom/beans/uploaderpdata/erpservice/TIPTOPServiceGateWayPortType.java
  18. 0 100
      src/custom/beans/uploaderpdata/erpservice/TIPTOPServiceGateWay_HY.java
  19. 0 229
      src/custom/beans/uploaderpdata/erpservice/aws_ttsrv2.xml
  20. 0 229
      src/custom/beans/uploaderpdata/erpservice/aws_ttsrv2_toptest.xml
  21. 0 98
      src/custom/beans/uploaderpdata/erpservice/old/aws_ttsrv2.xml
  22. 0 98
      src/custom/beans/uploaderpdata/erpservice/old/aws_ttsrv2_toptest.xml
  23. 0 2
      src/custom/beans/uploaderpdata/erpservice/package-info.java
  24. 61 62
      src/custom/restcontroller/webmanage/sale/order/Order.java
  25. 170 171
      src/custom/restcontroller/webmanage/sale/order/OrderItems.java
  26. 69 70
      src/custom/restcontroller/webmanage/sale/toolbill/ToolBill.java
  27. 11 11
      src/custom/restcontroller/webmanage/sale/u8/U8Rest.java
  28. 3 3
      src/custom/utility/ERPDocking.java
  29. 3 3
      src/custom/utility/WzwlDocking.java

+ 2 - 240
src/custom/beans/uploaderpdata/UploadDataToERP.java

@@ -2,6 +2,7 @@ package beans.uploaderpdata;
 
 import org.apache.log4j.Logger;
 
+import com.sun.tools.corba.se.idl.constExpr.And;
 
 import common.BaseClass;
 import common.Controller;
@@ -15,246 +16,7 @@ import restcontroller.webmanage.sale.toolbill.ToolBill;
 
 public class UploadDataToERP extends BaseClass {
 	Controller controller;
-	long uniqueIDValue;
-	String billtype;
-	private static Logger logger = Logger.getLogger(UploadDataToERP.class);
-
-	public UploadDataToERP(Controller controller, long uniqueIDValue, String billtype) {
+	public UploadDataToERP(Controller controller) {
 		this.controller = controller;
-		this.uniqueIDValue = uniqueIDValue;
-		this.billtype = billtype;
-	}
-
-	public boolean upload() throws YosException {
-		String siteid = controller.siteid;
-		Rows rows = new Rows();
-		switch (siteid) {
-//            case "YOSTEST2": {
-//            	System.out.println(uniqueIDValue);
-//            	System.out.println(controller instanceof workorder);
-//            	System.out.println(controller.getClass().getName());
-//            	   break;
-//            }
-		case "TZ": {
-			logger.info("台州单据上传");
-			if (controller instanceof Order || controller instanceof restcontroller.sale.order.Order && billtype.equals("")) {
-				logger.info("台州订单单据上传");
-				rows = controller.dbConnect.runSqlQuery(
-						"select * from sa_order where sa_orderid=" + uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					String typemx = rows.get(0).getString("typemx");
-					if ("特殊订单".equals(type) && "样品".equals(typemx)) {
-						logger.info("台州样品杂发订单单据上传");
-						return UploadDataToERP_TZ.uploadSaorder_ZF_post(controller, uniqueIDValue);
-					} else {
-						logger.info("其他订单单据上传");
-						return UploadDataToERP_TZ.uploadSaorder_post(controller, uniqueIDValue);
-					}
-				}
-
-			} else if (controller instanceof aftersalesmag
-					|| controller instanceof restcontroller.sale.aftersalesmag.aftersalesmag) {
-				logger.info("销退单单据上传");
-				rows = controller.dbConnect.runSqlQuery("select * from sa_aftersalesmag where sa_aftersalesmagid="
-						+ uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					if ("借用归还单".equals(type)) {
-						logger.info("借用归还单据上传");
-						return UploadDataToERP_TZ.uploadBorrowToReturn_post(controller, uniqueIDValue);
-					}
-//                		else if ("借转购".equals(type)) {	 
-//                        	
-//                        	logger.info("借转购单据上传");
-//                            return UploadDataToERP_TZ.uploadBorrowToSale_post(controller, uniqueIDValue);
-//                        } else if ("借转赠".equals(type)) {
-//                            return true;
-//                        } 
-					else {
-						return true;
-					}
-				}
-
-			} else if (controller instanceof ToolBill) {
-				logger.info("台州工具借用单据上传");
-				rows = controller.dbConnect.runSqlQuery(
-						"select * from sa_order where sa_orderid=" + uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					if ("工具借用单".equals(type)) {
-						logger.info("台州工具借用单单据上传");
-						return UploadDataToERP_TZ.uploadBorrow_post(controller, uniqueIDValue);
-					}
-				}
-			} else if (controller instanceof dispatch) {
-				rows = controller.dbConnect.runSqlQuery(
-						"select t2.typemx from sa_dispatch t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid  where t1.sa_dispatchid="
-								+ uniqueIDValue + " and t1.siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String typemx = rows.get(0).getString("typemx");
-					if (!"样品".equals(typemx)) {
-						logger.info("发货单单据上传");
-						return UploadDataToERP_TZ.uploadSainvoice_post(controller, uniqueIDValue);
-					} else {
-						return true;
-					}
-				}
-
-			} else if ((controller instanceof Order || controller instanceof restcontroller.sale.order.Order || controller instanceof OrderItems)
-					&& billtype.equals("订单变更")) {
-				logger.info("订单调整上传");
-				return UploadDataToERP_TZ.uploadSaorderChange_post(controller, uniqueIDValue);
-			}
-			break;
-		}
-		case "HY": {
-			logger.info("海盐单据上传");
-			if (controller instanceof Order || controller instanceof restcontroller.sale.order.Order && billtype.equals("")) {
-				logger.info("海盐订单单据上传");
-				rows = controller.dbConnect.runSqlQuery(
-						"select * from sa_order where sa_orderid=" + uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					String typemx = rows.get(0).getString("typemx");
-					if ("特殊订单".equals(type) && "样品".equals(typemx)) {
-						logger.info("海盐样品杂发订单单据上传");
-						return UploadDataToERP_HY.uploadSaorder_ZF_post(controller, uniqueIDValue);
-					} else {
-						logger.info("其他订单单据上传");
-						return UploadDataToERP_HY.uploadSaorder_post(controller, uniqueIDValue);
-					}
-				}
-
-			} else if (controller instanceof aftersalesmag
-					|| controller instanceof restcontroller.sale.aftersalesmag.aftersalesmag) {
-				logger.info("销退单单据上传");
-				rows = controller.dbConnect.runSqlQuery("select * from sa_aftersalesmag where sa_aftersalesmagid="
-						+ uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					if ("借用归还单".equals(type)) {
-						logger.info("借用归还单据上传");
-						return UploadDataToERP_HY.uploadBorrowToReturn_post(controller, uniqueIDValue);
-					}
-//                		else if ("借转购".equals(type)) {	 
-//                        	
-//                        	logger.info("借转购单据上传");
-//                            return UploadDataToERP_HY.uploadBorrowToSale_post(controller, uniqueIDValue);
-//                        } else if ("借转赠".equals(type)) {
-//                            return true;
-//                        } 
-					else {
-						return true;
-					}
-				}
-
-			}else if (controller instanceof ToolBill) {
-				logger.info("海盐工具借用单据上传");
-				rows = controller.dbConnect.runSqlQuery(
-						"select * from sa_order where sa_orderid=" + uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					if ("工具借用单".equals(type)) {
-						logger.info("海盐工具借用单单据上传");
-						return UploadDataToERP_HY.uploadBorrow_post(controller, uniqueIDValue);
-					}
-				}
-			} else if (controller instanceof dispatch) {
-				rows = controller.dbConnect.runSqlQuery(
-						"select t2.typemx from sa_dispatch t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid  where t1.sa_dispatchid="
-								+ uniqueIDValue + " and t1.siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String typemx = rows.get(0).getString("typemx");
-					if (!"样品".equals(typemx)) {
-						logger.info("发货单单据上传");
-						return UploadDataToERP_HY.uploadSainvoice_post(controller, uniqueIDValue);
-					} else {
-						return true;
-					}
-				}
-
-			} else if ((controller instanceof Order || controller instanceof restcontroller.sale.order.Order || controller instanceof OrderItems)
-					&& billtype.equals("订单变更")) {
-				logger.info("订单调整上传");
-				return UploadDataToERP_HY.uploadSaorderChange_post(controller, uniqueIDValue);
-			}
-			break;
-		}
-		case "NB": {
-			logger.info("宁波单据上传");
-			if (controller instanceof Order || controller instanceof restcontroller.sale.order.Order && billtype.equals("")) {
-				logger.info("宁波订单单据上传");
-				rows = controller.dbConnect.runSqlQuery(
-						"select * from sa_order where sa_orderid=" + uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					String typemx = rows.get(0).getString("typemx");
-					if ("特殊订单".equals(type) && "样品".equals(typemx)) {
-						logger.info("宁波样品杂发订单单据上传");
-						return UploadDataToERP_NB.uploadSaorder_ZF_post(controller, uniqueIDValue);
-					} else {
-						logger.info("其他订单单据上传");
-						return UploadDataToERP_NB.uploadSaorder_post(controller, uniqueIDValue);
-					}
-				}
-
-			} else if (controller instanceof aftersalesmag
-					|| controller instanceof restcontroller.sale.aftersalesmag.aftersalesmag) {
-				logger.info("销退单单据上传");
-				rows = controller.dbConnect.runSqlQuery("select * from sa_aftersalesmag where sa_aftersalesmagid="
-						+ uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					if ("借用归还单".equals(type)) {
-						logger.info("借用归还单据上传");
-						return UploadDataToERP_NB.uploadBorrowToReturn_post(controller, uniqueIDValue);
-					}
-//                		else if ("借转购".equals(type)) {	 
-//                        	
-//                        	logger.info("借转购单据上传");
-//                            return UploadDataToERP_NB.uploadBorrowToSale_post(controller, uniqueIDValue);
-//                        } else if ("借转赠".equals(type)) {
-//                            return true;
-//                        } 
-					else {
-						return true;
-					}
-				}
-
-			}else if (controller instanceof ToolBill) {
-				logger.info("宁波工具借用单据上传");
-				rows = controller.dbConnect.runSqlQuery(
-						"select * from sa_order where sa_orderid=" + uniqueIDValue + " and siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String type = rows.get(0).getString("type");
-					if ("工具借用单".equals(type)) {
-						logger.info("宁波工具借用单单据上传");
-						return UploadDataToERP_NB.uploadBorrow_post(controller, uniqueIDValue);
-					}
-				}
-			} else if (controller instanceof dispatch) {
-				rows = controller.dbConnect.runSqlQuery(
-						"select t2.typemx from sa_dispatch t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid  where t1.sa_dispatchid="
-								+ uniqueIDValue + " and t1.siteid='" + siteid + "'");
-				if (!rows.isEmpty()) {
-					String typemx = rows.get(0).getString("typemx");
-					if (!"样品".equals(typemx)) {
-						logger.info("发货单单据上传");
-						return UploadDataToERP_NB.uploadSainvoice_post(controller, uniqueIDValue);
-					} else {
-						return true;
-					}
-				}
-
-			} else if ((controller instanceof Order || controller instanceof restcontroller.sale.order.Order || controller instanceof OrderItems) 
-					&& billtype.equals("订单变更")) {
-				logger.info("订单调整上传");
-				return UploadDataToERP_NB.uploadSaorderChange_post(controller, uniqueIDValue);
-			}
-			break;
-		}
-		}
-		return false;
 	}
 }

+ 0 - 867
src/custom/beans/uploaderpdata/UploadDataToERP_HY.java

@@ -1,867 +0,0 @@
-/**
- *
- */
-package beans.uploaderpdata;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.dom4j.Document;
-import org.dom4j.DocumentHelper;
-
-import beans.uploaderpdata.erpservice.ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest;
-import beans.uploaderpdata.erpservice.ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse;
-import beans.uploaderpdata.erpservice.CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest;
-import beans.uploaderpdata.erpservice.CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse;
-import beans.uploaderpdata.erpservice.CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest;
-import beans.uploaderpdata.erpservice.CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse;
-import beans.uploaderpdata.erpservice.CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest;
-import beans.uploaderpdata.erpservice.CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse;
-import beans.uploaderpdata.erpservice.CreateShippingNoticeESORequestCreateShippingNoticeESORequest;
-import beans.uploaderpdata.erpservice.CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse;
-import beans.uploaderpdata.erpservice.TIPTOPServiceGateWayPortType;
-import beans.uploaderpdata.erpservice.TIPTOPServiceGateWay_HY;
-import common.BaseClass;
-import common.Controller;
-import common.YosException;
-import common.data.Row;
-import common.data.Rows;
-import common.data.SQLFactory;
-
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * @author Administrator
- *
- */
-public class UploadDataToERP_HY extends BaseClass {
-	private static final String SITEID = "IBPJX10";
-	private static Logger logger = Logger.getLogger(UploadDataToERP_HY.class);
-
-	/**
-	 * 订单上传erp服务
-	 */
-	public static boolean uploadSaorder_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t4.hrcode,t5.agentnum,t6.erpagentnum from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-
-		String fsonum = saorderRows.get(0).getString("sonum");
-		String fsaler = saorderRows.get(0).getString("salername");
-		String hrcode = saorderRows.get(0).getString("hrcode");
-		String checkdate = getDate_Str1(saorderRows.get(0).getDate("checkdate"));
-		String fagentnum = saorderRows.get(0).getString("agentnum");
-		String fcontact = saorderRows.get(0).getString("name");
-		String fphonenumber = saorderRows.get(0).getString("phonenumber");
-		String faddress = saorderRows.get(0).getString("address");
-		String fnotes = saorderRows.get(0).getString("remarks");
-		String ftype = saorderRows.get(0).getString("type");
-		String fsaletype = saorderRows.get(0).getString("saletype");
-		String fprojectname = saorderRows.get(0).getString("projectnote");
-		if ("项目订单".equals(ftype)) {
-			fprojectname = saorderRows.get(0).getString("projectname");
-		}
-
-		String ferptype = "ASO1";
-//        switch (ftype) {
-//            case "标准订单": {
-//                ftype = "PSO1";
-//                break;
-//            }
-//            default:
-//                break;
-//        }
-
-		if (!StringUtils.isBlank(saorderRows.get(0).getString("erpagentnum"))) {
-			fagentnum = saorderRows.get(0).getString("erpagentnum");
-		}
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.167\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + ferptype + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea03\" value=\"" + fagentnum + "\"/>");// 客户编号
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fsonum + "\"/>");// 订单编号
-		xmlbuffer.append("<Field name=\"oea14\" value=\"" + hrcode.toLowerCase() + "\"/>");// 业务员
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + fcontact + ";" + fphonenumber + ";" + faddress + "\"/>");// 地址
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + saorderRows.get(0).getString("province") + "->"
-				+ saorderRows.get(0).getString("city") + "->" + saorderRows.get(0).getString("county") + "\"/>");// 省市县
-		xmlbuffer.append("<Field name=\"oap044\" value=\"" + fprojectname + "\"/>");// 项目
-		xmlbuffer.append("<Field name=\"oeaud01\" value=\"" + fnotes + "\"/>");// 备注
-		xmlbuffer.append("<Field name=\"oea26\" value=\"" + fsaletype + "\"/>");// 销售分类
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				String fplandate = getDate_Str1(row.getDate("deliverydate"));
-				String fdetailnotes = row.getString("remarks");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				long frownum = row.getLong("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"oeb11\" value=\"" + fitemno + "\"/>");// 客户产品编码(DRP商品编号)
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb15\" value=\"" + fplandate + "\"/>");// 交货日期
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("<Field name=\"oebud04\" value=\"" + fsonum + "\"/>");// 订单号
-				xmlbuffer.append("<Field name=\"oebud05\" value=\"" + frownum + "\"/>");// 行号
-				xmlbuffer.append("<Field name=\"oeb30\" value=\"\"/>");// 预计归还日期
-				xmlbuffer.append("<Field name=\"oao06\" value=\"" + fdetailnotes + "\"/>");
-				xmlbuffer.append("</Record>");
-			}
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("订单上传请求" + fsonum + ":" + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay_HY gateWay = new TIPTOPServiceGateWay_HY();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("订单上传返回" + fsonum + ":" + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "订单上传", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + ":" + e.getMessage());
-
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 订单变更上传erp服务
-	 */
-	public static boolean uploadSaorderChange_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows orderitemsChangeRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum,t7.hrcode from sa_orderitems_change t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid left join sys_hr t7 on t7.siteid=t1.siteid and t1.createuserid=t7.userid where  t1.sa_orderitems_changeid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows orderitemsChangemxRows = controller.dbConnect.runSqlQuery(
-				"select t.*,t3.erpitemno,t1.rowno from sa_orderitems_changemx t left join sa_orderitems t1 on t.sa_orderitemsid=t1.sa_orderitemsid and t.siteid=t1.siteid left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t.itemid=t3.itemid and t.siteid=t3.siteid where t.sa_orderitems_changeid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (orderitemsChangeRows.isEmpty()) {
-			return issucess;
-		}
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_dataextend where ownertable='sa_order' and ownerid="
-						+ orderitemsChangeRows.get(0).getLong("sa_orderid") + " order by changedate desc");
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String fsonum = orderitemsChangeRows.get(0).getString("sonum");
-		String changeby = orderitemsChangeRows.get(0).getString("hrcode").toLowerCase();
-		String fdate = getDate_Str1(orderitemsChangeRows.get(0).getDate("createdate"));
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.167\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oep_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oep01\" value=\"" + ferpbillno + "\"/>");// 订单编号
-		xmlbuffer.append("<Field name=\"oep04\" value=\"" + fdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oep12\" value=\"" + changeby + "\"/>");// 变更人员
-		xmlbuffer.append("<Field name=\"oep13\" value=\"" + "37" + "\"/>");// 理由码代码
-
-		xmlbuffer.append("<Detail name=\"oeq_file\" node_id=\"1_1\">");
-
-		for (Row row : orderitemsChangemxRows) {
-			int frownum = row.getInteger("rowno");
-			BigDecimal fqty = row.getBigDecimal("newvalue");
-			xmlbuffer.append("<Record>");
-			xmlbuffer.append("<Field name=\"oeq03\" value=\"" + frownum + "\"/>");// 行号
-			xmlbuffer.append("<Field name=\"oeq12a\" value=\"" + fqty + "\"/>");// 变更后数量
-			xmlbuffer.append("<Field name=\"oeq13a\" value=\"" + "" + "\"/>");// 变更后单价
-			xmlbuffer.append("<Field name=\"oeq15a\" value=\"" + "" + "\"/>");// 变更后交货日期
-			xmlbuffer.append("<Field name=\"oeq50\" value=\"" + "" + "\"/>");// 备注
-			xmlbuffer.append("</Record>");
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("订单变更上传请求" + fsonum + ":" + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay_HY gateWay = new TIPTOPServiceGateWay_HY();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest esoRequest = new ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse esoResponse = portType
-					.changeSalesOrderDataEso(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("订单变更上传返回" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_orderitems_change", uniqueIDValue, "订单变更", xmlbuffer.toString(),
-					document);
-			issucess = saveDataextend(controller, "sa_orderitems_change", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 杂发单上传erp服务
-	 */
-	public static boolean uploadSaorder_ZF_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t5.agentnum,t6.erpagentnum,t7.hrcode from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid left join sys_hr t7 on t7.siteid=t1.siteid and t1.changeuserid=t7.userid where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno,t4.stockno from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid left join  st_stock t4 on t1.stockid=t4.stockid and t1.siteid=t4.siteid  where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-
-		String fsonum = saorderRows.get(0).getString("sonum");
-		String checkdate = getDate_Str1(saorderRows.get(0).getDate("checkdate"));
-		String fnotes = saorderRows.get(0).getString("remarks");
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.167\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"ina_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"ina00\" value=\"1\"/>");// 单据类型
-		xmlbuffer.append("<Field name=\"ina01\" value=\"AWI2\"/>");// 单据编号
-		xmlbuffer.append("<Field name=\"inaud06\" value=\"" + fsonum + "\"/>");// 单据编号
-		xmlbuffer.append("<Field name=\"ina03\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"ina07\" value=\"" + fnotes + "\"/>");// 备注
-		xmlbuffer.append(
-				"<Field name=\"ina11\" value=\"" + saorderRows.get(0).getString("hrcode").toLowerCase() + "\"/>");// 申请人
-		// xmlbuffer.append("<Field name=\"ina04\" value=\"" + "J61000" + "\"/>");//申请部门
-
-		xmlbuffer.append("<Detail name=\"inb_file\" node_id=\"1_1\">");
-
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String warehouse = row.getString("stockno");
-				String location = row.getString("position");
-				String lot = row.getString("batchno");
-				double fqty = row.getDouble("qty");
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"inb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"inb05\" value=\"" + warehouse + "\"/>");// 仓库
-				xmlbuffer.append("<Field name=\"inb06\" value=\"" + location + "\"/>");// 库位
-				xmlbuffer.append("<Field name=\"inb07\" value=\"" + lot + "\"/>");// 批号
-				xmlbuffer.append("<Field name=\"inb09\" value=\"" + fqty + "\"/>");// 异动数量
-				xmlbuffer.append("<Field name=\"inb15\" value=\"" + "A070" + "\"/>");// 理由码
-				xmlbuffer.append("</Record>");
-			}
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("杂发单上传请求" + fsonum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay_HY gateWay = new TIPTOPServiceGateWay_HY();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest esoRequest = new CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse esoResponse = portType
-					.createMiscIssueDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("杂发单上传请求" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "样品订单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借出单上传erp服务
-	 */
-	public static boolean uploadBorrow_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t4.hrcode,t5.agentnum,t6.erpagentnum from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-		Row saorder = saorderRows.get(0);
-
-		String fsonum = saorder.getString("sonum");
-		String fsaler = saorder.getString("salername");
-		String hrcode = saorder.getString("hrcode");
-		String checkdate = getDate_Str1(saorder.getDate("checkdate"));
-		String fagentnum = saorder.getString("agentnum");
-		String fcontact = saorder.getString("name");
-		String fphonenumber = saorder.getString("phonenumber");
-		String faddress = saorder.getString("faddress");
-		String fnotes = saorder.getString("remarks");
-		String fprojectname = "";
-		String ftype = saorder.getString("type");
-		// String ferptype = "ZSO1";
-		String ferptype = "ASO1";
-
-		if (!StringUtils.isBlank(saorderRows.get(0).getString("erpagentnum"))) {
-			fagentnum = saorderRows.get(0).getString("erpagentnum");
-		}
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.167\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"" + 8 + "\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + ferptype + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea03\" value=\"" + fagentnum + "\"/>");// 客户编号
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fsonum + "\"/>");// 借出单号
-		xmlbuffer.append("<Field name=\"oea14\" value=\"" + hrcode.toLowerCase() + "\"/>");// 业务员
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + fcontact + ";" + fphonenumber + ";" + faddress + "\"/>");// 地址
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + saorder.getString("province") + "->"
-				+ saorder.getString("city") + "->" + saorder.getString("county") + "\"/>");// 省市县
-		xmlbuffer.append("<Field name=\"oap044\" value=\"" + fprojectname + "\"/>");// 项目
-		xmlbuffer.append("<Field name=\"oeaud01\" value=\"" + fnotes + "\"/>");// 备注
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				String fplandate = getDate_Str1(row.getDate("deliverydate"));
-				String fdetailnotes = row.getString("remarks");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				long frownum = row.getLong("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"oeb11\" value=\"" + fitemno + "\"/>");// 客户产品编码(DRP商品编号)
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb15\" value=\"" + fplandate + "\"/>");// 交货日期
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("<Field name=\"oebud04\" value=\"" + fsonum + "\"/>");// 借出单号
-				xmlbuffer.append("<Field name=\"oebud05\" value=\"" + frownum + "\"/>");// 行号
-				String fbackdate = getDate_Str1(row.getDate("toolbackdate"));
-				xmlbuffer.append("<Field name=\"oeb30\" value=\"" + fbackdate + "\"/>");// 预计归还日期
-
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借出单上传请求" + fsonum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay_HY gateWay = new TIPTOPServiceGateWay_HY();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借出单上传请求" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "工具借用", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			e.printStackTrace();
-			logger.info("借出单上传错误" + fsonum + e.getMessage());
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借货转销售上传erp服务
-	 */
-	public static boolean uploadBorrowToSale_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-
-		Rows aftersalesmagRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum from sa_aftersalesmag t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows aftersalesmagdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.rowno from sa_aftersalesmag_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t2.rowno");
-
-		if (aftersalesmagRows.isEmpty()) {
-			return issucess;
-		}
-
-		if (StringUtils.isBlank(aftersalesmagRows.get(0).getString("sonum"))) {
-			return issucess;
-		}
-		Row taftersalesmag = aftersalesmagRows.get(0);
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_erpupdatelog where ownertable='sa_order' and ownerid="
-						+ aftersalesmagRows.get(0).getLong("sa_orderid") + "order by createdate desc");
-
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-		String fbillnum = taftersalesmag.getString("billno");
-		String checkdate = getDate_Str1(taftersalesmag.getDate("checkdate"));
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.167\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"" + 9 + "\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + "ASO1" + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fbillnum + "\"/>");// 单号
-		xmlbuffer.append("<Field name=\"oea12\" value=\"" + ferpbillno + "\"/>");// 原借出单号
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-
-		if (aftersalesmagdetailRows.isEmpty()) {
-			for (Row row : aftersalesmagdetailRows) {
-				double fqty = row.getDouble("qty");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				int fsorownum = row.getInteger("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb71\" value=\"" + fsorownum + "\"/>");// 原借出单行号
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借货转销售上传请求" + fbillnum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay_HY gateWay = new TIPTOPServiceGateWay_HY();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借货转销售上传请求" + fbillnum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_aftersalesmag", uniqueIDValue, "返退单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_aftersalesmag", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("借货转销售错误" + fbillnum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借货退回上传erp服务
-	 */
-	public static boolean uploadBorrowToReturn_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows aftersalesmagRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum from sa_aftersalesmag t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows aftersalesmagdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.rowno,t2.itemno from sa_aftersalesmag_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t2.rowno");
-
-		if (aftersalesmagRows.isEmpty()) {
-			return issucess;
-		}
-		if (StringUtils.isBlank(aftersalesmagRows.get(0).getString("sonum"))) {
-			return issucess;
-		}
-		Row taftersalesmag = aftersalesmagRows.get(0);
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_erpupdatelog where ownertable='sa_order' and ownerid="
-						+ aftersalesmagRows.get(0).getLong("sa_orderid") + "order by createdate desc");
-
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-		String fbillnum = taftersalesmag.getString("billno");
-		String checkdate = getDate_Str1(taftersalesmag.getDate("checkdate"));
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.167\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oha_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oha01\" value=\"" + "ZSR1" + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oha02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oha05\" value=\"" + "5" + "\"/>");// 销退类型
-		xmlbuffer.append("<Field name=\"oha09\" value=\"" + "6" + "\"/>");// 销退方式
-		xmlbuffer.append("<Field name=\"oha16\" value=\"" + ferpbillno + "\"/>");// 借出单号
-
-		xmlbuffer.append("<Detail name=\"ohb_file\" node_id=\"1_1\">");
-		if (aftersalesmagdetailRows.isEmpty()) {
-			for (Row row : aftersalesmagdetailRows) {
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				int fsorownum = row.getInteger("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"ohb04\" value=\"" + fitemno + "\"/>");// 料号
-				xmlbuffer.append("<Field name=\"ohb09\" value=\"" + "W11" + "\"/>");// 仓库
-				xmlbuffer.append("<Field name=\"ohb091\" value=\"" + "" + "\"/>");// 库位
-				xmlbuffer.append("<Field name=\"ohb092\" value=\"" + "" + "\"/>");// 批号
-				xmlbuffer.append("<Field name=\"ohb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"ohb31\" value=\"" + ferpbillno + "\"/>");// 借出单号
-				xmlbuffer.append("<Field name=\"ohb32\" value=\"" + fsorownum + "\"/>");// 借出单号项次
-				xmlbuffer.append("<Field name=\"ohb50\" value=\"" + "A210" + "\"/>");// 理由编号号
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借货退回上传请求" + fbillnum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay_HY gateWay = new TIPTOPServiceGateWay_HY();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest esoRequest = new CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse esoResponse = portType
-					.createSalesReturnEso(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借货退回上传请求" + fbillnum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_aftersalesmag", uniqueIDValue, "借货退回", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_aftersalesmag", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("借货退回上传错误" + fbillnum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 发货单上传erp服务
-	 */
-	public static boolean uploadSainvoice_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows dispatchRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum,t3.address,t3.province,t3.city,t3.county from sa_dispatch t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid where t1.sa_dispatchid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows dispatchdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno,t2.rowno sorowno from sa_dispatch_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_dispatchid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-		if (dispatchRows.isEmpty()) {
-			return issucess;
-		}
-		Row sainvoice = dispatchRows.get(0);
-
-		String fsonum = sainvoice.getString("sonum");
-		String finvonum = sainvoice.getString("billno");
-		String recheckdate = getDate_Str1(sainvoice.getDate("recheckdate"));
-		String fdate = getDate_Str1(sainvoice.getDate("billdate"));
-		String faddress = sainvoice.getString("address");
-		String fnotes = sainvoice.getString("remarks");
-		String ftype = "ASA1";
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.167\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oga_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oga01\" value=\"" + ftype + "\"/>");
-		xmlbuffer.append("<Field name=\"oga02\" value=\"" + recheckdate + "\"/>");
-		xmlbuffer.append("<Field name=\"oga16\" value=\"" + fsonum + "\"/>");
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + faddress + "\"/>");
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + sainvoice.getString("province") + "->"
-				+ sainvoice.getString("city") + "->" + sainvoice.getString("county") + "\"/>");
-		xmlbuffer.append("<Field name=\"ogaud01\" value=\"" + fnotes + "\"/>");
-		xmlbuffer.append("<Field name=\"ogaud02\" value=\"" + finvonum + "\"/>");
-
-		xmlbuffer.append("<Detail name=\"ogb_file\" node_id=\"1_1\">");
-
-		if (!dispatchdetailRows.isEmpty()) {
-			for (Row row : dispatchdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				double fqty = row.getDouble("qty");
-				// String fplandate = getDate_Str1(detailpao.getDate("fplandate"));
-				int frownum = row.getInteger("rowno");
-				int fsorownum = row.getInteger("sorowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"ogb03\" value=\"" + frownum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb04\" value=\"" + ferpitemno + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb12\" value=\"" + fqty + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb31\" value=\"" + fsonum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb32\" value=\"" + fsorownum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb1003\" value=\"" + fdate + "\"/>");
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("发货单上传" + finvonum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay_HY gateWay = new TIPTOPServiceGateWay_HY();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateShippingNoticeESORequestCreateShippingNoticeESORequest esoRequest = new CreateShippingNoticeESORequestCreateShippingNoticeESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse esoResponse = portType
-					.createShippingNoticeESO(esoRequest);
-
-			String result = esoResponse.getResponse();
-			logger.info("发货单返回" + finvonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_dispatch", uniqueIDValue, "发货单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_dispatch", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("发货单上传错误" + finvonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 上传日志更新
-	 *
-	 * @param controller
-	 * @param ownertable
-	 * @param ownerid
-	 * @param type
-	 * @param request
-	 * @param document
-	 * @return
-	 */
-	public static boolean saveLog(Controller controller, String ownertable, long ownerid, String type, String request,
-			Document document) {
-		boolean issuccess = false;
-		try {
-			SQLFactory sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志新增");
-			sqlFactory.addParameter("sys_erpupdatelogid", controller.createTableID("sys_erpupdatelog"));
-			sqlFactory.addParameter("siteid", controller.siteid);
-			sqlFactory.addParameter("userid", controller.userid);
-			sqlFactory.addParameter("username", controller.username);
-			sqlFactory.addParameter("ownerid", ownerid);
-			sqlFactory.addParameter("ownertable", ownertable);
-			sqlFactory.addParameter("type", type);
-			sqlFactory.addParameter("request", request);
-			sqlFactory.addParameter("response", document.asXML());
-			String status = document.getRootElement().element("Execution").element("Status").attribute("code")
-					.getText();
-			if ("0".equals(status)) {
-				String ferpbillno = document.getRootElement().element("ResponseContent").element("Parameter")
-						.element("Record").element("Field").attribute("value").getText();
-				sqlFactory.addParameter("erpbillno", ferpbillno);
-				sqlFactory.addParameter("errmsg", "");
-				issuccess = true;
-			} else {
-				String ferrmsg = document.getRootElement().element("Execution").element("Status")
-						.attribute("description").getText();
-				sqlFactory.addParameter("erpbillno", 0);
-				sqlFactory.addParameter("errmsg", ferrmsg);
-				issuccess = false;
-			}
-			sqlFactory.addParameter("status", status);
-			controller.dbConnect.runSqlUpdate(sqlFactory);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return issuccess;
-	}
-
-	/**
-	 * 上传日志更新
-	 *
-	 * @param controller
-	 * @param ownertable
-	 * @param ownerid
-	 * @param document
-	 * @return
-	 */
-	public static boolean saveDataextend(Controller controller, String ownertable, long ownerid, Document document) {
-		boolean issuccess = false;
-		try {
-			Rows rows = controller.dbConnect.runSqlQuery(
-					"select * from sys_dataextend where ownertable='" + ownertable + "' and ownerid=" + ownerid);
-			SQLFactory sqlFactory;
-			if (!rows.isEmpty()) {
-				sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp数据扩展信息更新");
-				sqlFactory.addParameter("sys_dataextendid", rows.get(0).getLong("sys_dataextendid"));
-			} else {
-				sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp数据扩展信息新增");
-				sqlFactory.addParameter("sys_dataextendid", controller.createTableID("sys_dataextend"));
-			}
-			sqlFactory.addParameter("siteid", controller.siteid);
-			sqlFactory.addParameter("userid", controller.userid);
-			sqlFactory.addParameter("username", controller.username);
-			sqlFactory.addParameter("ownerid", ownerid);
-			sqlFactory.addParameter("ownertable", ownertable);
-			String status = document.getRootElement().element("Execution").element("Status").attribute("code")
-					.getText();
-			if ("0".equals(status)) {
-				String ferpbillno = document.getRootElement().element("ResponseContent").element("Parameter")
-						.element("Record").element("Field").attribute("value").getText();
-				sqlFactory.addParameter("erpbillno", ferpbillno);
-				controller.dbConnect.runSqlUpdate(sqlFactory);
-				issuccess = true;
-			} else {
-				issuccess = false;
-			}
-
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return issuccess;
-	}
-
-	public static String getDate_Str1(Date date) {
-		if (date == null) {
-			return "";
-		}
-		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-		return format.format(date.getTime());
-	}
-
-}

+ 0 - 891
src/custom/beans/uploaderpdata/UploadDataToERP_NB.java

@@ -1,891 +0,0 @@
-/**
- *
- */
-package beans.uploaderpdata;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.dom4j.Document;
-import org.dom4j.DocumentHelper;
-
-import beans.uploaderpdata.erpservice.ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest;
-import beans.uploaderpdata.erpservice.ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse;
-import beans.uploaderpdata.erpservice.CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest;
-import beans.uploaderpdata.erpservice.CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse;
-import beans.uploaderpdata.erpservice.CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest;
-import beans.uploaderpdata.erpservice.CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse;
-import beans.uploaderpdata.erpservice.CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest;
-import beans.uploaderpdata.erpservice.CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse;
-import beans.uploaderpdata.erpservice.CreateShippingNoticeESORequestCreateShippingNoticeESORequest;
-import beans.uploaderpdata.erpservice.CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse;
-import beans.uploaderpdata.erpservice.TIPTOPServiceGateWay;
-import beans.uploaderpdata.erpservice.TIPTOPServiceGateWayPortType;
-import common.BaseClass;
-import common.Controller;
-import common.YosException;
-import common.data.Row;
-import common.data.Rows;
-import common.data.SQLFactory;
-
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * @author Administrator
- *
- */
-public class UploadDataToERP_NB extends BaseClass {
-	private static final String SITEID = "IBPNB10";
-	private static Logger logger = Logger.getLogger(UploadDataToERP_NB.class);
-
-	/**
-	 * 订单变更上传erp服务
-	 */
-	public static boolean uploadSaorderChange_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows orderitemsChangeRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum,t7.hrcode from sa_orderitems_change t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid left join sys_hr t7 on t7.siteid=t1.siteid and t1.createuserid=t7.userid  where  t1.sa_orderitems_changeid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows orderitemsChangemxRows = controller.dbConnect.runSqlQuery(
-				"select t.*,t3.erpitemno,t1.rowno,t1.deliverydate,t1.price from sa_orderitems_changemx t left join sa_orderitems t1 on t.sa_orderitemsid=t1.sa_orderitemsid and t.siteid=t1.siteid left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t.itemid=t3.itemid and t.siteid=t3.siteid where t.sa_orderitems_changeid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (orderitemsChangeRows.isEmpty()) {
-			return issucess;
-		}
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_dataextend where ownertable='sa_order' and ownerid="
-						+ orderitemsChangeRows.get(0).getLong("sa_orderid") + " order by changedate desc");
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String fsonum = orderitemsChangeRows.get(0).getString("sonum");
-		String changeby = orderitemsChangeRows.get(0).getString("hrcode").toLowerCase();
-		String fdate = getDate_Str1(orderitemsChangeRows.get(0).getDate("createdate"));
-		boolean isjiean = orderitemsChangeRows.get(0).getString("remarks").equals("订单结案变更");
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oep_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oep01\" value=\"" + ferpbillno + "\"/>");// 订单编号
-		xmlbuffer.append("<Field name=\"oep04\" value=\"" + fdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oep12\" value=\"" + changeby + "\"/>");// 变更人员
-		xmlbuffer.append("<Field name=\"oep13\" value=\"" + "37" + "\"/>");// 理由码代码
-		xmlbuffer.append("<Detail name=\"oeq_file\" node_id=\"1_1\">");
-
-		for (Row row : orderitemsChangemxRows) {
-			int frownum = row.getInteger("rowno");
-			BigDecimal fqty = row.getBigDecimal("newvalue");
-			String fplandate = getDate_Str1(row.getDate("deliverydate"));
-			double frateprice = row.getDouble("price");
-			xmlbuffer.append("<Record>");
-			xmlbuffer.append("<Field name=\"oeq03\" value=\"" + frownum + "\"/>");// 行号
-			xmlbuffer.append("<Field name=\"oeq12a\" value=\"" + fqty + "\"/>");// 变更后数量
-			xmlbuffer.append("<Field name=\"oeq13a\" value=\"" + frateprice + "\"/>");// 变更后单价
-			xmlbuffer.append("<Field name=\"oeq15a\" value=\"" + fplandate + "\"/>");// 变更后交货日期
-			xmlbuffer.append("<Field name=\"oeq50\" value=\"" + "" + "\"/>");// 备注
-			xmlbuffer.append("<Field name=\"oequd06\" value=\"" + (isjiean ? "Y" : "N") + "\"/>");// 是否结案
-			xmlbuffer.append("</Record>");
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("订单变更上传请求" + fsonum + ":" + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-			ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest esoRequest = new ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse esoResponse = portType
-					.changeSalesOrderDataEso(esoRequest);
-			String result = esoResponse.getResponse();
-
-			logger.info("订单变更上传返回" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_orderitems_change", uniqueIDValue, "订单变更", xmlbuffer.toString(),
-					document);
-			issucess = saveDataextend(controller, "sa_orderitems_change", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 订单上传erp服务
-	 */
-	public static boolean uploadSaorder_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t4.hrcode,t5.agentnum,t6.erpagentnum,t8.erpagentnum payentcode,t9.erpagentnum recentcode from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid  left join sys_enterprise t7 on t7.sys_enterpriseid=t1.pay_enterpriseid and t7.siteid=t1.siteid  left join sys_dataextend t8 on t8.ownertable='sys_enterprise' and t8.ownerid=t7.sys_enterpriseid and t8.siteid=t7.siteid left join sys_dataextend t9 on t9.ownertable='sys_enterprise' and t9.ownerid=t3.sys_enterpriseid and t9.siteid=t3.siteid where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		// Rows saorderRows= controller.dbConnect.runSqlQuery("select
-		// t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name`
-		// salername,t5.agentnum,t6.erpagentnum from sa_order t1 left join sa_project t2
-		// on t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join
-		// sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and
-		// t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and
-		// t1.siteid=t4.siteid left join sa_agents t5 on
-		// t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join
-		// sys_dataextend t6 on t6.ownertable='sa_agents' and t6.ownerid=t5.sa_agentsid
-		// and t6.siteid=t5.siteid where t1.checkdate is not null and
-		// t1.sa_orderid="+uniqueIDValue+" and t1.siteid='"+controller.siteid+"'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-
-		String fsonum = saorderRows.get(0).getString("sonum");
-		String fsaler = saorderRows.get(0).getString("salername");
-		String hrcode = saorderRows.get(0).getString("hrcode");
-		String checkdate = getDate_Str1(saorderRows.get(0).getDate("checkdate"));
-		String fagentnum = saorderRows.get(0).getString("agentnum");
-		String fcontact = saorderRows.get(0).getString("name");
-		String fphonenumber = saorderRows.get(0).getString("phonenumber");
-		String faddress = saorderRows.get(0).getString("address");
-		String fnotes = saorderRows.get(0).getString("remarks");
-		String ftype = saorderRows.get(0).getString("type");
-		String fsaletype = saorderRows.get(0).getString("saletype");
-		String fprojectname = saorderRows.get(0).getString("projectnote");
-		String frecagentnum = saorderRows.get(0).getString("recentcode");
-		if ("项目订单".equals(ftype)) {
-			fprojectname = saorderRows.get(0).getString("projectname");
-		}
-
-		ftype = "PSO1";
-//        switch (ftype) {
-//            case "标准订单": {
-//                ftype = "PSO1";
-//                break;
-//            }
-//            default:
-//                break;
-//        }
-
-		if (!StringUtils.isBlank(saorderRows.get(0).getString("erpagentnum"))) {
-			fagentnum = saorderRows.get(0).getString("erpagentnum");
-		}
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + ftype + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea03\" value=\"" + fagentnum + "\"/>");// 客户编号
-		xmlbuffer.append("<Field name=\"oea04\" value=\"" + frecagentnum + "\"/>");// 客户编号
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fsonum + "\"/>");// 订单编号
-		xmlbuffer.append("<Field name=\"oea14\" value=\"" + hrcode.toLowerCase() + "\"/>");// 业务员
-		xmlbuffer.append("<Field name=\"oea25\" value=\"" + fsaletype + "\"/>");
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + fcontact + ";" + fphonenumber + ";" + faddress + "\"/>");// 地址
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + saorderRows.get(0).getString("province") + "->"
-				+ saorderRows.get(0).getString("city") + "->" + saorderRows.get(0).getString("county") + "\"/>");// 省市县
-		xmlbuffer.append("<Field name=\"oap044\" value=\"" + fprojectname + "\"/>");// 项目
-		xmlbuffer.append("<Field name=\"oeaud01\" value=\"" + fnotes + "\"/>");// 备注
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				String fplandate = getDate_Str1(row.getDate("deliverydate"));
-				String fdetailnotes = row.getString("remarks");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				long frownum = row.getLong("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"oeb11\" value=\"" + fitemno + "\"/>");// 客户产品编码(DRP商品编号)
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb15\" value=\"" + fplandate + "\"/>");// 交货日期
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("<Field name=\"oebud04\" value=\"" + fsonum + "\"/>");// 订单号
-				xmlbuffer.append("<Field name=\"oebud05\" value=\"" + frownum + "\"/>");// 行号
-				xmlbuffer.append("<Field name=\"oeb30\" value=\"\"/>");// 预计归还日期
-				xmlbuffer.append("<Field name=\"oao06\" value=\"" + fdetailnotes + "\"/>");
-				xmlbuffer.append("</Record>");
-			}
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("订单上传请求" + fsonum + ":" + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("订单上传返回" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "订单上传", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + ":" + e.getMessage());
-
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 杂发单上传erp服务
-	 */
-	public static boolean uploadSaorder_ZF_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t5.agentnum,t6.erpagentnum,t7.hrcode from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid left join sys_hr t7 on t7.siteid=t1.siteid and t1.changeuserid=t7.userid where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno,t4.stockno from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid left join  st_stock t4 on t1.stockid=t4.stockid and t1.siteid=t4.siteid  where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-
-		String fsonum = saorderRows.get(0).getString("sonum");
-		String checkdate = getDate_Str1(saorderRows.get(0).getDate("checkdate"));
-		String fnotes = saorderRows.get(0).getString("remarks");
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"ina_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"ina00\" value=\"1\"/>");// 单据类型
-		xmlbuffer.append("<Field name=\"ina01\" value=\"PWI1\"/>");// 单据编号
-		xmlbuffer.append("<Field name=\"inaud06\" value=\"" + fsonum + "\"/>");// 单据编号
-		xmlbuffer.append("<Field name=\"ina03\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"ina07\" value=\"" + fnotes + "\"/>");// 备注
-		xmlbuffer.append("<Field name=\"ina11\" value=\"" + saorderRows.get(0).getString("hrcode").toLowerCase() + "\"/>");// 申请人
-		// xmlbuffer.append("<Field name=\"ina04\" value=\"" + "J61000" + "\"/>");//申请部门
-
-		xmlbuffer.append("<Detail name=\"inb_file\" node_id=\"1_1\">");
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String warehouse = row.getString("stockno");
-				String location = row.getString("position");
-				String lot = row.getString("batchno");
-				double fqty = row.getDouble("qty");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"inb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"inb05\" value=\"" + warehouse + "\"/>");// 仓库
-				xmlbuffer.append("<Field name=\"inb06\" value=\"" + location + "\"/>");// 库位
-				xmlbuffer.append("<Field name=\"inb07\" value=\"" + lot + "\"/>");// 批号
-				xmlbuffer.append("<Field name=\"inb09\" value=\"" + fqty + "\"/>");// 异动数量
-				xmlbuffer.append("<Field name=\"inb15\" value=\"" + "A070" + "\"/>");// 理由码
-				xmlbuffer.append("</Record>");
-			}
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("杂发单上传请求" + fsonum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest esoRequest = new CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse esoResponse = portType
-					.createMiscIssueDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("杂发单上传请求" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "样品订单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借出单上传erp服务
-	 */
-	public static boolean uploadBorrow_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t4.hrcode,t5.agentnum,t6.erpagentnum,t8.erpagentnum payentcode,t9.erpagentnum recentcode from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid  left join sys_enterprise t7 on t7.sys_enterpriseid=t1.pay_enterpriseid and t7.siteid=t1.siteid left join sys_dataextend t8 on t8.ownertable='sys_enterprise' and t8.ownerid=t7.sys_enterpriseid and t8.siteid=t7.siteid left join sys_dataextend t9 on t9.ownertable='sys_enterprise' and t9.ownerid=t3.sys_enterpriseid and t9.siteid=t3.siteid  where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-		Row saorder = saorderRows.get(0);
-
-		String fsonum = saorder.getString("sonum");
-		String hrcode = saorderRows.get(0).getString("hrcode");
-		String fsaler = saorder.getString("salername");
-		String checkdate = getDate_Str1(saorder.getDate("checkdate"));
-		String fagentnum = saorder.getString("agentnum");
-		String fcontact = saorder.getString("name");
-		String fphonenumber = saorder.getString("phonenumber");
-		String faddress = saorder.getString("faddress");
-		String fnotes = saorder.getString("remarks");
-		String fprojectname = "";
-		String frecagentnum = saorderRows.get(0).getString("recentcode");
-		String ftype = saorder.getString("type");
-		// String ferptype = "ZSO1";
-		String ferptype = "ZSO1";
-
-		if (!StringUtils.isBlank(saorderRows.get(0).getString("erpagentnum"))) {
-			fagentnum = saorderRows.get(0).getString("erpagentnum");
-		}
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"" + 8 + "\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + ferptype + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea03\" value=\"" + fagentnum + "\"/>");// 客户编号
-		xmlbuffer.append("<Field name=\"oea04\" value=\"" + frecagentnum + "\"/>");// 客户编号
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fsonum + "\"/>");// 借出单号
-		xmlbuffer.append("<Field name=\"oea14\" value=\"" + hrcode.toLowerCase() + "\"/>");// 业务员
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + fcontact + ";" + fphonenumber + ";" + faddress + "\"/>");// 地址
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + saorder.getString("province") + "->"
-				+ saorder.getString("city") + "->" + saorder.getString("county") + "\"/>");// 省市县
-		xmlbuffer.append("<Field name=\"oap044\" value=\"" + fprojectname + "\"/>");// 项目
-		xmlbuffer.append("<Field name=\"oeaud01\" value=\"" + fnotes + "\"/>");// 备注
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				String fplandate = getDate_Str1(row.getDate("deliverydate"));
-				String fdetailnotes = row.getString("remarks");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				long frownum = row.getLong("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"oeb11\" value=\"" + fitemno + "\"/>");// 客户产品编码(DRP商品编号)
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb15\" value=\"" + fplandate + "\"/>");// 交货日期
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("<Field name=\"oebud04\" value=\"" + fsonum + "\"/>");// 借出单号
-				xmlbuffer.append("<Field name=\"oebud05\" value=\"" + frownum + "\"/>");// 行号
-				String fbackdate = getDate_Str1(row.getDate("toolbackdate"));
-				xmlbuffer.append("<Field name=\"oeb30\" value=\"" + fbackdate + "\"/>");// 预计归还日期
-
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借出单上传请求" + fsonum + xmlbuffer.toString());
-		try {
-
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借出单上传请求" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "工具借用", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			e.printStackTrace();
-			logger.info("借出单上传错误" + fsonum + e.getMessage());
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借货转销售上传erp服务
-	 */
-	public static boolean uploadBorrowToSale_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-
-		Rows aftersalesmagRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum from sa_aftersalesmag t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows aftersalesmagdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.rowno from sa_aftersalesmag_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t2.rowno");
-
-		if (aftersalesmagRows.isEmpty()) {
-			return issucess;
-		}
-
-		if (StringUtils.isBlank(aftersalesmagRows.get(0).getString("sonum"))) {
-			return issucess;
-		}
-		Row taftersalesmag = aftersalesmagRows.get(0);
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_erpupdatelog where ownertable='sa_order' and ownerid="
-						+ aftersalesmagRows.get(0).getLong("sa_orderid") + "order by createdate desc");
-
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-		String fbillnum = taftersalesmag.getString("billno");
-		String checkdate = getDate_Str1(taftersalesmag.getDate("checkdate"));
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"" + 9 + "\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + "3SO1" + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fbillnum + "\"/>");// 单号
-		xmlbuffer.append("<Field name=\"oea12\" value=\"" + ferpbillno + "\"/>");// 原借出单号
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-
-		if (aftersalesmagdetailRows.isEmpty()) {
-			for (Row row : aftersalesmagdetailRows) {
-				double fqty = row.getDouble("qty");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				int fsorownum = row.getInteger("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb71\" value=\"" + fsorownum + "\"/>");// 原借出单行号
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借货转销售上传请求" + fbillnum + xmlbuffer.toString());
-		try {
-
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借货转销售上传请求" + fbillnum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_aftersalesmag", uniqueIDValue, "返退单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_aftersalesmag", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("借货转销售错误" + fbillnum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借货退回上传erp服务
-	 */
-	public static boolean uploadBorrowToReturn_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows aftersalesmagRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum from sa_aftersalesmag t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows aftersalesmagdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.rowno,t2.itemno from sa_aftersalesmag_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t2.rowno");
-
-		if (aftersalesmagRows.isEmpty()) {
-			return issucess;
-		}
-		if (StringUtils.isBlank(aftersalesmagRows.get(0).getString("sonum"))) {
-			return issucess;
-		}
-		Row taftersalesmag = aftersalesmagRows.get(0);
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_erpupdatelog where ownertable='sa_order' and ownerid="
-						+ aftersalesmagRows.get(0).getLong("sa_orderid") + "order by createdate desc");
-
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-		String fbillnum = taftersalesmag.getString("billno");
-		String checkdate = getDate_Str1(taftersalesmag.getDate("checkdate"));
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oha01\" value=\"" + "ZSR1" + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oha02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oha05\" value=\"" + "5" + "\"/>");// 销退类型
-		xmlbuffer.append("<Field name=\"oha09\" value=\"" + "6" + "\"/>");// 销退方式
-		xmlbuffer.append("<Field name=\"oha16\" value=\"" + ferpbillno + "\"/>");// 借出单号
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-		if (aftersalesmagdetailRows.isEmpty()) {
-			for (Row row : aftersalesmagdetailRows) {
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				int fsorownum = row.getInteger("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"ohb04\" value=\"" + fitemno + "\"/>");// 料号
-				xmlbuffer.append("<Field name=\"ohb09\" value=\"" + "W11" + "\"/>");// 仓库
-				xmlbuffer.append("<Field name=\"ohb091\" value=\"" + "" + "\"/>");// 库位
-				xmlbuffer.append("<Field name=\"ohb092\" value=\"" + "" + "\"/>");// 批号
-				xmlbuffer.append("<Field name=\"ohb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"ohb31\" value=\"" + ferpbillno + "\"/>");// 借出单号
-				xmlbuffer.append("<Field name=\"ohb32\" value=\"" + fsorownum + "\"/>");// 借出单号项次
-				xmlbuffer.append("<Field name=\"ohb50\" value=\"" + "A210" + "\"/>");// 理由编号号
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借货退回上传请求" + fbillnum + xmlbuffer.toString());
-		try {
-
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest esoRequest = new CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse esoResponse = portType
-					.createSalesReturnEso(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借货退回上传请求" + fbillnum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_aftersalesmag", uniqueIDValue, "借货退回", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_aftersalesmag", uniqueIDValue, document);
-
-		} catch (Exception e) {
-			logger.info("借货退回上传错误" + fbillnum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 发货单上传erp服务
-	 */
-	public static boolean uploadSainvoice_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows dispatchRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum,t3.address,t3.province,t3.city,t3.county from sa_dispatch t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid where t1.sa_dispatchid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows dispatchdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno,t2.rowno sorowno from sa_dispatch_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_dispatchid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-		if (dispatchRows.isEmpty()) {
-			return issucess;
-		}
-		Row sainvoice = dispatchRows.get(0);
-
-		String fsonum = sainvoice.getString("sonum");
-		String finvonum = sainvoice.getString("billno");
-		String recheckdate = getDate_Str1(sainvoice.getDate("recheckdate"));
-		String fdate = getDate_Str1(sainvoice.getDate("billdate"));
-		String faddress = sainvoice.getString("address");
-		String fnotes = sainvoice.getString("remarks");
-		String ftype = "PSA1";
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oga_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oga01\" value=\"" + ftype + "\"/>");
-		xmlbuffer.append("<Field name=\"oga02\" value=\"" + recheckdate + "\"/>");
-		xmlbuffer.append("<Field name=\"oga16\" value=\"" + fsonum + "\"/>");
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + faddress + "\"/>");
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + sainvoice.getString("province") + "->"
-				+ sainvoice.getString("city") + "->" + sainvoice.getString("county") + "\"/>");
-		xmlbuffer.append("<Field name=\"ogaud01\" value=\"" + fnotes + "\"/>");
-		xmlbuffer.append("<Field name=\"ogaud02\" value=\"" + finvonum + "\"/>");
-
-		xmlbuffer.append("<Detail name=\"ogb_file\" node_id=\"1_1\">");
-
-		if (!dispatchdetailRows.isEmpty()) {
-			for (Row row : dispatchdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				double fqty = row.getDouble("qty");
-				// String fplandate = getDate_Str1(detailpao.getDate("fplandate"));
-				int frownum = row.getInteger("rowno");
-				int fsorownum = row.getInteger("sorowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"ogb03\" value=\"" + frownum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb04\" value=\"" + ferpitemno + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb12\" value=\"" + fqty + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb31\" value=\"" + fsonum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb32\" value=\"" + fsorownum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb1003\" value=\"" + fdate + "\"/>");
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("发货单上传" + finvonum + xmlbuffer.toString());
-		try {
-
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateShippingNoticeESORequestCreateShippingNoticeESORequest esoRequest = new CreateShippingNoticeESORequestCreateShippingNoticeESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse esoResponse = portType
-					.createShippingNoticeESO(esoRequest);
-
-			String result = esoResponse.getResponse();
-			logger.info("发货单返回" + finvonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_dispatch", uniqueIDValue, "发货单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_dispatch", uniqueIDValue, document);
-
-		} catch (Exception e) {
-			logger.info("发货单上传错误" + finvonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 上传日志更新
-	 *
-	 * @param controller
-	 * @param ownertable
-	 * @param ownerid
-	 * @param type
-	 * @param request
-	 * @param document
-	 * @return
-	 */
-	public static boolean saveLog(Controller controller, String ownertable, long ownerid, String type, String request,
-			Document document) {
-		boolean issuccess = false;
-		try {
-			SQLFactory sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志新增");
-			sqlFactory.addParameter("sys_erpupdatelogid", controller.createTableID("sys_erpupdatelog"));
-			sqlFactory.addParameter("siteid", controller.siteid);
-			sqlFactory.addParameter("userid", controller.userid);
-			sqlFactory.addParameter("username", controller.username);
-			sqlFactory.addParameter("ownerid", ownerid);
-			sqlFactory.addParameter("ownertable", ownertable);
-			sqlFactory.addParameter("type", type);
-			sqlFactory.addParameter("request", request);
-			sqlFactory.addParameter("response", document.asXML());
-			String status = document.getRootElement().element("Execution").element("Status").attribute("code")
-					.getText();
-			if ("0".equals(status)) {
-				String ferpbillno = document.getRootElement().element("ResponseContent").element("Parameter")
-						.element("Record").element("Field").attribute("value").getText();
-				sqlFactory.addParameter("erpbillno", ferpbillno);
-				sqlFactory.addParameter("errmsg", "");
-				issuccess = true;
-			} else {
-				String ferrmsg = document.getRootElement().element("Execution").element("Status")
-						.attribute("description").getText();
-				sqlFactory.addParameter("erpbillno", 0);
-				sqlFactory.addParameter("errmsg", ferrmsg);
-				issuccess = false;
-			}
-			sqlFactory.addParameter("status", status);
-			controller.dbConnect.runSqlUpdate(sqlFactory);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return issuccess;
-	}
-
-	/**
-	 * 上传日志更新
-	 *
-	 * @param controller
-	 * @param ownertable
-	 * @param ownerid
-	 * @param type
-	 * @param request
-	 * @param document
-	 * @return
-	 */
-	public static boolean saveDataextend(Controller controller, String ownertable, long ownerid, Document document) {
-		boolean issuccess = false;
-		try {
-			Rows rows = controller.dbConnect.runSqlQuery(
-					"select * from sys_dataextend where ownertable='" + ownertable + "' and ownerid=" + ownerid);
-			SQLFactory sqlFactory;
-			if (!rows.isEmpty()) {
-				sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp数据扩展信息更新");
-				sqlFactory.addParameter("sys_dataextendid", rows.get(0).getLong("sys_dataextendid"));
-			} else {
-				sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp数据扩展信息新增");
-				sqlFactory.addParameter("sys_dataextendid", controller.createTableID("sys_dataextend"));
-			}
-			sqlFactory.addParameter("siteid", controller.siteid);
-			sqlFactory.addParameter("userid", controller.userid);
-			sqlFactory.addParameter("username", controller.username);
-			sqlFactory.addParameter("ownerid", ownerid);
-			sqlFactory.addParameter("ownertable", ownertable);
-			String status = document.getRootElement().element("Execution").element("Status").attribute("code")
-					.getText();
-			if ("0".equals(status)) {
-				String ferpbillno = document.getRootElement().element("ResponseContent").element("Parameter")
-						.element("Record").element("Field").attribute("value").getText();
-				sqlFactory.addParameter("erpbillno", ferpbillno);
-				controller.dbConnect.runSqlUpdate(sqlFactory);
-				issuccess = true;
-			} else {
-				issuccess = false;
-			}
-
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return issuccess;
-	}
-
-	public static String getDate_Str1(Date date) {
-		if (date == null) {
-			return "";
-		}
-		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-		return format.format(date.getTime());
-	}
-}

+ 0 - 904
src/custom/beans/uploaderpdata/UploadDataToERP_TZ.java

@@ -1,904 +0,0 @@
-/**
- *
- */
-package beans.uploaderpdata;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.dom4j.Document;
-import org.dom4j.DocumentHelper;
-
-import beans.brand.Brand;
-import beans.uploaderpdata.erpservice.ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest;
-import beans.uploaderpdata.erpservice.ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse;
-import beans.uploaderpdata.erpservice.CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest;
-import beans.uploaderpdata.erpservice.CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse;
-import beans.uploaderpdata.erpservice.CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest;
-import beans.uploaderpdata.erpservice.CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse;
-import beans.uploaderpdata.erpservice.CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest;
-import beans.uploaderpdata.erpservice.CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse;
-import beans.uploaderpdata.erpservice.CreateShippingNoticeESORequestCreateShippingNoticeESORequest;
-import beans.uploaderpdata.erpservice.CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse;
-import beans.uploaderpdata.erpservice.TIPTOPServiceGateWay;
-import beans.uploaderpdata.erpservice.TIPTOPServiceGateWayPortType;
-import common.BaseClass;
-import common.Controller;
-import common.YosException;
-import common.data.Row;
-import common.data.Rows;
-import common.data.RowsMap;
-import common.data.SQLFactory;
-
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-
-/**
- * @author Administrator
- *
- */
-public class UploadDataToERP_TZ extends BaseClass {
-	private static final String SITEID = "IDCZJ10";
-	private static Logger logger = Logger.getLogger(UploadDataToERP_TZ.class);
-
-	/**
-	 * 订单上传erp服务
-	 */
-	public static boolean uploadSaorder_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t4.hrcode,t5.agentnum,t6.erpagentnum,t8.erpagentnum payentcode,t9.erpagentnum recentcode from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid  left join sys_enterprise t7 on t7.sys_enterpriseid=t1.pay_enterpriseid and t7.siteid=t1.siteid left join sys_dataextend t8 on t8.ownertable='sys_enterprise' and t8.ownerid=t7.sys_enterpriseid and t8.siteid=t7.siteid left join sys_dataextend t9 on t9.ownertable='sys_enterprise' and t9.ownerid=t3.sys_enterpriseid and t9.siteid=t3.siteid  where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno,t2.standards from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		ArrayList<Long> ids = saorderdetailRows.toArrayList("itemid", new ArrayList<>());
-		// 商品领域
-		RowsMap tradefieldRowsMap = beans.Item.Item.getTradefieldRowsMap(controller, ids);
-		// 品牌
-		RowsMap brandRowsMap = Brand.getBrandRowsMap(controller, ids);
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-
-		String fsonum = saorderRows.get(0).getString("sonum");
-		String fsaler = saorderRows.get(0).getString("salername");
-		String hrcode = saorderRows.get(0).getString("hrcode");
-		String checkdate = getDate_Str1(saorderRows.get(0).getDate("checkdate"));
-		String fagentnum = saorderRows.get(0).getString("agentnum");
-		String fcontact = saorderRows.get(0).getString("name");
-		String fphonenumber = saorderRows.get(0).getString("phonenumber");
-		String faddress = saorderRows.get(0).getString("address");
-		String fnotes = saorderRows.get(0).getString("remarks");
-		String ftype = saorderRows.get(0).getString("type");
-		String fsaletype = saorderRows.get(0).getString("saletype");
-		String fprojectname = saorderRows.get(0).getString("projectnote");
-		String freviewtype = saorderRows.get(0).getString("reviewtype");
-		String fpayagentnum = saorderRows.get(0).getString("payentcode");
-		String frecagentnum = saorderRows.get(0).getString("recentcode");
-		if ("项目订单".equals(ftype)) {
-			fprojectname = saorderRows.get(0).getString("projectname");
-		}
-
-		String ferptype = "ZSO1";
-//        switch (ftype) {
-//            case "标准订单": {
-//                ftype = "PSO1";
-//                break;
-//            }
-//            default:
-//                break;
-//        }
-
-		if (!StringUtils.isBlank(saorderRows.get(0).getString("erpagentnum"))) {
-			fagentnum = saorderRows.get(0).getString("erpagentnum");
-		}
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + ferptype + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea03\" value=\"" + fpayagentnum + "\"/>");// 付款客户编号
-		xmlbuffer.append("<Field name=\"oea04\" value=\"" + frecagentnum + "\"/>");// 收货客户编号
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fsonum + "\"/>");// 订单编号
-		xmlbuffer.append("<Field name=\"oea14\" value=\"" + hrcode.toLowerCase() + "\"/>");// 业务员
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + fcontact + ";" + fphonenumber + ";" + faddress + "\"/>");// 地址
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + saorderRows.get(0).getString("province") + "->"
-				+ saorderRows.get(0).getString("city") + "->" + saorderRows.get(0).getString("county") + "\"/>");// 省市县
-		xmlbuffer.append("<Field name=\"oap044\" value=\"" + fprojectname + "\"/>");// 项目
-		xmlbuffer.append("<Field name=\"oeaud01\" value=\"" + fnotes + "\"/>");// 备注
-		xmlbuffer.append("<Field name=\"oea25\" value=\"" + fsaletype + "\"/>");// 销售分类
-		xmlbuffer.append("<Field name=\"oeaud10\" value=\"" + freviewtype + "\"/>");// 订单评审类型
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				String fplandate = getDate_Str1(row.getDate("deliverydate"));
-				String fdetailnotes = row.getString("remarks");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				long frownum = row.getLong("rowno");
-				String fproductstandard = row.getString("standards");
-				String fieldname = "";
-				String fbrand = "";
-				if (!tradefieldRowsMap.get(row.getString("itemid")).isEmpty()) {
-					fieldname = tradefieldRowsMap.get(row.getString("itemid")).get(0).getString("tradefield");
-				}
-				if (!brandRowsMap.get(row.getString("itemid")).isEmpty()) {
-					fbrand = brandRowsMap.get(row.getString("itemid")).get(0).getString("brandname");
-				}
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"oeb11\" value=\"" + fitemno + "\"/>");// 客户产品编码(DRP商品编号)
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb15\" value=\"" + fplandate + "\"/>");// 交货日期
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("<Field name=\"oebud04\" value=\"" + fsonum + "\"/>");// 订单号
-				xmlbuffer.append("<Field name=\"oebud05\" value=\"" + frownum + "\"/>");// 行号
-				xmlbuffer.append("<Field name=\"oeb30\" value=\"\"/>");// 预计归还日期
-				xmlbuffer.append("<Field name=\"oao06\" value=\"" + fieldname + "->" + fproductstandard + "->" + fbrand
-						+ "->" + fdetailnotes + "\"/>");
-				xmlbuffer.append("</Record>");
-			}
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("订单上传请求" + fsonum + ":" + xmlbuffer.toString());
-		try {
-
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("订单上传返回" + fsonum + ":" + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "订单上传", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + ":" + e.getMessage());
-
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 订单变更上传erp服务
-	 */
-	public static boolean uploadSaorderChange_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows orderitemsChangeRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum,t7.hrcode from sa_orderitems_change t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid left join sys_hr t7 on t7.siteid=t1.siteid and t1.createuserid=t7.userid where  t1.sa_orderitems_changeid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows orderitemsChangemxRows = controller.dbConnect.runSqlQuery(
-				"select t.*,t3.erpitemno,t1.rowno from sa_orderitems_changemx t left join sa_orderitems t1 on t.sa_orderitemsid=t1.sa_orderitemsid and t.siteid=t1.siteid left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t.itemid=t3.itemid and t.siteid=t3.siteid where t.sa_orderitems_changeid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (orderitemsChangeRows.isEmpty()) {
-			return issucess;
-		}
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_dataextend where ownertable='sa_order' and ownerid="
-						+ orderitemsChangeRows.get(0).getLong("sa_orderid") + " order by changedate desc");
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String fsonum = orderitemsChangeRows.get(0).getString("sonum");
-		String changeby = orderitemsChangeRows.get(0).getString("hrcode").toLowerCase();
-		String fdate = getDate_Str1(orderitemsChangeRows.get(0).getDate("createdate"));
-		boolean isjiean = orderitemsChangeRows.get(0).getString("remarks").equals("订单结案变更");
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oep_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oep01\" value=\"" + ferpbillno + "\"/>");// 订单编号
-		xmlbuffer.append("<Field name=\"oep04\" value=\"" + fdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oep12\" value=\"" + changeby + "\"/>");// 变更人员
-		xmlbuffer.append("<Field name=\"oep13\" value=\"" + "37" + "\"/>");// 理由码代码
-
-		xmlbuffer.append("<Detail name=\"oeq_file\" node_id=\"1_1\">");
-
-		for (Row row : orderitemsChangemxRows) {
-			int frownum = row.getInteger("rowno");
-			BigDecimal fqty = row.getBigDecimal("newvalue");
-			xmlbuffer.append("<Record>");
-			xmlbuffer.append("<Field name=\"oeq03\" value=\"" + frownum + "\"/>");// 行号
-			xmlbuffer.append("<Field name=\"oeq12a\" value=\"" + fqty + "\"/>");// 变更后数量
-			xmlbuffer.append("<Field name=\"oeq13a\" value=\"" + "" + "\"/>");// 变更后单价
-			xmlbuffer.append("<Field name=\"oeq15a\" value=\"" + "" + "\"/>");// 变更后交货日期
-			xmlbuffer.append("<Field name=\"oeq50\" value=\"" + "" + "\"/>");// 备注
-			xmlbuffer.append("<Field name=\"oequd06\" value=\"" + (isjiean ? "Y" : "N") + "\"/>");// 是否结案
-			xmlbuffer.append("</Record>");
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("订单变更上传请求" + fsonum + ":" + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest esoRequest = new ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse esoResponse = portType
-					.changeSalesOrderDataEso(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("订单变更上传返回" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_orderitems_change", uniqueIDValue, "订单变更", xmlbuffer.toString(),
-					document);
-			issucess = saveDataextend(controller, "sa_orderitems_change", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 杂发单上传erp服务
-	 */
-	public static boolean uploadSaorder_ZF_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t5.agentnum,t6.erpagentnum,t7.hrcode from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid left join sys_hr t7 on t7.siteid=t1.siteid and t1.changeuserid=t7.userid  where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno,t4.stockno from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid left join  st_stock t4 on t1.stockid=t4.stockid and t1.siteid=t4.siteid  where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-
-		String fsonum = saorderRows.get(0).getString("sonum");
-		String checkdate = getDate_Str1(saorderRows.get(0).getDate("checkdate"));
-		String fnotes = saorderRows.get(0).getString("remarks");
-		String freviewtype = saorderRows.get(0).getString("reviewtype");
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"ina_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"ina00\" value=\"1\"/>");// 单据类型
-		xmlbuffer.append("<Field name=\"ina01\" value=\"ZWI1\"/>");// 单据编号
-		xmlbuffer.append("<Field name=\"inaud06\" value=\"" + fsonum + "\"/>");// 单据编号
-		xmlbuffer.append("<Field name=\"ina03\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"ina07\" value=\"" + fnotes + "\"/>");// 备注
-		xmlbuffer.append(
-				"<Field name=\"ina11\" value=\"" + saorderRows.get(0).getString("hrcode").toLowerCase() + "\"/>");// 申请人
-		// xmlbuffer.append("<Field name=\"ina04\" value=\"" + "J61000" + "\"/>");//申请部门
-		xmlbuffer.append("<Field name=\"oeaud10\" value=\"" + freviewtype + "\"/>");// 订单评审类型
-
-		xmlbuffer.append("<Detail name=\"inb_file\" node_id=\"1_1\">");
-
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String warehouse = row.getString("stockno");
-				String location = row.getString("position");
-				String lot = row.getString("batchno");
-				double fqty = row.getDouble("qty");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"inb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"inb05\" value=\"" + warehouse + "\"/>");// 仓库
-				xmlbuffer.append("<Field name=\"inb06\" value=\"" + location + "\"/>");// 库位
-				xmlbuffer.append("<Field name=\"inb07\" value=\"" + lot + "\"/>");// 批号
-				xmlbuffer.append("<Field name=\"inb09\" value=\"" + fqty + "\"/>");// 异动数量
-				xmlbuffer.append("<Field name=\"inb15\" value=\"" + "A070" + "\"/>");// 理由码
-				xmlbuffer.append("</Record>");
-			}
-		}
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("杂发单上传请求" + fsonum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest esoRequest = new CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse esoResponse = portType
-					.createMiscIssueDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("杂发单上传请求" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "样品订单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("订单上传错误" + fsonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借出单上传erp服务
-	 */
-	public static boolean uploadBorrow_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-
-		Rows saorderRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.projectname,t3.address,t3.phonenumber,t3.name,t3.province,t3.city,t3.county,t4.`name` salername,t4.hrcode,t5.agentnum,t6.erpagentnum,t8.erpagentnum payentcode,t9.erpagentnum recentcode from sa_order t1 left join sa_project t2  on  t1.sa_projectid=t2.sa_projectid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid left join sys_hr t4 on t1.saler_hrid=t4.hrid and t1.siteid=t4.siteid left join sa_agents t5 on t1.sys_enterpriseid=t5.sys_enterpriseid and t1.siteid=t5.siteid left join sys_dataextend t6 on t6.ownertable='sys_enterprise' and t6.ownerid=t5.sys_enterpriseid and t6.siteid=t5.siteid  left join sys_enterprise t7 on t7.sys_enterpriseid=t1.pay_enterpriseid and t7.siteid=t1.siteid left join sys_dataextend t8 on t8.ownertable='sys_enterprise' and t8.ownerid=t7.sys_enterpriseid and t8.siteid=t7.siteid left join sys_dataextend t9 on t9.ownertable='sys_enterprise' and t9.ownerid=t3.sys_enterpriseid and t9.siteid=t3.siteid  where t1.checkdate is not null and t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows saorderdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno from sa_orderitems t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_orderid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-
-		if (saorderRows.isEmpty()) {
-			return issucess;
-		}
-		Row saorder = saorderRows.get(0);
-
-		String fsonum = saorder.getString("sonum");
-		String fsaler = saorder.getString("salername");
-		String hrcode = saorder.getString("hrcode");
-		String checkdate = getDate_Str1(saorder.getDate("checkdate"));
-		String fagentnum = saorder.getString("agentnum");
-		String fcontact = saorder.getString("name");
-		String fphonenumber = saorder.getString("phonenumber");
-		String faddress = saorder.getString("faddress");
-		String fnotes = saorder.getString("remarks");
-		String fprojectname = "";
-		String freviewtype = saorderRows.get(0).getString("reviewtype");
-		String fpayagentnum = saorderRows.get(0).getString("payentcode");
-		String frecagentnum = saorderRows.get(0).getString("recentcode");
-		String ftype = saorder.getString("type");
-		// String ferptype = "ZSO1";
-		String ferptype = "ZSF1";
-
-		if (!StringUtils.isBlank(saorderRows.get(0).getString("erpagentnum"))) {
-			fagentnum = saorderRows.get(0).getString("erpagentnum");
-		}
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"" + 8 + "\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + ferptype + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea03\" value=\"" + fpayagentnum + "\"/>");// 付款客户编号
-		xmlbuffer.append("<Field name=\"oea04\" value=\"" + frecagentnum + "\"/>");// 收货客户编号
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fsonum + "\"/>");// 借出单号
-		xmlbuffer.append("<Field name=\"oea14\" value=\"" + hrcode.toLowerCase() + "\"/>");// 业务员
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + fcontact + ";" + fphonenumber + ";" + faddress + "\"/>");// 地址
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + saorder.getString("province") + "->"
-				+ saorder.getString("city") + "->" + saorder.getString("county") + "\"/>");// 省市县
-		xmlbuffer.append("<Field name=\"oap044\" value=\"" + fprojectname + "\"/>");// 项目
-		xmlbuffer.append("<Field name=\"oeaud01\" value=\"" + fnotes + "\"/>");// 备注
-		xmlbuffer.append("<Field name=\"oeaud10\" value=\"" + freviewtype + "\"/>");// 订单评审类型
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-
-		if (!saorderdetailRows.isEmpty()) {
-			for (Row row : saorderdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				String fplandate = getDate_Str1(row.getDate("deliverydate"));
-				String fdetailnotes = row.getString("remarks");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				long frownum = row.getLong("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb04\" value=\"" + ferpitemno + "\"/>");// 料号(ERP商品编号)
-				xmlbuffer.append("<Field name=\"oeb11\" value=\"" + fitemno + "\"/>");// 客户产品编码(DRP商品编号)
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb15\" value=\"" + fplandate + "\"/>");// 交货日期
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("<Field name=\"oebud04\" value=\"" + fsonum + "\"/>");// 借出单号
-				xmlbuffer.append("<Field name=\"oebud05\" value=\"" + frownum + "\"/>");// 行号
-				String fbackdate = getDate_Str1(row.getDate("toolbackdate"));
-				xmlbuffer.append("<Field name=\"oeb30\" value=\"" + fbackdate + "\"/>");// 预计归还日期
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借出单上传请求" + fsonum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借出单上传请求" + fsonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_order", uniqueIDValue, "工具借用", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_order", uniqueIDValue, document);
-		} catch (Exception e) {
-			e.printStackTrace();
-			logger.info("借出单上传错误" + fsonum + e.getMessage());
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借货转销售上传erp服务
-	 */
-	public static boolean uploadBorrowToSale_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-
-		Rows aftersalesmagRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum from sa_aftersalesmag t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows aftersalesmagdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.rowno from sa_aftersalesmag_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t2.rowno");
-
-		if (aftersalesmagRows.isEmpty()) {
-			return issucess;
-		}
-
-		if (StringUtils.isBlank(aftersalesmagRows.get(0).getString("sonum"))) {
-			return issucess;
-		}
-		Row taftersalesmag = aftersalesmagRows.get(0);
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_erpupdatelog where ownertable='sa_order' and ownerid="
-						+ aftersalesmagRows.get(0).getLong("sa_orderid") + "order by createdate desc");
-
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-		String fbillnum = taftersalesmag.getString("billno");
-		String checkdate = getDate_Str1(taftersalesmag.getDate("checkdate"));
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oea_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oea00\" value=\"" + 9 + "\"/>");
-		xmlbuffer.append("<Field name=\"oea01\" value=\"" + "" + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oea02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oea10\" value=\"" + fbillnum + "\"/>");// 单号
-		xmlbuffer.append("<Field name=\"oea12\" value=\"" + ferpbillno + "\"/>");// 原借出单号
-
-		xmlbuffer.append("<Detail name=\"oeb_file\" node_id=\"1_1\">");
-
-		if (aftersalesmagdetailRows.isEmpty()) {
-			for (Row row : aftersalesmagdetailRows) {
-				double fqty = row.getDouble("qty");
-				double frateprice = row.getDouble("price");
-				double frateamount = row.getDouble("amount");
-				int fsorownum = row.getInteger("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"oeb71\" value=\"" + fsorownum + "\"/>");// 原借出单行号
-				xmlbuffer.append("<Field name=\"oeb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"oeb13\" value=\"" + frateprice + "\"/>");// 单价
-				xmlbuffer.append("<Field name=\"oeb14t\" value=\"" + frateamount + "\"/>");// 金额
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借货转销售上传请求" + fbillnum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest esoRequest = new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse esoResponse = portType
-					.createSalesOrderDataESO(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借货转销售上传请求" + fbillnum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_aftersalesmag", uniqueIDValue, "返退单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_aftersalesmag", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("借货转销售错误" + fbillnum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 借货退回上传erp服务
-	 */
-	public static boolean uploadBorrowToReturn_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows aftersalesmagRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum from sa_aftersalesmag t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows aftersalesmagdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.rowno,t2.itemno from sa_aftersalesmag_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.sa_aftersalesmagid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t2.rowno");
-
-		if (aftersalesmagRows.isEmpty()) {
-			return issucess;
-		}
-		if (StringUtils.isBlank(aftersalesmagRows.get(0).getString("sonum"))) {
-			return issucess;
-		}
-		Row taftersalesmag = aftersalesmagRows.get(0);
-
-		Rows erpupdatelogRows = controller.dbConnect
-				.runSqlQuery("select * from sys_erpupdatelog where ownertable='sa_order' and ownerid="
-						+ aftersalesmagRows.get(0).getLong("sa_orderid") + "order by createdate desc");
-
-		if (erpupdatelogRows.isEmpty()) {
-			return issucess;
-		}
-		String ferpbillno = erpupdatelogRows.get(0).getString("erpbillno");
-		String fbillnum = taftersalesmag.getString("billno");
-		String checkdate = getDate_Str1(taftersalesmag.getDate("checkdate"));
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oha_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oha01\" value=\"" + "" + "\"/>");// 单别
-		xmlbuffer.append("<Field name=\"oha02\" value=\"" + checkdate + "\"/>");// 单据日期
-		xmlbuffer.append("<Field name=\"oha05\" value=\"" + "5" + "\"/>");// 销退类型
-		xmlbuffer.append("<Field name=\"oha09\" value=\"" + "6" + "\"/>");// 销退方式
-		xmlbuffer.append("<Field name=\"oha16\" value=\"" + ferpbillno + "\"/>");// 借出单号
-
-		xmlbuffer.append("<Detail name=\"ohb_file\" node_id=\"1_1\">");
-		if (aftersalesmagdetailRows.isEmpty()) {
-			for (Row row : aftersalesmagdetailRows) {
-				String fitemno = row.getString("itemno");
-				double fqty = row.getDouble("qty");
-				int fsorownum = row.getInteger("rowno");
-
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"ohb04\" value=\"" + fitemno + "\"/>");// 料号
-				xmlbuffer.append("<Field name=\"ohb09\" value=\"" + "W11" + "\"/>");// 仓库
-				xmlbuffer.append("<Field name=\"ohb091\" value=\"" + "" + "\"/>");// 库位
-				xmlbuffer.append("<Field name=\"ohb092\" value=\"" + "" + "\"/>");// 批号
-				xmlbuffer.append("<Field name=\"ohb12\" value=\"" + fqty + "\"/>");// 数量
-				xmlbuffer.append("<Field name=\"ohb31\" value=\"" + ferpbillno + "\"/>");// 借出单号
-				xmlbuffer.append("<Field name=\"ohb32\" value=\"" + fsorownum + "\"/>");// 借出单号项次
-				xmlbuffer.append("<Field name=\"ohb50\" value=\"" + "A210" + "\"/>");// 理由编号号
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("借货退回上传请求" + fbillnum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest esoRequest = new CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse esoResponse = portType
-					.createSalesReturnEso(esoRequest);
-			String result = esoResponse.getResponse();
-			logger.info("借货退回上传请求" + fbillnum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_aftersalesmag", uniqueIDValue, "借货退回", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_aftersalesmag", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("借货退回上传错误" + fbillnum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 发货单上传erp服务
-	 */
-	public static boolean uploadSainvoice_post(Controller controller, long uniqueIDValue) throws YosException {
-		boolean issucess = false;
-		Rows dispatchRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t2.sonum,t3.address,t3.province,t3.city,t3.county from sa_dispatch t1 left join sa_order t2 on t1.sa_orderid=t2.sa_orderid and t1.siteid=t2.siteid left join  sys_enterprise_contacts t3 on t1.rec_contactsid=t3.contactsid and t1.siteid=t3.siteid where t1.sa_dispatchid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "'");
-		Rows dispatchdetailRows = controller.dbConnect.runSqlQuery(
-				"select t1.*,t3.erpitemno,t2.rowno sorowno,t2.itemname from sa_dispatch_items t1 left join sa_orderitems t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid left join  plm_itemextend t3 on t1.itemid=t3.itemid and t1.siteid=t3.siteid where t1.sa_dispatchid="
-						+ uniqueIDValue + " and t1.siteid='" + controller.siteid + "' order by t1.rowno");
-		if (dispatchRows.isEmpty()) {
-			return issucess;
-		}
-		Row sainvoice = dispatchRows.get(0);
-
-		String fsonum = sainvoice.getString("sonum");
-		String finvonum = sainvoice.getString("billno");
-		String recheckdate = getDate_Str1(sainvoice.getDate("recheckdate"));
-		String fdate = getDate_Str1(sainvoice.getDate("billdate"));
-		String faddress = sainvoice.getString("address");
-		String fnotes = sainvoice.getString("remarks");
-		String ftype = "ZSA1";
-
-		StringBuffer xmlbuffer = new StringBuffer();
-		xmlbuffer.append("<Request>");
-		xmlbuffer.append("<Access>");
-		xmlbuffer.append("<Authentication user=\"tiptop\" password=\"\"/>");
-		xmlbuffer.append("<Connection application=\"ESO\" source=\"192.168.10.115\"/>");
-		xmlbuffer.append("<Organization name=\"" + SITEID + "\"/>");
-		xmlbuffer.append("<Locale language=\"zh_cn\"/>");
-		xmlbuffer.append("</Access>");
-		xmlbuffer.append("<RequestContent>");
-		xmlbuffer.append("<Document>");
-		xmlbuffer.append("<RecordSet id=\"1\">");
-		xmlbuffer.append("<Master name=\"oga_file\">");
-		xmlbuffer.append("<Record>");
-		xmlbuffer.append("<Field name=\"oga01\" value=\"" + ftype + "\"/>");
-		xmlbuffer.append("<Field name=\"oga02\" value=\"" + recheckdate + "\"/>");
-		xmlbuffer.append("<Field name=\"oga16\" value=\"" + fsonum + "\"/>");
-		xmlbuffer.append("<Field name=\"oap041\" value=\"" + faddress + "\"/>");
-		xmlbuffer.append("<Field name=\"oap042\" value=\"" + sainvoice.getString("province") + "->"
-				+ sainvoice.getString("city") + "->" + sainvoice.getString("county") + "\"/>");
-		xmlbuffer.append("<Field name=\"ogaud01\" value=\"" + fnotes + "\"/>");
-		xmlbuffer.append("<Field name=\"ogaud02\" value=\"" + finvonum + "\"/>");
-
-		xmlbuffer.append("<Detail name=\"ogb_file\" node_id=\"1_1\">");
-
-		if (!dispatchdetailRows.isEmpty()) {
-			for (Row row : dispatchdetailRows) {
-				String ferpitemno = row.getString("erpitemno");
-				double fqty = row.getDouble("qty");
-				// String fplandate = getDate_Str11(detailpao.getDate("fplandate"));
-				int frownum = row.getInteger("rowno");
-				int fsorownum = row.getInteger("sorowno");
-				String fitemname = row.getString("itemname");
-				xmlbuffer.append("<Record>");
-				xmlbuffer.append("<Field name=\"ogb03\" value=\"" + frownum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb04\" value=\"" + ferpitemno + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb12\" value=\"" + fqty + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb31\" value=\"" + fsonum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb32\" value=\"" + fsorownum + "\"/>");
-				xmlbuffer.append("<Field name=\"ogb1003\" value=\"" + fdate + "\"/>");
-				xmlbuffer.append("<Field name=\"ogbud01\" value=\"" + fitemname + "\"/>");
-				xmlbuffer.append("</Record>");
-			}
-		}
-
-		xmlbuffer.append("</Detail>");
-
-		xmlbuffer.append("</Record>");
-		xmlbuffer.append("</Master>");
-		xmlbuffer.append("</RecordSet>");
-		xmlbuffer.append("</Document>");
-		xmlbuffer.append("</RequestContent>");
-		xmlbuffer.append("</Request>");
-		logger.info("发货单上传" + finvonum + xmlbuffer.toString());
-		try {
-			TIPTOPServiceGateWay gateWay = new TIPTOPServiceGateWay();
-			TIPTOPServiceGateWayPortType portType = gateWay.getTIPTOPServiceGateWayPortType();
-
-			CreateShippingNoticeESORequestCreateShippingNoticeESORequest esoRequest = new CreateShippingNoticeESORequestCreateShippingNoticeESORequest();
-			esoRequest.setRequest(xmlbuffer.toString());
-			CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse esoResponse = portType
-					.createShippingNoticeESO(esoRequest);
-
-			String result = esoResponse.getResponse();
-			logger.info("发货单返回" + finvonum + result);
-
-			Document document = DocumentHelper.parseText(result);
-			issucess = saveLog(controller, "sa_dispatch", uniqueIDValue, "发货单", xmlbuffer.toString(), document);
-			issucess = saveDataextend(controller, "sa_dispatch", uniqueIDValue, document);
-		} catch (Exception e) {
-			logger.info("发货单上传错误" + finvonum + e.getMessage());
-			e.printStackTrace();
-		}
-		return issucess;
-	}
-
-	/**
-	 * 上传日志更新
-	 *
-	 * @param controller
-	 * @param ownertable
-	 * @param ownerid
-	 * @param type
-	 * @param request
-	 * @param document
-	 * @return
-	 */
-	public static boolean saveLog(Controller controller, String ownertable, long ownerid, String type, String request,
-			Document document) {
-		boolean issuccess = false;
-		try {
-			SQLFactory sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志新增");
-			sqlFactory.addParameter("sys_erpupdatelogid", controller.createTableID("sys_erpupdatelog"));
-			sqlFactory.addParameter("siteid", controller.siteid);
-			sqlFactory.addParameter("userid", controller.userid);
-			sqlFactory.addParameter("username", controller.username);
-			sqlFactory.addParameter("ownerid", ownerid);
-			sqlFactory.addParameter("ownertable", ownertable);
-			sqlFactory.addParameter("type", type);
-			sqlFactory.addParameter("request", request);
-			sqlFactory.addParameter("response", document.asXML());
-			String status = document.getRootElement().element("Execution").element("Status").attribute("code")
-					.getText();
-			if ("0".equals(status)) {
-				String ferpbillno = document.getRootElement().element("ResponseContent").element("Parameter")
-						.element("Record").element("Field").attribute("value").getText();
-				sqlFactory.addParameter("erpbillno", ferpbillno);
-				sqlFactory.addParameter("errmsg", "");
-				issuccess = true;
-			} else {
-				String ferrmsg = document.getRootElement().element("Execution").element("Status")
-						.attribute("description").getText();
-				sqlFactory.addParameter("erpbillno", 0);
-				sqlFactory.addParameter("errmsg", ferrmsg);
-				issuccess = false;
-			}
-			sqlFactory.addParameter("status", status);
-			controller.dbConnect.runSqlUpdate(sqlFactory);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return issuccess;
-	}
-
-	/**
-	 * 上传日志更新
-	 *
-	 * @param controller
-	 * @param ownertable
-	 * @param ownerid
-	 * @param type
-	 * @param request
-	 * @param document
-	 * @return
-	 */
-	public static boolean saveDataextend(Controller controller, String ownertable, long ownerid, Document document) {
-		boolean issuccess = false;
-		try {
-			Rows rows = controller.dbConnect.runSqlQuery(
-					"select * from sys_dataextend where ownertable='" + ownertable + "' and ownerid=" + ownerid);
-			SQLFactory sqlFactory;
-			if (!rows.isEmpty()) {
-				sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp数据扩展信息更新");
-				sqlFactory.addParameter("sys_dataextendid", rows.get(0).getLong("sys_dataextendid"));
-			} else {
-				sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp数据扩展信息新增");
-				sqlFactory.addParameter("sys_dataextendid", controller.createTableID("sys_dataextend"));
-			}
-			sqlFactory.addParameter("siteid", controller.siteid);
-			sqlFactory.addParameter("userid", controller.userid);
-			sqlFactory.addParameter("username", controller.username);
-			sqlFactory.addParameter("ownerid", ownerid);
-			sqlFactory.addParameter("ownertable", ownertable);
-			String status = document.getRootElement().element("Execution").element("Status").attribute("code")
-					.getText();
-			logger.info("0".equals(status));
-			if ("0".equals(status)) {
-				String ferpbillno = document.getRootElement().element("ResponseContent").element("Parameter")
-						.element("Record").element("Field").attribute("value").getText();
-				sqlFactory.addParameter("erpbillno", ferpbillno);
-				logger.info("上传日志" + sqlFactory.getSQL());
-				controller.dbConnect.runSqlUpdate(sqlFactory);
-				issuccess = true;
-			} else {
-				issuccess = false;
-			}
-
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return issuccess;
-	}
-
-	public static String getDate_Str1(Date date) {
-		if (date == null) {
-			return "";
-		}
-		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-		return format.format(date.getTime());
-	}
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>ChangeSalesOrderData_esoRequest_ChangeSalesOrderData_esoRequest complex type的 Java 类。
- * 
- * <p>以下模式片段指定包含在此类中的预期内容。
- * 
- * <pre>
- * &lt;complexType name="ChangeSalesOrderData_esoRequest_ChangeSalesOrderData_esoRequest">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="request" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ChangeSalesOrderData_esoRequest_ChangeSalesOrderData_esoRequest", propOrder = {
-    "request"
-})
-public class ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest {
-
-    @XmlElement(required = true, nillable = true)
-    protected String request;
-
-    /**
-     * 获取request属性的值。
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getRequest() {
-        return request;
-    }
-
-    /**
-     * 设置request属性的值。
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setRequest(String value) {
-        this.request = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>ChangeSalesOrderData_esoResponse_ChangeSalesOrderData_esoResponse complex type的 Java 类。
- * 
- * <p>以下模式片段指定包含在此类中的预期内容。
- * 
- * <pre>
- * &lt;complexType name="ChangeSalesOrderData_esoResponse_ChangeSalesOrderData_esoResponse">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="response" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ChangeSalesOrderData_esoResponse_ChangeSalesOrderData_esoResponse", propOrder = {
-    "response"
-})
-public class ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse {
-
-    @XmlElement(required = true, nillable = true)
-    protected String response;
-
-    /**
-     * 获取response属性的值。
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getResponse() {
-        return response;
-    }
-
-    /**
-     * 设置response属性的值。
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setResponse(String value) {
-        this.response = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>CreateMiscIssueData_ESORequest_CreateMiscIssueData_ESORequest complex type的 Java 类。
- * 
- * <p>以下模式片段指定包含在此类中的预期内容。
- * 
- * <pre>
- * &lt;complexType name="CreateMiscIssueData_ESORequest_CreateMiscIssueData_ESORequest">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="request" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CreateMiscIssueData_ESORequest_CreateMiscIssueData_ESORequest", propOrder = {
-    "request"
-})
-public class CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest {
-
-    @XmlElement(required = true, nillable = true)
-    protected String request;
-
-    /**
-     * 获取request属性的值。
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getRequest() {
-        return request;
-    }
-
-    /**
-     * 设置request属性的值。
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setRequest(String value) {
-        this.request = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>CreateMiscIssueData_ESOResponse_CreateMiscIssueData_ESOResponse complex type的 Java 类。
- * 
- * <p>以下模式片段指定包含在此类中的预期内容。
- * 
- * <pre>
- * &lt;complexType name="CreateMiscIssueData_ESOResponse_CreateMiscIssueData_ESOResponse">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="response" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CreateMiscIssueData_ESOResponse_CreateMiscIssueData_ESOResponse", propOrder = {
-    "response"
-})
-public class CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse {
-
-    @XmlElement(required = true, nillable = true)
-    protected String response;
-
-    /**
-     * 获取response属性的值。
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getResponse() {
-        return response;
-    }
-
-    /**
-     * 设置response属性的值。
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setResponse(String value) {
-        this.response = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest complex type�� Java �ࡣ
- * 
- * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
- * 
- * <pre>
- * &lt;complexType name="CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="request" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest", propOrder = {
-    "request"
-})
-public class CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest {
-
-    @XmlElement(required = true, nillable = true)
-    protected String request;
-
-    /**
-     * ��ȡrequest���Ե�ֵ��
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getRequest() {
-        return request;
-    }
-
-    /**
-     * ����request���Ե�ֵ��
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setRequest(String value) {
-        this.request = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse complex type�� Java �ࡣ
- * 
- * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
- * 
- * <pre>
- * &lt;complexType name="CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="response" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse", propOrder = {
-    "response"
-})
-public class CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse {
-
-    @XmlElement(required = true, nillable = true)
-    protected String response;
-
-    /**
-     * ��ȡresponse���Ե�ֵ��
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getResponse() {
-        return response;
-    }
-
-    /**
-     * ����response���Ե�ֵ��
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setResponse(String value) {
-        this.response = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>CreateSalesReturn_esoRequest_CreateSalesReturn_esoRequest complex type的 Java 类。
- * 
- * <p>以下模式片段指定包含在此类中的预期内容。
- * 
- * <pre>
- * &lt;complexType name="CreateSalesReturn_esoRequest_CreateSalesReturn_esoRequest">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="request" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CreateSalesReturn_esoRequest_CreateSalesReturn_esoRequest", propOrder = {
-    "request"
-})
-public class CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest {
-
-    @XmlElement(required = true, nillable = true)
-    protected String request;
-
-    /**
-     * 获取request属性的值。
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getRequest() {
-        return request;
-    }
-
-    /**
-     * 设置request属性的值。
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setRequest(String value) {
-        this.request = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>CreateSalesReturn_esoResponse_CreateSalesReturn_esoResponse complex type的 Java 类。
- * 
- * <p>以下模式片段指定包含在此类中的预期内容。
- * 
- * <pre>
- * &lt;complexType name="CreateSalesReturn_esoResponse_CreateSalesReturn_esoResponse">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="response" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CreateSalesReturn_esoResponse_CreateSalesReturn_esoResponse", propOrder = {
-    "response"
-})
-public class CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse {
-
-    @XmlElement(required = true, nillable = true)
-    protected String response;
-
-    /**
-     * 获取response属性的值。
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getResponse() {
-        return response;
-    }
-
-    /**
-     * 设置response属性的值。
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setResponse(String value) {
-        this.response = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/CreateShippingNoticeESORequestCreateShippingNoticeESORequest.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest complex type�� Java �ࡣ
- * 
- * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
- * 
- * <pre>
- * &lt;complexType name="CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="request" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest", propOrder = {
-    "request"
-})
-public class CreateShippingNoticeESORequestCreateShippingNoticeESORequest {
-
-    @XmlElement(required = true, nillable = true)
-    protected String request;
-
-    /**
-     * ��ȡrequest���Ե�ֵ��
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getRequest() {
-        return request;
-    }
-
-    /**
-     * ����request���Ե�ֵ��
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setRequest(String value) {
-        this.request = value;
-    }
-
-}

+ 0 - 62
src/custom/beans/uploaderpdata/erpservice/CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse.java

@@ -1,62 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse complex type�� Java �ࡣ
- * 
- * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
- * 
- * <pre>
- * &lt;complexType name="CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="response" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse", propOrder = {
-    "response"
-})
-public class CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse {
-
-    @XmlElement(required = true, nillable = true)
-    protected String response;
-
-    /**
-     * ��ȡresponse���Ե�ֵ��
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getResponse() {
-        return response;
-    }
-
-    /**
-     * ����response���Ե�ֵ��
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setResponse(String value) {
-        this.response = value;
-    }
-
-}

+ 0 - 215
src/custom/beans/uploaderpdata/erpservice/ObjectFactory.java

@@ -1,215 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each 
- * Java content interface and Java element interface 
- * generated in the service.erpservice package.
- * <p>An ObjectFactory allows you to programatically 
- * construct new instances of the Java representation 
- * for XML content. The Java representation of XML 
- * content can consist of schema derived interfaces 
- * and classes representing the binding of schema 
- * type definitions, element declarations and model 
- * groups.  Factory methods for each of these are 
- * provided in this class.
- * 
- */
-@XmlRegistry
-public class ObjectFactory {
-
-    private final static QName _ChangeSalesOrderDataEsoResponse_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "ChangeSalesOrderData_esoResponse");
-    private final static QName _CreateSalesOrderDataESOResponse_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "CreateSalesOrderData_ESOResponse");
-    private final static QName _ChangeSalesOrderDataEsoRequest_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "ChangeSalesOrderData_esoRequest");
-    private final static QName _CreateShippingNoticeESOResponse_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "CreateShippingNotice_ESOResponse");
-    private final static QName _CreateMiscIssueDataESOResponse_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "CreateMiscIssueData_ESOResponse");
-    private final static QName _CreateSalesReturnEsoResponse_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "CreateSalesReturn_esoResponse");
-    private final static QName _CreateShippingNoticeESORequest_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "CreateShippingNotice_ESORequest");
-    private final static QName _CreateSalesOrderDataESORequest_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "CreateSalesOrderData_ESORequest");
-    private final static QName _CreateMiscIssueDataESORequest_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "CreateMiscIssueData_ESORequest");
-    private final static QName _CreateSalesReturnEsoRequest_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "CreateSalesReturn_esoRequest");
-
-    /**
-     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: service.erpservice
-     * 
-     */
-    public ObjectFactory() {
-    }
-
-    /**
-     * Create an instance of {@link ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest }
-     *
-     */
-    public ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest createChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest() {
-        return new ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest();
-    }
-
-    /**
-     * Create an instance of {@link CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse }
-     * 
-     */
-    public CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse createCreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse() {
-        return new CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse();
-    }
-
-    /**
-     * Create an instance of {@link ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse }
-     *
-     */
-    public ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse createChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse() {
-        return new ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse();
-    }
-
-    /**
-     * Create an instance of {@link CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest }
-     * 
-     */
-    public CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest createCreateSalesOrderDataESORequestCreateSalesOrderDataESORequest() {
-        return new CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest();
-    }
-
-    /**
-     * Create an instance of {@link CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest }
-     *
-     */
-    public CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest createCreateMiscIssueDataESORequestCreateMiscIssueDataESORequest() {
-        return new CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest();
-    }
-
-    /**
-     * Create an instance of {@link CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest }
-     *
-     */
-    public CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest createCreateSalesReturnEsoRequestCreateSalesReturnEsoRequest() {
-        return new CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest();
-    }
-
-    /**
-     * Create an instance of {@link CreateShippingNoticeESORequestCreateShippingNoticeESORequest }
-     * 
-     */
-    public CreateShippingNoticeESORequestCreateShippingNoticeESORequest createCreateShippingNoticeESORequestCreateShippingNoticeESORequest() {
-        return new CreateShippingNoticeESORequestCreateShippingNoticeESORequest();
-    }
-
-    /**
-     * Create an instance of {@link CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse }
-     *
-     */
-    public CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse createCreateSalesReturnEsoResponseCreateSalesReturnEsoResponse() {
-        return new CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse();
-    }
-
-    /**
-     * Create an instance of {@link CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse }
-     * 
-     */
-    public CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse createCreateShippingNoticeESOResponseCreateShippingNoticeESOResponse() {
-        return new CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse();
-    }
-
-    /**
-     * Create an instance of {@link CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse }
-     *
-     */
-    public CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse createCreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse() {
-        return new CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse();
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse }{@code >}}
-     *
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "ChangeSalesOrderData_esoResponse")
-    public JAXBElement<ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse> createChangeSalesOrderDataEsoResponse(ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse value) {
-        return new JAXBElement<ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse>(_ChangeSalesOrderDataEsoResponse_QNAME, ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "CreateSalesOrderData_ESOResponse")
-    public JAXBElement<CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse> createCreateSalesOrderDataESOResponse(CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse value) {
-        return new JAXBElement<CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse>(_CreateSalesOrderDataESOResponse_QNAME, CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest }{@code >}}
-     *
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "ChangeSalesOrderData_esoRequest")
-    public JAXBElement<ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest> createChangeSalesOrderDataEsoRequest(ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest value) {
-        return new JAXBElement<ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest>(_ChangeSalesOrderDataEsoRequest_QNAME, ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "CreateShippingNotice_ESOResponse")
-    public JAXBElement<CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse> createCreateShippingNoticeESOResponse(CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse value) {
-        return new JAXBElement<CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse>(_CreateShippingNoticeESOResponse_QNAME, CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse }{@code >}}
-     *
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "CreateMiscIssueData_ESOResponse")
-    public JAXBElement<CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse> createCreateMiscIssueDataESOResponse(CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse value) {
-        return new JAXBElement<CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse>(_CreateMiscIssueDataESOResponse_QNAME, CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse }{@code >}}
-     *
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "CreateSalesReturn_esoResponse")
-    public JAXBElement<CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse> createCreateSalesReturnEsoResponse(CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse value) {
-        return new JAXBElement<CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse>(_CreateSalesReturnEsoResponse_QNAME, CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CreateShippingNoticeESORequestCreateShippingNoticeESORequest }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "CreateShippingNotice_ESORequest")
-    public JAXBElement<CreateShippingNoticeESORequestCreateShippingNoticeESORequest> createCreateShippingNoticeESORequest(CreateShippingNoticeESORequestCreateShippingNoticeESORequest value) {
-        return new JAXBElement<CreateShippingNoticeESORequestCreateShippingNoticeESORequest>(_CreateShippingNoticeESORequest_QNAME, CreateShippingNoticeESORequestCreateShippingNoticeESORequest.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "CreateSalesOrderData_ESORequest")
-    public JAXBElement<CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest> createCreateSalesOrderDataESORequest(CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest value) {
-        return new JAXBElement<CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest>(_CreateSalesOrderDataESORequest_QNAME, CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest }{@code >}}
-     *
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "CreateMiscIssueData_ESORequest")
-    public JAXBElement<CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest> createCreateMiscIssueDataESORequest(CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest value) {
-        return new JAXBElement<CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest>(_CreateMiscIssueDataESORequest_QNAME, CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest.class, null, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest }{@code >}}
-     *
-     */
-    @XmlElementDecl(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", name = "CreateSalesReturn_esoRequest")
-    public JAXBElement<CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest> createCreateSalesReturnEsoRequest(CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest value) {
-        return new JAXBElement<CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest>(_CreateSalesReturnEsoRequest_QNAME, CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest.class, null, value);
-    }
-
-}

+ 0 - 109
src/custom/beans/uploaderpdata/erpservice/TIPTOPServiceGateWay.java

@@ -1,109 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.transport.http.HTTPConduit;
-import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebEndpoint;
-import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * This class was generated by the JAX-WS RI.
- * JAX-WS RI 2.2.9-b130926.1035
- * Generated source version: 2.2
- * 
- */
-@WebServiceClient(name = "TIPTOPServiceGateWay", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", wsdlLocation = "file:C://Users//Administrator//Desktop//aws_ttsrv2.xml")
-public class TIPTOPServiceGateWay
-    extends Service
-{
-
-    private final static URL TIPTOPSERVICEGATEWAY_WSDL_LOCATION;
-    private final static WebServiceException TIPTOPSERVICEGATEWAY_EXCEPTION;
-    private final static QName TIPTOPSERVICEGATEWAY_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWay");
-
-    static {
-        URL url = null;
-        WebServiceException e = null;
-        try {
-            //url = new URL("http://192.168.10.115/web/ws/r/aws_ttsrv2_toptest?WSDL");
-            //url = new URL("file:C://Users//Administrator//Desktop//aws_ttsrv2_toptest.xml");
-            url = new URL("file:C://Users//Administrator//Desktop//aws_ttsrv2.xml");
-        } catch (MalformedURLException ex) {
-            e = new WebServiceException(ex);
-        }
-        TIPTOPSERVICEGATEWAY_WSDL_LOCATION = url;
-        TIPTOPSERVICEGATEWAY_EXCEPTION = e;
-    }
-
-    public TIPTOPServiceGateWay() {
-        super(__getWsdlLocation(), TIPTOPSERVICEGATEWAY_QNAME);
-    }
-
-    public TIPTOPServiceGateWay(WebServiceFeature... features) {
-        super(__getWsdlLocation(), TIPTOPSERVICEGATEWAY_QNAME, features);
-    }
-
-    public TIPTOPServiceGateWay(URL wsdlLocation) {
-        super(wsdlLocation, TIPTOPSERVICEGATEWAY_QNAME);
-    }
-
-    public TIPTOPServiceGateWay(URL wsdlLocation, WebServiceFeature... features) {
-        super(wsdlLocation, TIPTOPSERVICEGATEWAY_QNAME, features);
-    }
-
-    public TIPTOPServiceGateWay(URL wsdlLocation, QName serviceName) {
-        super(wsdlLocation, serviceName);
-    }
-
-    public TIPTOPServiceGateWay(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
-        super(wsdlLocation, serviceName, features);
-    }
-
-    /**
-     * 
-     * @return
-     *     returns TIPTOPServiceGateWayPortType
-     */
-    @WebEndpoint(name = "TIPTOPServiceGateWayPortType")
-    public TIPTOPServiceGateWayPortType getTIPTOPServiceGateWayPortType() {
-        TIPTOPServiceGateWayPortType portType=super.getPort(new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWayPortType"), TIPTOPServiceGateWayPortType.class);
-
-        //���service  ��������TIPTOPServiceGateWayPortType
-        org.apache.cxf.endpoint.Client client = ClientProxy.getClient(portType);
-        HTTPConduit http = (HTTPConduit) client.getConduit();
-        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
-        httpClientPolicy.setConnectionTimeout(36000);
-        httpClientPolicy.setAllowChunking(false);
-        http.setClient(httpClientPolicy);
-
-        return portType;
-    }
-
-    /**
-     * 
-     * @param features
-     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
-     * @return
-     *     returns TIPTOPServiceGateWayPortType
-     */
-    @WebEndpoint(name = "TIPTOPServiceGateWayPortType")
-    public TIPTOPServiceGateWayPortType getTIPTOPServiceGateWayPortType(WebServiceFeature... features) {
-        return super.getPort(new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWayPortType"), TIPTOPServiceGateWayPortType.class, features);
-    }
-
-    private static URL __getWsdlLocation() {
-        if (TIPTOPSERVICEGATEWAY_EXCEPTION!= null) {
-            throw TIPTOPSERVICEGATEWAY_EXCEPTION;
-        }
-        return TIPTOPSERVICEGATEWAY_WSDL_LOCATION;
-    }
-
-}

+ 0 - 86
src/custom/beans/uploaderpdata/erpservice/TIPTOPServiceGateWayPortType.java

@@ -1,86 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.xml.bind.annotation.XmlSeeAlso;
-
-
-/**
- * This class was generated by the JAX-WS RI.
- * JAX-WS RI 2.2.9-b130926.1035
- * Generated source version: 2.2
- * 
- */
-@WebService(name = "TIPTOPServiceGateWayPortType", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay")
-@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
-@XmlSeeAlso({
-    ObjectFactory.class
-})
-public interface TIPTOPServiceGateWayPortType {
-
-
-    /**
-     * 
-     * @param parameters
-     * @return
-     *     returns service.erpservice.CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse
-     */
-    @WebMethod(operationName = "CreateSalesOrderData_ESO")
-    @WebResult(name = "CreateSalesOrderData_ESOResponse", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-    public CreateSalesOrderDataESOResponseCreateSalesOrderDataESOResponse createSalesOrderDataESO(
-        @WebParam(name = "CreateSalesOrderData_ESORequest", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-        CreateSalesOrderDataESORequestCreateSalesOrderDataESORequest parameters);
-
-    /**
-     * 
-     * @param parameters
-     * @return
-     *     returns service.erpservice.CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse
-     */
-    @WebMethod(operationName = "CreateShippingNotice_ESO")
-    @WebResult(name = "CreateShippingNotice_ESOResponse", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-    public CreateShippingNoticeESOResponseCreateShippingNoticeESOResponse createShippingNoticeESO(
-        @WebParam(name = "CreateShippingNotice_ESORequest", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-        CreateShippingNoticeESORequestCreateShippingNoticeESORequest parameters);
-
-    /**
-     *
-     * @param parameters
-     * @return
-     *     returns service.erpservice.CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse
-     */
-    @WebMethod(operationName = "CreateMiscIssueData_ESO")
-    @WebResult(name = "CreateMiscIssueData_ESOResponse", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-    public CreateMiscIssueDataESOResponseCreateMiscIssueDataESOResponse createMiscIssueDataESO(
-        @WebParam(name = "CreateMiscIssueData_ESORequest", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-        CreateMiscIssueDataESORequestCreateMiscIssueDataESORequest parameters);
-
-    /**
-     *
-     * @param parameters
-     * @return
-     *     returns service.erpservice.ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse
-     */
-    @WebMethod(operationName = "ChangeSalesOrderData_eso")
-    @WebResult(name = "ChangeSalesOrderData_esoResponse", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-    public ChangeSalesOrderDataEsoResponseChangeSalesOrderDataEsoResponse changeSalesOrderDataEso(
-        @WebParam(name = "ChangeSalesOrderData_esoRequest", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-        ChangeSalesOrderDataEsoRequestChangeSalesOrderDataEsoRequest parameters);
-
-    /**
-     *
-     * @param parameters
-     * @return
-     *     returns service.erpservice.CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse
-     */
-    @WebMethod(operationName = "CreateSalesReturn_eso")
-    @WebResult(name = "CreateSalesReturn_esoResponse", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-    public CreateSalesReturnEsoResponseCreateSalesReturnEsoResponse createSalesReturnEso(
-        @WebParam(name = "CreateSalesReturn_esoRequest", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", partName = "parameters")
-        CreateSalesReturnEsoRequestCreateSalesReturnEsoRequest parameters);
-
-}

+ 0 - 100
src/custom/beans/uploaderpdata/erpservice/TIPTOPServiceGateWay_HY.java

@@ -1,100 +0,0 @@
-
-package beans.uploaderpdata.erpservice;
-
-import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.transport.http.HTTPConduit;
-import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-
-/**
- * This class was generated by the JAX-WS RI.
- * JAX-WS RI 2.2.9-b130926.1035
- * Generated source version: 2.2
- */
-@WebServiceClient(name = "TIPTOPServiceGateWay", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", wsdlLocation = "file:C://Users//Administrator//Desktop//aws_ttsrv2_HY.xml")
-public class TIPTOPServiceGateWay_HY
-        extends Service {
-
-    private final static URL TIPTOPSERVICEGATEWAY_WSDL_LOCATION;
-    private final static WebServiceException TIPTOPSERVICEGATEWAY_EXCEPTION;
-    private final static QName TIPTOPSERVICEGATEWAY_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWay");
-
-    static {
-        URL url = null;
-        WebServiceException e = null;
-        try {
-            //url = new URL("http://192.168.10.115/web/ws/r/aws_ttsrv2_toptest?WSDL");
-            //url = new URL("file:C://Users//Administrator//Desktop//aws_ttsrv2_toptest_HY.xml");
-            url = new URL("file:C://Users//Administrator//Desktop//aws_ttsrv2_HY.xml");
-
-        } catch (MalformedURLException ex) {
-            e = new WebServiceException(ex);
-        }
-        TIPTOPSERVICEGATEWAY_WSDL_LOCATION = url;
-        TIPTOPSERVICEGATEWAY_EXCEPTION = e;
-    }
-
-    public TIPTOPServiceGateWay_HY() {
-        super(__getWsdlLocation(), TIPTOPSERVICEGATEWAY_QNAME);
-    }
-
-    public TIPTOPServiceGateWay_HY(WebServiceFeature... features) {
-        super(__getWsdlLocation(), TIPTOPSERVICEGATEWAY_QNAME, features);
-    }
-
-    public TIPTOPServiceGateWay_HY(URL wsdlLocation) {
-        super(wsdlLocation, TIPTOPSERVICEGATEWAY_QNAME);
-    }
-
-    public TIPTOPServiceGateWay_HY(URL wsdlLocation, WebServiceFeature... features) {
-        super(wsdlLocation, TIPTOPSERVICEGATEWAY_QNAME, features);
-    }
-
-    public TIPTOPServiceGateWay_HY(URL wsdlLocation, QName serviceName) {
-        super(wsdlLocation, serviceName);
-    }
-
-    public TIPTOPServiceGateWay_HY(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
-        super(wsdlLocation, serviceName, features);
-    }
-
-    /**
-     * @return returns TIPTOPServiceGateWayPortType
-     */
-    @WebEndpoint(name = "TIPTOPServiceGateWayPortType")
-    public TIPTOPServiceGateWayPortType getTIPTOPServiceGateWayPortType() {
-        TIPTOPServiceGateWayPortType portType = super.getPort(new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWayPortType"), TIPTOPServiceGateWayPortType.class);
-
-        //���service  ��������TIPTOPServiceGateWayPortType
-        org.apache.cxf.endpoint.Client client = ClientProxy.getClient(portType);
-        HTTPConduit http = (HTTPConduit) client.getConduit();
-        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
-        httpClientPolicy.setConnectionTimeout(36000);
-        httpClientPolicy.setAllowChunking(false);
-        http.setClient(httpClientPolicy);
-
-        return portType;
-    }
-
-    /**
-     * @param features A list of {@link WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
-     * @return returns TIPTOPServiceGateWayPortType
-     */
-    @WebEndpoint(name = "TIPTOPServiceGateWayPortType")
-    public TIPTOPServiceGateWayPortType getTIPTOPServiceGateWayPortType(WebServiceFeature... features) {
-        return super.getPort(new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWayPortType"), TIPTOPServiceGateWayPortType.class, features);
-    }
-
-    private static URL __getWsdlLocation() {
-        if (TIPTOPSERVICEGATEWAY_EXCEPTION != null) {
-            throw TIPTOPSERVICEGATEWAY_EXCEPTION;
-        }
-        return TIPTOPSERVICEGATEWAY_WSDL_LOCATION;
-    }
-
-}

+ 0 - 229
src/custom/beans/uploaderpdata/erpservice/aws_ttsrv2.xml

@@ -1,229 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-                  xmlns:fjs="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay"
-                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-                  name="TIPTOPServiceGateWay" targetNamespace="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
-    <wsdl:types>
-        <xsd:schema xmlns:s1="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay" elementFormDefault="qualified"
-                    targetNamespace="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
-
-            <!--订单创建-->
-            <xsd:complexType name="CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesOrderData_ESORequest"
-                         type="s1:CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest"/>
-            <xsd:complexType name="CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesOrderData_ESOResponse"
-                         type="s1:CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse"/>
-
-            <!--发货单创建-->
-            <xsd:complexType name="CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateShippingNotice_ESORequest" type="s1:CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest"/>
-            <xsd:complexType name="CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateShippingNotice_ESOResponse" type="s1:CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse"/>
-
-
-            <!--杂发单(样品订单)创建-->
-            <xsd:complexType name="CreateMiscIssueData_ESORequest_CreateMiscIssueData_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateMiscIssueData_ESORequest"
-                         type="s1:CreateMiscIssueData_ESORequest_CreateMiscIssueData_ESORequest"/>
-            <xsd:complexType name="CreateMiscIssueData_ESOResponse_CreateMiscIssueData_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateMiscIssueData_ESOResponse"
-                         type="s1:CreateMiscIssueData_ESOResponse_CreateMiscIssueData_ESOResponse"/>
-
-            <!--订单变更创建-->
-            <xsd:complexType name="ChangeSalesOrderData_esoRequest_ChangeSalesOrderData_esoRequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="ChangeSalesOrderData_esoRequest"
-                         type="s1:ChangeSalesOrderData_esoRequest_ChangeSalesOrderData_esoRequest"/>
-            <xsd:complexType name="ChangeSalesOrderData_esoResponse_ChangeSalesOrderData_esoResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="ChangeSalesOrderData_esoResponse"
-                         type="s1:ChangeSalesOrderData_esoResponse_ChangeSalesOrderData_esoResponse"/>
-
-            <!--借货退回创建-->
-            <xsd:complexType name="CreateSalesReturn_esoRequest_CreateSalesReturn_esoRequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesReturn_esoRequest"
-                         type="s1:CreateSalesReturn_esoRequest_CreateSalesReturn_esoRequest"/>
-            <xsd:complexType name="CreateSalesReturn_esoResponse_CreateSalesReturn_esoResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesReturn_esoResponse"
-                         type="s1:CreateSalesReturn_esoResponse_CreateSalesReturn_esoResponse"/>
-        </xsd:schema>
-    </wsdl:types>
-
-    <!--订单创建-->
-    <wsdl:message name="CreateSalesOrderData_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateSalesOrderData_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateSalesOrderData_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateSalesOrderData_ESOResponse"/>
-    </wsdl:message>
-
-    <!--发货单创建-->
-    <wsdl:message name="CreateShippingNotice_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateShippingNotice_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateShippingNotice_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateShippingNotice_ESOResponse"/>
-    </wsdl:message>
-
-    <!--杂发单(样品订单)创建-->
-    <wsdl:message name="CreateMiscIssueData_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateMiscIssueData_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateMiscIssueData_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateMiscIssueData_ESOResponse"/>
-    </wsdl:message>
-
-    <!--订单变更创建-->
-    <wsdl:message name="ChangeSalesOrderData_esoIn">
-        <wsdl:part name="parameters" element="fjs:ChangeSalesOrderData_esoRequest"/>
-    </wsdl:message>
-    <wsdl:message name="ChangeSalesOrderData_esoOut">
-        <wsdl:part name="parameters" element="fjs:ChangeSalesOrderData_esoResponse"/>
-    </wsdl:message>
-
-    <!--借货退回创建-->
-    <wsdl:message name="CreateSalesReturn_esoIn">
-        <wsdl:part name="parameters" element="fjs:CreateSalesReturn_esoRequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateSalesReturn_esoOut">
-        <wsdl:part name="parameters" element="fjs:CreateSalesReturn_esoResponse"/>
-    </wsdl:message>
-
-
-    <wsdl:portType name="TIPTOPServiceGateWayPortType">
-
-        <!--订单创建-->
-        <wsdl:operation name="CreateSalesOrderData_ESO">
-            <wsdl:input message="fjs:CreateSalesOrderData_ESOIn" name="CreateSalesOrderData_ESORequest"/>
-            <wsdl:output message="fjs:CreateSalesOrderData_ESOOut" name="CreateSalesOrderData_ESOResponse"/>
-        </wsdl:operation>
-
-        <!--发货单创建-->
-        <wsdl:operation name="CreateShippingNotice_ESO">
-            <wsdl:input message="fjs:CreateShippingNotice_ESOIn" name="CreateShippingNotice_ESORequest"/>
-            <wsdl:output message="fjs:CreateShippingNotice_ESOOut" name="CreateShippingNotice_ESOResponse"/>
-        </wsdl:operation>
-
-        <!--杂发单(样品订单)创建-->
-        <wsdl:operation name="CreateMiscIssueData_ESO">
-            <wsdl:input message="fjs:CreateMiscIssueData_ESOIn" name="CreateMiscIssueData_ESORequest"/>
-            <wsdl:output message="fjs:CreateMiscIssueData_ESOOut" name="CreateMiscIssueData_ESOResponse"/>
-        </wsdl:operation>
-
-        <!--订单变更创建-->
-        <wsdl:operation name="ChangeSalesOrderData_eso">
-            <wsdl:input message="fjs:ChangeSalesOrderData_esoIn" name="ChangeSalesOrderData_esoRequest"/>
-            <wsdl:output message="fjs:ChangeSalesOrderData_esoOut" name="ChangeSalesOrderData_esoResponse"/>
-        </wsdl:operation>
-
-        <!--借货退回创建-->
-        <wsdl:operation name="CreateSalesReturn_eso">
-            <wsdl:input message="fjs:CreateSalesReturn_esoIn" name="CreateSalesReturn_esoRequest"/>
-            <wsdl:output message="fjs:CreateSalesReturn_esoOut" name="CreateSalesReturn_esoResponse"/>
-        </wsdl:operation>
-
-    </wsdl:portType>
-    <wsdl:binding name="TIPTOPServiceGateWayBinding" type="fjs:TIPTOPServiceGateWayPortType">
-        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
-
-        <!--订单创建-->
-        <wsdl:operation name="CreateSalesOrderData_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateSalesOrderData_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateSalesOrderData_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <!--发货单创建-->
-        <wsdl:operation name="CreateShippingNotice_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateShippingNotice_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateShippingNotice_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <!--杂发单(样品订单)创建-->
-        <wsdl:operation name="CreateMiscIssueData_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateMiscIssueData_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateMiscIssueData_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <!--订单变更创建-->
-        <wsdl:operation name="ChangeSalesOrderData_eso">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="ChangeSalesOrderData_esoRequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="ChangeSalesOrderData_esoResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <!--借货退回创建-->
-        <wsdl:operation name="CreateSalesReturn_eso">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateSalesReturn_esoRequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateSalesReturn_esoResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-    </wsdl:binding>
-    <wsdl:service name="TIPTOPServiceGateWay">
-        <wsdl:port binding="fjs:TIPTOPServiceGateWayBinding" name="TIPTOPServiceGateWayPortType">
-            <soap:address location="http://192.168.10.115/web/ws/r/aws_ttsrv2_toptest"/>
-        </wsdl:port>
-    </wsdl:service>
-</wsdl:definitions>

+ 0 - 229
src/custom/beans/uploaderpdata/erpservice/aws_ttsrv2_toptest.xml

@@ -1,229 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-                  xmlns:fjs="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay"
-                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-                  name="TIPTOPServiceGateWay" targetNamespace="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
-    <wsdl:types>
-        <xsd:schema xmlns:s1="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay" elementFormDefault="qualified"
-                    targetNamespace="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
-
-            <!--订单创建-->
-            <xsd:complexType name="CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesOrderData_ESORequest"
-                         type="s1:CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest"/>
-            <xsd:complexType name="CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesOrderData_ESOResponse"
-                         type="s1:CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse"/>
-
-            <!--发货单创建-->
-            <xsd:complexType name="CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateShippingNotice_ESORequest" type="s1:CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest"/>
-            <xsd:complexType name="CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateShippingNotice_ESOResponse" type="s1:CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse"/>
-
-
-            <!--杂发单(样品订单)创建-->
-            <xsd:complexType name="CreateMiscIssueData_ESORequest_CreateMiscIssueData_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateMiscIssueData_ESORequest"
-                         type="s1:CreateMiscIssueData_ESORequest_CreateMiscIssueData_ESORequest"/>
-            <xsd:complexType name="CreateMiscIssueData_ESOResponse_CreateMiscIssueData_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateMiscIssueData_ESOResponse"
-                         type="s1:CreateMiscIssueData_ESOResponse_CreateMiscIssueData_ESOResponse"/>
-
-            <!--订单变更创建-->
-            <xsd:complexType name="ChangeSalesOrderData_esoRequest_ChangeSalesOrderData_esoRequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="ChangeSalesOrderData_esoRequest"
-                         type="s1:ChangeSalesOrderData_esoRequest_ChangeSalesOrderData_esoRequest"/>
-            <xsd:complexType name="ChangeSalesOrderData_esoResponse_ChangeSalesOrderData_esoResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="ChangeSalesOrderData_esoResponse"
-                         type="s1:ChangeSalesOrderData_esoResponse_ChangeSalesOrderData_esoResponse"/>
-
-            <!--借货退回创建-->
-            <xsd:complexType name="CreateSalesReturn_esoRequest_CreateSalesReturn_esoRequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesReturn_esoRequest"
-                         type="s1:CreateSalesReturn_esoRequest_CreateSalesReturn_esoRequest"/>
-            <xsd:complexType name="CreateSalesReturn_esoResponse_CreateSalesReturn_esoResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesReturn_esoResponse"
-                         type="s1:CreateSalesReturn_esoResponse_CreateSalesReturn_esoResponse"/>
-        </xsd:schema>
-    </wsdl:types>
-
-    <!--订单创建-->
-    <wsdl:message name="CreateSalesOrderData_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateSalesOrderData_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateSalesOrderData_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateSalesOrderData_ESOResponse"/>
-    </wsdl:message>
-
-    <!--发货单创建-->
-    <wsdl:message name="CreateShippingNotice_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateShippingNotice_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateShippingNotice_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateShippingNotice_ESOResponse"/>
-    </wsdl:message>
-
-    <!--杂发单(样品订单)创建-->
-    <wsdl:message name="CreateMiscIssueData_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateMiscIssueData_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateMiscIssueData_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateMiscIssueData_ESOResponse"/>
-    </wsdl:message>
-
-    <!--订单变更创建-->
-    <wsdl:message name="ChangeSalesOrderData_esoIn">
-        <wsdl:part name="parameters" element="fjs:ChangeSalesOrderData_esoRequest"/>
-    </wsdl:message>
-    <wsdl:message name="ChangeSalesOrderData_esoOut">
-        <wsdl:part name="parameters" element="fjs:ChangeSalesOrderData_esoResponse"/>
-    </wsdl:message>
-
-    <!--借货退回创建-->
-    <wsdl:message name="CreateSalesReturn_esoIn">
-        <wsdl:part name="parameters" element="fjs:CreateSalesReturn_esoRequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateSalesReturn_esoOut">
-        <wsdl:part name="parameters" element="fjs:CreateSalesReturn_esoResponse"/>
-    </wsdl:message>
-
-
-    <wsdl:portType name="TIPTOPServiceGateWayPortType">
-
-        <!--订单创建-->
-        <wsdl:operation name="CreateSalesOrderData_ESO">
-            <wsdl:input message="fjs:CreateSalesOrderData_ESOIn" name="CreateSalesOrderData_ESORequest"/>
-            <wsdl:output message="fjs:CreateSalesOrderData_ESOOut" name="CreateSalesOrderData_ESOResponse"/>
-        </wsdl:operation>
-
-        <!--发货单创建-->
-        <wsdl:operation name="CreateShippingNotice_ESO">
-            <wsdl:input message="fjs:CreateShippingNotice_ESOIn" name="CreateShippingNotice_ESORequest"/>
-            <wsdl:output message="fjs:CreateShippingNotice_ESOOut" name="CreateShippingNotice_ESOResponse"/>
-        </wsdl:operation>
-
-        <!--杂发单(样品订单)创建-->
-        <wsdl:operation name="CreateMiscIssueData_ESO">
-            <wsdl:input message="fjs:CreateMiscIssueData_ESOIn" name="CreateMiscIssueData_ESORequest"/>
-            <wsdl:output message="fjs:CreateMiscIssueData_ESOOut" name="CreateMiscIssueData_ESOResponse"/>
-        </wsdl:operation>
-
-        <!--订单变更创建-->
-        <wsdl:operation name="ChangeSalesOrderData_eso">
-            <wsdl:input message="fjs:ChangeSalesOrderData_esoIn" name="ChangeSalesOrderData_esoRequest"/>
-            <wsdl:output message="fjs:ChangeSalesOrderData_esoOut" name="ChangeSalesOrderData_esoResponse"/>
-        </wsdl:operation>
-
-        <!--借货退回创建-->
-        <wsdl:operation name="CreateSalesReturn_eso">
-            <wsdl:input message="fjs:CreateSalesReturn_esoIn" name="CreateSalesReturn_esoRequest"/>
-            <wsdl:output message="fjs:CreateSalesReturn_esoOut" name="CreateSalesReturn_esoResponse"/>
-        </wsdl:operation>
-
-    </wsdl:portType>
-    <wsdl:binding name="TIPTOPServiceGateWayBinding" type="fjs:TIPTOPServiceGateWayPortType">
-        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
-
-        <!--订单创建-->
-        <wsdl:operation name="CreateSalesOrderData_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateSalesOrderData_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateSalesOrderData_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <!--发货单创建-->
-        <wsdl:operation name="CreateShippingNotice_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateShippingNotice_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateShippingNotice_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <!--杂发单(样品订单)创建-->
-        <wsdl:operation name="CreateMiscIssueData_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateMiscIssueData_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateMiscIssueData_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <!--订单变更创建-->
-        <wsdl:operation name="ChangeSalesOrderData_eso">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="ChangeSalesOrderData_esoRequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="ChangeSalesOrderData_esoResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <!--借货退回创建-->
-        <wsdl:operation name="CreateSalesReturn_eso">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateSalesReturn_esoRequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateSalesReturn_esoResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-    </wsdl:binding>
-    <wsdl:service name="TIPTOPServiceGateWay">
-        <wsdl:port binding="fjs:TIPTOPServiceGateWayBinding" name="TIPTOPServiceGateWayPortType">
-            <soap:address location="http://192.168.10.115/web/ws/r/aws_ttsrv2_toptest"/>
-        </wsdl:port>
-    </wsdl:service>
-</wsdl:definitions>

+ 0 - 98
src/custom/beans/uploaderpdata/erpservice/old/aws_ttsrv2.xml

@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-                  xmlns:fjs="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay"
-                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-                  name="TIPTOPServiceGateWay" targetNamespace="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
-    <wsdl:types>
-        <xsd:schema xmlns:s1="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay" elementFormDefault="qualified"
-                    targetNamespace="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
-
-            <xsd:complexType name="CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesOrderData_ESORequest"
-                         type="s1:CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest"/>
-
-
-            <xsd:complexType name="CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesOrderData_ESOResponse"
-                         type="s1:CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse"/>
-
-
-            <xsd:complexType name="CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateShippingNotice_ESORequest" type="s1:CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest"/>
-            <xsd:complexType name="CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateShippingNotice_ESOResponse" type="s1:CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse"/>
-
-        </xsd:schema>
-    </wsdl:types>
-
-    <wsdl:message name="CreateSalesOrderData_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateSalesOrderData_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateSalesOrderData_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateSalesOrderData_ESOResponse"/>
-    </wsdl:message>
-    <wsdl:message name="CreateShippingNotice_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateShippingNotice_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateShippingNotice_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateShippingNotice_ESOResponse"/>
-    </wsdl:message>
-    <wsdl:portType name="TIPTOPServiceGateWayPortType">
-
-        <wsdl:operation name="CreateSalesOrderData_ESO">
-            <wsdl:input message="fjs:CreateSalesOrderData_ESOIn" name="CreateSalesOrderData_ESORequest"/>
-            <wsdl:output message="fjs:CreateSalesOrderData_ESOOut" name="CreateSalesOrderData_ESOResponse"/>
-        </wsdl:operation>
-
-        <wsdl:operation name="CreateShippingNotice_ESO">
-            <wsdl:input message="fjs:CreateShippingNotice_ESOIn" name="CreateShippingNotice_ESORequest"/>
-            <wsdl:output message="fjs:CreateShippingNotice_ESOOut" name="CreateShippingNotice_ESOResponse"/>
-        </wsdl:operation>
-
-    </wsdl:portType>
-    <wsdl:binding name="TIPTOPServiceGateWayBinding" type="fjs:TIPTOPServiceGateWayPortType">
-        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
-
-
-        <wsdl:operation name="CreateSalesOrderData_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateSalesOrderData_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateSalesOrderData_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <wsdl:operation name="CreateShippingNotice_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateShippingNotice_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateShippingNotice_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:service name="TIPTOPServiceGateWay">
-        <wsdl:port binding="fjs:TIPTOPServiceGateWayBinding" name="TIPTOPServiceGateWayPortType">
-            <soap:address location="http://192.168.10.115/web/ws/r/aws_ttsrv2"/>
-        </wsdl:port>
-    </wsdl:service>
-</wsdl:definitions>

+ 0 - 98
src/custom/beans/uploaderpdata/erpservice/old/aws_ttsrv2_toptest.xml

@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-                  xmlns:fjs="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay"
-                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-                  name="TIPTOPServiceGateWay" targetNamespace="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
-    <wsdl:types>
-        <xsd:schema xmlns:s1="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay" elementFormDefault="qualified"
-                    targetNamespace="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
-
-            <xsd:complexType name="CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesOrderData_ESORequest"
-                         type="s1:CreateSalesOrderData_ESORequest_CreateSalesOrderData_ESORequest"/>
-
-
-            <xsd:complexType name="CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateSalesOrderData_ESOResponse"
-                         type="s1:CreateSalesOrderData_ESOResponse_CreateSalesOrderData_ESOResponse"/>
-
-
-            <xsd:complexType name="CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="request" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateShippingNotice_ESORequest" type="s1:CreateShippingNotice_ESORequest_CreateShippingNotice_ESORequest"/>
-            <xsd:complexType name="CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse">
-                <xsd:sequence>
-                    <xsd:element type="xsd:string" name="response" nillable="true"/>
-                </xsd:sequence>
-            </xsd:complexType>
-            <xsd:element name="CreateShippingNotice_ESOResponse" type="s1:CreateShippingNotice_ESOResponse_CreateShippingNotice_ESOResponse"/>
-
-        </xsd:schema>
-    </wsdl:types>
-
-    <wsdl:message name="CreateSalesOrderData_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateSalesOrderData_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateSalesOrderData_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateSalesOrderData_ESOResponse"/>
-    </wsdl:message>
-    <wsdl:message name="CreateShippingNotice_ESOIn">
-        <wsdl:part name="parameters" element="fjs:CreateShippingNotice_ESORequest"/>
-    </wsdl:message>
-    <wsdl:message name="CreateShippingNotice_ESOOut">
-        <wsdl:part name="parameters" element="fjs:CreateShippingNotice_ESOResponse"/>
-    </wsdl:message>
-    <wsdl:portType name="TIPTOPServiceGateWayPortType">
-
-        <wsdl:operation name="CreateSalesOrderData_ESO">
-            <wsdl:input message="fjs:CreateSalesOrderData_ESOIn" name="CreateSalesOrderData_ESORequest"/>
-            <wsdl:output message="fjs:CreateSalesOrderData_ESOOut" name="CreateSalesOrderData_ESOResponse"/>
-        </wsdl:operation>
-
-        <wsdl:operation name="CreateShippingNotice_ESO">
-            <wsdl:input message="fjs:CreateShippingNotice_ESOIn" name="CreateShippingNotice_ESORequest"/>
-            <wsdl:output message="fjs:CreateShippingNotice_ESOOut" name="CreateShippingNotice_ESOResponse"/>
-        </wsdl:operation>
-
-    </wsdl:portType>
-    <wsdl:binding name="TIPTOPServiceGateWayBinding" type="fjs:TIPTOPServiceGateWayPortType">
-        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
-
-
-        <wsdl:operation name="CreateSalesOrderData_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateSalesOrderData_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateSalesOrderData_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-
-        <wsdl:operation name="CreateShippingNotice_ESO">
-            <soap:operation soapAction="" style="document"/>
-            <wsdl:input name="CreateShippingNotice_ESORequest">
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="CreateShippingNotice_ESOResponse">
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:service name="TIPTOPServiceGateWay">
-        <wsdl:port binding="fjs:TIPTOPServiceGateWayBinding" name="TIPTOPServiceGateWayPortType">
-            <soap:address location="http://192.168.10.115/web/ws/r/aws_ttsrv2_toptest"/>
-        </wsdl:port>
-    </wsdl:service>
-</wsdl:definitions>

+ 0 - 2
src/custom/beans/uploaderpdata/erpservice/package-info.java

@@ -1,2 +0,0 @@
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package beans.uploaderpdata.erpservice;

+ 61 - 62
src/custom/restcontroller/webmanage/sale/order/Order.java

@@ -12,7 +12,6 @@ import beans.itemprice.ItemPrice;
 import beans.parameter.Parameter;
 import beans.remind.Remind;
 import beans.salearea.SaleArea;
-import beans.uploaderpdata.UploadDataToERP;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import common.Controller;
@@ -2795,67 +2794,67 @@ public class Order extends Controller {
     }
 
 
-    @API(title = "关闭", apiversion = R.ID20221108164502.v1.class)
-    @CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class, accessoryorder.class})
-    public String close() throws YosException {
-        long sa_orderid = content.getLong("sa_orderid");
-        String str = closeordervalidate(sa_orderid);
-        if (!str.equals("true")) {
-            return getErrReturnObject().setErrMsg(str).toString();
-        }
-
-        //通过版本更新订单表头数据
-        beans.order.Order.updateOrderWithVersion(this);
-
-
-        Rows RowsDetails = dbConnect.runSqlQuery(
-                "select * from sa_orderitems where sa_orderid=" + sa_orderid + " and siteid='" + siteid + "' order by rowno asc");
-        content.put("type", "数量");
-        content.put("remarks", "订单结案变更");
-        JSONArray itemifnos = new JSONArray();
-        for (Row row : RowsDetails) {
-            if (row.getBigDecimal("qty").compareTo(row.getBigDecimal("erpdeliedqty")) > 0) {
-                JSONObject jsonObject = new JSONObject();
-                jsonObject.put("itemid", row.getLong("itemid"));
-                jsonObject.put("sa_orderitemsid", row.getLong("sa_orderitemsid"));
-                jsonObject.put("newvalue", row.getString("erpdeliedqty"));
-                itemifnos.add(jsonObject);
-            }
-        }
-        content.put("itemifnos", itemifnos);
-        content.put("isjiean", true);
-        OrderItems orderItems = new OrderItems(content);
-        orderItems.changeItem();
-
-        if (Parameter.getBoolean("system.erp_dockswitch")) {
-            Rows rows = dbConnect.runSqlQuery("select * from sa_orderitems_change where sa_orderid=" + sa_orderid
-                    + " and siteid='" + siteid + "' order by createdate desc");
-            //System.out.println(!rows.isEmpty());
-            if (!rows.isEmpty()) {
-
-                UploadDataToERP uploadDataToERP = new UploadDataToERP(this, rows.get(0).getLong("sa_orderitems_changeid"), "订单变更");
-                boolean issuccess = uploadDataToERP.upload();
-                if (!issuccess) {
-                    dbConnect.runSqlUpdate("update sa_order set changeuserid='" + userid + "',changeby= '"
-                            + username
-                            + "',changedate = current_time,status= '审核',closeby='',closedate  = NULL where siteid = '"
-                            + siteid + "' and sa_orderid =" + sa_orderid);
-                    return getErrReturnObject().setErrMsg("上传ERP失败,当前单据将自动反关闭,请检查!").toString();
-                }
-            }
-
-        }
-
-        SQLFactory sqlFactory = new SQLFactory(this, "订单_关闭");
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("userid", userid);
-        sqlFactory.addParameter("username", username);
-        sqlFactory.addParameter("sa_orderid", sa_orderid);
-        dbConnect.runSqlUpdate(sqlFactory);
-
-
-        return getSucReturnObject().toString();
-    }
+//    @API(title = "关闭", apiversion = R.ID20221108164502.v1.class)
+//    @CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class, accessoryorder.class})
+//    public String close() throws YosException {
+//        long sa_orderid = content.getLong("sa_orderid");
+//        String str = closeordervalidate(sa_orderid);
+//        if (!str.equals("true")) {
+//            return getErrReturnObject().setErrMsg(str).toString();
+//        }
+//
+//        //通过版本更新订单表头数据
+//        beans.order.Order.updateOrderWithVersion(this);
+//
+//
+//        Rows RowsDetails = dbConnect.runSqlQuery(
+//                "select * from sa_orderitems where sa_orderid=" + sa_orderid + " and siteid='" + siteid + "' order by rowno asc");
+//        content.put("type", "数量");
+//        content.put("remarks", "订单结案变更");
+//        JSONArray itemifnos = new JSONArray();
+//        for (Row row : RowsDetails) {
+//            if (row.getBigDecimal("qty").compareTo(row.getBigDecimal("erpdeliedqty")) > 0) {
+//                JSONObject jsonObject = new JSONObject();
+//                jsonObject.put("itemid", row.getLong("itemid"));
+//                jsonObject.put("sa_orderitemsid", row.getLong("sa_orderitemsid"));
+//                jsonObject.put("newvalue", row.getString("erpdeliedqty"));
+//                itemifnos.add(jsonObject);
+//            }
+//        }
+//        content.put("itemifnos", itemifnos);
+//        content.put("isjiean", true);
+//        OrderItems orderItems = new OrderItems(content);
+//        orderItems.changeItem();
+//
+//        if (Parameter.getBoolean("system.erp_dockswitch")) {
+//            Rows rows = dbConnect.runSqlQuery("select * from sa_orderitems_change where sa_orderid=" + sa_orderid
+//                    + " and siteid='" + siteid + "' order by createdate desc");
+//            //System.out.println(!rows.isEmpty());
+//            if (!rows.isEmpty()) {
+//
+//                UploadDataToERP uploadDataToERP = new UploadDataToERP(this, rows.get(0).getLong("sa_orderitems_changeid"), "订单变更");
+//                boolean issuccess = uploadDataToERP.upload();
+//                if (!issuccess) {
+//                    dbConnect.runSqlUpdate("update sa_order set changeuserid='" + userid + "',changeby= '"
+//                            + username
+//                            + "',changedate = current_time,status= '审核',closeby='',closedate  = NULL where siteid = '"
+//                            + siteid + "' and sa_orderid =" + sa_orderid);
+//                    return getErrReturnObject().setErrMsg("上传ERP失败,当前单据将自动反关闭,请检查!").toString();
+//                }
+//            }
+//
+//        }
+//
+//        SQLFactory sqlFactory = new SQLFactory(this, "订单_关闭");
+//        sqlFactory.addParameter("siteid", siteid);
+//        sqlFactory.addParameter("userid", userid);
+//        sqlFactory.addParameter("username", username);
+//        sqlFactory.addParameter("sa_orderid", sa_orderid);
+//        dbConnect.runSqlUpdate(sqlFactory);
+//
+//
+//        return getSucReturnObject().toString();
+//    }
 
 
     //查询订单列表(业务员)

+ 170 - 171
src/custom/restcontroller/webmanage/sale/order/OrderItems.java

@@ -8,7 +8,6 @@ import beans.datacontrllog.DataContrlLog;
 import beans.enterprise.Enterprise;
 import beans.itemprice.ItemPrice;
 import beans.parameter.Parameter;
-import beans.uploaderpdata.UploadDataToERP;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import common.Controller;
@@ -1213,178 +1212,178 @@ public class OrderItems extends Controller {
 //    }
 
 
-    @API(title = "订单商品变更", apiversion = R.ID20221110145302.v1.class)
-    @CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class})
-    public String changeItem() throws YosException {
-        boolean isjiean = content.getBooleanValue("isjiean");
-        Long sa_orderid = content.getLong("sa_orderid");
-        //通过版本更新订单表头数据
-        beans.order.Order.updateOrderWithVersion(this);
-
-        String type = content.getString("type");
-        Long sa_orderitems_changeid = createTableID("sa_orderitems_change");
-        JSONArray itemifnos = content.getJSONArray("itemifnos");
-        BigDecimal oldValue = new BigDecimal(0);
-        Rows Rowstatus = dbConnect.runSqlQuery(
-                "select * from sa_order where sa_orderid=" + sa_orderid + " and siteid='" + siteid + "'");
-        if (Rowstatus.isEmpty()) {
-            return "订单不存在";
-        } else {
-            if (!Rowstatus.get(0).getString("status").equals("审核")) {
-                return getErrReturnObject().setErrMsg("非审核状态的订单无法进行商品变更").toString();
-            }
-        }
-        ArrayList<String> sqlList = new ArrayList<>();
-        // 订单商品变更
-        SQLFactory sqlFactory = new SQLFactory(this, "订单商品变更_新增");
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("userid", userid);
-        sqlFactory.addParameter("username", username);
-        sqlFactory.addParameter("sa_orderitems_changeid", sa_orderitems_changeid);
-        sqlFactory.addParameter("sa_orderid", sa_orderid);
-        sqlFactory.addParameter("remarks", content.getStringValue("remarks"));
-        sqlList.add(sqlFactory.getSQL());
-
-        HashMap<Long, Row> orderdetailmap = new HashMap<>();
-        HashMap<Long, BigDecimal> orderdetailchangeamount = new HashMap<>();
-        Rows rowsOrder = dbConnect.runSqlQuery("select * from sa_order t1 where t1.sa_orderid=" + sa_orderid);
-
-        BigDecimal ce = new BigDecimal(0);
-
-        for (Object obj : itemifnos) {
-            JSONObject jsonObject = (JSONObject) obj;
-            Rows rows = dbConnect.runSqlQuery(
-                    "SELECT sa_orderitemsid,qty,deliedqty,undeliqty,writeoffamount,price from sa_orderitems WHERE sa_orderitemsid="
-                            + jsonObject.getLongValue("sa_orderitemsid"));
-            if (rows.isNotEmpty()) {
-                oldValue = rows.get(0).getBigDecimal("qty");
-            } else {
-                return getErrReturnObject().setErrMsg("订单行不存在").toString();
-            }
-            if (type.equals("数量")) {
-                // 更新数量
-                BigDecimal newqty = jsonObject.getBigDecimal("newvalue");
-                BigDecimal oldqty = rows.get(0).getBigDecimal("qty");
-                BigDecimal oldundeliqty = rows.get(0).getBigDecimal("undeliqty");
-                BigDecimal addqty = newqty.subtract(oldqty);// 新增的数量
-                if (newqty.compareTo(oldqty) >= 0) {
-                    return getErrReturnObject().setErrMsg("修改数量必须小于原订单数量" + oldqty).toString();
-                }
-                if (newqty.compareTo(oldqty.subtract(oldundeliqty)) < 0) {
-                    return getErrReturnObject().setErrMsg("修改数量必须大于等于已发货数量" + oldqty.subtract(oldundeliqty)).toString();
-                }
-                if (newqty.compareTo(BigDecimal.ZERO) < 0) {
-                    return getErrReturnObject().setErrMsg("修改数量不可小于0").toString();
-                }
-
-                sqlFactory = new SQLFactory(this, "订单商品明细变更_更新");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("sa_orderitemsid", jsonObject.getLongValue("sa_orderitemsid"));
-                sqlFactory.addParameter("qty", jsonObject.getStringValue("newvalue"));
-//                sqlFactory.addParameter("undeliqty",  oldundeliqty.add(addqty));
-                ce = ce.add(addqty.multiply(rows.get(0).getBigDecimal("price")));
-                sqlList.add(sqlFactory.getSQL());
-                /**
-                 * * 核销对冲计算
-                 */
-                {
-                    /**
-                     * * 核销对冲计算
-                     */
-                    BigDecimal writeoffamount = rows.get(0).getBigDecimal("writeoffamount");// 订单行已核销金额
-                    //System.out.println(newqty.multiply(rows.get(0).getBigDecimal("price")));
-                    //System.out.println(writeoffamount);
-                    if (writeoffamount.compareTo(BigDecimal.ZERO) > 0
-                            && (newqty.multiply(rows.get(0).getBigDecimal("price"))).compareTo(writeoffamount) < 0) {
-                        // 如果已核销金额大于0 且调整后折后金额小于已核销金额,则需要将差价进行回冲
-                        orderdetailmap.put(rows.get(0).getLong("sa_orderitemsid"), rows.get(0));
-                        //System.out.println(writeoffamount.subtract(newqty.multiply(rows.get(0).getBigDecimal("price"))));
-                        //System.out.println("sa_orderitemsid:"+rows.get(0).getLong("sa_orderitemsid"));
-                        orderdetailchangeamount.put(rows.get(0).getLong("sa_orderitemsid"),
-                                writeoffamount.subtract(newqty.multiply(rows.get(0).getBigDecimal("price"))));
-                    }
-
-                }
-            }
-            // 订单商品变更明细
-            sqlFactory = new SQLFactory(this, "订单商品变更明细_新增");
-            sqlFactory.addParameter("siteid", siteid);
-            sqlFactory.addParameter("sa_orderitems_changemxid", createTableID("sa_orderitems_changemx"));
-            sqlFactory.addParameter("itemid", jsonObject.getLongValue("itemid"));
-            sqlFactory.addParameter("sa_orderitemsid", jsonObject.getLongValue("sa_orderitemsid"));
-            sqlFactory.addParameter("sa_orderitems_changeid", sa_orderitems_changeid);
-            sqlFactory.addParameter("type", type);
-            sqlFactory.addParameter("oldvalue", oldValue);
-            sqlFactory.addParameter("newvalue", jsonObject.getStringValue("newvalue"));
-
-            sqlList.add(sqlFactory.getSQL());
-
-//            content.put("sa_orderitemsid", sa_orderitemsid);
-
-        }
-
-        Long sa_cashbillid = 0L;
-        if (ce.compareTo(BigDecimal.ZERO) != 0) {
-            CashbillEntity cashbillEntity = new CashbillEntity();
-            cashbillEntity.setAmount(ce);
-            cashbillEntity.setDiscountamountamount(BigDecimal.ZERO);
-            cashbillEntity.setOwnerid(sa_orderid);
-            cashbillEntity.setOwnertable("sa_order");
-            cashbillEntity
-                    .setRemarks("订单变更:" + rowsOrder.get(0).getString("sonum") + "订单变更单id:" + sa_orderitems_changeid);
-            JSONObject cashbillPay = Accountbalance.createCashbillPay(this, rowsOrder.get(0).getLong("sys_enterpriseid"),
-                    rowsOrder.get(0).getLong("sa_accountclassid"), cashbillEntity, true);
-            sqlList.addAll(cashbillPay.getJSONArray("sqlList").toJavaList(String.class));
-            sa_cashbillid = cashbillPay.getLong("sa_cashbillid");
-        }
-
-        /**
-         * * 核销对冲
-         */
-        if (!orderdetailmap.isEmpty()) {
-            //System.out.println("测试");
-            sqlList.addAll(
-                    new twriteoffbill_orderchange(rowsOrder.get(0), orderdetailmap, orderdetailchangeamount).hedging());
-        }
-        for (String string : sqlList) {
-            //System.out.println(string);
-        }
-        dbConnect.runSqlUpdate(sqlList);
-        // 居间费设置
-        updateRebateFee(sa_orderid);
-        if (!isjiean) {
-            if (Parameter.getBoolean("system.erp_dockswitch")) {
-                UploadDataToERP uploadDataToERP = new UploadDataToERP(this, sa_orderitems_changeid, "订单变更");
-                boolean issuccess = uploadDataToERP.upload();
-                if (!issuccess) {
-                    return getErrReturnObject().setErrMsg("上传ERP失败,请检查!").toString();
-                }
-            }
-        }
-
-        if (ce.compareTo(BigDecimal.ZERO) != 0) {
-            Accountbalance.remindSend(this, rowsOrder.get(0).getLong("sys_enterpriseid"), sa_cashbillid);
-        }
-        return getSucReturnObject().toString();
-    }
-
+//    @API(title = "订单商品变更", apiversion = R.ID20221110145302.v1.class)
+//    @CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class})
+//    public String changeItem() throws YosException {
+//        boolean isjiean = content.getBooleanValue("isjiean");
+//        Long sa_orderid = content.getLong("sa_orderid");
+//        //通过版本更新订单表头数据
+//        beans.order.Order.updateOrderWithVersion(this);
+//
+//        String type = content.getString("type");
+//        Long sa_orderitems_changeid = createTableID("sa_orderitems_change");
+//        JSONArray itemifnos = content.getJSONArray("itemifnos");
+//        BigDecimal oldValue = new BigDecimal(0);
+//        Rows Rowstatus = dbConnect.runSqlQuery(
+//                "select * from sa_order where sa_orderid=" + sa_orderid + " and siteid='" + siteid + "'");
+//        if (Rowstatus.isEmpty()) {
+//            return "订单不存在";
+//        } else {
+//            if (!Rowstatus.get(0).getString("status").equals("审核")) {
+//                return getErrReturnObject().setErrMsg("非审核状态的订单无法进行商品变更").toString();
+//            }
+//        }
+//        ArrayList<String> sqlList = new ArrayList<>();
+//        // 订单商品变更
+//        SQLFactory sqlFactory = new SQLFactory(this, "订单商品变更_新增");
+//        sqlFactory.addParameter("siteid", siteid);
+//        sqlFactory.addParameter("userid", userid);
+//        sqlFactory.addParameter("username", username);
+//        sqlFactory.addParameter("sa_orderitems_changeid", sa_orderitems_changeid);
+//        sqlFactory.addParameter("sa_orderid", sa_orderid);
+//        sqlFactory.addParameter("remarks", content.getStringValue("remarks"));
+//        sqlList.add(sqlFactory.getSQL());
+//
+//        HashMap<Long, Row> orderdetailmap = new HashMap<>();
+//        HashMap<Long, BigDecimal> orderdetailchangeamount = new HashMap<>();
+//        Rows rowsOrder = dbConnect.runSqlQuery("select * from sa_order t1 where t1.sa_orderid=" + sa_orderid);
+//
+//        BigDecimal ce = new BigDecimal(0);
+//
+//        for (Object obj : itemifnos) {
+//            JSONObject jsonObject = (JSONObject) obj;
+//            Rows rows = dbConnect.runSqlQuery(
+//                    "SELECT sa_orderitemsid,qty,deliedqty,undeliqty,writeoffamount,price from sa_orderitems WHERE sa_orderitemsid="
+//                            + jsonObject.getLongValue("sa_orderitemsid"));
+//            if (rows.isNotEmpty()) {
+//                oldValue = rows.get(0).getBigDecimal("qty");
+//            } else {
+//                return getErrReturnObject().setErrMsg("订单行不存在").toString();
+//            }
+//            if (type.equals("数量")) {
+//                // 更新数量
+//                BigDecimal newqty = jsonObject.getBigDecimal("newvalue");
+//                BigDecimal oldqty = rows.get(0).getBigDecimal("qty");
+//                BigDecimal oldundeliqty = rows.get(0).getBigDecimal("undeliqty");
+//                BigDecimal addqty = newqty.subtract(oldqty);// 新增的数量
+//                if (newqty.compareTo(oldqty) >= 0) {
+//                    return getErrReturnObject().setErrMsg("修改数量必须小于原订单数量" + oldqty).toString();
+//                }
+//                if (newqty.compareTo(oldqty.subtract(oldundeliqty)) < 0) {
+//                    return getErrReturnObject().setErrMsg("修改数量必须大于等于已发货数量" + oldqty.subtract(oldundeliqty)).toString();
+//                }
+//                if (newqty.compareTo(BigDecimal.ZERO) < 0) {
+//                    return getErrReturnObject().setErrMsg("修改数量不可小于0").toString();
+//                }
+//
+//                sqlFactory = new SQLFactory(this, "订单商品明细变更_更新");
+//                sqlFactory.addParameter("siteid", siteid);
+//                sqlFactory.addParameter("sa_orderitemsid", jsonObject.getLongValue("sa_orderitemsid"));
+//                sqlFactory.addParameter("qty", jsonObject.getStringValue("newvalue"));
+////                sqlFactory.addParameter("undeliqty",  oldundeliqty.add(addqty));
+//                ce = ce.add(addqty.multiply(rows.get(0).getBigDecimal("price")));
+//                sqlList.add(sqlFactory.getSQL());
+//                /**
+//                 * * 核销对冲计算
+//                 */
+//                {
+//                    /**
+//                     * * 核销对冲计算
+//                     */
+//                    BigDecimal writeoffamount = rows.get(0).getBigDecimal("writeoffamount");// 订单行已核销金额
+//                    //System.out.println(newqty.multiply(rows.get(0).getBigDecimal("price")));
+//                    //System.out.println(writeoffamount);
+//                    if (writeoffamount.compareTo(BigDecimal.ZERO) > 0
+//                            && (newqty.multiply(rows.get(0).getBigDecimal("price"))).compareTo(writeoffamount) < 0) {
+//                        // 如果已核销金额大于0 且调整后折后金额小于已核销金额,则需要将差价进行回冲
+//                        orderdetailmap.put(rows.get(0).getLong("sa_orderitemsid"), rows.get(0));
+//                        //System.out.println(writeoffamount.subtract(newqty.multiply(rows.get(0).getBigDecimal("price"))));
+//                        //System.out.println("sa_orderitemsid:"+rows.get(0).getLong("sa_orderitemsid"));
+//                        orderdetailchangeamount.put(rows.get(0).getLong("sa_orderitemsid"),
+//                                writeoffamount.subtract(newqty.multiply(rows.get(0).getBigDecimal("price"))));
+//                    }
+//
+//                }
+//            }
+//            // 订单商品变更明细
+//            sqlFactory = new SQLFactory(this, "订单商品变更明细_新增");
+//            sqlFactory.addParameter("siteid", siteid);
+//            sqlFactory.addParameter("sa_orderitems_changemxid", createTableID("sa_orderitems_changemx"));
+//            sqlFactory.addParameter("itemid", jsonObject.getLongValue("itemid"));
+//            sqlFactory.addParameter("sa_orderitemsid", jsonObject.getLongValue("sa_orderitemsid"));
+//            sqlFactory.addParameter("sa_orderitems_changeid", sa_orderitems_changeid);
+//            sqlFactory.addParameter("type", type);
+//            sqlFactory.addParameter("oldvalue", oldValue);
+//            sqlFactory.addParameter("newvalue", jsonObject.getStringValue("newvalue"));
+//
+//            sqlList.add(sqlFactory.getSQL());
+//
+////            content.put("sa_orderitemsid", sa_orderitemsid);
+//
+//        }
+//
+//        Long sa_cashbillid = 0L;
+//        if (ce.compareTo(BigDecimal.ZERO) != 0) {
+//            CashbillEntity cashbillEntity = new CashbillEntity();
+//            cashbillEntity.setAmount(ce);
+//            cashbillEntity.setDiscountamountamount(BigDecimal.ZERO);
+//            cashbillEntity.setOwnerid(sa_orderid);
+//            cashbillEntity.setOwnertable("sa_order");
+//            cashbillEntity
+//                    .setRemarks("订单变更:" + rowsOrder.get(0).getString("sonum") + "订单变更单id:" + sa_orderitems_changeid);
+//            JSONObject cashbillPay = Accountbalance.createCashbillPay(this, rowsOrder.get(0).getLong("sys_enterpriseid"),
+//                    rowsOrder.get(0).getLong("sa_accountclassid"), cashbillEntity, true);
+//            sqlList.addAll(cashbillPay.getJSONArray("sqlList").toJavaList(String.class));
+//            sa_cashbillid = cashbillPay.getLong("sa_cashbillid");
+//        }
+//
+//        /**
+//         * * 核销对冲
+//         */
+//        if (!orderdetailmap.isEmpty()) {
+//            //System.out.println("测试");
+//            sqlList.addAll(
+//                    new twriteoffbill_orderchange(rowsOrder.get(0), orderdetailmap, orderdetailchangeamount).hedging());
+//        }
+//        for (String string : sqlList) {
+//            //System.out.println(string);
+//        }
+//        dbConnect.runSqlUpdate(sqlList);
+//        // 居间费设置
+//        updateRebateFee(sa_orderid);
+//        if (!isjiean) {
+//            if (Parameter.getBoolean("system.erp_dockswitch")) {
+//                UploadDataToERP uploadDataToERP = new UploadDataToERP(this, sa_orderitems_changeid, "订单变更");
+//                boolean issuccess = uploadDataToERP.upload();
+//                if (!issuccess) {
+//                    return getErrReturnObject().setErrMsg("上传ERP失败,请检查!").toString();
+//                }
+//            }
+//        }
+//
+//        if (ce.compareTo(BigDecimal.ZERO) != 0) {
+//            Accountbalance.remindSend(this, rowsOrder.get(0).getLong("sys_enterpriseid"), sa_cashbillid);
+//        }
+//        return getSucReturnObject().toString();
+//    }
 
-    @API(title = "订单商品变更(手动推erp)", apiversion = R.ID20230306161703.v1.class)
-    @CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class})
-    public String changeItem1() throws YosException {
-        if (Parameter.getBoolean("system.erp_dockswitch")) {
-            UploadDataToERP uploadDataToERP = new UploadDataToERP(this, content.getLong("sa_orderitems_changeid"), "订单变更");
-            boolean issuccess = uploadDataToERP.upload();
-            if (!issuccess) {
-                return getErrReturnObject().setErrMsg("上传ERP失败,请检查!").toString();
-            } else {
-                return getSucReturnObject().toString();
-            }
-        } else {
-            return getErrReturnObject().setErrMsg("erp对接开关未开!").toString();
-        }
 
-    }
+//    @API(title = "订单商品变更(手动推erp)", apiversion = R.ID20230306161703.v1.class)
+//    @CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class})
+//    public String changeItem1() throws YosException {
+//        if (Parameter.getBoolean("system.erp_dockswitch")) {
+//            UploadDataToERP uploadDataToERP = new UploadDataToERP(this, content.getLong("sa_orderitems_changeid"), "订单变更");
+//            boolean issuccess = uploadDataToERP.upload();
+//            if (!issuccess) {
+//                return getErrReturnObject().setErrMsg("上传ERP失败,请检查!").toString();
+//            } else {
+//                return getSucReturnObject().toString();
+//            }
+//        } else {
+//            return getErrReturnObject().setErrMsg("erp对接开关未开!").toString();
+//        }
+//
+//    }
 
 
     /**

+ 69 - 70
src/custom/restcontroller/webmanage/sale/toolbill/ToolBill.java

@@ -8,7 +8,6 @@ import beans.datateam.DataTeam;
 import beans.hr.Hr;
 import beans.parameter.Parameter;
 import beans.remind.Remind;
-import beans.uploaderpdata.UploadDataToERP;
 
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
@@ -552,75 +551,75 @@ public class ToolBill extends Controller {
         return getSucReturnObject().toString();
     }
 
-    @API(title = "审核", apiversion = R.ID20230114161402.v1.class)
-    @CACHEING_CLEAN(apiClass = {ToolBill.class, ToolBilItem.class})
-    public String check() throws YosException {
-        Long sa_orderid = content.getLong("sa_orderid");
-        String reviewtype = content.getString("reviewtype");
-
-        Rows rows = getOrderRows(this, sa_orderid);
-        ArrayList<String> sqlList = new ArrayList<>();
-        if (rows.isEmpty()) {
-            return getErrReturnObject().setErrMsg("数据不存在").toString();
-        }
-        if (!rows.get(0).getString("status").equals("提交") && !rows.get(0).getString("status").equals("交期确认")) {
-            return getErrReturnObject().setErrMsg("非提交,交期确认状态无法审核").toString();
-        }
-        Row row = rows.get(0);
-        Long sa_accountclassid = row.getLong("sa_accountclassid");
-        if (sa_accountclassid <= 0) {
-            return getErrReturnObject().setErrMsg("请选择支付账号").toString();
-        }
-        //验证结算企业
-        Long pay_enterpriseid = row.getLong("pay_enterpriseid");
-        if (pay_enterpriseid <= 0) {
-            return getErrReturnObject().setErrMsg("请选择结算企业").toString();
-        }
-
-        String sonum = row.getString("sonum");
-
-        SQLFactory sqlFactory = new SQLFactory(this, "审核");
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("userid", userid);
-        sqlFactory.addParameter("username", username);
-        sqlFactory.addParameter("reviewtype", reviewtype);
-        sqlFactory.addParameter("sa_orderid", sa_orderid);
-        sqlList.add(sqlFactory.getSQL());
-
-        BigDecimal amount = getAmount(sa_orderid);
-        CashbillEntity entity = getCashbillEntity(amount, sa_orderid, "押金收入凭证", "由" + sonum + "工具借用单审核时自动产生");
-        JSONObject cashbillIncome = Accountbalance.createCashbillIncome(this, pay_enterpriseid, sa_accountclassid, entity, true, false);
-        sqlList.addAll(cashbillIncome.getJSONArray("sqlList").toJavaList(String.class));
-        Long sa_cashbillid = cashbillIncome.getLong("sa_cashbillid");
-
-        //操作记录
-        sqlList.add(DataContrlLog.createLog(this, "sa_order", sa_orderid, "审核", "工具借用单:审核" + sa_orderid).getSQL());
-        dbConnect.runSqlUpdate(sqlList);
-
-        Accountbalance.remindSend(this, pay_enterpriseid, sa_cashbillid);
-
-        if (Parameter.getBoolean("system.erp_dockswitch")) {
-            UploadDataToERP uploadDataToERP = new UploadDataToERP(this, sa_orderid, "");
-            boolean issuccess = uploadDataToERP.upload();
-            if (!issuccess) {
-                unCheck();
-                return getErrReturnObject().setErrMsg("上传ERP失败,当前单据将自动反审核,请检查!").toString();
-            } else {
-                Long sys_enterpriseid = row.getLong("sys_enterpriseid");
-
-                sendMsg("工具借用单审核", sa_orderid, sys_enterpriseid);
-                sendMsg("生成押金收入凭证", sa_orderid, sys_enterpriseid);
-            }
-        } else {
-            Long sys_enterpriseid = row.getLong("sys_enterpriseid");
-
-            sendMsg("工具借用单审核", sa_orderid, sys_enterpriseid);
-            sendMsg("生成押金收入凭证", sa_orderid, sys_enterpriseid);
-        }
-
-
-        return getSucReturnObject().toString();
-    }
+//    @API(title = "审核", apiversion = R.ID20230114161402.v1.class)
+//    @CACHEING_CLEAN(apiClass = {ToolBill.class, ToolBilItem.class})
+//    public String check() throws YosException {
+//        Long sa_orderid = content.getLong("sa_orderid");
+//        String reviewtype = content.getString("reviewtype");
+//
+//        Rows rows = getOrderRows(this, sa_orderid);
+//        ArrayList<String> sqlList = new ArrayList<>();
+//        if (rows.isEmpty()) {
+//            return getErrReturnObject().setErrMsg("数据不存在").toString();
+//        }
+//        if (!rows.get(0).getString("status").equals("提交") && !rows.get(0).getString("status").equals("交期确认")) {
+//            return getErrReturnObject().setErrMsg("非提交,交期确认状态无法审核").toString();
+//        }
+//        Row row = rows.get(0);
+//        Long sa_accountclassid = row.getLong("sa_accountclassid");
+//        if (sa_accountclassid <= 0) {
+//            return getErrReturnObject().setErrMsg("请选择支付账号").toString();
+//        }
+//        //验证结算企业
+//        Long pay_enterpriseid = row.getLong("pay_enterpriseid");
+//        if (pay_enterpriseid <= 0) {
+//            return getErrReturnObject().setErrMsg("请选择结算企业").toString();
+//        }
+//
+//        String sonum = row.getString("sonum");
+//
+//        SQLFactory sqlFactory = new SQLFactory(this, "审核");
+//        sqlFactory.addParameter("siteid", siteid);
+//        sqlFactory.addParameter("userid", userid);
+//        sqlFactory.addParameter("username", username);
+//        sqlFactory.addParameter("reviewtype", reviewtype);
+//        sqlFactory.addParameter("sa_orderid", sa_orderid);
+//        sqlList.add(sqlFactory.getSQL());
+//
+//        BigDecimal amount = getAmount(sa_orderid);
+//        CashbillEntity entity = getCashbillEntity(amount, sa_orderid, "押金收入凭证", "由" + sonum + "工具借用单审核时自动产生");
+//        JSONObject cashbillIncome = Accountbalance.createCashbillIncome(this, pay_enterpriseid, sa_accountclassid, entity, true, false);
+//        sqlList.addAll(cashbillIncome.getJSONArray("sqlList").toJavaList(String.class));
+//        Long sa_cashbillid = cashbillIncome.getLong("sa_cashbillid");
+//
+//        //操作记录
+//        sqlList.add(DataContrlLog.createLog(this, "sa_order", sa_orderid, "审核", "工具借用单:审核" + sa_orderid).getSQL());
+//        dbConnect.runSqlUpdate(sqlList);
+//
+//        Accountbalance.remindSend(this, pay_enterpriseid, sa_cashbillid);
+//
+//        if (Parameter.getBoolean("system.erp_dockswitch")) {
+//            UploadDataToERP uploadDataToERP = new UploadDataToERP(this, sa_orderid, "");
+//            boolean issuccess = uploadDataToERP.upload();
+//            if (!issuccess) {
+//                unCheck();
+//                return getErrReturnObject().setErrMsg("上传ERP失败,当前单据将自动反审核,请检查!").toString();
+//            } else {
+//                Long sys_enterpriseid = row.getLong("sys_enterpriseid");
+//
+//                sendMsg("工具借用单审核", sa_orderid, sys_enterpriseid);
+//                sendMsg("生成押金收入凭证", sa_orderid, sys_enterpriseid);
+//            }
+//        } else {
+//            Long sys_enterpriseid = row.getLong("sys_enterpriseid");
+//
+//            sendMsg("工具借用单审核", sa_orderid, sys_enterpriseid);
+//            sendMsg("生成押金收入凭证", sa_orderid, sys_enterpriseid);
+//        }
+//
+//
+//        return getSucReturnObject().toString();
+//    }
 
     public void sendMsg(String content, Long sa_orderid, Long sys_enterpriseid) throws YosException {
 

+ 11 - 11
src/custom/restcontroller/webmanage/sale/u8/U8Rest.java

@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package restcontroller.webmanage.sale.u8;
 
@@ -9,7 +9,7 @@ import java.net.URL;
 
 /**
  * @author SJW
- * 
+ *
  */
 public class U8Rest {
 	String url = "http://192.168.130.71:8080/MDDataService/jaxrs/webclientrest";
@@ -22,24 +22,24 @@ public class U8Rest {
 		HttpURLConnection conn = null;
 		try {
 			URL realUrl = new URL(url);
-			conn = (HttpURLConnection) realUrl.openConnection(); // 打开和URL之间的连接
-			// 设置通用的请求属性
+			conn = (HttpURLConnection) realUrl.openConnection(); // 鎵撳紑鍜孶RL涔嬮棿鐨勮繛鎺�
+			// 璁剧疆閫氱敤鐨勮�姹傚睘鎬�
 			conn.setRequestProperty("accept", "*/*");
 			conn.setRequestProperty("connection", "Keep-Alive");
 			conn.setRequestProperty("user-agent",
 					"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
 			conn.setConnectTimeout(5000);
-			// 发送POST请求必须设置如下两行
+			// 鍙戦€丳OST璇锋眰蹇呴』璁剧疆濡備笅涓よ�
 			conn.setDoOutput(true);
 			conn.setDoInput(true);
-			// 获取URLConnection对象对应的输出流
+			// 鑾峰彇URLConnection瀵硅薄瀵瑰簲鐨勮緭鍑烘祦
 			out = new PrintWriter(new OutputStreamWriter(
 					conn.getOutputStream(), "utf-8"));
-			// 发送请求参数
+			// 鍙戦€佽�姹傚弬鏁�
 			out.print(param);
-			// flush输出流的缓冲
+			// flush杈撳嚭娴佺殑缂撳啿
 			out.flush();
-			// 定义BufferedReader输入流来读取URL的响应
+			// 瀹氫箟BufferedReader杈撳叆娴佹潵璇诲彇URL鐨勫搷搴�
 			in = new BufferedReader(new InputStreamReader(
 					conn.getInputStream(), "UTF-8"));
 			String line;
@@ -47,7 +47,7 @@ public class U8Rest {
 				result += line;
 			}
 		} catch (Exception e) {
-		} finally {// 使用finally块来关闭输出流、输入流
+		} finally {// 浣跨敤finally鍧楁潵鍏抽棴杈撳嚭娴併€佽緭鍏ユ祦
 			try {
 				if (out != null) {
 					out.close();
@@ -61,7 +61,7 @@ public class U8Rest {
 					conn.disconnect();
 				}
 			} catch (IOException ex) {
-				System.err.println("关闭流异常");
+				System.err.println("鍏抽棴娴佸紓甯�");
 			}
 		}
 		return result;

+ 3 - 3
src/custom/utility/ERPDocking.java

@@ -1,6 +1,6 @@
 package utility;
 
-import beans.uploaderpdata.UploadDataToERP_HY;
+import beans.uploaderpdata.UploadDataToERP;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import common.BaseClass;
@@ -669,10 +669,10 @@ public class ERPDocking extends BaseClass {
                     "select * from sys_erpupdatelog where ownertable='" + ownertable + "' and ownerid=" + ownerid);
             SQLFactory sqlFactory;
             if (!rows.isEmpty()) {
-                sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志更新");
+                sqlFactory = new SQLFactory(new UploadDataToERP(controller), "erp上传日志更新");
                 sqlFactory.addParameter("sys_erpupdatelogid", rows.get(0).getLong("sys_erpupdatelogid"));
             } else {
-                sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志新增");
+                sqlFactory = new SQLFactory(new UploadDataToERP(controller), "erp上传日志新增");
                 sqlFactory.addParameter("sys_erpupdatelogid", controller.createTableID("sys_erpupdatelog"));
             }
             sqlFactory.addParameter("siteid", controller.siteid);

+ 3 - 3
src/custom/utility/WzwlDocking.java

@@ -1,6 +1,6 @@
 package utility;
 
-import beans.uploaderpdata.UploadDataToERP_HY;
+import beans.uploaderpdata.UploadDataToERP;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import common.BaseClass;
@@ -265,10 +265,10 @@ public class WzwlDocking extends BaseClass {
                     "select * from sys_erpupdatelog where ownertable='" + ownertable + "' and ownerid=" + ownerid);
             SQLFactory sqlFactory;
             if (!rows.isEmpty()) {
-                sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志更新");
+                sqlFactory = new SQLFactory(new UploadDataToERP(controller), "erp上传日志更新");
                 sqlFactory.addParameter("sys_erpupdatelogid", rows.get(0).getLong("sys_erpupdatelogid"));
             } else {
-                sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志新增");
+                sqlFactory = new SQLFactory(new UploadDataToERP(controller), "erp上传日志新增");
                 sqlFactory.addParameter("sys_erpupdatelogid", controller.createTableID("sys_erpupdatelog"));
             }
             sqlFactory.addParameter("siteid", controller.siteid);