浏览代码

Merge remote-tracking branch 'liujiankang/master'

# Conflicts:
#	watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
liujiankang 6 年之前
父节点
当前提交
0286dc59e0
共有 32 个文件被更改,包括 206 次插入1928 次删除
  1. 0 24
      watero-common-tool/src/main/java/com/iamberry/nuonuo/bean/PrivateData.java
  2. 0 50
      watero-common-tool/src/main/java/com/iamberry/nuonuo/bean/PublicData.java
  3. 0 31
      watero-common-tool/src/main/java/com/iamberry/nuonuo/bean/RequestMode.java
  4. 0 59
      watero-common-tool/src/main/java/com/iamberry/nuonuo/bean/ResultMode.java
  5. 0 27
      watero-common-tool/src/main/java/com/iamberry/nuonuo/exception/ExConstants.java
  6. 0 88
      watero-common-tool/src/main/java/com/iamberry/nuonuo/exception/OpensnsException.java
  7. 0 178
      watero-common-tool/src/main/java/com/iamberry/nuonuo/oauth/Oauth2AccessToken.java
  8. 0 96
      watero-common-tool/src/main/java/com/iamberry/nuonuo/oauth/RefreshTokenTimer.java
  9. 0 155
      watero-common-tool/src/main/java/com/iamberry/nuonuo/service/HttpClientService.java
  10. 0 149
      watero-common-tool/src/main/java/com/iamberry/nuonuo/service/OpenApiV1.java
  11. 0 144
      watero-common-tool/src/main/java/com/iamberry/nuonuo/test/TestOpenApiV1.java
  12. 0 62
      watero-common-tool/src/main/java/com/iamberry/nuonuo/util/Compress.java
  13. 0 43
      watero-common-tool/src/main/java/com/iamberry/nuonuo/util/MD5Util.java
  14. 0 163
      watero-common-tool/src/main/java/com/iamberry/nuonuo/util/SecurityUtil.java
  15. 0 69
      watero-common-tool/src/main/java/com/iamberry/nuonuo/util/StateData.java
  16. 0 19
      watero-common-tool/src/main/java/com/iamberry/nuonuo/util/ValidataUtil.java
  17. 0 384
      watero-rst-service/src/main/java/com/iamberry/rst/util/NuoNuoServiceUtil.java
  18. 3 68
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/ei/BillingController.java
  19. 7 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  20. 8 8
      watero-rst-web/src/main/resources/platform.properties
  21. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/base/page_util.ftl
  22. 9 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl
  23. 25 13
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  24. 3 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inventory/inventoryLog_list.ftl
  25. 3 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/postage/postage_list.ftl
  26. 5 6
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl
  27. 3 5
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/complete_signclosed.ftl
  28. 18 9
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/customer_signclosed_list.ftl
  29. 20 19
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl
  30. 40 3
      watero-rst-web/src/main/webapp/WEB-INF/views/ei/ei_billing_list.ftl
  31. 55 42
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl
  32. 6 6
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_split.ftl

+ 0 - 24
watero-common-tool/src/main/java/com/iamberry/nuonuo/bean/PrivateData.java

@@ -1,24 +0,0 @@
-package com.iamberry.nuonuo.bean;
-
-/**
- * 请求体中业务参数model
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class PrivateData<T> {
-	
-	/**
-	 * 请求数据
-	 */
-	private Object servicedata;
-
-	public void setServicedata(Object servicedata) {
-		this.servicedata = servicedata;
-	}
-
-	public Object getServicedata() {
-		return servicedata;
-	}
-	
-}

+ 0 - 50
watero-common-tool/src/main/java/com/iamberry/nuonuo/bean/PublicData.java

@@ -1,50 +0,0 @@
-package com.iamberry.nuonuo.bean;
-
-/**
- * 请求体中公共参数model
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class PublicData {
-	
-	/**
-	 * 调用方法
-	 */
-	private String method;
-	
-	/**
-	 * API版本
-	 */
-	private String version;
-	
-	/**
-	 * 时间戳 
-	 */
-	private String timestamp;
-
-	public String getVersion() {
-		return version;
-	}
-
-	public void setVersion(String version) {
-		this.version = version;
-	}
-
-	public String getMethod() {
-		return method;
-	}
-
-	public void setMethod(String method) {
-		this.method = method;
-	}
-
-	public String getTimestamp() {
-		return timestamp;
-	}
-
-	public void setTimestamp(String timestamp) {
-		this.timestamp = timestamp;
-	}
-	
-}

+ 0 - 31
watero-common-tool/src/main/java/com/iamberry/nuonuo/bean/RequestMode.java

@@ -1,31 +0,0 @@
-package com.iamberry.nuonuo.bean;
-
-/**
- * 请求model
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class RequestMode {
-	
-	private PublicData Public;
-
-	private PrivateData Private;
-
-	public PublicData getPublic() {
-		return Public;
-	}
-
-	public void setPublic(PublicData public1) {
-		Public = public1;
-	}
-
-	public PrivateData getPrivate() {
-		return Private;
-	}
-
-	public void setPrivate(PrivateData private1) {
-		Private = private1;
-	}
-	
-}

+ 0 - 59
watero-common-tool/src/main/java/com/iamberry/nuonuo/bean/ResultMode.java

@@ -1,59 +0,0 @@
-package com.iamberry.nuonuo.bean;
-
-/**
- * 返回数据model
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class ResultMode {
-
-	/**
-	 * 返回码
-	 */
-	private String code;
-	
-	/**
-	 * 描述
-	 */
-	private String describe;
-	
-	/**
-	 * 返回值
-	 */
-	private String result;
-
-	public ResultMode() {
-	}
-
-	public ResultMode(String code, String describe, String result) {
-		this.code = code;
-		this.describe = describe;
-		this.result = result;
-	}
-
-	public String getCode() {
-		return code;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public String getDescribe() {
-		return describe;
-	}
-
-	public void setDescribe(String describe) {
-		this.describe = describe;
-	}
-
-	public String getResult() {
-		return result;
-	}
-
-	public void setResult(String result) {
-		this.result = result;
-	}
-	
-}

+ 0 - 27
watero-common-tool/src/main/java/com/iamberry/nuonuo/exception/ExConstants.java

@@ -1,27 +0,0 @@
-package com.iamberry.nuonuo.exception;
-
-/**
- * 异常静态数据
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class ExConstants {
-	
-	public final static String security_Decryption = "0701";
-	public final static String security_Encryption_Msg = "加密异常";
-
-	public final static String security_Decryption_arithmeticNULL = "070103";
-	public final static String security_Decryption_arithmeticNULL_Msg = "无法识别加密算法";
-
-	public final static String input_Data_Null = "0101";
-	public final static String input_Data_Null_Msg = "入参为空";
-
-	public final static String input_Data_Type = "0201";
-	public final static String input_Data_Type_Msg = "输入参数格式有误";
-	public final static String input_Data_Type_Msg1 = "必填项输入参数空";
-
-	public final static String http_invoke_Interrupt = "040102";
-	public final static String http_invoke_Interrupt_Msg = "http连接异常";
-	
-}

+ 0 - 88
watero-common-tool/src/main/java/com/iamberry/nuonuo/exception/OpensnsException.java

@@ -1,88 +0,0 @@
-package com.iamberry.nuonuo.exception;
-
-
-import com.iamberry.nuonuo.bean.ResultMode;
-
-/**
- * 异常返回结果
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class OpensnsException extends Exception {
-	
-	// 序列化UID
-	private static final long serialVersionUID = 8243127099991355146L;
-	
-	// 错误码
-	private String code;
-	
-	// 错误描述
-	private String describe;
-
-	private ResultMode resultMode;
-
-	public OpensnsException(String code, String describe) {
-		super(describe);
-		this.code = code;
-	}
-	
-	/**
-	 * 构造异常
-	 * @param code 异常状态码
-	 * @param msg 异常讯息
-	 */
-	public OpensnsException(ResultMode resultMode) {
-		super(resultMode.getDescribe());
-		this.resultMode = resultMode;
-	}
-	
-	/**
-	 * 构造异常
-	 * @param code 异常状态码
-	 * @param ex 异常来源
-	 */
-	public OpensnsException(String code, Exception ex) {
-		super(ex);
-		this.code = code;
-	}
-	
-	/**
-	 * 返回异常状态码
-	 * @return
-	 */
-	public String getErrorCode() {
-		return code;
-	}
-
-	public String getCode() {
-		return code;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public String getDescribe() {
-		return describe;
-	}
-
-	public void setDescribe(String describe) {
-		this.describe = describe;
-	}
-
-	public ResultMode getResultMode() {
-		return resultMode;
-	}
-
-	public void setResultMode(ResultMode resultMode) {
-		this.resultMode = resultMode;
-	}
-
-	public static long getSerialversionuid() {
-		return serialVersionUID;
-	}
-   
-}
-
-

+ 0 - 178
watero-common-tool/src/main/java/com/iamberry/nuonuo/oauth/Oauth2AccessToken.java

@@ -1,178 +0,0 @@
-package com.iamberry.nuonuo.oauth;
-
-import com.iamberry.nuonuo.test.TestOpenApiV1;
-import com.iamberry.nuonuo.util.StateData;
-import net.sf.json.JSONArray;
-import net.sf.json.JSONObject;
-import org.apache.commons.lang.StringUtils;
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.client.methods.RequestBuilder;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
-
-import java.io.IOException;
-import java.util.*;
-
-/**
- * ISV类用户在获取到auth_code后可套用此方法
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- **/
-public class Oauth2AccessToken {
-
-    public static String _url = StateData.accessToken_url; //获取token地址
-    public static String _header = StateData.contentType;  //http发送模式
-    public static String client_id = StateData.client_id;  //创建应用后,分配给应用的appKey
-    public static String client_secret = StateData.client_secret; //创建应用后,分配给应用的appSecret
-    public static String token_grant_type = StateData.grant_type_token;   //授权类型,在本步骤中,此值为“authorization_code”
-    public static String redirect_uri = StateData.redirect_uri;   //回调地址,必传且不能为空
-
-    public static void main(String[] args) {
-
-        StateData.taxNum = "914403003120360455";
-
-        TestOpenApiV1.setHeader();
-
-        //开发者通过code可以换取access_token、授权商户的uerId
-        String code = StateData.auth_code;//临时授权码code,isv用户通过页面请求(authorize.html)返回code值;
-        String taxNum = StateData.taxNum;//授权企业的税号,isv用户通过页面请求(authorize.html)返回taxnum值;
-        String resValue = getAccessToken();
-
-       /**
-        * ISV用户定时刷新token
-        * refresh_token提供给开发者一种延长access_token有效期的机制,提升开发者提供给商户应用的使用流畅性。
-        * 开发者使用code获取access_token时会返回一个refresh_token,在refresh_token有效期内可以通过refresh_token刷新access_token有效时长。
-        * 注:refresh_token超时时,需重走授权流程
-        */
-       
-//        if (!StringUtils.isEmpty(resValue)) {
-//            Map<String, Object> map = parseJSON2Map(resValue);
-//            new RefreshTokenTimer( _url, _header,
-//                    String.valueOf(map.get("refresh_token")), client_secret, String.valueOf(map.get("userId"))).executeTimer();
-//        } else {
-//            System.out.println("获取授权码报错");
-//        }
-
-    }
-
-
-    /**
-     * 获取去token
-     * @return
-     */
-    public static String getAccessToken() {
-        CloseableHttpClient client = null;
-        CloseableHttpResponse response = null;
-        try {
-            client = HttpClients.createDefault();
-            HttpUriRequest build = RequestBuilder
-                    .post(_url)
-                    .addHeader("Content-Type",_header)
-                    .addParameter("client_id", client_id)
-                    .addParameter("client_secret", client_secret)
-                    .addParameter("grant_type", token_grant_type)
-                    .build();
-            //请求
-            response = client.execute(build);
-            HttpEntity entity = response.getEntity();
-
-            String resValue = "";
-            if (entity != null) {
-                resValue = EntityUtils.toString(entity);
-                System.out.println("response: " + resValue);
-            }
-            //释放资源
-            EntityUtils.consume(entity);
-            return resValue;
-        } catch (Exception e) {
-            e.printStackTrace();
-        }finally{
-            try {
-                client.close();
-                response.close();
-            } catch (IOException e) {
-                // TODO 自动生成的 catch 块
-                e.printStackTrace();
-            }
-        }
-        return "更新token失败";
-    }
-
-    /**
-     * 获取去token
-     * @return
-     */
-    public static String getAccessToken(String code, String taxNum) {
-    	 CloseableHttpClient client = null;
-    	 CloseableHttpResponse response = null;
-        try {
-            client = HttpClients.createDefault();
-            HttpUriRequest build = RequestBuilder
-                    .post(_url)
-                    .addHeader("Content-Type",_header)
-                    .addParameter("client_id", client_id)
-                    .addParameter("client_secret", client_secret)
-                    .addParameter("grant_type", token_grant_type)
-                    .addParameter("redirect_uri", redirect_uri)
-                    .addParameter("code", code)
-                    .addParameter("taxNum", taxNum)
-                    .build();
-
-            //请求
-            response = client.execute(build);
-            HttpEntity entity = response.getEntity();
-
-            String resValue = "";
-            if (entity != null) {
-                resValue = EntityUtils.toString(entity);
-                System.out.println("response: " + resValue);
-            }
-            //释放资源
-            EntityUtils.consume(entity);
-            return resValue;
-        } catch (Exception e) {
-            e.printStackTrace();
-        }finally{
-        	try {
-				client.close();
-				response.close();
-			} catch (IOException e) {
-				// TODO 自动生成的 catch 块
-				e.printStackTrace();
-			}
-        }
-        return null;
-    }
-
-    /**
-     * json转map
-     * @param jsonStr
-     * @return
-     */
-    public static Map<String, Object> parseJSON2Map(String jsonStr) {
-        Map<String, Object> map = new HashMap<String, Object>();
-        //最外层解析
-        JSONObject json = JSONObject.fromObject(jsonStr);
-        for (Object k : json.keySet()) {
-            Object v = json.get(k);
-            //如果内层还是数组的话,继续解析
-            if (v instanceof JSONArray) {
-                List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
-                Iterator<JSONObject> it = ((JSONArray) v).iterator();
-                while (it.hasNext()) {
-                    JSONObject json2 = it.next();
-                    list.add(parseJSON2Map(json2.toString()));
-                }
-                map.put(k.toString(), list);
-            } else {
-                map.put(k.toString(), v);
-            }
-        }
-        return map;
-    }
-
-}

+ 0 - 96
watero-common-tool/src/main/java/com/iamberry/nuonuo/oauth/RefreshTokenTimer.java

@@ -1,96 +0,0 @@
-package com.iamberry.nuonuo.oauth;
-
-import com.iamberry.nuonuo.util.StateData;
-import org.apache.commons.lang.StringUtils;
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.client.methods.RequestBuilder;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-/**
- * 定时刷新token
- *  当refreshToken过期时需重新执行授权流程
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- **/
-public class RefreshTokenTimer implements Runnable{
-
-    ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
-
-    private String _url; //获取token地址
-    private String _header;
-    private String client_secret; //创建应用后,分配给应用的appSecret
-
-    private String refresh_token; //刷新令牌
-    private String client_id; //获取access_token时授权商户的userId
-    private String grant_type = StateData.grant_type_refreshToken; //授权类型,此值固定为“refresh_token”
-    
-    public RefreshTokenTimer(String url, String header, String refresh_token,
-                             String client_secret, String client_id) {
-        this._url = url;
-        this._header = header;
-        this.refresh_token = refresh_token;
-        this.client_secret = client_secret;
-        this.client_id = client_id;
-    }
-
-    void executeTimer() {
-        executor.scheduleAtFixedRate(new RefreshTokenTimer( _url, _header,
-                refresh_token, client_secret, client_id), StateData.delay, StateData.preiod, TimeUnit.SECONDS);
-    }
-
-    @Override
-    public void run() {
-    	CloseableHttpClient client = null;
-    	CloseableHttpResponse response = null;
-        try {
-            client = HttpClients.createDefault();
-            HttpUriRequest build = RequestBuilder
-                    .post(_url)
-                    .addHeader("Content-Type", _header)
-                    .addParameter("refresh_token", refresh_token)
-                    .addParameter("client_id", client_id)
-                    .addParameter("client_secret", client_secret)
-                    .addParameter("grant_type", grant_type)
-                    .build();
-
-            //请求
-            response = client.execute(build);
-            HttpEntity entity = response.getEntity();
-
-            String resValue = "";
-            if (entity != null) {
-                resValue = EntityUtils.toString(entity);
-                System.out.println("refresh_toke_response: " + resValue);
-            }
-
-            if (!StringUtils.isEmpty(resValue)) {
-                Map<String, Object> map = Oauth2AccessToken.parseJSON2Map(resValue);
-                refresh_token = String.valueOf(map.get("refresh_token"));
-            }
-
-            //释放资源
-            EntityUtils.consume(entity);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }finally{
-        	try {
-				client.close();
-				response.close();
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-        }
-    }
-}
-

+ 0 - 155
watero-common-tool/src/main/java/com/iamberry/nuonuo/service/HttpClientService.java

@@ -1,155 +0,0 @@
-package com.iamberry.nuonuo.service;
-
-import com.iamberry.nuonuo.util.Compress;
-import org.apache.http.Header;
-import org.apache.http.NameValuePair;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.entity.UrlEncodedFormEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.message.BasicNameValuePair;
-import org.apache.http.protocol.HTTP;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.ProtocolException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * 发送请求
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class HttpClientService {
-	private Logger logger = LoggerFactory.getLogger(HttpClientService.class);
-
-	// 连接超时时间
-	private static final int CONNECTION_TIMEOUT = 3000;
-
-	// 读数据超时时间
-	private static final int READ_DATA_TIMEOUT = 3000;
-
-	private static final int successCode = 200;
-	
-	/**
-	 * 同步发送方式
-	 * @return
-	 */
-	public String sendSyncSingleHttp(String url, Map<String, String> headers, String param) {
-		CloseableHttpClient httpclient = HttpClients.createDefault();
-		RequestConfig defaultRequestConfig = RequestConfig.custom().build();
-		RequestConfig requestConfig = RequestConfig.copy(defaultRequestConfig).setSocketTimeout(READ_DATA_TIMEOUT)
-				.setConnectTimeout(CONNECTION_TIMEOUT).build();
-		List<NameValuePair> nvps = new ArrayList<NameValuePair>();
-		CloseableHttpResponse response = null;
-		String compress = (String) headers.get("compress");
-		try {
-			HttpPost httpPost = setConnectionParam(url, headers);
-			param = java.net.URLEncoder.encode(param, HTTP.UTF_8);
-			if ("GZIP".equals(compress)) {
-				param = Compress.compress(param); // 压缩
-			}
-			nvps.add(new BasicNameValuePair("param", param));
-			UrlEncodedFormEntity utlencode = new UrlEncodedFormEntity(nvps);// ,HTTP.UTF_8
-			httpPost.setEntity(utlencode);
-			httpPost.setConfig(requestConfig);
-			response = httpclient.execute(httpPost);
-			Header[] heads = httpPost.getAllHeaders();
-			for (int i = 0; i < heads.length; i++) {
-				logger.info(heads[i].getName() + "   " + heads[i].getValue());
-			}
-			return printResult(response);
-		} catch (Exception e) {
-			e.printStackTrace();
-		} finally {
-			try {
-				if (response != null) {
-					response.close();
-				}
-				if (httpclient != null) {
-					httpclient.close();
-				}
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-		}
-		return null;
-	}
-	
-	private String printResult(CloseableHttpResponse response) {
-		String str = "";
-		InputStream input = null;
-		;
-		if (response.getStatusLine().getStatusCode() == successCode) {
-			try {
-				input = response.getEntity().getContent();
-				str = java.net.URLDecoder.decode(inputStreamToString(input), HTTP.UTF_8);
-				Header[] heahers = response.getAllHeaders();
-				logger.info("+++++返回消息头:");
-				for (Header header : heahers) {
-					logger.info("++++++:" + header.getName() + ":" + header.getValue());
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-			} finally {
-				try {
-					if (input != null) {
-						input.close();
-					}
-					response.close();
-				} catch (IOException e) {
-					e.printStackTrace();
-				}
-			}
-		} else {
-			System.out.println(response.getStatusLine().getStatusCode());
-		}
-		return str;
-	}
-	
-	/**
-	 * 构建post请求
-	 * @param url
-	 * @param headers
-	 * @return
-	 * @throws IOException
-	 * @throws ProtocolException
-	 */
-	private static HttpPost setConnectionParam(String url, Map<String, String> headers)
-			throws IOException, ProtocolException {
-		HttpPost hpost = new HttpPost(url);
-		Set<String> headerSet = headers.keySet();
-		for (String key : headerSet) {
-			// 指定请求header参数
-			hpost.setHeader(key, headers.get(key));
-		}
-		return hpost;
-	}
-	
-	/**
-	 * 获取流
-	 * @return
-	 * @throws IOException
-	 */
-	public String inputStreamToString(InputStream input) throws IOException {
-		BufferedReader br = null;
-		String data = "";
-		StringBuffer sb = new StringBuffer();
-		br = new BufferedReader(new InputStreamReader(input));
-		while ((data = br.readLine()) != null) {
-			sb.append(data);
-		}
-		return sb.toString();
-	}
-    
-}

+ 0 - 149
watero-common-tool/src/main/java/com/iamberry/nuonuo/service/OpenApiV1.java

@@ -1,149 +0,0 @@
-package com.iamberry.nuonuo.service;
-
-
-import com.iamberry.nuonuo.bean.RequestMode;
-import com.iamberry.nuonuo.exception.ExConstants;
-import com.iamberry.nuonuo.exception.OpensnsException;
-import com.iamberry.nuonuo.util.SecurityUtil;
-import com.iamberry.nuonuo.util.StateData;
-import com.iamberry.nuonuo.util.ValidataUtil;
-import net.sf.json.xml.XMLSerializer;
-import org.json.JSONObject;
-
-import java.util.Map;
-
-/**
-* 提供访问爱信诺开放平台 OpenApiV1 的接口
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
-*/
-public class OpenApiV1{
-
-	/**
-	 * 执行API调用
-	 * @param serverName 服务器的地址
-	 * @param headers  请求头参数
-	 * @param requestMode 请求体model
-	 * @return  返回服务器响应内容
-	 * @throws OpensnsException
-	 */
-	public String handle(String serverName, Map<String, String> headers, RequestMode requestMode) throws OpensnsException {
-		// 客户端请求的数据进行基本校验
-		requestDataValidata(serverName, headers, requestMode);
-		String dataType = (String) headers.get("dataType");
-		String signMethod = (String) headers.get("signMethod");
-		String clientReqParam = "";
-		String aesParams = "";
-		try {
-			if ("json".equalsIgnoreCase(dataType)) {
-				clientReqParam = installJsonStr(requestMode, clientReqParam);
-			} else if ("xml".equalsIgnoreCase(dataType)) {
-				clientReqParam = installXmlStr(requestMode);
-			}
-		} catch (Exception e) {
-			throw new OpensnsException(ExConstants.input_Data_Type, ExConstants.input_Data_Type_Msg);
-		}
-//		System.out.println("客户端组装的参数格式-->:" + clientReqParam);
-		try {
-			// 每个APP密钥不同,根据当前APP赋值相应密钥值
-			aesParams = (String) SecurityUtil.AESEncrypt(clientReqParam, StateData.app_secret);
-		} catch (Exception e) {
-			throw new OpensnsException(ExConstants.security_Decryption, ExConstants.security_Encryption_Msg);
-		}
-		// 发送请求(客户端可以自定义自己的请求)
-		HttpClientService httpService = new HttpClientService();
-		String result = httpService.sendSyncSingleHttp(serverName, headers, aesParams);
-		// 如果返回值为密文,此处进行AES解密操作
-		if ("AES/AES".equalsIgnoreCase(signMethod)) {	//{"result":"","code":"E9301","describe":"企业信息备案错误,请联系诺诺网"}
-			result = String.valueOf(SecurityUtil.AESDecrypt(result, StateData.app_secret));
-		}
-		return result;
-	}
-
-
-	/**
-	 * 客户端请求数据校验
-	 * @param headers
-	 * @param requestMode
-	 * @throws OpensnsException
-	 */
-	private void requestDataValidata(String serverName, Map<String, String> headers, RequestMode requestMode) throws OpensnsException {
-		if (ValidataUtil.isEmpty(serverName) || (headers == null || headers.isEmpty()) || requestMode == null
-				|| requestMode.getPublic() == null || requestMode.getPrivate() == null) {
-			throw new OpensnsException(ExConstants.input_Data_Null, ExConstants.input_Data_Null_Msg);
-		}
-		// 检查header参数不为空
-		if (ValidataUtil.isEmpty(headers.get("appKey")) // appkey
-				|| ValidataUtil.isEmpty(headers.get("dataType"))// 数据格式<xml/json>
-				|| ValidataUtil.isEmpty(headers.get("accessToken"))// 授权码
-				|| ValidataUtil.isEmpty(headers.get("appRate"))) {
-			throw new OpensnsException(ExConstants.input_Data_Type, ExConstants.input_Data_Type_Msg1);
-		}
-		// 检查加密算法
-		if (!valiSignMethod(String.valueOf(headers.get("signMethod")))) {
-			throw new OpensnsException(ExConstants.security_Decryption_arithmeticNULL,
-					ExConstants.security_Decryption_arithmeticNULL_Msg);
-		}
-		// 检查public参数不为空
-		if (ValidataUtil.isEmpty(requestMode.getPublic().getMethod())
-				|| ValidataUtil.isEmpty(requestMode.getPublic().getTimestamp())
-				|| ValidataUtil.isEmpty(requestMode.getPublic().getVersion())) {
-			throw new OpensnsException(ExConstants.input_Data_Type, ExConstants.input_Data_Null_Msg);
-		}
-		String dataType = (String) headers.get("dataType");
-		// 检查public参数不为空
-		if ((!"json".equalsIgnoreCase(dataType)) && (!"xml".equalsIgnoreCase(dataType))) {
-			throw new OpensnsException(ExConstants.input_Data_Type, ExConstants.input_Data_Type_Msg);
-		}
-	}
-	
-	/**
-	 * 判断加密方法是否正确
-	 *   true 正确
-	 * @param signMethod
-	 * @return
-	 */
-	private boolean valiSignMethod(String signMethod) {
-		boolean isFlag = false;
-		if ("AES".equalsIgnoreCase(signMethod) || "AES/AES".equalsIgnoreCase(signMethod)) {
-			isFlag = true;
-		}
-		return isFlag;
-	}
-
-
-	/**
-	 * 组装成JSON格式字符串
-	 * @param requestMode
-	 * @param clientReqParam
-	 * @return
-	 */
-	private String installJsonStr(RequestMode requestMode, String clientReqParam) throws Exception {
-		JSONObject jSONObj = new JSONObject();
-		JSONObject publicObj = new JSONObject();
-		JSONObject privateObj = new JSONObject();
-		publicObj.put("method", requestMode.getPublic().getMethod());
-		publicObj.put("version", requestMode.getPublic().getVersion());
-		publicObj.put("timestamp", requestMode.getPublic().getTimestamp());
-		privateObj.put("servicedata", requestMode.getPrivate().getServicedata());
-		jSONObj.put("public", publicObj);
-		jSONObj.put("private", privateObj);
-		clientReqParam = jSONObj.toString();
-		return clientReqParam;
-	}
-
-
-	/**
-	 * 组装成XML格式字符串
-	 * @param requestMode
-	 * @return
-	 */
-	private String installXmlStr(RequestMode requestMode) throws Exception {
-		net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(requestMode);
-		XMLSerializer xml = new XMLSerializer();
-		String xmlStr = xml.write(jsonObject, "UTF-8");
-		return xmlStr;
-	}
-	
-}

+ 0 - 144
watero-common-tool/src/main/java/com/iamberry/nuonuo/test/TestOpenApiV1.java

@@ -1,144 +0,0 @@
-package com.iamberry.nuonuo.test;
-
-import com.iamberry.nuonuo.bean.PrivateData;
-import com.iamberry.nuonuo.bean.PublicData;
-import com.iamberry.nuonuo.bean.RequestMode;
-import com.iamberry.nuonuo.exception.OpensnsException;
-import com.iamberry.nuonuo.oauth.Oauth2AccessToken;
-import com.iamberry.nuonuo.service.OpenApiV1;
-import com.iamberry.nuonuo.util.SecurityUtil;
-import com.iamberry.nuonuo.util.StateData;
-import com.iamberry.nuonuo.util.ValidataUtil;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 测试示例
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class TestOpenApiV1 {
-	
-	public static void main(String[] args) {
-		TestOpenApiV1.setHeader();
-		Map<String,String> headers = getHeaders();
-        PublicData pdData = getPublicData();
-        PrivateData<Object> pvData = new PrivateData<Object>();
-        List<Map<String,Object>> list = new ArrayList<Map<String,Object>>();
-        List<Map<String,Object>> list_invoiceDetail = new ArrayList<Map<String,Object>>();
-        Map<String,Object> map_s = new HashMap<String,Object>();
-        Map<String,Object> map_order = new HashMap<String,Object>();
-        Map<String,Object> map_invoiceDetails = new HashMap<String,Object>();
-        map_order.put("pushMode", "1");
-        map_order.put("buyerName", "安徽省安迈达进出口有限公司");
-        map_order.put("buyerTaxNum", "913400007349708745");
-        map_order.put("buyerPhone", "17098074113");
-        map_order.put("buyerAddress", "333");
-        map_order.put("buyerAccount", "333");
-        map_order.put("orderNo", System.currentTimeMillis() + "001");
-        map_order.put("invoiceDate", "2016-06-15 01:59:41");
-        map_order.put("clerk", "袁牧庆");
-        map_order.put("salerAccount", "东亚银行杭州分行131001088303400");
-        map_order.put("salerTel", "0571-87022168");
-        map_order.put("salerAddress", "杭州市中河中路222号平海国际商务大厦5楼");
-        map_order.put("salerTaxNum", "339901999999142");
-        map_order.put("invoiceType", "1");
-        map_order.put("remark", "开票机号为02 请前往诺诺网(www.jss.com.cn)查询发票详情");
-        map_order.put("payee", "络克");
-        map_order.put("checker", "朱燕");
-        map_order.put("invoiceCode", "11");
-        map_order.put("invoiceNum", "11");
-        map_order.put("pushMode", "1");
-        map_order.put("email", "122@qq.com");
-        map_order.put("listFlag", "0");
-        map_order.put("listName", "1111");
-        map_order.put("buyerTel", "0571-88888888");
-        map_order.put("proxyInvoiceFlag", "0");
-        map_order.put("departmentId", "23456790");
-        map_order.put("clerkId", "");
-        map_invoiceDetails.put("goodsName", "1");
-        map_invoiceDetails.put("num", "1");
-        map_invoiceDetails.put("withTaxFlag", "1");
-        map_invoiceDetails.put("price", "46.79");
-        map_invoiceDetails.put("taxRate", "0.16");
-        map_invoiceDetails.put("specType", "1");
-        map_invoiceDetails.put("unit", "1");
-        map_invoiceDetails.put("goodsCode", "1090511030000000000");
-        map_invoiceDetails.put("selfCode", null);
-        map_invoiceDetails.put("invoiceLineProperty", "0");
-        map_invoiceDetails.put("favouredPolicyFlag", "0");
-        map_invoiceDetails.put("favouredPolicyName", null);
-        map_invoiceDetails.put("zeroRateFlag", null);
-        map_invoiceDetails.put("deduction", null);
-        map_invoiceDetails.put("tax", "6.45");
-        map_invoiceDetails.put("taxIncludedAmount", "46.79");
-        map_invoiceDetails.put("taxExcludedAmount", "40.34");
-        list_invoiceDetail.add(map_invoiceDetails);
-        map_order.put("invoiceDetail", list_invoiceDetail);
-        map_order.put("invoiceLine", "p");
-        map_order.put("productOilFlag", "0");
-        map_s.put("order", map_order);
-        list.add(map_s);
-        pvData.setServicedata(list);
-        RequestMode requestMode = getRequestMode(pdData,pvData);
-        OpenApiV1 sdk =  new OpenApiV1();
-        try {
-            String result = sdk.handle(StateData.url,headers, requestMode);
-        } catch (OpensnsException e) {
-            e.printStackTrace();
-        }
-	}
-
-	public static void setHeader(){
-		StateData.app_secret = "SD950B2179EB4A77"; // 填写本APP申请的 appSecret,注意区分正式环境与沙箱环境参数,如: 9B4CA8CEA5EE4823
-		StateData.app_key = "SDnyMiOMQZ"; // 填写本APP申请的 appKey,注意区分正式环境与沙箱环境参数,如:fk5dWkPA
-		StateData.app_api = "nuonuo.electronInvoice.requestBilling"; // 填写APP调用接口名称,如:nuonuo.speedBilling.billingByCode  	--开票:nuonuo.electronInvoice.requestBilling
-		StateData.app_apiVersion = "V1.0.0"; // 填写本APP调用接口版本,如:1.0.0
-		StateData.app_accessToken = "fdd052d08bbad090aeff770febrcasfs"; // 填写本APP申请的 令牌 ,注意区分正式环境与沙箱环境参数,如://{"access_token":"fdd052d08bbad090aeff770kgia1mkms","expires_in":86400}
-		StateData.app_dataType = "JSON"; // 填写本APP传输数据格式,如:JSON,XML
-		StateData.app_compressType = ""; // 填写本APP传输数据压缩格式,如:GZIP
-		StateData.app_signType = "AES"; // 填写本APP传输数据加密格式,如:AES/AES
-		StateData.user_Tax = ""; // 业务发生方税号(ISV类型用户必填);如:339901999999142  授权商户的税号(商家应用非必填,服务商应用必填)
-		StateData.url = "https://sandbox.jss.com.cn/openPlatform/services";
-		StateData.grant_type_token = "authorization_code";
-
-        Oauth2AccessToken.client_id = "SDnyMiOMQZ";  //创建应用后,分配给应用的appKey
-        Oauth2AccessToken.client_secret = "SD950B2179EB4A77"; //创建应用后,分配给应用的appSecret
-        Oauth2AccessToken.token_grant_type = StateData.grant_type_token;   //授权类型,在本步骤中,此值为“authorization_code”
-	}
-
-	// 定义请求头数据
-	private static Map<String, String> getHeaders() {
-		Map<String, String> headers = new HashMap<String, String>();
-		headers.put("appKey", StateData.app_key); // 用户申请的appkey
-		headers.put("accessToken", StateData.app_accessToken); // 用户Oauth登录后得到的令牌accessToken
-		headers.put("compress", StateData.app_compressType);// 压缩方式:提供GZIP 置空“”不压缩
-		headers.put("signMethod", StateData.app_signType); // 加密方式:提供AES/AES,不可为空
-		headers.put("dataType", StateData.app_dataType); // 数据请求格式: JSON/XML
-		headers.put("appRate", StateData.app_rate); // app并发请求数 ,平台默认10如需升级请联系开放平台
-		headers.put("userTax", StateData.user_Tax); // ISV下商家需要填写当前商户税号,普通商家模式用户可以不填写此值
-		headers.put("Content-Type", StateData.contentType); // http发送模式
-		return headers;
-	}
-
-	// 定义请求体中的公共数据
-	private static PublicData getPublicData() {
-		PublicData pdData = new PublicData();
-		pdData.setVersion(StateData.app_apiVersion); // API版本
-		pdData.setTimestamp(String.valueOf(System.currentTimeMillis()));
-		pdData.setMethod(StateData.app_api);// API名称
-		return pdData;
-	}
-
-	private static RequestMode getRequestMode(PublicData pdata, PrivateData<Object> pvData) {
-		RequestMode requestMode = new RequestMode();
-		requestMode.setPrivate(pvData);
-		requestMode.setPublic(pdata);
-		return requestMode;
-	}
-
-}

+ 0 - 62
watero-common-tool/src/main/java/com/iamberry/nuonuo/util/Compress.java

@@ -1,62 +0,0 @@
-package com.iamberry.nuonuo.util;
-
-import sun.misc.BASE64Decoder;
-import sun.misc.BASE64Encoder;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-
-/**
- * 压缩
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class Compress {
-
-	public static String compress(String str) throws Exception {
-		if (str == null || str.length() == 0) {
-			return "";
-		}
-		byte[] tArray;
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		GZIPOutputStream gzip = new GZIPOutputStream(out);
-		try {
-			gzip.write(str.getBytes("UTF-8"));
-			gzip.flush();
-		} finally {
-			gzip.close();
-		}
-
-		tArray = out.toByteArray();
-		out.close();
-		BASE64Encoder tBase64Encoder = new BASE64Encoder();
-		return tBase64Encoder.encode(tArray);
-	}
-
-	public static String uncompress(String str) throws Exception {
-		if (str == null || str.length() == 0) {
-			return "";
-		}
-		BASE64Decoder tBase64Decoder = new BASE64Decoder();
-		byte[] t = tBase64Decoder.decodeBuffer(str);
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		ByteArrayInputStream in = new ByteArrayInputStream(t);
-		GZIPInputStream gunzip = new GZIPInputStream(in);
-		try {
-			byte[] buffer = new byte[256];
-			int n;
-			while ((n = gunzip.read(buffer)) >= 0) {
-				out.write(buffer, 0, n);
-			}
-		} finally {
-			gunzip.close();
-		}
-		in.close();
-		out.close();
-		return out.toString("UTF-8");
-	}
-	
-}

+ 0 - 43
watero-common-tool/src/main/java/com/iamberry/nuonuo/util/MD5Util.java

@@ -1,43 +0,0 @@
-package com.iamberry.nuonuo.util;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-/**
- * sdk.jss.com.cn
- * @author open.jss.com
- * @version 2.0
- * @since jdk1.6
- */
-public class MD5Util {
-	
-	/**
-	 * 将字符串转换成md5
-	 * @param source
-	 * @return
-	 */
-	public static String toMD5(String source) {
-		try {
-			MessageDigest md = MessageDigest.getInstance("MD5");
-			md.update(source.getBytes());
-			byte b[] = md.digest();
-			int i;
-
-			StringBuffer buf = new StringBuffer("");
-			for (int offset = 0; offset < b.length; offset++) {
-				i = b[offset];
-				if (i < 0)
-					i += 256;
-				if (i < 16)
-					buf.append("0");
-				buf.append(Integer.toHexString(i));
-			}
-
-			return buf.toString();
-
-		} catch (NoSuchAlgorithmException e) {
-			return null;
-		}
-
-	}
-}

+ 0 - 163
watero-common-tool/src/main/java/com/iamberry/nuonuo/util/SecurityUtil.java

@@ -1,163 +0,0 @@
-package com.iamberry.nuonuo.util;
-
-import org.apache.commons.codec.binary.Base64;
-
-import javax.crypto.Cipher;
-import javax.crypto.spec.SecretKeySpec;
-import java.util.BitSet;
-
-/**
- * 安全类工具类
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class SecurityUtil {
-
-	/**
-	 * 极速开票密钥
-	 */
-	public final static String speedBilling = "F59E1B2970D64B8F926E9932E0A1A1DB";
-
-	private static final BitSet UNRESERVED = new BitSet(256);
-	private static final BitSet URLENCODER = new BitSet(256);
-	private static final BitSet PUNCT = new BitSet(256);
-	private static final BitSet USERINFO = new BitSet(256);
-	private static final BitSet PATHSAFE = new BitSet(256);
-	private static final BitSet URIC = new BitSet(256);
-	private static final BitSet RESERVED = new BitSet(256);
-	  
-	  static
-	  {
-	    for (int i = 97; i <= 122; i++) {
-	      UNRESERVED.set(i);
-	    }
-	    for (int i = 65; i <= 90; i++) {
-	      UNRESERVED.set(i);
-	    }
-	    
-	    for (int i = 48; i <= 57; i++) {
-	      UNRESERVED.set(i);
-	    }
-	    UNRESERVED.set(95);
-	    UNRESERVED.set(45);
-	    UNRESERVED.set(46);
-	    UNRESERVED.set(42);
-	    URLENCODER.or(UNRESERVED);
-	    UNRESERVED.set(33);
-	    UNRESERVED.set(126);
-	    UNRESERVED.set(39);
-	    UNRESERVED.set(40);
-	    UNRESERVED.set(41);
-	    
-	    PUNCT.set(44);
-	    PUNCT.set(59);
-	    PUNCT.set(58);
-	    PUNCT.set(36);
-	    PUNCT.set(38);
-	    PUNCT.set(43);
-	    PUNCT.set(61);
-	    
-	    USERINFO.or(UNRESERVED);
-	    USERINFO.or(PUNCT);
-	    
-	    PATHSAFE.or(UNRESERVED);
-	    PATHSAFE.set(47);
-	    PATHSAFE.set(59);
-	    PATHSAFE.set(58);
-	    PATHSAFE.set(64);
-	    PATHSAFE.set(38);
-	    PATHSAFE.set(61);
-	    PATHSAFE.set(43);
-	    PATHSAFE.set(36);
-	    PATHSAFE.set(44);
-	    
-	    RESERVED.set(59);
-	    RESERVED.set(47);
-	    RESERVED.set(63);
-	    RESERVED.set(58);
-	    RESERVED.set(64);
-	    RESERVED.set(38);
-	    RESERVED.set(61);
-	    RESERVED.set(43);
-	    RESERVED.set(36);
-	    RESERVED.set(44);
-	    RESERVED.set(91);
-	    RESERVED.set(93);
-	    
-	    URIC.or(RESERVED);
-	    URIC.or(UNRESERVED);
-	  }
-	  
-    /**
-     *  AES加密
-     * @param sSrc  待加密字符串
-     * @param sKey	加密Key值
-     * @return
-     */
-	public static Object AESEncrypt(String sSrc, String sKey) {
-		try {
-			if (sKey == null) {
-				System.out.print("Key为空");
-				throw new Exception();
-			}
-			// 判断Key是否为16位
-			if (sKey.length() != 16) {
-				System.out.print("Key长度不等于16位");
-				throw new Exception();
-			}
-			byte[] raw = sKey.getBytes("utf-8");
-			SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
-			Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
-			cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
-			byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
-			return new Base64().encodeToString(encrypted);
-		} catch (Exception e) {
-			e.printStackTrace();
-			return null;
-		}
-	}
-    
-    /**
-     * AES 解密
-     * @param sSrc
-     * @param sKey
-     * @return
-     */
-	public static Object AESDecrypt(String sSrc, String sKey) {
-		try {
-			if (sKey == null) {
-				return null;
-			}
-			// 判断Key是否为16位
-			if (sKey.length() != 16) {
-				return null;
-			}
-			byte[] raw = sKey.getBytes("UTF-8");
-			SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
-			Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
-			cipher.init(Cipher.DECRYPT_MODE, skeySpec);
-			byte[] encrypted1 = new Base64().decode(sSrc);
-			byte[] original = cipher.doFinal(encrypted1);
-			String originalString = new String(original, "utf-8");
-			return originalString;
-		} catch (Exception ex) {
-			ex.printStackTrace();
-			return null;
-		}
-	}
-    
-	/**
-	 * 仅针对极速开票MD5加密
-	 * MD5加密
-	 * validator+F59E1B2970D64B8F926E9932E0A1A1DB,然后再进行MD5加密;
-	 * @param source
-	 * @return
-	 */
-	public static String MD5Encrypt(String randomSixNum){
-		String signidSource = new StringBuffer(randomSixNum).append(SecurityUtil.speedBilling).toString();
-		String signidTarget  = MD5Util.toMD5(signidSource);
-		return signidTarget;
-	}
-	
-}

+ 0 - 69
watero-common-tool/src/main/java/com/iamberry/nuonuo/util/StateData.java

@@ -1,69 +0,0 @@
-package com.iamberry.nuonuo.util;
-
-/**
- * 静态用户数据
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class StateData {
-
-	/**
-	 * APP 调用接口需填写以下系统参数
-	 */
-	public static int app_id = 0; // 本地新增,诺诺系统的id
-	public static String app_secret = ""; // 填写本APP申请的 appSecret,注意区分正式环境与沙箱环境参数,如: 9B4CA8CEA5EE4823
-	public static String app_key = ""; // 填写本APP申请的 appKey,注意区分正式环境与沙箱环境参数,如:fk5dWkPA
-	public static String app_api = ""; // 填写APP调用接口名称,如:nuonuo.speedBilling.billingByCode  	--开票:nuonuo.electronInvoice.requestBilling
-	public static String app_apiVersion = "V1.0.0"; // 填写本APP调用接口版本,如:1.0.0
-	public static String app_accessToken = ""; // 填写本APP申请的 令牌 ,注意区分正式环境与沙箱环境参数,如://{"access_token":"fdd052d08bbad090aeff770kgia1mkms","expires_in":86400}
-	public static String app_dataType = "JSON"; // 填写本APP传输数据格式,如:JSON,XML
-	public static String app_compressType = ""; // 填写本APP传输数据压缩格式,如:GZIP
-	public static String app_signType = "AES/AES"; // 填写本APP传输数据加密格式,如:AES/AES
-	public static String user_Tax = ""; // 业务发生方税号(ISV类型用户必填);如:339901999999142  授权商户的税号(商家应用非必填,服务商应用必填)
-	
-	/**
-	 * APP 请求并发数(平台默认)
-	 */
-	public static String app_rate = "10"; // 填写APP并发请求数
-	
-	/**
-	 * 发送方式
-	 */
-	public static String contentType = "application/x-www-form-urlencoded";
-	
-	/**
-	 * 开放平台API访问地址
-	 */
-	public static String url = ""; // 正式环境地址  --在platform.properties获取
-
-	/**
-	 * 开放平台Oauth授权访问地址
-	 */
-	public static String url_token = "https://open.jss.com.cn/accessToken"; // 正式环境地址
-	
-	/**
-	 * 正式环境/沙箱环境OAUTH参数
-	 *  请求access_token环节
-	 */
-	public static String auth_code = ""; // ISV商户获取的auth_code
-	public static String refresh_token = ""; // ISV商户刷新令牌,普通商户无此值,可程序赋值
-	public static String taxNum = ""; // 获取auth_code时开放平台返回当前商户税号,ISV模式下商户请求API时需传此值,可程序赋值
-	public static String userId = ""; // 获取access_token时开放平台返回,ISV模式下商户刷新令牌时需传此值,可程序赋值
-	public static String expires_in = ""; // access_token失效时间,可程序赋值
-	public static String client_id = app_key; // 用户ID,取$appKey值,当调用刷新令牌时取$userId值
-	public static String client_secret = app_secret; // 用户秘钥,取$app_secret值
-	public static String redirect_uri = "https://rst.iamberry.com/back/nuonuo_back"; // 对调地址由商户自定义
-//	public static String grant_type_token = "authorization_code"; // 获取access_token时,OAUTH定义编码类型
-	public static String grant_type_token = "client_credentials"; // 获取access_token时,OAUTH定义编码类型
-	public static String grant_type_refreshToken = "refresh_token"; // 获取access_token时,OAUTH定义编码类型
-	public static String accessToken_url = url_token; // 获取access_token和refresh_token请求地址
-	
-	
-    /**
-     * 定时任务 刷新access_token
-     */
-	public static long delay = 60; // 步长
-	public static long preiod = 29 * 24 * 60 * 60; // 偏移量accesstoken尝试时间
-	
-}

+ 0 - 19
watero-common-tool/src/main/java/com/iamberry/nuonuo/util/ValidataUtil.java

@@ -1,19 +0,0 @@
-package com.iamberry.nuonuo.util;
-
-
-/**
- * 校验类
- * @author sdk.jss.com.cn
- * @version 2.0
- * @since jdk1.6
- */
-public class ValidataUtil {
-
-	public static boolean isEmpty(String str) {
-		if (str == null || str.trim().equals("")) {
-			return true;
-		}
-		return false;
-	}
-	
-}

+ 0 - 384
watero-rst-service/src/main/java/com/iamberry/rst/util/NuoNuoServiceUtil.java

@@ -1,384 +0,0 @@
-package com.iamberry.rst.util;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.iamberry.file.DownloadFile;
-import com.iamberry.nuonuo.bean.PrivateData;
-import com.iamberry.nuonuo.bean.PublicData;
-import com.iamberry.nuonuo.bean.RequestMode;
-import com.iamberry.nuonuo.exception.OpensnsException;
-import com.iamberry.nuonuo.oauth.Oauth2AccessToken;
-import com.iamberry.nuonuo.service.OpenApiV1;
-import com.iamberry.nuonuo.util.StateData;
-import com.iamberry.rst.core.ei.Billing;
-import com.iamberry.rst.core.ei.BillingItem;
-import com.iamberry.rst.core.ei.InvoPlatform;
-import com.iamberry.rst.core.ei.PlatformInfo;
-import com.iamberry.rst.faces.ei.BillingService;
-import com.iamberry.rst.faces.ei.InvoPlatformService;
-import com.iamberry.rst.faces.ei.PlatformInfoService;
-import com.iamberry.wechat.tools.NameUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-/**
- * 诺诺开票系统
- */
-@Service
-public class NuoNuoServiceUtil {
-    private Logger logger = LoggerFactory.getLogger(NuoNuoServiceUtil.class);
-    private static String NUONUO_URL = NameUtils.getConfig("NUONUO_URL");
-    private static Integer NUONUO_ID = Integer.valueOf(NameUtils.getConfig("NUONUO_ID"));
-
-    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
-    @Autowired
-    private InvoPlatformService invoPlatformService;
-    @Autowired
-    private PlatformInfoService platformInfoService;
-    @Autowired
-    private BillingService billingService;
-
-    /**
-     * 开票
-     * @param billing
-     * @return
-     */
-    public String nuoNInvo(Billing billing){
-        InvoPlatform invoPlatform  = invoPlatformService.getInvoPlatformById(billing.getInvoPlatId());
-        PlatformInfo platformInfo = platformInfoService.getPlatformInfoById(billing.getPlatId());
-
-        if(StateData.app_id != billing.getInvoPlatId()){
-            this.setHeader(invoPlatform,platformInfo);
-        }
-        String msg = this.setToken(invoPlatform);
-        if(!"success".equals(msg)){
-            return msg;
-        }
-
-        Map<String,String> headers = getHeaders();
-        PublicData pdData = getPublicData("nuonuo.electronInvoice.requestBilling");
-        PrivateData<Object> pvData = new PrivateData<Object>();
-        List<Map<String,Object>> list = new ArrayList<Map<String,Object>>();
-        List<Map<String,Object>> list_invoiceDetail = new ArrayList<Map<String,Object>>();
-        Map<String,Object> map_s = new HashMap<String,Object>();
-        Map<String,Object> map_order = new HashMap<String,Object>();
-
-        map_order.put("buyerName", billing.getBillCompanyName()); //购方名称,  个人填“个人”
-        map_order.put("buyerTaxNum", billing.getBillTaxNumber()); //购方税号(企业要填,个人可为空)
-        if(billing.getBillTel() == null || "".equals(billing.getBillTel())){
-            map_order.put("buyerPhone", "13265476840"); //购方手机(开票成功会短信提醒购方,不受推送方式影响)
-        }else{
-            map_order.put("buyerPhone", billing.getBillTel()); //购方手机(开票成功会短信提醒购方,不受推送方式影响)
-        }
-        map_order.put("buyerAddress", billing.getBillAddress());   //购方地址
-
-        String billBankInfo =  getStr(billing.getBillBankName())  + getStr(billing.getBillBankNumber());
-        map_order.put("buyerAccount", billBankInfo);   //	购方银行账号及开户行地址
-        map_order.put("orderNo", billing.getBillOrderNo());   //订单号(每个企业唯一)
-
-        if(billing.getBillOrderDate() == null){
-            map_order.put("invoiceDate", sdf.format(new Date()));    //订单时间
-        }else{
-            map_order.put("invoiceDate", sdf.format(billing.getBillOrderDate()));    //订单时间
-        }
-
-        map_order.put("clerk", platformInfo.getPlatBilling());  //开票员 platBilling
-        String platBankInfo =  getStr(platformInfo.getPlatBankName())  + getStr(platformInfo.getPlatBankNumber());
-        map_order.put("salerAccount", platBankInfo);       //销方银行账号和开户行地址
-        map_order.put("salerTel", platformInfo.getPlatTel());
-        map_order.put("salerAddress", platformInfo.getPlatAddress());
-
-        if(1 == NUONUO_ID){  //表示沙箱环境
-            map_order.put("salerTaxNum", "339901999999142");
-        }else{
-            map_order.put("salerTaxNum", platformInfo.getPlatTaxNumber());
-        }
-
-        map_order.put("invoiceType", "1");  //开票类型:1,正票;2,红票
-        map_order.put("remark", "");    //冲红时,在备注中注明“对应正数发票代码:XXXXXXXXX号码:YYYYYYYY”文案,其中“X”为发票代码,“Y”为发票号码,可以不填,接口会自动添加该文案
-        map_order.put("payee", platformInfo.getPlatPayee());   //收款人platPayee
-        map_order.put("checker",platformInfo.getPlatReviewer());     //复核人   platReviewer
-        map_order.put("invoiceCode", ""); //	冲红时填写的对应蓝票发票代码(红票必填,不满12位请左补0)
-        map_order.put("invoiceNum", "");  //冲红时填写的对应蓝票发票号码(红票必填,不满8位请左补0)
-        map_order.put("pushMode", "1"); //推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机
-        map_order.put("email", ""); //推送邮箱(pushMode为0或2时,此项为必填)
-        map_order.put("listFlag", "1"); //清单标志:0,根据项目名称数,自动产生清单;1,将项目信息打印至清单
-        map_order.put("listName", "详见销货清单");  //清单项目名称:打印清单时对应发票票面项目名称(listFlag为1是,此项为必填,默认为“详见销货清单”)
-        map_order.put("buyerTel", getStr(billing.getBillTel()));
-        map_order.put("proxyInvoiceFlag", "0");  //代开标志:0非代开;1代开。
-        map_order.put("departmentId", "");  //部门门店id(诺诺系统中的id)  N
-        map_order.put("clerkId", "");   //开票员id(诺诺系统中的id) N
-
-        for (BillingItem billingItem : billing.getBillingItemList()) {
-            Map<String,Object> map_invoiceDetails = new HashMap<String,Object>();
-            map_invoiceDetails.put("goodsName", billingItem.getBillItemProductName()+"("+ billingItem.getBillItemColorName() +")");   //商品名称(如invoiceLineProperty =1,则此商品行为折扣行,折扣行不允许多行折扣,折扣行必须紧邻被折扣行,商品名称必须与被折扣行一致)
-            map_invoiceDetails.put("num", billingItem.getBillItemNum());
-            map_invoiceDetails.put("withTaxFlag", "1"); //单价含税标志,0:不含税,1:含税
-            map_invoiceDetails.put("price", Double.valueOf(billingItem.getBillItemUnitPrice())/100);
-            map_invoiceDetails.put("taxRate", "0.13");  //税率
-            map_invoiceDetails.put("specType", "");    //规格型号
-            map_invoiceDetails.put("unit", "");    //	单位
-            map_invoiceDetails.put("goodsCode", billingItem.getBillItemColorBar());   //商品编码(商品税收分类编码开发者自行填写) -- rst 标准69吗
-            map_invoiceDetails.put("selfCode", billingItem.getJdProductId());   //自行编码(可不填) - 京东
-            map_invoiceDetails.put("invoiceLineProperty", "0"); //发票行性质:0,正常行;1,折扣行;2,被折扣行
-            map_invoiceDetails.put("favouredPolicyFlag", "0");  //优惠政策标识:0,不使用;1,使用
-            map_invoiceDetails.put("favouredPolicyName", null); //增值税特殊管理(优惠政策名称),当favouredPolicyFlag为1时,此项必填
-            map_invoiceDetails.put("zeroRateFlag", null);
-            map_invoiceDetails.put("deduction", null);  //扣除额。差额征收时填写,目前只支持填写一项
-//            map_invoiceDetails.put("tax", "6.45");
-            map_invoiceDetails.put("taxIncludedAmount", null);   //含税金额,[不含税金额] + [税额] = [含税金额],红票为负。不含税金额、税额、含税金额任何一个不传时,会根据传入的单价,数量进行计算,可能和实际数值存在误差,建议都传入
-            map_invoiceDetails.put("taxExcludedAmount", null);   //不含税金额。红票为负。不含税金额、税额、含税金额任何一个不传时,会根据传入的单价,数量进行计算,可能和实际数值存在误差,建议都传入
-            list_invoiceDetail.add(map_invoiceDetails);
-        }
-
-        map_order.put("invoiceDetail", list_invoiceDetail);
-        map_order.put("invoiceLine", "p");  //发票种类:p,普通发票(电票)(默认);c,普通发票(纸票);s,专用发票;e,收购发票(电票);f,收购发票(纸质)
-        map_order.put("productOilFlag", "0");   //成品油标志:0,非成品油(默认);1,成品油
-        map_s.put("order", map_order);
-        list.add(map_s);
-        pvData.setServicedata(list);
-        RequestMode requestMode = getRequestMode(pdData,pvData);
-        OpenApiV1 sdk =  new OpenApiV1();
-        String result = "";
-        try {
-            result = sdk.handle(NUONUO_URL,headers, requestMode);
-            String invoiceSerialNum = "";  //调用结果与流水号
-            Integer status = 0;     //状态 0:未开票; 1:开票中; 2为开票成功 3:开票失败;
-            JSONObject jsonObject = JSON.parseObject(result);
-            String code = jsonObject.getString("code");
-            if("E0000".equals(code)){
-                status = 1;
-                JSONObject jo = jsonObject.getJSONObject("result");
-                invoiceSerialNum = jo.getString("invoiceSerialNum");
-                msg = "success";
-            }else if("E9106".equals(code)){
-                status = 1;
-                msg = "success";
-            }else{
-                msg =  "发票生成错误:"+result;
-            }
-            Billing bl = new Billing();
-            bl.setBillId(billing.getBillId());
-            bl.setBillInvoiceSerialNum(invoiceSerialNum);  //billInvoiceSerialNum
-            bl.setBillResultMsg(msg);
-            bl.setBillStatus(status);
-            Integer flag = billingService.update(bl);
-        } catch (OpensnsException e) {
-            e.printStackTrace();
-            msg =  "发票生成错误:"+result;
-        }
-        return msg;
-    }
-
-    /**
-     *  获取电子发票
-     * @return
-     */
-    public boolean invoGetByNuoNuo(String path){
-        boolean flag = true;
-
-        Billing bl = new Billing();
-        bl.setBillStatus(1);
-        List<Billing> billingList = billingService.getBillingList(bl);
-        if(billingList != null && billingList.size() > 0){
-            List<String> list_s = new ArrayList<>();
-            Integer platId = 0;
-            for (Billing bi:billingList) {
-                platId = bi.getPlatId();
-                list_s.add(bi.getBillInvoiceSerialNum());
-            }
-            invoGetByNuoNuoList(NUONUO_ID,platId,list_s,path);
-        }
-        return flag;
-    }
-
-    /**
-     *  获取电子发票
-     * @param InvoPlatId  诺诺平台在数据库的id
-     * @param platId    所属平台
-     * @param list_s
-     * @param path E:\java-work\iamberry-work\watero-rst-web\target\watero-rst-web\common
-     * @return
-     */
-    public void invoGetByNuoNuoList(Integer InvoPlatId,Integer platId, List<String> list_s,String path){
-        InvoPlatform invoPlatform  = invoPlatformService.getInvoPlatformById(platId);
-        PlatformInfo platformInfo = platformInfoService.getPlatformInfoById(InvoPlatId);
-        if(StateData.app_id != InvoPlatId){
-            this.setHeader(invoPlatform,platformInfo);
-        }
-       this.setToken(invoPlatform);
-
-        Map<String,String> headers = getHeaders();
-        PublicData pdData = getPublicData("nuonuo.electronInvoice.CheckEInvoice");
-        PrivateData<Object> pvData = new PrivateData<Object>();
-        List<Map<String,Object>> list = new ArrayList<Map<String,Object>>();
-        Map<String,Object> map_s = new HashMap<String,Object>();
-        map_s.put("invoiceSerialNum", list_s);
-        list.add(map_s);
-        pvData.setServicedata(list);
-        RequestMode requestMode = getRequestMode(pdData,pvData);
-        OpenApiV1 sdk = new OpenApiV1();
-        String result = null;
-        try {
-            result = sdk.handle(NUONUO_URL,headers, requestMode);
-            JSONObject jsonObject = JSON.parseObject(result);
-            String res = jsonObject.getString("result");
-            JSONArray jsonArray = JSON.parseArray(res);
-            for (int i=0;i<jsonArray.size();i++){
-                JSONObject jo = jsonArray.getJSONObject(i);
-                Integer status = jo.getInteger("status");
-                String orderNo = jo.getString("orderNo");
-                String statusMsg = jo.getString("statusMsg");
-                Billing billing = new Billing();
-                billing.setBillOrderNo(orderNo);
-                billing.setBillResultMsg(statusMsg);
-                if(2 == status){
-                    String invoiceFileUrl = jo.getString("invoiceFileUrl");
-                    String invoiceDate = jo.getString("invoiceDate");   //开票日期
-                    String invoiceLine = jo.getString("invoiceLine");
-                    String invoiceCode = jo.getString("invoiceCode");   //发票代码
-                    String invoiceNum = jo.getString("invoiceNum"); ///发票号码
-                    Double taxExcludedAmount = jo.getDouble("taxExcludedAmount")*100;   //不含税金额  48*
-                    Double taxIncludedAmount = jo.getDouble("taxIncludedAmount")*100;   //总  48*
-
-                    String pdfUnitPath = "common/ei/pdf";
-
-                    long start = System.currentTimeMillis();
-                    DownloadFile.downLoadByUrl(invoiceFileUrl,orderNo+".pdf",path+pdfUnitPath);
-                    long end = System.currentTimeMillis();
-                    System.out.println("下载pdf时间为:"+ (end-start));
-
-                    String pdfFilePath = pdfUnitPath+ "/" + orderNo+".pdf";
-                    billing.setBillStatus(status);
-                    billing.setBillInvoiceFileUrl(pdfFilePath); //billInvoiceFileUrl
-                    billing.setBillInvoiceImageUrl(invoiceFileUrl); //billInvoiceImageUrl
-                    billing.setBillInvoiceDate(sdf.parse(invoiceDate));
-                    billing.setBillInvoiceLine(invoiceLine);
-                    billing.setBillTaxExcludedAmount(Integer.valueOf(taxExcludedAmount.intValue()));
-                    billing.setBillTaxIncludedAmount(Integer.valueOf(taxIncludedAmount.intValue()));
-                    billing.setBillInvoiceCode(invoiceCode);
-                    billing.setBillInvoiceNum(invoiceNum);
-                    Integer flag = billingService.updateByOrderNo(billing);
-                    if(flag < 1){
-                        logger.info("发票修改失败:"+result);
-                        billing.setBillStatus(3);
-                    }
-                }else{
-                    logger.info("订单编号:"+orderNo+",发票还在生成中!");
-                    billing.setBillStatus(status);
-                }
-                Integer flag = billingService.updateByOrderNo(billing);
-            }
-        } catch (OpensnsException e) {
-            e.printStackTrace();
-            logger.info("获取发票信息失败:"+list_s.toString());
-        }catch (Exception e){
-            e.printStackTrace();
-            logger.info("获取发票信息失败:"+result);
-        }
-    }
-
-    /**
-     * 如果token过期,获取新的token
-     * @param invoPlatform
-     * @return
-     */
-    private String setToken(InvoPlatform invoPlatform){
-        Calendar calendar = Calendar.getInstance();
-        calendar.add(Calendar.DAY_OF_MONTH, 1); //因为有效期24小时,所以加一天
-        if(invoPlatform.getInvoPlatEndDate() == null || invoPlatform.getInvoPlatEndDate().before(new Date())){   //当前时间大于截止时间
-            StateData.grant_type_token = "authorization_code";
-            String msg =  Oauth2AccessToken.getAccessToken();
-            String token = "";
-
-            try{
-                JSONObject jsonObject = JSON.parseObject(msg);    //{"access_token":"fdd052d08bbad090aeff770tg7h2ehxs","expires_in":86400}
-                token = jsonObject.getString("access_token");
-                if(token == null || "".equals(token)){
-                    throw new Exception();
-                }
-            }catch (Exception e){
-                logger.info("获取新token失败,获取token结果:"+msg);
-                return "获取新token失败,获取token结果:"+msg;
-            }
-
-            InvoPlatform ip = new InvoPlatform();
-            ip.setInvoPlatId(invoPlatform.getInvoPlatId());
-            ip.setInvoPlatAccessToken(token);
-            ip.setInvoPlatEndDate(calendar.getTime());
-            Integer flag = invoPlatformService.update(ip);
-            if(flag < 0){
-                logger.info("刷新诺诺token失败");
-                return "刷新诺诺token失败";
-            }
-            StateData.app_accessToken = token;
-        }
-        return "success";
-    }
-
-    /**
-     * 设置key
-     * @param invoPlatform
-     * @param platformInfo
-     */
-    private void setHeader(InvoPlatform invoPlatform,PlatformInfo platformInfo){
-        StateData.app_id = invoPlatform.getInvoPlatId(); //
-        StateData.app_secret = invoPlatform.getInvoPlatAppSecret(); // 填写本APP申请的 appSecret,注意区分正式环境与沙箱环境参数,如: 9B4CA8CEA5EE4823
-        StateData.app_key = invoPlatform.getInvoPlatAppKey(); // 填写本APP申请的 appKey,注意区分正式环境与沙箱环境参数,如:fk5dWkPA
-        StateData.app_accessToken = invoPlatform.getInvoPlatAccessToken(); // 填写本APP申请的 令牌 ,注意区分正式环境与沙箱环境参数,如://{"access_token":"fdd052d08bbad090aeff770kgia1mkms","expires_in":86400}
-        StateData.app_signType = "AES"; // 填写本APP传输数据加密格式,如:AES/AES
-
-        if(1 == NUONUO_ID){  //表示沙箱环境
-            StateData.user_Tax =  "339901999999142";
-        }else{
-            StateData.user_Tax = platformInfo.getPlatTaxNumber(); //销方税号
-        }
-
-        Oauth2AccessToken.client_id = invoPlatform.getInvoPlatAppKey();  //创建应用后,分配给应用的appKey
-        Oauth2AccessToken.client_secret = invoPlatform.getInvoPlatAppSecret(); //创建应用后,分配给应用的appSecret
-        Oauth2AccessToken.token_grant_type = "client_credentials";   //授权类型,在本步骤中,此值为“authorization_code” ,获取token用client_credentials
-    }
-
-    // 定义请求头数据
-    private Map<String, String> getHeaders() {
-        Map<String, String> headers = new HashMap<String, String>();
-        headers.put("appKey", StateData.app_key); // 用户申请的appkey
-        headers.put("accessToken", StateData.app_accessToken); // 用户Oauth登录后得到的令牌accessToken
-        headers.put("compress", StateData.app_compressType);// 压缩方式:提供GZIP 置空“”不压缩
-        headers.put("signMethod",  StateData.app_signType); // 加密方式:提供AES/AES,不可为空
-        headers.put("dataType", StateData.app_dataType); // 数据请求格式: JSON/XML
-        headers.put("appRate", StateData.app_rate); // app并发请求数 ,平台默认10如需升级请联系开放平台
-        headers.put("userTax", StateData.user_Tax); // ISV下商家需要填写当前商户税号,普通商家模式用户可以不填写此值
-        headers.put("Content-Type", StateData.contentType); // http发送模式
-        return headers;
-    }
-
-    // 定义请求体中的公共数据
-    private  PublicData getPublicData(String api) {
-        PublicData pdData = new PublicData();
-        pdData.setVersion(StateData.app_apiVersion); // API版本
-        pdData.setTimestamp(String.valueOf(System.currentTimeMillis()));
-        pdData.setMethod(api);// API名称
-        return pdData;
-    }
-
-    private  RequestMode getRequestMode(PublicData pdata, PrivateData<Object> pvData) {
-        RequestMode requestMode = new RequestMode();
-        requestMode.setPrivate(pvData);
-        requestMode.setPublic(pdata);
-        return requestMode;
-    }
-
-    private static String getStr(String str){
-        if(str == null)
-            return "";
-        return str;
-    }
-}

+ 3 - 68
watero-rst-web/src/main/java/com/iamberry/rst/controllers/ei/BillingController.java

@@ -1,8 +1,6 @@
 package com.iamberry.rst.controllers.ei;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
 import com.iamberry.rst.core.ei.Billing;
 import com.iamberry.rst.core.ei.BillingItem;
 import com.iamberry.rst.core.ei.PlatformInfo;
@@ -15,7 +13,6 @@ import com.iamberry.rst.faces.ei.BillingService;
 import com.iamberry.rst.faces.ei.PlatformInfoService;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.util.JdServiceUtil;
-import com.iamberry.rst.util.NuoNuoServiceUtil;
 import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
 import com.iamberry.wechat.tools.NameUtils;
@@ -31,7 +28,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -41,7 +37,6 @@ import java.util.List;
 @RequestMapping("/admin/ei_billing")
 public class BillingController {
     private Logger logger = LoggerFactory.getLogger(BillingController.class);
-    private static Integer NUONUO_ID = Integer.valueOf(NameUtils.getConfig("NUONUO_ID"));
 
     @Autowired
     private  BillingService billingService;
@@ -53,8 +48,6 @@ public class BillingController {
     private ProductService productService;
     @Autowired
     private JdServiceUtil jdServiceUtil;
-    @Autowired
-    private NuoNuoServiceUtil nuoNuoServiceUtil;
 
     /**
      * 查询客户基本信息列表
@@ -199,44 +192,7 @@ public class BillingController {
             e.printStackTrace();
             return  new ResponseJson(500, "添加错误"+e.getMessage(), 500);
         }
-
-        String msg = "",invoiceSerialNum = "";  //调用结果与流水号
-        Integer status = 0;     //状态 0:未开票; 1:开票中; 2为开票成功 3:开票失败;
-        Billing bl = new Billing();
-        bl.setBillId(billing.getBillId());
-        try{
-            billing.setInvoPlatId(NUONUO_ID);   //获取诺诺的平台id
-            //调用诺诺接口生成发票流水号
-            msg = nuoNuoServiceUtil.nuoNInvo(billing);  //{"result":{"invoiceSerialNum":"19041710353801188438"},"code":"E0000","describe":"开票提交成功"}
-
-            JSONObject jsonObject = JSON.parseObject(msg);
-            String code = jsonObject.getString("code");
-            if("E0000".equals(code)){
-                status = 1;
-                JSONObject jo = jsonObject.getJSONObject("result");
-                invoiceSerialNum = jo.getString("invoiceSerialNum");
-                rj = new ResponseJson(200, "发票正在生成中,可到列表页面等待发票生成完成", 200);
-            }else{
-                msg =  "发票生成错误:"+msg;
-            }
-        }catch (Exception e){
-            e.printStackTrace();
-            msg =  "发票生成错误:"+msg;
-        }
-
-        bl.setBillId(billing.getBillId());
-        bl.setBillInvoiceSerialNum(invoiceSerialNum);  //billInvoiceSerialNum
-        bl.setBillResultMsg(msg);
-        bl.setBillStatus(status);
-        flag = billingService.update(bl);
-        if(status == 1){
-            List<String> list_s = new ArrayList<>();
-            list_s.add(invoiceSerialNum);
-            String path = request.getSession().getServletContext().getRealPath("/");
-            nuoNuoServiceUtil.invoGetByNuoNuoList(NUONUO_ID,billing.getPlatId(),list_s,path);
-            return rj;
-        }
-        return  new ResponseJson(500, "发票生成失败,失败原因("+msg+")", 500);
+        return  new ResponseJson(200, "添加成功", 200);
     }
 
     /**
@@ -261,29 +217,8 @@ public class BillingController {
         List<BillingItem> billingItemList =  billingItemService.getBillingItemList(billingItem);
         billing.setBillingItemList(billingItemList);
 
-        String msg = "";
-        try{
-            billing.setInvoPlatId(NUONUO_ID);   //获取诺诺的平台id
-            //调用诺诺接口生成发票流水号
-            msg = nuoNuoServiceUtil.nuoNInvo(billing);  //{"result":{"invoiceSerialNum":"19041710353801188438"},"code":"E0000","describe":"开票提交成功"}
-            if(!"success".equals(msg)){
-                return  new ResponseJson(500, "发票生成失败,失败原因("+msg+")", 500);
-            }
-
-            Billing bill = billingService.getBillingById(billId);
-            if(bill.getBillInvoiceSerialNum() != null && !"".equals(bill.getBillInvoiceSerialNum())){
-                List<String> list_s = new ArrayList<>();
-                list_s.add(bill.getBillInvoiceSerialNum());
-                String path = request.getSession().getServletContext().getRealPath("/");
-                nuoNuoServiceUtil.invoGetByNuoNuoList(NUONUO_ID,billing.getPlatId(),list_s,path);
-            }
-
-            return new ResponseJson(200, "发票正在生成中,可到列表页面等待发票生成完成", 200);
-
-        }catch (Exception e){
-            e.printStackTrace();
-            return  new ResponseJson(500, "发票生成失败,失败原因("+msg+")", 500);
-        }
+        rj = new ResponseJson(500, "查询所属平台失败", 500);
+        return rj;
     }
 
     /**

+ 7 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -1373,6 +1373,13 @@ public class AdminSalesOrderController {
             if(getSalesOrderList == null || getSalesOrderList.size() < 1){
                 BeanUtils.copyProperties(or,getSalesOrder);
                 getSalesOrder.setSalesDealCode(salesOrderItem.getSalesDealCode());
+                getSalesOrder.setSalesOrderId(salesOrderItem.getSalesDealCode());
+                getSalesOrder.setSalesShippingStatus(0);    //salesShippingStatus
+                getSalesOrder.setSalesDeliver(1);           //salesDeliver
+                getSalesOrder.setSalesDeliverTime(null);   //salesDeliverTime
+                getSalesOrder.setSalesStatus(1);            //salesStatus
+                getSalesOrder.setSalesPostNum(null);        //salesPostNum;            //快递单号
+                getSalesOrder.setSalesIsDownload(1);        //salesIsDownload;
                 getSalesOrder.setSalesId(null);
                 getSalesOrder.setSalesMainOrderId(or.getSalesId());
             }else{

+ 8 - 8
watero-rst-web/src/main/resources/platform.properties

@@ -119,12 +119,12 @@ DO_MAIN=test.iamberry.com
 JD_URL=https://api.jd.com/routerjson
 JD_ORDER=1
 
-##nuonuo_url
-#NUONUO_URL=https://sdk.jss.com.cn/openPlatform/services
-#NUONUO_ID=2
-
-##nuonuo_url_test
-NUONUO_URL=https://sandbox.jss.com.cn/openPlatform/services
-NUONUO_ID=1
-
+###nuonuo_url
+##NUONUO_URL=https://sdk.jss.com.cn/openPlatform/services
+##NUONUO_ID=2
+#
+###nuonuo_url_test
+#NUONUO_URL=https://sandbox.jss.com.cn/openPlatform/services
+#NUONUO_ID=1
+#
 

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/base/page_util.ftl

@@ -84,7 +84,7 @@
     	</span>
 
             <span class="btn" style="cursor: default;">共<a class="active">${page.pages}</a>页</span>
-            <span class="btn" style="cursor: default;">到<a class="active" style="max-height: 36px;min-height: 34px"><input type="text" id="pageCode" value="${page.pageNo}" class="input-text radius" style="width: 36px;height:22px;text-align: center;" maxlength="3"/></a>页</span>
+            <span class="btn" style="cursor: default;">到<a class="active" style="margin: 0 10px; max-height: 36px;min-height: 34px"><input type="text" id="pageCode" value="${page.pageNo}" class="input-text radius" style="width: 36px;height:22px;text-align: center;" maxlength="3"/></a>页</span>
             <span class="btn btn-lowblue radius"><a href="javascript:_go();" class="active">确定</a></span>
             <a href="#" style="overflow:hidden" class="active"></a>
         </div>

+ 9 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl

@@ -20,7 +20,15 @@
         .my-textarea{padding: 5px 10px;width: 77%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
         .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
         .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
-        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        .my-select {
+            border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 50px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;
+        }
         input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         .huanhang{ float:left}

+ 25 - 13
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl

@@ -8,10 +8,16 @@
         *{padding: 0;margin: 0;}
         .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 25px;margin-right: 5px;}
         /*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
-        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
-        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 20px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(${path}/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;}
+        .my-btn-search{border: 1px solid #50a2ea;padding: 1px 25px;background-color: #fff;color: #50a2ea;height: 32px;}
         .barcodeImg{margin:10px 0px}
-        .table-bg thead th{background-color: #e2f6ff;}
+        .table-bg thead th{background-color: #f7fafd;}
         input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         .txt2{
@@ -55,15 +61,21 @@
         .yulia-name .after{}
         .table2 {}
         .table2 th{font-size: 0.875rem;font-weight: 500;}
+        .yulia-logo{width: 4cm;padding:1.5cm 0 0.5cm 0;margin: 0 auto; display: block;}
+        .yulia-name{margin: 0 auto;padding: 0 0 0.5cm 0;text-align: center;position: relative;font-weight: bold;font-size: 1rem;letter-spacing: 1rem;}
+        .yulia-name .before{position: absolute;left: 0;width: 3cm;height: 0;border: 0.0625rem solid #000;top: 0.5625rem;}
+        .yulia-name .after{position: absolute;right: 0;width: 3cm;height: 0.125rem;border: 0.0625rem solid #000;top: 0.5625rem;}
+        .table2 {margin:1cm 0 0.7cm 1cm;width: 19cm;border: 0.0625rem solid #000;border-collapse: collapse;text-align: left;}
+        .table2 th{font-size: 0.875rem;font-weight: 500;background: #f7fafd;}
         .table2 thead tr th,
         .table2 tbody tr td {font-size: 0.75rem;padding:0.5rem 0;text-indent: 1.2rem; color: #333;border: 0.0625rem solid #000;border-collapse: collapse;background-color: #fff;height: 1.2cm;}
     </style>
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">&gt;</span> RST管理
-    <span class="c-gray en">&gt;</span> 维修列表
-    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    <span class="c-gray en">/</span> RST管理
+    <span class="c-gray en">/</span> 维修列表
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 <div class="page-container">
     <div class="text-c">
@@ -149,7 +161,7 @@
                     <td class="text-c" width="100">${detect.productName!'暂无产品'}(${detect.colorName!'暂无颜色'})</td>
                     <td class="text-c" width="100">
                         <#if detect.detectState == 1>
-                            待检测机器
+                            <span class="c-red">待检测机器</span>
                         </#if>
                         <#if detect.detectState == 30>
                             待用户确认
@@ -158,10 +170,10 @@
                             用户同意维修(待维修)
                         </#if>
                         <#if detect.detectState == 32>
-                            维修完成
+                            <span class="c-success">维修完成</span>
                         </#if>
                         <#if detect.detectState == 33>
-                            用户不维修(原机退回)
+                            <span class="c-success">用户不维修(原机退回)</span>
                         </#if>
                         <#if detect.detectState == 34>
                             待客服确认维修
@@ -170,7 +182,7 @@
                             客服确认维修,(待维修)
                         </#if>
                         <#if detect.detectState == 36>
-                            维修完成
+                            <span class="c-success">维修完成</span>
                         </#if>
                         <#if detect.detectState == 37>
                             机器无故障,原机退回
@@ -188,7 +200,7 @@
                             不能翻新,待报废
                         </#if>
                         <#if detect.detectState == 23>
-                            已报废回收
+                            <span class="c-success">已报废回收</span>
                         </#if>
                     </td>
                     <td class="text-c" width="100">
@@ -219,7 +231,7 @@
                     <td class="text-c" width="100"><div  title="${detect.detectNalysis!}">${detect.detectNalysis!'-'}</div></td>
                     <td class="text-c" width="100"><div  title="${detect.detectContent!}">${detect.detectContent!'-'}</div></td>
                     <td class="text-c" width="100"><#if detect.detectOffer??>${detect.detectOffer/100}<#else>-</#if></td>
-                    <td class="text-c" width="100"><span class="label txt2" title="${detect.questionTitle!}" >${detect.questionTitle!'-'}</span><br><#if detect.questionTitle??><#if detect.questionTitle != ""><a href="#" onclick="getDescribeInfo(${detect.customerId!});" style="color : #4149FF;">查看详情</a></#if></#if></td>
+                    <td class="text-c" width="100"><span class="label txt2" title="${detect.questionTitle!}" >${detect.questionTitle!'-'}</span><br><#if detect.questionTitle??><#if detect.questionTitle != ""><a href="#" onclick="getDescribeInfo(${detect.customerId!});" style="color : #50a2ea;">查看详情</a></#if></#if></td>
                     <td class="text-c" width="100">${detect.detectDesc!'-'}</td>
                     <td class="text-c" width="100">${detect.detectCustomerDesc!'-'}</td>
                     <td class="text-c" width="100">${(detect.detectDate?string("yyyy-MM-dd"))!'-'}</td>
@@ -234,7 +246,7 @@
                             <i class="Hui-iconfont">&#xe609;</i>
                         </a>-->
                         <#if detect.detectState == 1>
-                            <a style="text-decoration:none" href="javascript:;" title="完成检测"
+                            <a style="text-decoration:none;color: #50a2ea" href="javascript:;" title="完成检测"
                                onclick="update_info('完成检测','${path}/admin/detect/to_update_complete?detectId=${detect.detectId!''}','670','550');">
                                 <i class="Hui-iconfont">完成检测</i><br>
                             </a>

+ 3 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inventory/inventoryLog_list.ftl

@@ -33,9 +33,9 @@
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">&gt;</span> 库存管理
-    <span class="c-gray en">&gt;</span> 库存日志列表
-    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    <span class="c-gray en">/</span> 库存管理
+    <span class="c-gray en">/</span> 库存日志列表
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 <div class="page-container">
     <div class="text-c">

+ 3 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/postage/postage_list.ftl

@@ -29,9 +29,9 @@
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">&gt;</span> 客诉管理
-    <span class="c-gray en">&gt;</span> 邮费转账列表
-    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    <span class="c-gray en">/</span> 客诉管理
+    <span class="c-gray en">/</span> 邮费转账列表
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 <div class="page-container">
     <div class="text-c">

+ 5 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl

@@ -42,7 +42,8 @@
         .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
         .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent  transparent  transparent #32a3d8;font-size:0; line-height:0;}
         .time-line-list>li:first-child .arrow{display: none;}
-        .table-bg th{background-color: #e2f6ff;}
+        .table-bg th{background-color: #f7fafd;height: 40px;}
+        .table-bg td{height: 40px;}
         .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
         .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
         input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
@@ -52,11 +53,9 @@
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">&gt;</span> 客诉管理
-    <span class="c-gray en">&gt;</span> 添加签收
-    <a class="btn radius r"
-       style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
-       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+    <span class="c-gray en">/</span> 客诉管理
+    <span class="c-gray en">/</span> 添加签收
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl">

+ 3 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/complete_signclosed.ftl

@@ -52,11 +52,9 @@
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">&gt;</span> 客诉管理
-    <span class="c-gray en">&gt;</span> 完成签收
-    <a class="btn radius r"
-       style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
-       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+    <span class="c-gray en">/</span> 客诉管理
+    <span class="c-gray en">/</span> 完成签收
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl">

+ 18 - 9
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/customer_signclosed_list.ftl

@@ -8,10 +8,19 @@
         *{padding: 0;margin: 0;}
         .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 25px;margin-right: 5px;}
         /*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
-        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
-        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        .my-select {
+            border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 50px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;
+        }
+        .my-btn-search{    border: 1px solid #50a2ea;padding: 1px 25px;background-color: #fff;color: #50a2ea;height: 32px;}
         .barcodeImg{margin:10px 0px}
-        .table-bg thead th{background-color: #e2f6ff;}
+        .table-bg thead th{background-color: #f7fafd;height: 40px;}
+        .table-bg tr td{height: 40px;}
         input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #44C861;border: 1px solid #44C861;border-radius: 5px;color: #E5EAEA;font-weight:bold;}
@@ -28,14 +37,14 @@
              white-space: nowrap;
              text-overflow: ellipsis;
          }
-
+        .label-default{background-color: #e6e6e6; color: #50a2ea;}
     </style>
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">&gt;</span> RST管理
-    <span class="c-gray en">&gt;</span> 待联系寄回信息列表
-    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    <span class="c-gray en">/</span> RST管理
+    <span class="c-gray en">/</span> 待联系寄回信息列表
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 <div class="page-container">
     <div class="text-c">
@@ -101,9 +110,9 @@
                     </td>
                     <td class="text-c" width="100"><#if signclosed.signclosedIsReceiving??>
                         <#if signclosed.signclosedIsReceiving == 1>
-                            已签收
+                            <span class="c-success">已签收</span>
                         <#elseif signclosed.signclosedIsReceiving == 2>
-                            未签收
+                            <span class="c-red">未签收</span>
                         </#if>
                     </#if></td>
                     <td class="text-c" width="100">${signclosed.signclosedAddrProvincesName!}-${signclosed.signclosedAddrCityName!}-${signclosed.signclosedAddrAreaName!}</td>

+ 20 - 19
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl

@@ -9,9 +9,10 @@
         .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 25px;margin-right: 5px;}
         /*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
         .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
-        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        .my-btn-search{    border: 1px solid #50a2ea;padding: 1px 25px;background-color: #fff;color: #50a2ea;height: 32px;}
         .barcodeImg{margin:10px 0px}
-        .table-bg thead th{background-color: #e2f6ff;}
+        .table-bg thead th{background-color: #f7fafd;height: 40px;}
+        .table-bg tr td{height: 40px;}
         input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #44C861;border: 1px solid #44C861;border-radius: 5px;color: #E5EAEA;font-weight:bold;}
@@ -28,23 +29,23 @@
              white-space: nowrap;
              text-overflow: ellipsis;
          }
-
+        .label-default{background-color: #e6e6e6; color: #50a2ea;}
     </style>
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">&gt;</span> RST管理
-    <span class="c-gray en">&gt;</span> 签收列表
-    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    <span class="c-gray en">/</span> RST管理
+    <span class="c-gray en">/</span> 签收列表
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 <div class="page-container">
     <div class="text-c">
         <form name="form1" action="${path}/admin/signclosed/select_signclosed_list" method="post">
             <button type="button" style="cursor:pointer;float: left;" class="my-btn-search" onclick="add_signclosed('${path}/admin/signclosed/to_add_signclosed');">新建签收</button>
-            <input class="my-input" style="width: 120px;" type="text" name="signclosedCustomerId" value="${signclosedCustomerId!}" placeholder="客诉编号"/>
-            <input class="my-input" style="width: 120px;" type="text" name="signclosedSendName" value="${signclosedSendName!}" placeholder="寄件人姓名"/>
-            <input class="my-input" style="width: 120px;" type="text" name="signclosedSendTel" value="${signclosedSendTel!}" placeholder="寄件人电话号码"/>
-            <input class="my-input" style="width: 120px;" type="text" name="signclosedLogisticsNumber" value="${signclosedLogisticsNumber!}" placeholder="快递单号"/>
+            <input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedCustomerId" value="${signclosedCustomerId!}" placeholder="客诉编号"/>
+            <input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedSendName" value="${signclosedSendName!}" placeholder="寄件人姓名"/>
+            <input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedSendTel" value="${signclosedSendTel!}" placeholder="寄件人电话号码"/>
+            <input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedLogisticsNumber" value="${signclosedLogisticsNumber!}" placeholder="快递单号"/>
             <#--<select class="my-select" name="signclosedType" style="height: 30px;width: 150px">
                 <option value ="">签收类型</option>
                 <option value ="1" <#if signclosedType??><#if signclosedType == 1>selected="selected"</#if></#if>>客诉寄回</option>
@@ -56,7 +57,7 @@
                 <option value ="1" <#if signclosedObjectsState??><#if signclosedObjectsState == 1>selected="selected"</#if></#if>>正常签收</option>
                 <option value ="2" <#if signclosedObjectsState??><#if signclosedObjectsState == 2>selected="selected"</#if></#if>>物件不对</option>
             </select>-->
-            <button style="cursor:pointer;" type="submit" class="my-btn-search">搜索</button>
+            <button style="cursor:pointer;width: 100px;" type="submit" class="btn btn-primary">查询</button>
         </form>
     </div>
     <div class="mt-20">
@@ -84,15 +85,15 @@
             <#if (page.dataList?size > 0)>
                 <#list page.dataList as signclosed>
                 <tr>
-                    <td class="text-c" width="70">${signclosed.signclosedId!}</td>
+                    <td class="text-c" width="70" style="color: #50a2ea;">${signclosed.signclosedId!}</td>
                     <td class="text-c" width="70">${signclosed.signclosedCustomerId!}</td>
                     <td class="text-c" width="100">${signclosed.customerIdDescribe!}</td>
                     <td class="text-c" width="100">
                         <#if signclosed.signclosedIsReceiving??>
                             <#if signclosed.signclosedIsReceiving == 1>
-                                待签收
+                                <span class="c-red">待签收</span>
                             <#elseif signclosed.signclosedIsReceiving == 2>
-                                已签收
+                                <span class="c-success">已签收</span>
                             </#if>
                         </#if>
                     </td>
@@ -145,9 +146,9 @@
                             <#if (signclosed.signclosedProductInfoList?size > 0)>
                                 <#list signclosed.signclosedProductInfoList as info>
                                     <#--<#if info.signclosedProductType == 1 >
-                                        <span class="label label-success radius" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
+                                        <span class="label label-default radius" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
                                     <#else >-->
-                                        <span class="label label-success radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件</span><br>
+                                        <span class="label label-default radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件</span><br>
                                     <#--</#if>-->
                                 </#list>
                             <#else >
@@ -174,7 +175,7 @@
                     <td class="td-manage text-c">
                         <a style="text-decoration:none" href="javascript:;" title="修改备注"
                            onclick="add_remark('修改备注','${path}/admin/signclosed/to_update_remark?signclosedId=${signclosed.signclosedId!''}','570','450');">
-                            <i class="Hui-iconfont">&#xe692;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe692;</i>
                         </a>
                        <#-- <a style="text-decoration:none" href="javascript:;" title="打印"
                            onclick="print_aftermarket(${signclosed.signclosedId!''});">
@@ -183,7 +184,7 @@
 
                             <a style="text-decoration:none" href="javascript:;" title="修改寄件人信息"
                                onclick="add_remark('修改寄件人信息','${path}/admin/signclosed/to_update_sender?signclosedId=${signclosed.signclosedId!''}','570','450');">
-                                <i class="Hui-iconfont">&#xe60c;</i>
+                                <i class="Hui-iconfont" style="font-size: 20px;">&#xe60c;</i>
                             </a><#--
                             <a style="text-decoration:none" href="javascript:;" title="转入品检"
                                onclick="into_complaint('转入品检','${path}/admin/signclosed/to_into_complaint?signclosedId=${signclosed.signclosedId!''}','770','600');">
@@ -199,7 +200,7 @@
                             <#if signclosed.signclosedIsReceiving == 1>
                                 <a style="text-decoration:none" href="javascript:;" title="签收"
                                    onclick="update_info('${path}/admin/signclosed/to_complete_signclosed?signclosedId=${signclosed.signclosedId!''}');">
-                                    <i class="Hui-iconfont">签收</i>
+                                    <i class="Hui-iconfont" style="color: #50a2ea;">签收</i>
                                 </a>
                             </#if>
                         </#if>

+ 40 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/ei/ei_billing_list.ftl

@@ -107,12 +107,12 @@
                                     </#if>
                                 </#if>
 
-                                <#if (billing.billStatus == 3 || billing.billStatus == 0)>
+                                <#if (billing.billStatus == 0)>
                                   <#--  <a class="scm_update_order " style="text-decoration: none"  href="javascript:void(0);" title="修改信息" alt="修改信息" onclick="toUpdate(${billing.billId!''})">
                                         <i class="Hui-iconfont">&#xe6df;</i>
                                     </a> &nbsp;-->
-                                    <a class="scm_update_order " style="text-decoration: none"  href="javascript:void(0);" title="重新开票" alt="重新开票" onclick="reInvoice(${billing.billId!''})">
-                                        <i class="Hui-iconfont">&#xe66c;</i>
+                                    <a class="scm_update_order " style="text-decoration: none"  href="javascript:void(0);" title="上传发票" alt="上传发票" onclick="uploadPdf(${billing.billId!''})">
+                                        <i class="Hui-iconfont">&#xe642;</i>
                                     </a> &nbsp;
                                 </#if>
 
@@ -169,7 +169,42 @@
             </div>
         </div>
     </div>
+</div>
+
+
+
+<div id="uploadPdfHtml" style="display: none">
+
+    <div style="width: 90%;margin-left: 5%;margin-top: 20px;" class="main_print">
+        <input type="hidden" id="billId" name="" value="">
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>上传类型:</label>
+            <div class="formControls col-9 col-sm-9 skin-minimal ">
+                <div class="radio-box">
+                    <input type="radio" id="tel-1" name="pushLogType" value="1" checked>
+                    <label for="tel-1">京东</label>
+                </div>
+                <div class="radio-box">
+                    <input type="radio" id="tel-2" name="pushLogType" value="2" >
+                    <label for="tel-2">邮箱</label>
+                </div>
+                <div class="radio-box">
+                    <input type="radio" id="tel-2" name="pushLogType" value="2" >
+                    <label for="tel-2">电话</label>
+                </div>
+            </div>
+        </div>
+        <div class="row cl" id="" style="margin-top: 20px;">
+            <div class="formControls col-11 col-sm-11">
 
+            </div>
+        </div>
+        <div class="row cl" id="" style="margin-top: 50px;">
+            <div class="formControls col-11 col-sm-11" style="text-align: center;">
+                <input type="button" class="btn btn-primary add-order-button" onclick="pushUpload(this)" value="确定上传" >
+            </div>
+        </div>
+    </div>
 </div>
 
 <tfoot>
@@ -202,6 +237,8 @@
         window.open("/"+url);
     }
 
+    uploadPdf
+
     /**
      * 重开发票
      * @param url

+ 55 - 42
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

@@ -16,8 +16,21 @@
         .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
         .table-bg thead th{background-color: #e2f6ff;}
         .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
-        .my-order{left: 0px;cursor:pointer; position: absolute;border-bottom: 1px solid rgb(255, 255, 255);float: left;width: 110px;height: 36px;}
-
+        .my-order{border: 1px solid #50a2ea;
+            padding: 1px 25px;
+            height: 36px;
+            background-color: #fff;
+            color: #50a2ea;}
+        .my-select {
+            border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 50px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;
+        }
+        .label-default{background-color: #e6e6e6; color: #50a2ea;}
         .radio-box input[type=radio]{position: relative;-webkit-appearance: none;appearance: none;cursor: pointer;width: 17px;height: 17px;border: 1px solid #333;border-radius: 50%;}
         .radio-box input[type=radio]:focus {outline: none;}
         .radio-box input[type=radio]:checked{background: #fff;}
@@ -26,9 +39,9 @@
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">&gt;</span> 订单管理
-    <span class="c-gray en">&gt;</span> 订单列表
-    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    <span class="c-gray en">/</span> 订单管理
+    <span class="c-gray en">/</span> 订单列表
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 
 <!--  录入订单 -->
@@ -42,28 +55,28 @@
                 <button type="button" style="height: 30px;top: 60px;display: none;" class="my-btn-search my-order" id="addOrderExcel" onclick="upFiles();">Excel导入</button>
             </div>
 
-            <div style="width: 90%;text-align: left;margin-left: 10%;">
+            <div style="width: 90%;margin-left: 10%;">
                 <#if identity != 2>
-                    <select class="select" name="salesIsDownload" id="salesIsDownload" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                    <select class="my-select" name="salesIsDownload" id="salesIsDownload" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;">
                         <option value ="">导出状态</option>
                         <option value ="2" <#if salesOrder.salesIsDownload??><#if salesOrder.salesIsDownload == 2 >selected="selected"</#if></#if>>已导出</option>
                         <option value ="1" <#if salesOrder.salesIsDownload??><#if salesOrder.salesIsDownload == 1 >selected="selected"</#if></#if>>未导出</option>
                     </select>
                 </#if>
-                <select class="select" name="salesShippingStatus" id="salesShippingStatus" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                <select class="my-select" name="salesShippingStatus" id="salesShippingStatus" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;">
                     <option value ="">发货状态</option>
                     <option value ="0" <#if salesOrder.salesShippingStatus??><#if salesOrder.salesShippingStatus == 0 >selected="selected"</#if></#if>>未发货</option>
                     <option value ="11" <#if salesOrder.salesShippingStatus??><#if salesOrder.salesShippingStatus == 11 >selected="selected"</#if></#if>>已通知配货</option>
                     <option value ="1" <#if salesOrder.salesShippingStatus??><#if salesOrder.salesShippingStatus == 1 >selected="selected"</#if></#if>>已打单</option>
                 </select>
 
-                <select class="select" name="salesDeliver" id="salesDeliver" style="height: 31px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                <select class="my-select" name="salesDeliver" id="salesDeliver" style="height: 31px;width: 120px;margin: 0px;margin-bottom: 10px;">
                     <option value ="">出库状态</option>
                     <option <#if (salesOrder.salesDeliver)??><#if salesOrder.salesDeliver == 1>selected="selected"</#if></#if> value ="1" >未出库</option>
                     <option <#if (salesOrder.salesDeliver)??><#if salesOrder.salesDeliver == 2>selected="selected"</#if></#if> value ="2" >已出库</option>
                 </select>
 
-                <select class="select" name="salesStatus" id="salesStatus" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                <select class="my-select" name="salesStatus" id="salesStatus" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;">
                     <option value ="">订单状态</option>
                     <option value ="0" <#if salesOrder.salesStatus??><#if salesOrder.salesStatus == 0 >selected="selected"</#if></#if>>未确认</option>
                     <option value ="1" <#if salesOrder.salesStatus??><#if salesOrder.salesStatus == 1 >selected="selected"</#if></#if>>确认</option>
@@ -71,7 +84,7 @@
                     <option value ="3" <#if salesOrder.salesStatus??><#if salesOrder.salesStatus == 3 >selected="selected"</#if></#if>>作废</option>
                 </select>
 
-                <select class="select" name="salesStoreId" id="salesStoreId" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;"">
+                <select class="my-select" name="salesStoreId" id="salesStoreId" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;"">
                     <option value="">店铺</option>
                     <#if listStoreInfo?? &&  (listStoreInfo?size > 0) >
                         <#list listStoreInfo as info>
@@ -79,14 +92,14 @@
                         </#list>
                     </#if>
                 </select>
-                <select class="select" name="colorId" id="colorId" style="height: 31px;width: 150px">
+                <select class="my-select" name="colorId" id="colorId" style="height: 31px;width: 150px">
                         <option value="">产品名称(颜色)</option>
                     <#list productColorList as productColor>
                         <option <#if (salesOrder.colorId)??><#if salesOrder.colorId == productColor.colorId>selected="selected"</#if></#if> value="${productColor.colorId}">${productColor.productName}(${productColor.colorName})</option>
                     </#list>
                 </select>
 
-                <select class="select" name="salesPostFirm" id="salesPostFirm" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;"">
+                <select class="my-select" name="salesPostFirm" id="salesPostFirm" style="height: 30px;width: 120px;margin: 0px;margin-bottom: 10px;"">
                     <option value="">快递公司</option>
                     <#if logisticsInfoList?? &&  (logisticsInfoList?size > 0) >
                         <#list logisticsInfoList as logisticsInfo>
@@ -99,18 +112,18 @@
 
             </div>
             <#--Efast add end-->
-            <div style="width: 90%;text-align: left;margin-left: 10%;">
-                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesOrderId!}" placeholder="订单号" name="salesOrderId" id="salesOrderId">
-                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesDealCode!}" placeholder="交易号" name="salesDealCode" id="salesDealCode">
-                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesBatchId!}" placeholder="订单批次号" name="salesBatchId" id="salesBatchId">
-
-                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesPostNum!}" placeholder="快递单号" name="salesPostNum" id="salesPostNum">
-                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesAddressName!}" placeholder="收货人姓名" name="salesAddressName" id="salesAddressName">
-                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesAddressTel!}" placeholder="收货人电话" name="salesAddressTel" id="salesAddressTel">
+            <div style="width: 90%;margin-left: 10%;">
+                <input type="text" class="my-input trim_input"  style="margin-top: -3px;text-indent: 1em;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesOrderId!}" placeholder="订单号" name="salesOrderId" id="salesOrderId">
+                <input type="text" class="my-input trim_input"  style="margin-top: -3px;text-indent: 1em;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesDealCode!}" placeholder="交易号" name="salesDealCode" id="salesDealCode">
+                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;text-indent: 1em;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesBatchId!}" placeholder="订单批次号" name="salesBatchId" id="salesBatchId">
+
+                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;text-indent: 1em;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesPostNum!}" placeholder="快递单号" name="salesPostNum" id="salesPostNum">
+                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;text-indent: 1em;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesAddressName!}" placeholder="收货人姓名" name="salesAddressName" id="salesAddressName">
+                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;text-indent: 1em;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesAddressTel!}" placeholder="收货人电话" name="salesAddressTel" id="salesAddressTel">
                 <#--<input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.itemProductName!}" placeholder="产品" name="itemProductName" id="itemProductName">-->
-                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesAddressInfo!}" placeholder="收货人地址" name="salesAddressInfo" id="salesAddressInfo">
-                <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 30px;" id="">搜索</button>
-                <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 30px;" id="order_excel">下载Efast格式订单</button>
+                <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;text-indent: 1em;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesAddressInfo!}" placeholder="收货人地址" name="salesAddressInfo" id="salesAddressInfo">
+                <button type="submit" class="btn" style="border: 1px solid #50a2ea;background-color: #fff; color: #50a2ea;-webkit-transform:translateY(-5%);height: 30px;" id="">搜索</button>
+                <button type="button" class="btn" style="border: 1px solid #50a2ea;background-color: #fff; color: #50a2ea;-webkit-transform:translateY(-5%);height: 30px;" id="order_excel">下载Efast格式订单</button>
                 <#--<button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 30px;" id="send_sms" onclick="sendEms();">发送售后短信</button>-->
             </div>
         </form>
@@ -207,7 +220,7 @@
                     <td style="text-align: left;">
                         <#if order.salesOrderItemList ??>
                             <#list order.salesOrderItemList as d>
-                                <span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span>
+                                <span class="label label-default radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span>
                             </#list>
                         </#if>
                     </td>
@@ -215,43 +228,43 @@
                         ${(order.salesCreateTime?string("yy-MM-dd"))!''}</br>
                         ${(order.salesCreateTime?string("HH:mm:ss"))!''}
                     </td>
-                    <td class="operating_td">
+                    <td class="operating_td" style="min-width: 100px;">
                         <a class="confirm_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="确认订单" alt="确认订单" onclick="confirm_one(${order.salesId!''})">
-                            <i class="Hui-iconfont">&#xe615;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe615;</i>
                         </a>
                         <a class="edit_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="修改订单" alt="修改订单" onclick="sales_order_update(${order.salesId!''})">
-                            <i class="Hui-iconfont">&#xe6df;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe6df;</i>
                         </a>
                         <a class="allocation_logistics_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="分配物流" onclick="distribution_express(${order.salesId!''})">
-                            <i class="Hui-iconfont">&#xe669;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe669;</i>
                         </a>
 
                         <a class="split_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="拆分订单" onclick="split_order(${order.salesId!''})">
-                            <i class="Hui-iconfont">&#xe6ea;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe6ea;</i>
                         </a>
 
                         <a class="notice_distribution_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="通知配货" onclick="chooseWarehouse(${order.salesId})">
-                            <i class="Hui-iconfont">&#xe62f;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe62f;</i>
                         </a>
                         <a class="manual_ship_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="手动发货" onclick="distribution_postFirm('手动发货','${path}/admin/await_send/to_manual_delivery?salesId=${order.salesId}','570','450');">
-                            <i class="Hui-iconfont">&#xe642;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe642;</i>
                         </a>
                         <a class="order_details_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="订单详情" alt="订单详情" onclick="sales_order_detail(${order.salesId!''})">
-                            <i class="Hui-iconfont">&#xe695;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe695;</i>
                         </a>
                         <a class="invalid_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="作废订单" onclick="invalidation_order(${order.salesId!''})">
-                            <i class="Hui-iconfont">&#xe631;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe631;</i>
                         </a>
                         <a class="del_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="删除订单" onclick="delSalesOrder(${order.salesId!''})">
-                            <i class="Hui-iconfont">&#xe609;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe609;</i>
                         </a>
                         <a style="text-decoration:none" href="javascript:;" title="修改备注"
                            onclick="distribution_postFirm('修改备注','${path}/admin/salesOrder/to_update_order_remark?salesId=${order.salesId!''}','570','450');">
-                            <i class="Hui-iconfont">&#xe60c;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe60c;</i>
                         </a>
                         <a style="text-decoration:none" href="javascript:;" title="更正订单"
                            onclick="acorrect_order(${order.salesId!''});">
-                            <i class="Hui-iconfont">&#xe6f7;</i>
+                            <i class="Hui-iconfont" style="font-size: 20px;">&#xe6f7;</i>
                         </a>
                         <#if order.procTypeId??>
                             <#if order.procTypeId != '3'>
@@ -283,11 +296,11 @@
 
         <#if identity != 2>
             <div style="float: left;margin-top: 20px;">
-                <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="confirmOrder()">确认订单</button>
-                <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="distribution_express(null)">分配物流</button>
-                <button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="chooseWarehouse(null)">通知配货</button>
-                <button type="button" onClick="upFiles2();"  class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;">上传发货信息</button>
-                <button onClick="downloadOrderPage();" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);height: 35px;" type="button" title="下载订单">下载订单</button>
+                <button type="button" class="btn" style="border: 1px solid #50a2ea;background-color: #fff;color: #50a2ea;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="confirmOrder()">确认订单</button>
+                <button type="button" class="btn" style="border: 1px solid #50a2ea;background-color: #fff;color: #50a2ea;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="distribution_express(null)">分配物流</button>
+                <button type="button" class="btn" style="border: 1px solid #50a2ea;background-color: #fff;color: #50a2ea;-webkit-transform:translateY(-5%);height: 35px;" id="" onclick="chooseWarehouse(null)">通知配货</button>
+                <button type="button" onClick="upFiles2();"  class="btn" style="border: 1px solid #50a2ea;background-color: #fff;color: #50a2ea;-webkit-transform:translateY(-5%);height: 35px;">上传发货信息</button>
+                <button onClick="downloadOrderPage();" class="btn" style="border: 1px solid #50a2ea;background-color: #fff;color: #50a2ea;-webkit-transform:translateY(-5%);height: 35px;" type="button" title="下载订单">下载订单</button>
             </div>
         </#if>
     </div>

+ 6 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_split.ftl

@@ -609,17 +609,17 @@
         $("#productStatistics").find("tr").each(function(){
             var oldNumber = parseInt($(this).find("td").eq(3).html());
             var newNumber = parseInt($(this).find("td").eq(4).html());
-            if(oldNumber == newNumber){
+            if(oldNumber != newNumber){
                 flag = false;
             }
         });
+        var msg = "确定拆单?";
         if(!flag){
-            layer.confirm('产品数量出现变动,是否继续拆单?',function(index){
-                toSubmitSplitOrder();
-            });
-        }else{
-            toSubmitSplitOrder();
+            msg = '产品数量出现变动,是否继续拆单?';
         }
+        layer.confirm(msg,function(index){
+            toSubmitSplitOrder();
+        });
     }
     
     function toSubmitSplitOrder() {