Browse Source

init from phab

xielq 4 years ago
parent
commit
bc87b2a222
60 changed files with 194 additions and 2454 deletions
  1. 0 8
      warehouse-backend-app/pom.xml
  2. 3 9
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/api/NotificationController.java
  3. 3 26
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/api/ReplyController.java
  4. 0 13
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/dao/FeeDao.java
  5. 0 13
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/dao/ProdioMainfestDao.java
  6. 0 14
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/dao/ProductMainfestDao.java
  7. 0 195
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/Fee.java
  8. 0 42
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/NormalReply.java
  9. 5 5
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/PackingDetail.java
  10. 1 12
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/PackingReply.java
  11. 15 29
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/PackingReplyDetail.java
  12. 0 175
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/ProdioMainfest.java
  13. 0 14
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/Product.java
  14. 0 191
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/ProductMainfest.java
  15. 1 28
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/Shipment.java
  16. 24 54
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/ShipmentDetail.java
  17. 0 98
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/Status.java
  18. 9 66
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/StockinDetail.java
  19. 0 21
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/service/CommonService.java
  20. 0 25
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/service/ShipmentService.java
  21. 4 47
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/service/impl/CommonServiceImpl.java
  22. 0 54
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/service/impl/ShipmentServiceImpl.java
  23. 1 1
      warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/util/SignUtil.java
  24. 0 5
      warehouse-online-app/pom.xml
  25. 3 12
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/OnlineApplication.java
  26. 0 20
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/api/BaseController.java
  27. 82 102
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/api/LoginController.java
  28. 1 12
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/entity/AppAuthentication.java
  29. 0 14
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/profile/Dev.java
  30. 0 14
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/profile/Prod.java
  31. 0 62
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/profile/SSOConfiguration.java
  32. 0 14
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/profile/Test.java
  33. 0 73
      warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/util/ContextUtils.java
  34. 0 10
      warehouse-online-app/src/main/resources/application-prod.yml
  35. 0 21
      warehouse-online-app/src/main/resources/dev/account.properties
  36. 0 22
      warehouse-online-app/src/main/resources/prod/account.properties
  37. 0 13
      warehouse-online-app/src/main/resources/spring/context.xml
  38. BIN
      warehouse-online-app/src/main/resources/static/img/loading.gif
  39. BIN
      warehouse-online-app/src/main/resources/static/img/u.png
  40. 0 20
      warehouse-online-app/src/main/resources/static/js/loginProxy.js
  41. 0 39
      warehouse-online-app/src/main/resources/static/views/proxyLogin.html
  42. 1 1
      warehouse-online-app/src/main/resources/static/views/warehousingList.html
  43. 0 22
      warehouse-online-app/src/main/resources/test/account.properties
  44. 0 5
      warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/dao/NotificationDao.java
  45. 0 15
      warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/entity/BaseVoucher.java
  46. 0 84
      warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/entity/Status.java
  47. 0 6
      warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/service/PullDataService.java
  48. 0 5
      warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/service/impl/NotificationServiceImpl.java
  49. 6 17
      warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/service/impl/PullDataServiceImpl.java
  50. 0 18
      warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/client/AbstractClient.java
  51. 0 174
      warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/Fee.java
  52. 0 39
      warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/NormalReply.java
  53. 0 155
      warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/ProdioMainfest.java
  54. 0 167
      warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/ProductMainfest.java
  55. 0 85
      warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/Status.java
  56. 1 1
      warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/util/SignUtil.java
  57. 7 8
      warehouse-uas-sdk/src/test/java/com/uas/platform/warehouse/sample/ConstantForTest.java
  58. 25 40
      warehouse-uas-sdk/src/test/java/com/uas/platform/warehouse/sample/EntityDemo.java
  59. 1 2
      warehouse-uas-sdk/src/test/java/com/uas/platform/warehouse/sample/UASEnterpriseUserDemo.java
  60. 1 17
      warehouse-uas-sdk/src/test/java/com/uas/platform/warehouse/sample/WarehouseProviderSumDemo.java

+ 0 - 8
warehouse-backend-app/pom.xml

@@ -105,14 +105,6 @@
           </execution>
         </executions>
       </plugin>
-        <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-                <source>1.8</source>
-                <target>1.8</target>
-            </configuration>
-        </plugin>
     </plugins>
   </build>
 

+ 3 - 9
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/api/NotificationController.java

@@ -77,7 +77,7 @@ public class NotificationController {
           status = commonService.doStockin(data);
         }else if("tran".equals(type)){ //调拨单
           status = commonService.doTransfer(data);
-        }else if("reply".equals(type)){ //物流回复接口
+        }else if("reply".equals(type)){ //通用回复接口
           status = commonService.doNormalReply(data);
         }else if("item".equals(type)){ //物料资料
           status = commonService.doProduct(data);
@@ -85,16 +85,10 @@ public class NotificationController {
           status = commonService.doPacking(data);
         }else if("packing-reply".equals(type)){ //包装单回复
           status = commonService.doPackingReply(data);
-        }else if("invoice".equals(type)){ //发票单
+        }else if("invoice".equals(type)){ //包装单回复
           status = commonService.doInvoice(data);
-        }else if("invoice-reply".equals(type)){//发票单回复
+        }else if("invoice-reply".equals(type)){
           status = commonService.doInvoiceReply(data);
-        }else if("mainfest-reply".equals(type)){//出入库报关回复
-          status = commonService.doProdioMainfestReply(data);
-        }else if("prodmainfest-reply".equals(type)){//物料报关回复
-          status = commonService.doProductMainfestReply(data);
-        }else if("fee-reply".equals(type)){//费用回复
-          status = commonService.doFeeReply(data);
         }
       }
     }

+ 3 - 26
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/api/ReplyController.java

@@ -1,21 +1,17 @@
 package com.uas.platform.warehouse.backend.api;
 
 import com.uas.platform.warehouse.backend.transport.entity.BaseVoucher;
-import com.uas.platform.warehouse.backend.transport.entity.Status;
 import com.uas.platform.warehouse.backend.transport.service.NotificationService;
 import com.uas.platform.warehouse.backend.transport.service.PullDataService;
 import com.uas.platform.warehouse.core.common.ResultBean;
-
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
-
-import com.uas.platform.warehouse.core.util.JacksonUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.web.PageableDefault;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * Http interface for operating post back(reply).
@@ -49,23 +45,4 @@ public class ReplyController {
       @PageableDefault(size = 50) Pageable pageInfo) {
     return new ResultBean<List<BaseVoucher>>(pullDataService.gainNotificationFromEnterprise(pageInfo));
   }
-
-  /**
-   * 更新状态
-   */
-  @PostMapping(value = "/update-status", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-  public ResultBean<Map<String,Object>> updateStatus(@RequestBody List<Map> datas){
-      Status status;
-      boolean flag = true;
-      Map<String,Object> respMap = new HashMap<String,Object>();
-      System.out.println(datas);
-      for (Map map : datas){
-          status = JacksonUtils.fromJson(JacksonUtils.toJson(map),Status.class);
-          if(!pullDataService.updateStatus(status)){
-              flag = false;
-          }
-      }
-      respMap.put("success",flag);
-      return new ResultBean<Map<String,Object>>(respMap);
-  }
 }

+ 0 - 13
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/dao/FeeDao.java

@@ -1,13 +0,0 @@
-package com.uas.platform.warehouse.backend.dao;
-
-import com.uas.platform.warehouse.backend.entity.Fee;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.stereotype.Repository;
-
-/**
- * @Author liujw
- * @Date 2017/12/18 9:35
- */
-@Repository
-public interface FeeDao extends JpaRepository<Fee, Long> {
-}

+ 0 - 13
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/dao/ProdioMainfestDao.java

@@ -1,13 +0,0 @@
-package com.uas.platform.warehouse.backend.dao;
-
-import com.uas.platform.warehouse.backend.entity.ProdioMainfest;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.stereotype.Repository;
-
-/**
- * @Author liujw
- * @Date 2017/12/13 15:03
- */
-@Repository
-public interface ProdioMainfestDao extends JpaRepository<ProdioMainfest, Long> {
-}

+ 0 - 14
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/dao/ProductMainfestDao.java

@@ -1,14 +0,0 @@
-package com.uas.platform.warehouse.backend.dao;
-
-
-import com.uas.platform.warehouse.backend.entity.ProductMainfest;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.stereotype.Repository;
-
-/**
- * @Author liujw
- * @Date 2017/12/13 17:06
- */
-@Repository
-public interface ProductMainfestDao extends JpaRepository<ProductMainfest, Long> {
-}

+ 0 - 195
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/Fee.java

@@ -1,195 +0,0 @@
-package com.uas.platform.warehouse.backend.entity;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.uas.platform.warehouse.backend.transport.entity.BaseReply;
-import org.joda.time.LocalDateTime;
-
-import javax.persistence.*;
-import java.util.Date;
-
-/**
- * @Author liujw
- * @Date 2017/12/15 14:00
- */
-@Entity
-@Table(name = "fee")
-@JsonInclude(JsonInclude.Include.NON_EMPTY)
-public class Fee extends BaseReply {
-    @Id
-    @GeneratedValue
-    @Column(name = "id")
-    @JsonIgnore
-    private long id;
-
-    /**
-     *出入库单单据编号
-     */
-    @Column(name = "code")
-    private String code;
-
-    /**
-     * 费用产生时间
-     */
-    @Column(name = "fee_gentime")
-    private Date feeGentime;
-
-    /**
-     * 费用名称
-     */
-    @Column(name = "fee_name")
-    private String feeName;
-
-    /**
-     *费用金额
-     */
-    @Column(name = "fee_amount")
-    private double feeAmount;
-
-    /**
-     * 币别
-     */
-    @Column(name = "fee_currency")
-    private String feeCurrency;
-
-    /**
-     *备注信息
-     */
-    @Column(name = "remark")
-    private String remark;
-
-    /**
-     * 时间
-     */
-    @Column(name = "date_")
-    @JsonIgnore
-    private Date date_= LocalDateTime.now().toDate();
-
-    /**
-     * 数据类型
-     */
-    @Column(name = "type")
-    private String type;
-
-    /**
-     * 接收方UU.
-     */
-    @Column(name = "receiver_uu")
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String receiverUU;
-
-    /**
-     * 发送方UU.
-     */
-    @Column(name = "sender_uu")
-    private String senderUU;
-
-    /**
-     * 企业名称.
-
-     */
-    @Column(name = "en_name")
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String enterprise;
-
-    @Override
-    public String getReceiverUU() {
-        return receiverUU;
-    }
-
-    public void setReceiverUU(String receiverUU) {
-        this.receiverUU = receiverUU;
-    }
-
-    public String getSenderUU() {
-        return senderUU;
-    }
-
-    public void setSenderUU(String senderUU) {
-        this.senderUU = senderUU;
-    }
-
-    public String getEnterprise() {
-        return enterprise;
-    }
-
-    public void setEnterprise(String enterprise) {
-        this.enterprise = enterprise;
-    }
-
-
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public Date getDate_() {
-        return date_;
-    }
-
-    public void setDate_(Date date_) {
-        this.date_ = date_;
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public Date getFeeGentime() {
-        return feeGentime;
-    }
-
-    public void setFeeGentime(Date feeGentime) {
-        this.feeGentime = feeGentime;
-    }
-
-    public String getFeeName() {
-        return feeName;
-    }
-
-    public void setFeeName(String feeName) {
-        this.feeName = feeName;
-    }
-
-    public double getFeeAmount() {
-        return feeAmount;
-    }
-
-    public void setFeeAmount(double feeAmount) {
-        this.feeAmount = feeAmount;
-    }
-
-    public String getFeeCurrency() {
-        return feeCurrency;
-    }
-
-    public void setFeeCurrency(String feeCurrency) {
-        this.feeCurrency = feeCurrency;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-}

+ 0 - 42
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/NormalReply.java

@@ -13,7 +13,6 @@ import javax.persistence.Enumerated;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
 import javax.persistence.Table;
-import java.util.Date;
 
 /**
  * 用于通用的出入库单据回复.
@@ -107,30 +106,6 @@ public class NormalReply extends BaseReply {
   @Column(name = "attribute3",columnDefinition = "TEXT")
   private String attribute3;
 
-  /**
-   *物流时间
-   */
-  @Column(name = "logisticstime")
-  private Date logisticstime;
-  /**
-   * 物流地址
-   */
-  @Column(name = "logisticsaddr")
-  private String logisticsaddr;
-  /**
-   * 物流备注
-   */
-  @Column(name = "logisticsremark")
-  private String logisticsremark;
-
-  public String getLogisticsremark() {
-    return logisticsremark;
-  }
-
-  public void setLogisticsremark(String logisticsremark) {
-    this.logisticsremark = logisticsremark;
-  }
-
   public Long getId() {
     return id;
   }
@@ -171,24 +146,7 @@ public class NormalReply extends BaseReply {
     this.operator = operator;
   }
 
-  public Date getLogisticstime() {
-    return logisticstime;
-  }
-
-  public void setLogisticstime(Date logisticstime) {
-    this.logisticstime = logisticstime;
-  }
-
-  public String getLogisticsaddr() {
-    return logisticsaddr;
-  }
-
-  public void setLogisticsaddr(String logisticsaddr) {
-    this.logisticsaddr = logisticsaddr;
-  }
-
   @Override
-
   public String getReceiverUU() {
     return receiverUU;
   }

+ 5 - 5
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/PackingDetail.java

@@ -56,7 +56,7 @@ public class PackingDetail {
      * 客户型号
      */
     @Column(name = "cust_mode")
-    private String custProdSpec;
+    private String custMode;
 
     /**
      * 合同号
@@ -163,12 +163,12 @@ public class PackingDetail {
         this.custPn = custPn;
     }
 
-    public String getCustProdSpec() {
-        return custProdSpec;
+    public String getCustMode() {
+        return custMode;
     }
 
-    public void setCustProdSpec(String custProdSpec) {
-        this.custProdSpec = custProdSpec;
+    public void setCustMode(String custMode) {
+        this.custMode = custMode;
     }
 
     public String getContract() {

+ 1 - 12
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/PackingReply.java

@@ -72,12 +72,6 @@ public class PackingReply  extends BaseReply {
     @Column(name = "enterprise")
     private String enterprise;
 
-    /**
-     * 操作人
-     */
-    @Column(name = "operator")
-    private String operator;
-
     /**
      * 操作时间
      */
@@ -218,11 +212,6 @@ public class PackingReply  extends BaseReply {
         this.attribute3 = attribute3;
     }
 
-    public String getOperator() {
-        return operator;
-    }
 
-    public void setOperator(String operator) {
-        this.operator = operator;
-    }
+
 }

+ 15 - 29
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/PackingReplyDetail.java

@@ -55,7 +55,7 @@ public class PackingReplyDetail {
      * 客户型号
      */
     @Column(name = "cust_mode")
-    private String custProdSpec;
+    private String custMode;
 
     /**
      * 合同号
@@ -69,12 +69,6 @@ public class PackingReplyDetail {
     @Column(name = "saleprice")
     private double salePrice;
 
-    /**
-     * 数量
-     */
-    @Column(name = "qty")
-    private long qty;
-
     /**
      * 物料规格
      */
@@ -140,13 +134,13 @@ public class PackingReplyDetail {
      * lot no
      */
     @Column(name = "lotno",columnDefinition = "TEXT")
-    private String lotNo;
+    private String lotno;
 
     /**
      * dc
      */
     @Column(name = "datecode",columnDefinition = "TEXT")
-    private String dateCode;
+    private String datecode;
 
     /**
      * 备用字段1.
@@ -224,12 +218,12 @@ public class PackingReplyDetail {
         this.custPn = custPn;
     }
 
-    public String getCustProdSpec() {
-        return custProdSpec;
+    public String getCustMode() {
+        return custMode;
     }
 
-    public void setCustProdSpec(String custProdSpec) {
-        this.custProdSpec = custProdSpec;
+    public void setCustMode(String custMode) {
+        this.custMode = custMode;
     }
 
     public String getContract() {
@@ -328,28 +322,20 @@ public class PackingReplyDetail {
         this.origin = origin;
     }
 
-    public long getQty() {
-        return qty;
-    }
-
-    public void setQty(long qty) {
-        this.qty = qty;
-    }
-
-    public String getLotNo() {
-        return lotNo;
+    public String getLotno() {
+        return lotno;
     }
 
-    public void setLotNo(String lotNo) {
-        this.lotNo = lotNo;
+    public void setLotno(String lotno) {
+        this.lotno = lotno;
     }
 
-    public String getDateCode() {
-        return dateCode;
+    public String getDatecode() {
+        return datecode;
     }
 
-    public void setDateCode(String dateCode) {
-        this.dateCode = dateCode;
+    public void setDatecode(String datecode) {
+        this.datecode = datecode;
     }
 
     public String getAttribute1() {

+ 0 - 175
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/ProdioMainfest.java

@@ -1,175 +0,0 @@
-package com.uas.platform.warehouse.backend.entity;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.uas.platform.warehouse.backend.transport.entity.BaseReply;
-
-import javax.persistence.*;
-import java.util.Date;
-
-/**
- * 出入库报关单实体
- * @Author liujw
- * @Date 2017/12/13 14:21
- */
-    @Entity
-    @Table(name = "mainfest")
-    @JsonInclude(JsonInclude.Include.NON_EMPTY)
-public class ProdioMainfest extends BaseReply {
-
-    @Id
-    @GeneratedValue
-    @Column(name = "id")
-    @JsonIgnore
-    private long id;
-    /**
-     * 出入库单单据编号
-     */
-    @Column(name = "code")
-    private String code;
-
-    /**
-     * 数据类型.
-     */
-    @Column(name = "type")
-    private String type;
-
-    /**
-     * 报关时间
-     */
-    @Column(name = "customstime")
-    private Date customsTime;
-
-    /**
-     * 报关状态
-     */
-    @Column(name = "customsstatus")
-    private String customsStatus;
-
-    /**
-     * 备注信息
-     */
-    @Column(name = "remark",columnDefinition = "TEXT")
-    private String remark;
-
-    @Column(name = "date_")
-    private Date date;
-
-    /**
-     * 接收方UU.
-     */
-    @Column(name = "receiver_uu")
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String receiverUU;
-
-    /**
-     * 发送方UU.
-     */
-    @Column(name = "sender_uu")
-    private String senderUU;
-
-    /**
-     * 企业名称.
-     */
-    @Column(name = "en_name")
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String enterprise;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public Date getCustomsTime() {
-        return customsTime;
-    }
-
-    public void setCustomsTime(Date customsTime) {
-        this.customsTime = customsTime;
-    }
-
-    public String getCustomsStatus() {
-        return customsStatus;
-    }
-
-    public void setCustomsStatus(String customsStatus) {
-        this.customsStatus = customsStatus;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public Date getDate() {
-        return date;
-    }
-
-    public void setDate(Date date) {
-        this.date = date;
-    }
-
-    @Override
-    public String getReceiverUU() {
-        return receiverUU;
-    }
-
-    public void setReceiverUU(String receiverUU) {
-        this.receiverUU = receiverUU;
-    }
-
-    public String getSenderUU() {
-        return senderUU;
-    }
-
-    public void setSenderUU(String senderUU) {
-        this.senderUU = senderUU;
-    }
-
-    public String getEnterprise() {
-        return enterprise;
-    }
-
-    public void setEnterprise(String enterprise) {
-        this.enterprise = enterprise;
-    }
-
-    /**
-     * 出入库报关状态
-     */
-    public enum mainfestState{
-        /**
-         * 已申报
-         */
-        REPORTED,
-        /**
-         * 已放行
-         */
-        PASSED
-    }
-
-}

+ 0 - 14
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/Product.java

@@ -35,12 +35,6 @@ public class Product extends BaseVoucher {
     @Column(name = "spec")
     private String spec;
 
-    /**
-     * 原厂型号
-     */
-    @Column(name = "original_spec")
-    private String originalSpec;
-
     /**
      * 最小包装
      */
@@ -98,14 +92,6 @@ public class Product extends BaseVoucher {
     public Product() {
     }
 
-    public String getOriginalSpec() {
-        return originalSpec;
-    }
-
-    public void setOriginalSpec(String originalSpec) {
-        this.originalSpec = originalSpec;
-    }
-
     public long getId() {
         return id;
     }

+ 0 - 191
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/ProductMainfest.java

@@ -1,191 +0,0 @@
-package com.uas.platform.warehouse.backend.entity;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.uas.platform.warehouse.backend.transport.entity.BaseReply;
-
-import javax.persistence.*;
-
-/**
- * 物料报关信息
- * @Author liujw
- * @Date 2017/12/13 16:50
- */
-@Entity
-@Table(name = "mainfest")
-@JsonInclude(JsonInclude.Include.NON_EMPTY)
-public class ProductMainfest extends BaseReply {
-
-    @Id
-    @GeneratedValue
-    @Column(name = "id")
-    @JsonIgnore
-    private long id;
-
-    /**
-     *物料编号
-     */
-    @Column(name = "code")
-    private String code;
-
-    /**
-     *海关编码
-     */
-    @Column(name = "custocode")
-    private String custoCode;
-
-    /**
-     * 申报要素
-     */
-    @Column(name = "customselement")
-    private String customsElement;
-
-    /**
-     * 原产国
-     */
-    @Column(name = "origincountry")
-    private String originCountry;
-
-    /**
-     * 币别
-     */
-    @Column(name = "currency")
-    private String currency;
-
-    /**
-     *征免
-     */
-    @Column(name = "customsexemption")
-    private String customsExemption;
-
-    /**
-     * 备注信息
-     */
-    @Column(name = "remark")
-    private String remark;
-
-    /**
-     * 数据类型.
-     */
-    @Column(name = "type")
-    private String type;
-
-    /**
-     * 接收方UU.
-     */
-    @Column(name = "receiver_uu")
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String receiverUU;
-
-    /**
-     * 发送方UU.
-     */
-    @Column(name = "sender_uu")
-    private String senderUU;
-
-    /**
-     * 企业名称.
-     */
-    @Column(name = "en_name")
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String enterprise;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getCustoCode() {
-        return custoCode;
-    }
-
-    public void setCustoCode(String custoCode) {
-        this.custoCode = custoCode;
-    }
-
-    public String getCustomsElement() {
-        return customsElement;
-    }
-
-    public void setCustomsElement(String customsElement) {
-        this.customsElement = customsElement;
-    }
-
-    public String getOriginCountry() {
-        return originCountry;
-    }
-
-    public void setOriginCountry(String originCountry) {
-        this.originCountry = originCountry;
-    }
-
-    public String getCurrency() {
-        return currency;
-    }
-
-    public void setCurrency(String currency) {
-        this.currency = currency;
-    }
-
-    public String getCustomsExemption() {
-        return customsExemption;
-    }
-
-    public void setCustomsexEmption(String customsExemption) {
-        this.customsExemption = customsExemption;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    @Override
-    public String getReceiverUU() {
-        return receiverUU;
-    }
-
-    public void setReceiverUU(String receiverUU) {
-        this.receiverUU = receiverUU;
-    }
-
-    public String getSenderUU() {
-        return senderUU;
-    }
-
-    public void setSenderUU(String senderUU) {
-        this.senderUU = senderUU;
-    }
-
-    public String getEnterprise() {
-        return enterprise;
-    }
-
-    public void setEnterprise(String enterprise) {
-        this.enterprise = enterprise;
-    }
-}

+ 1 - 28
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/Shipment.java

@@ -75,18 +75,6 @@ public class Shipment extends BaseVoucher {
   @Column(name = "address")
   private String address;
 
-  /**
-   * 联系人电话.
-   */
-  @Column(name = "phone")
-  private String phone;
-
-    /**
-   * 包装单号.
-   */
-  @Column(name = "packing_no")
-  private String packingNo;
-
   /**
    * 联系人地址.
    */
@@ -138,22 +126,7 @@ public class Shipment extends BaseVoucher {
   @JoinColumn(name = "shipment_id")
   private List<ShipmentDetail> details;
 
-  public Shipment() {   }
-
-  public String getPhone() {
-    return phone;
-  }
-
-  public void setPhone(String phone) {
-    this.phone = phone;
-  }
-
-  public String getPackingNo() {
-    return packingNo;
-  }
-
-  public void setPackingNo(String packingNo) {
-    this.packingNo = packingNo;
+  public Shipment() {
   }
 
   public long getId() {

+ 24 - 54
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/ShipmentDetail.java

@@ -45,13 +45,13 @@ public class ShipmentDetail {
    * 物料号.
    */
   @Column(name = "prod_code")
-  private String pn;
+  private String prodCode;
 
   /**
    * 出货数量.
    */
   @Column(name = "out_qty")
-  private int qty;
+  private int outQty;
 
   /**
    * 批次号.
@@ -63,8 +63,7 @@ public class ShipmentDetail {
    * 客户物料号.
    */
   @Column(name = "cust_prod_code")
-  private String custPn;
-
+  private String custProdCode;
 
   /**
    * 客户PO号.
@@ -81,8 +80,8 @@ public class ShipmentDetail {
   /**
    * 销售单价.
    */
-  @Column(name = "sale_price")
-  private Double salePrice;
+  @Column(name = "sales_price")
+  private Double salesPrice;
 
   /**
    * 物料规格.
@@ -97,35 +96,23 @@ public class ShipmentDetail {
   private String purCurrency;
 
   /**
-   * 备用字段1.最小包装
+   * 备用字段1.
    */
   @Column(name = "attribute1",columnDefinition = "TEXT")
   private String attribute1;
 
   /**
-   * 备用字段2.物料种类
+   * 备用字段2.
    */
   @Column(name = "attribute2",columnDefinition = "TEXT")
   private String attribute2;
 
   /**
-   * 备用字段3.物料品牌
+   * 备用字段3.
    */
   @Column(name = "attribute3",columnDefinition = "TEXT")
   private String attribute3;
 
-  /**
-   * 备用字段4.单位
-   */
-  @Column(name = "attribute4",columnDefinition = "TEXT")
-  private String attribute4;
-
-  /**
-   * 备用字段5.原厂型号
-   */
-  @Column(name = "attribute5",columnDefinition = "TEXT")
-  private String attribute5;
-
   /**
    * 操作时间
    */
@@ -152,20 +139,20 @@ public class ShipmentDetail {
     this.pullLineNo = pullLineNo;
   }
 
-  public String getPn() {
-    return pn;
+  public String getProdCode() {
+    return prodCode;
   }
 
-  public void setPn(String pn) {
-    this.pn = pn;
+  public void setProdCode(String prodCode) {
+    this.prodCode = prodCode;
   }
 
-  public int getQty() {
-    return qty;
+  public int getOutQty() {
+    return outQty;
   }
 
-  public void setQty(int qty) {
-    this.qty = qty;
+  public void setOutQty(int outQty) {
+    this.outQty = outQty;
   }
 
   public String getBatchCode() {
@@ -176,12 +163,12 @@ public class ShipmentDetail {
     this.batchCode = batchCode;
   }
 
-  public String getCustPn() {
-    return custPn;
+  public String getCustProdCode() {
+    return custProdCode;
   }
 
-  public void setCustPn(String custPn) {
-    this.custPn = custPn;
+  public void setCustProdCode(String custProdCode) {
+    this.custProdCode = custProdCode;
   }
 
   public String getPoCode() {
@@ -200,12 +187,12 @@ public class ShipmentDetail {
     this.custProdSpec = custProdSpec;
   }
 
-  public Double getSalePrice() {
-    return salePrice;
+  public Double getSalesPrice() {
+    return salesPrice;
   }
 
-  public void setSalePrice(Double salePrice) {
-    this.salePrice = salePrice;
+  public void setSalesPrice(Double salesPrice) {
+    this.salesPrice = salesPrice;
   }
 
   public String getSpec() {
@@ -248,24 +235,7 @@ public class ShipmentDetail {
     this.attribute3 = attribute3;
   }
 
-  public String getAttribute4() {
-    return attribute4;
-  }
-
-  public void setAttribute4(String attribute4) {
-    this.attribute4 = attribute4;
-  }
-
-  public String getAttribute5() {
-    return attribute5;
-  }
-
-  public void setAttribute5(String attribute5) {
-    this.attribute5 = attribute5;
-  }
-
   @Override
-
   public String toString() {
     return JacksonUtils.toJson(this);
   }

+ 0 - 98
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/Status.java

@@ -1,98 +0,0 @@
-package com.uas.platform.warehouse.backend.entity;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import org.joda.time.LocalDateTime;
-
-import javax.persistence.*;
-import java.util.Date;
-
-/**
- * Author liujw
- * Date 2018/1/8 19:13
- */
-@Entity
-@Table(name = "status")
-@JsonInclude(JsonInclude.Include.NON_EMPTY)
-public class Status {
-    @Id
-    @GeneratedValue
-    @Column(name = "id")
-    @JsonIgnore
-    private long id;
-    /**
-     * 单据ID
-     */
-    @Column(name = "bill_id")
-    private String billId;
-
-    /**
-     * 状态
-     */
-    @Column(name = "bill_status")
-    private BillStatus billStatus;
-
-    /**
-     * 回复时间
-     */
-    @Column(name = "reply_time")
-    private Date replyTime = LocalDateTime.now().toDate();
-
-    /**
-     * 备注
-     */
-    @Column(name="remark")
-    private String remark;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getBillId() {
-        return billId;
-    }
-
-    public void setBillId(String billId) {
-        this.billId = billId;
-    }
-
-    public BillStatus getBillStatus() {
-        return billStatus;
-    }
-
-    public void setBillStatus(BillStatus billStatus) {
-        this.billStatus = billStatus;
-    }
-
-    public Date getReplyTime() {
-        return replyTime;
-    }
-
-    public void setReplyTime(Date replyTime) {
-        this.replyTime = replyTime;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public enum BillStatus{
-    /**
-     * 已获取
-     */
-    OK,
-
-    /**
-     * 未获取成功
-     */
-    ERROR
-    }
-}

+ 9 - 66
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/entity/StockinDetail.java

@@ -49,8 +49,8 @@ public class StockinDetail {
     /**
      * 单价.
      */
-    @Column(name = "unit_price")
-    private double unitPrice;
+    @Column(name = "unitprice")
+    private double unitprice;
 
     /**
      * 批号.
@@ -58,49 +58,24 @@ public class StockinDetail {
     @Column(name = "batchcode")
     private String batchCode;
 
-
     /**
-     * 备用字段1.spec
+     * 备用字段1.
      */
     @Column(name = "attribute1",columnDefinition = "TEXT")
     private String attribute1;
 
     /**
-     * 备用字段2.moq
+     * 备用字段2.
      */
     @Column(name = "attribute2",columnDefinition = "TEXT")
     private String attribute2;
 
     /**
-     * 备用字段3.matkl
+     * 备用字段3.
      */
     @Column(name = "attribute3",columnDefinition = "TEXT")
     private String attribute3;
 
-    /**
-     * 备用字段4.barnd
-     */
-    @Column(name = "attribute4",columnDefinition = "TEXT")
-    private String attribute4;
-
-    /**
-     * 备用字段5.uom
-     */
-    @Column(name = "attribute5",columnDefinition = "TEXT")
-    private String attribute5;
-
-    /**
-     * 备用字段6.originalSpec
-     */
-    @Column(name = "attribute6",columnDefinition = "TEXT")
-    private String attribute6;
-
-    /**
-     * 备用字段7.
-     */
-    @Column(name = "attribute7",columnDefinition = "TEXT")
-    private String attribute7;
-
     /**
      * 操作时间
      */
@@ -111,38 +86,6 @@ public class StockinDetail {
     public StockinDetail() {
     }
 
-    public String getAttribute4() {
-        return attribute4;
-    }
-
-    public void setAttribute4(String attribute4) {
-        this.attribute4 = attribute4;
-    }
-
-    public String getAttribute5() {
-        return attribute5;
-    }
-
-    public void setAttribute5(String attribute5) {
-        this.attribute5 = attribute5;
-    }
-
-    public String getAttribute6() {
-        return attribute6;
-    }
-
-    public void setAttribute6(String attribute6) {
-        this.attribute6 = attribute6;
-    }
-
-    public String getAttribute7() {
-        return attribute7;
-    }
-
-    public void setAttribute7(String attribute7) {
-        this.attribute7 = attribute7;
-    }
-
     public Long getId() {
         return id;
     }
@@ -183,12 +126,12 @@ public class StockinDetail {
         this.qty = qty;
     }
 
-    public double getUnitPrice() {
-        return unitPrice;
+    public double getUnitprice() {
+        return unitprice;
     }
 
-    public void setUnitPrice(double unitPrice) {
-        this.unitPrice = unitPrice;
+    public void setUnitprice(double unitprice) {
+        this.unitprice = unitprice;
     }
 
     public String getBatchCode() {

+ 0 - 21
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/service/CommonService.java

@@ -77,25 +77,4 @@ public interface CommonService {
      * @return
      */
     boolean doInvoiceReply(String data);
-
-    /**
-     * 出入库报关回复处理.
-     * @param data
-     * @return
-     */
-    boolean doProdioMainfestReply(String data);
-
-    /**
-     * 物料报关处理.
-     * @param data
-     * @return
-     */
-    boolean doProductMainfestReply(String data);
-
-    /**
-     * 费用回传处理.
-     * @param data
-     * @return
-     */
-    boolean doFeeReply(String data);
 }

+ 0 - 25
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/service/ShipmentService.java

@@ -81,29 +81,4 @@ public interface ShipmentService {
    * @return  status of operation
    */
   boolean replyInvoiceFromWarehouse(InvoiceReply invoiceReply);
-
-  /**
-   * Reply mainfest from warehouse provider, Only for api calling.
-   *
-   * @param prodiomainfest prodiomainfest-reply
-   * @return  reply of prodiomainfest
-   */
-  boolean replyProdioMainfestFromWarehouse(ProdioMainfest prodiomainfest);
-
-  /**
-   * Reply mainfest from warehouse provider, Only for api calling.
-   *
-   * @param productMainfest productMainfest-reply
-   * @return  reply of productMainfest
-   */
-  boolean replyProductMainfestFromWarehouse(ProductMainfest productMainfest);
-
-  /**
-   * Reply fee from warehouse provider, Only for api calling.
-   *
-   * @param fee fee-reply
-   * @return  reply of fee
-   */
-  boolean replyFeeFromWarehouse(Fee fee);
-
 }

+ 4 - 47
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/service/impl/CommonServiceImpl.java

@@ -181,6 +181,7 @@ public class CommonServiceImpl implements CommonService{
      * @return
      */
     public boolean doPackingReply(String data){
+        boolean status = false;
         PackingReply packingReply = JacksonUtils.fromJson(data,PackingReply.class);
         try {
             return shipmentService.replyPackingFromWarehouse(packingReply);
@@ -195,8 +196,9 @@ public class CommonServiceImpl implements CommonService{
      * @param data
      * @return
      */
-    public boolean doInvoiceReply(String data) {
-        InvoiceReply invoiceReply = JacksonUtils.fromJson(data, InvoiceReply.class);
+    public boolean doInvoiceReply(String data){
+        boolean status = false;
+        InvoiceReply invoiceReply = JacksonUtils.fromJson(data,InvoiceReply.class);
         try {
             return shipmentService.replyInvoiceFromWarehouse(invoiceReply);
         } catch (RuntimeException e) {
@@ -204,49 +206,4 @@ public class CommonServiceImpl implements CommonService{
         }
         return false;
     }
-
-        /**
-         * 处理出入库报关回复.
-         * @param data
-         * @return
-         */
-    public boolean doProdioMainfestReply(String data){
-        ProdioMainfest mainfest = JacksonUtils.fromJson(data,ProdioMainfest.class);
-        try {
-            return shipmentService.replyProdioMainfestFromWarehouse(mainfest);
-        } catch (RuntimeException e) {
-            saveErrorLogInfo(ErrorLog.LogType.INVALID_REPLY, mainfest.getReceiverUU(), data, e.getMessage());
-        }
-        return false;
-    }
-
-    /**
-     * 处理物料报关回复.
-     * @param data
-     * @return
-     */
-    public boolean doProductMainfestReply(String data){
-        ProductMainfest mainfest = JacksonUtils.fromJson(data,ProductMainfest.class);
-        try {
-            return shipmentService.replyProductMainfestFromWarehouse(mainfest);
-        } catch (RuntimeException e) {
-            saveErrorLogInfo(ErrorLog.LogType.INVALID_REPLY, mainfest.getReceiverUU(), data, e.getMessage());
-        }
-        return false;
-    }
-
-    /**
-     * 处理费用回复.
-     * @param data
-     * @return
-     */
-    public boolean doFeeReply(String data){
-        Fee fee = JacksonUtils.fromJson(data,Fee.class);
-        try {
-            return shipmentService.replyFeeFromWarehouse(fee);
-        } catch (RuntimeException e) {
-            saveErrorLogInfo(ErrorLog.LogType.INVALID_REPLY, fee.getReceiverUU(), data, e.getMessage());
-        }
-        return false;
-    }
 }

+ 0 - 54
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/service/impl/ShipmentServiceImpl.java

@@ -33,9 +33,6 @@ public class ShipmentServiceImpl implements ShipmentService {
   private final PackingReplyDao packingReplyDao;
   private final InvoiceReplyDao invoiceReplyDao;
   private final NotificationService notificationService;
-  private final ProdioMainfestDao prodioMainfestDao;
-  private final ProductMainfestDao productMainfestDao;
-  private final FeeDao feeDao;
 
   @Autowired
   public ShipmentServiceImpl(ShipmentDao shipmentDao,
@@ -47,9 +44,6 @@ public class ShipmentServiceImpl implements ShipmentService {
       PackingReplyDao packingReplyDao,
       InvoiceDao invoiceDao,
       InvoiceReplyDao invoiceReplyDao,
-      ProdioMainfestDao prodioMainfestDao,
-      ProductMainfestDao productMainfestDao,
-      FeeDao feeDao,
       NotificationService notificationService) {
     this.stockinDao = stockinDao;
     this.shipmentDao = shipmentDao;
@@ -60,10 +54,7 @@ public class ShipmentServiceImpl implements ShipmentService {
     this.normalReplyDao = normalReplyDao;
     this.packingReplyDao = packingReplyDao;
     this.invoiceReplyDao = invoiceReplyDao;
-    this.prodioMainfestDao = prodioMainfestDao;
-    this.productMainfestDao = productMainfestDao;
     this.notificationService = notificationService;
-    this.feeDao = feeDao;
   }
 
   @Override
@@ -227,51 +218,6 @@ public class ShipmentServiceImpl implements ShipmentService {
     return true;
   }
 
-  @Override
-  public boolean replyProdioMainfestFromWarehouse(ProdioMainfest mainfest) {
-    Validate.notNull(mainfest, "回传信息不能为空");
-    AppAuthentication authentication = AuthenticationUtil.getAuthentication();
-    if (authentication == null) {
-      throw new IllegalStateException("App Key无效");
-    }
-    mainfest.setSenderUU(authentication.getEnUu());
-
-    prodioMainfestDao.save(mainfest);
-
-    notificationService.replyFromWarehouse(mainfest);
-    return true;
-  }
-
-  @Override
-  public boolean replyProductMainfestFromWarehouse(ProductMainfest mainfest) {
-    Validate.notNull(mainfest, "回传信息不能为空");
-    AppAuthentication authentication = AuthenticationUtil.getAuthentication();
-    if (authentication == null) {
-      throw new IllegalStateException("App Key无效");
-    }
-    mainfest.setSenderUU(authentication.getEnUu());
-
-    productMainfestDao.save(mainfest);
-
-    notificationService.replyFromWarehouse(mainfest);
-    return true;
-  }
-
-  @Override
-  public boolean replyFeeFromWarehouse(Fee fee) {
-    Validate.notNull(fee, "回传信息不能为空");
-    AppAuthentication authentication = AuthenticationUtil.getAuthentication();
-    if (authentication == null) {
-      throw new IllegalStateException("App Key无效");
-    }
-    fee.setSenderUU(authentication.getEnUu());
-
-    feeDao.save(fee);
-
-    notificationService.replyFromWarehouse(fee);
-    return true;
-  }
-
   /**
    * CheckAppKey valid.
    * @param authentication

+ 1 - 1
warehouse-backend-app/src/main/java/com/uas/platform/warehouse/backend/util/SignUtil.java

@@ -63,7 +63,7 @@ public class SignUtil {
     Validate.notBlank(secretKey, "Secret Key 不能为空");
     Validate.notNull(timestamp, "时间戳不能为空");
 
-     return getMD5(appKey + timestamp + secretKey );
+     return getMD5(appKey + timestamp + secretKey + "md5" );
   }
 
   //!!注意:不足32位要补0

+ 0 - 5
warehouse-online-app/pom.xml

@@ -79,11 +79,6 @@
       <artifactId>warehouse-uas-sdk</artifactId>
       <version>0.1.2-SNAPSHOT</version>
     </dependency>
-    <dependency>
-      <groupId>com.uas.account</groupId>
-      <artifactId>account-common</artifactId>
-      <version>0.0.1-SNAPSHOT</version>
-    </dependency>
   </dependencies>
 
   <build>

+ 3 - 12
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/OnlineApplication.java

@@ -1,11 +1,8 @@
 package com.uas.platform.warehouse.online;
 
-import com.uas.platform.warehouse.online.util.ContextUtils;
 import org.springframework.boot.Banner.Mode;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.context.event.ApplicationPreparedEvent;
-import org.springframework.context.ApplicationListener;
 
 /**
  * Online application entry.
@@ -22,14 +19,8 @@ public class OnlineApplication {
    */
   public static void main(String[] args) {
     new SpringApplicationBuilder(OnlineApplication.class)
-            .bannerMode(Mode.OFF)
-            .web(true)
-            .listeners(new ApplicationListener<ApplicationPreparedEvent>() {
-              @Override
-              public void onApplicationEvent(ApplicationPreparedEvent event) {
-                ContextUtils.setApplicationContext(event.getApplicationContext());
-              }
-            })
-            .run(args);
+        .bannerMode(Mode.OFF)
+        .web(true)
+        .run(args);
   }
 }

+ 0 - 20
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/api/BaseController.java

@@ -1,20 +0,0 @@
-package com.uas.platform.warehouse.online.api;
-
-import org.apache.catalina.servlet4preview.http.HttpServletRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import javax.servlet.http.HttpServletResponse;
-
-/**
- *
- * @author wangmh
- * @date 2017/11/16
- */
-public class BaseController {
-
-    @Autowired
-    protected HttpServletRequest request;
-
-    @Autowired
-    protected HttpServletResponse response;
-}

+ 82 - 102
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/api/LoginController.java

@@ -1,136 +1,116 @@
 package com.uas.platform.warehouse.online.api;
 
-import com.alibaba.fastjson.JSON;
 import com.uas.platform.warehouse.online.dao.AppAuthenticationDao;
 import com.uas.platform.warehouse.online.entity.AppAuthentication;
 import com.uas.platform.warehouse.online.util.AppKeyUtil;
 import com.uas.platform.warehouse.online.util.HttpUtil;
-import com.uas.sso.AuthToken;
-import com.uas.sso.SSOConfig;
-import com.uas.sso.SSOHelper;
-import com.uas.sso.SSOToken;
 import org.apache.catalina.servlet4preview.http.HttpServletRequest;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
 import org.apache.log4j.Logger;
 import org.joda.time.DateTime;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.ui.ModelMap;
-import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.servlet.ModelAndView;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
-
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
 /**
  * Created by luhg on 2017/11/10.
  * User login.
  */
 @RestController
-public class LoginController{
+public class LoginController {
     private static final Logger logger = Logger.getLogger(HttpUtil.class);
+    private static final String uid = "uid=4sjrtiHZOu3sG71-9lOyB1jEPXOxBgJ_3jjuugBiDcZs9xlBhPHqdaypUNveDTUwUV8V2UZiz_XyiF54d5oA8-tWwALg7AiREkmq93ydcq7KVM0-lBf0bGEQMIIvck2m59UXPC8jQWYSinAqerzvnjG20OD4co1xYOGjTabDMNiN_ca6vlUQkgCrDPhWv4StQSjiiEx8BRbs51kD7qCxpkBdMmR9EWZUaZ4nC2a1a1Vq9NVcqkFjFOVe0o-06DkV-AlRCeKnvp8JtbKJYYm6Crd2_2oOX9ncu7wKcn-cLqaa-IT_yQUj-E0qouiOSr-_bSaJlQuVne3Pqi1os5r13QqS6C4vhd54sRApTAq5D1U0inlq0KalszUWJ2d-XtFDxM5ctvOW4iLczbTs6jK5ocvHtFPNDDUp0bOQcDlO4tznAVHl8TJYydsTwn7zyOqaUa4YRlS_0QsCWabWcxn_AC46QTCBtntQdfBXWgQPP1LbpwEZNUEFKYDh8Y3dUFRghj-05GfFshoAPqbUaEMiA0moJsbouP9zd7WtLbmWdVEGgMwCI_HEUdgTKvrXvbpPlR_EdjVZEJz7KYn8WUsXiHhswRzWU1dCQx_CjgNt9-6xOp61JmYS99BfK0QujCnoUUL1iIk6u17AWarBOPI8egBm0JZeRLvwajbhCy2CkeyKHHbb_ow5cdvWrLl291huKEhOwhGaBmh2ReDz1dHGTqqAL3UxQ0_E9t8HJ8p12hMNR3fAahFMJyOhRCkEbIVQUrUlpMYGTmCTbMfwWBqAVIZRac87961iDhY7KChIBCtiHyXICUryDojbNd2Mh66cghNvWlaOcnxiCTyAum2zBXI_hzmM4PUTCmkGojTmSzBFF-Kt7CrZ6xZu9Td8jb_4Kz_iaX4RfpFUG66YajmUXvCU8U_WhBw1fx1ebL_sCH2o041U2WZfAyVuVI17PWQ7EdurzJX5YeVm27cLbu5C1ICk0HN1_28RFJNAWSgk9PJuEl1ne1Nheb4Dgpyl7hzQ3OjLzrlyg7K6MGHFDrwZM0rFrUP7EsSAdUgUzy-uQFH-dtCk6D_3E_s.";
+    private static final String userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36";
 
     @Autowired
     private  AppAuthenticationDao authenticationDao;
 
-    @Autowired
-    private HttpServletRequest request;
-    /**
-     * 登录接口
-     * @param type 登录类型
-     *             user:用户
-     *             provider:供应商
-     * @return 返回登录代理页面
-     */
-    @RequestMapping(value = "/login/{type}", method = RequestMethod.GET)
-    @ResponseBody
-    public ModelAndView login(@PathVariable String type) {
-        request.getSession().setAttribute("type", type);
-        return new ModelAndView("/views/proxyLogin.html");
-    }
-
-    /**
-     * 在跨域确认账户中心登录之后调用接口,写入登录cookie
-     * @param replyTxt 由账户中心返回的数据
-     * @return 设置cookie是否成功
-     */
-    @RequestMapping(value = "/login/crossAfter", method = RequestMethod.POST)
-    @ResponseBody
-    public ModelMap getAuthenticationByUUAndType(HttpServletResponse response, String replyTxt){
-        if (!StringUtils.isEmpty(replyTxt)) {
-            SSOConfig config = SSOHelper.getSSOService().getConfig();
-            AuthToken token = SSOHelper.ok(request, response, replyTxt, config.getClientPublicKey(), config.getCenterPublicKey());
-            if (token != null) {
-                SSOToken tk = new SSOToken();
-                tk.setUid(token.getUid());
-                tk.setTime(token.getTime());
-                String type = String.valueOf(request.getSession().getAttribute("type"));
-                AppAuthentication appAuthentication = getAuthenticationByToken(token, type);
-                if (appAuthentication == null) {
-                    return new ModelMap("error", true);
-                }
-                tk.setData(JSON.toJSONString(appAuthentication));
-                SSOHelper.setSSOCookie(request, response, tk, true);
+    @RequestMapping(value="/login",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    public AppAuthentication login(HttpServletRequest request,String uu,String name,String type){
+        String check = null;
+        try {
+            check = loginAsk();
+            if(check!=null&&!"".equals(check)){ //未登录
+                return null;
             }
+        }catch (Exception e){
+            e.printStackTrace();
         }
-        return new ModelMap("success", true);
+        return getAuthenticationByUUAndType(uu,name,type);
     }
 
-    /**
-     * 根据token获得验证
-     * @param token
-     * @param type
-     * @return
-     */
-    private AppAuthentication getAuthenticationByToken(AuthToken token, String type) {
-        AppAuthentication appAuthentication = null;
-        if (token.getData() != null) {
-            com.uas.account.entity.UserView tokenUser = JSON.parseObject(token.getData(), com.uas.account.entity.UserView.class);
-            appAuthentication = authenticationDao.findByEnUu(tokenUser.getSpaceDialectUID());
-            if(appAuthentication==null){
-                appAuthentication = new AppAuthentication();
-                String appKey = AppKeyUtil.createAppKey();
-                String secretKey = AppKeyUtil.createSecretKey(appKey);
-                appAuthentication.setEnUu(tokenUser.getSpaceDialectUID());
-                appAuthentication.setEnName(tokenUser.getSpaceName());
-                appAuthentication.setAppKey(appKey);
-                appAuthentication.setSecretKey(secretKey);
-                appAuthentication.setCreateTime(DateTime.now().toDate());
-                appAuthentication.setType(AppAuthentication.IdentificationType.getIdentificationType(type));
-                authenticationDao.save(appAuthentication);
-                logger.info("创建新用户:"+"企业名称="+tokenUser.getSpaceName()+"&appKey="+appKey+
-                        "&secretKey="+secretKey+"&type="+AppAuthentication.IdentificationType.getIdentificationType(type));
-            }
+    public AppAuthentication getAuthenticationByUUAndType(String uu,String name,String type){
+        AppAuthentication appAuthentication = authenticationDao
+                .findByEnUu(uu);
+
+        if(appAuthentication==null){
+            appAuthentication = new AppAuthentication();
+
+            String appKey = AppKeyUtil.createAppKey();
+            String secretKey = AppKeyUtil.createSecretKey(appKey);
+            appAuthentication.setEnUu(uu);
+            appAuthentication.setEnName(name);
+            appAuthentication.setAppKey(appKey);
+            appAuthentication.setSecretKey(secretKey);
+            appAuthentication.setCreateTime(DateTime.now().toDate());
+            appAuthentication.setType(AppAuthentication.IdentificationType.valueOf(type));
+            authenticationDao.save(appAuthentication);
         }
         return appAuthentication;
     }
 
-    /**
-     * 获取跨域登录的参数
-     *
-     * @return
-     * @throws IOException
-     */
-    @RequestMapping(value = "/login/crossBefore", method = RequestMethod.GET)
-    @ResponseBody
-    public ModelMap getCrossLoginData(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        ModelMap model = new ModelMap();
-        SSOConfig config = SSOHelper.getSSOService().getConfig();
-        // 业务系统私钥签名 authToken 自动设置临时会话 cookie 授权后自动销毁
-        AuthToken at = SSOHelper.askCiphertext(request, response, config.getClientPrivateKey());
-        // askUrl 询问 sso 是否登录地址
-        model.addAttribute("askUrl", config.getCrossAskUrl());
-        // askTxt 询问 token 密文
-        model.addAttribute("askData", at.encryptAuthToken());
-        return model;
-    }
+/*    public String loginCheck() throws IOException{
+        String url = "https://account.ubtob.com/sso/login/ask";
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        HttpGet httpGet = new HttpGet(url);
+        httpGet.setHeader("Cookie",uid);
+        httpGet.setHeader("User-Agent",userAgent);
+        return httpClient.execute(httpGet, HttpUtil.RESPONSE_HANDLER_STRING);
+    }*/
+
+    @Test
+    public String loginAsk(){
+        //String uid
+        StringBuilder json = new StringBuilder();
+        String url = "https://account.ubtob.com/sso/login/ask";
+
+        try {
+            URL oracle = new URL(url);
+            HttpURLConnection yc = (HttpURLConnection)oracle.openConnection();
+            yc.setRequestMethod("GET");
+            yc.addRequestProperty("Cookie",uid);
+            yc.addRequestProperty("User-Agent",userAgent);
+
+            yc.setDoOutput(true);
+            yc.setDoInput(true);
+            PrintWriter printWriter = new PrintWriter(yc.getOutputStream());
+            printWriter.flush();
 
-    /**
-     * 判断是否登录
-     * @return
-     */
-    @RequestMapping("/isLogin")
-    public ModelMap isLogin() {
-        SSOToken token = SSOHelper.getToken(request);
-        return new ModelMap("isLogin", token!=null);
+            yc.setConnectTimeout(6000); 										 //毫秒
+            yc.setReadTimeout(6000); 											 //毫秒
+            BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+            String inputLine = null;
+            while ( (inputLine = in.readLine()) != null) {
+                json.append(inputLine);
+            }
+            in.close();
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return json.toString();
     }
+
 }

+ 1 - 12
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/entity/AppAuthentication.java

@@ -188,17 +188,6 @@ public class AppAuthentication implements Serializable {
     /**
      * Represent warehouse provider.
      */
-    WAREHOUSE_PROVIDER;
-
-    public static IdentificationType getIdentificationType(String type) {
-      switch (type) {
-        case "user":
-          return ENTERPRISE_USER;
-        case "provider":
-          return WAREHOUSE_PROVIDER;
-        default:
-          throw new RuntimeException("用户类型未找到!");
-      }
-    }
+    WAREHOUSE_PROVIDER
   }
 }

+ 0 - 14
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/profile/Dev.java

@@ -1,14 +0,0 @@
-package com.uas.platform.warehouse.online.profile;
-
-import org.springframework.context.annotation.Profile;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ ElementType.TYPE, ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
-@Profile("dev")
-public @interface Dev {
-}

+ 0 - 14
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/profile/Prod.java

@@ -1,14 +0,0 @@
-package com.uas.platform.warehouse.online.profile;
-
-import org.springframework.context.annotation.Profile;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ ElementType.TYPE, ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
-@Profile("prod")
-public @interface Prod {
-}

+ 0 - 62
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/profile/SSOConfiguration.java

@@ -1,62 +0,0 @@
-package com.uas.platform.warehouse.online.profile;
-
-import com.uas.account.web.AccountConfigurer;
-import com.uas.platform.warehouse.online.OnlineApplication;
-import com.uas.platform.warehouse.online.util.ContextUtils;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-
-/**
- * SSOconfig 配置
- *
- * @author hejq
- */
-@Configuration
-public class SSOConfiguration extends WebMvcConfigurerAdapter {
-
-
-    @Override
-    public void addInterceptors(InterceptorRegistry registry) {
-//        /**
-//         * 拦截器配置
-//         */
-//        registry.addInterceptor(new SSOInterceptor()).addPathPatterns("/**").
-//                excludePathPatterns("/WEB-INF/**","/**/static/**", "/login/**", "/logout/**");
-    }
-
-    @Bean
-    @Dev
-    public AccountConfigurer devAccountConfigurer() {
-        return accountConfigurer("dev");
-    }
-
-    @Bean
-    @Test
-    public AccountConfigurer testAccountConfigurer() {
-        return accountConfigurer("test");
-    }
-
-    @Bean
-    @Prod
-    public AccountConfigurer prodAccountConfigurer() {
-        return accountConfigurer("prod");
-    }
-
-    /**
-     * 获取当前环境下的配置
-     *
-     * @param profile
-     * @return
-     */
-    private AccountConfigurer accountConfigurer(String profile) {
-        AccountConfigurer accountConfigurer = new AccountConfigurer("classpath:" + profile + "/account.properties");
-        accountConfigurer.setApplicationContext(ContextUtils.getApplicationContext());
-        accountConfigurer.init();
-        return accountConfigurer;
-    }
-
-}

+ 0 - 14
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/profile/Test.java

@@ -1,14 +0,0 @@
-package com.uas.platform.warehouse.online.profile;
-
-import org.springframework.context.annotation.Profile;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ ElementType.TYPE, ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
-@Profile("test")
-public @interface Test {
-}

+ 0 - 73
warehouse-online-app/src/main/java/com/uas/platform/warehouse/online/util/ContextUtils.java

@@ -1,73 +0,0 @@
-package com.uas.platform.warehouse.online.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationEvent;
-
-/**
- * spring容器上下文对象
- * 
- * @author yingp
- *
- */
-public class ContextUtils {
-	private static ApplicationContext applicationContext;
-
-	private static Logger logger = LoggerFactory.getLogger(ContextUtils.class);
-
-	public static void setApplicationContext(ApplicationContext applicationContext) {
-		synchronized (ContextUtils.class) {
-			logger.debug("setApplicationContext, notifyAll");
-			ContextUtils.applicationContext = applicationContext;
-			ContextUtils.class.notifyAll();
-		}
-	}
-
-	public static ApplicationContext getApplicationContext() {
-		synchronized (ContextUtils.class) {
-			while (applicationContext == null) {
-				try {
-					logger.debug("getApplicationContext, wait...");
-					ContextUtils.class.wait(60000);
-					if (applicationContext == null) {
-						logger.warn("Have been waiting for ApplicationContext to be set for 1 minute", new Exception());
-					}
-				} catch (InterruptedException ex) {
-					logger.debug("getApplicationContext, wait interrupted");
-				}
-			}
-			return applicationContext;
-		}
-	}
-
-	/**
-	 * 获取bean
-	 * 
-	 * @param name
-	 * @return
-	 */
-	public static Object getBean(String name) {
-		return getApplicationContext().getBean(name);
-	}
-
-	/**
-	 * 获取bean
-	 * 
-	 * @param cls
-	 * @return
-	 */
-	public static <T> T getBean(Class<T> cls) {
-		return getApplicationContext().getBean(cls);
-	}
-
-	/**
-	 * 触发事件
-	 * 
-	 * @param event
-	 */
-	public static void publishEvent(ApplicationEvent event) {
-		getApplicationContext().publishEvent(event);
-	}
-
-}

+ 0 - 10
warehouse-online-app/src/main/resources/application-prod.yml

@@ -1,10 +0,0 @@
-spring:
-  datasource:
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    username: root
-    password: select111***
-    url: jdbc:mysql://192.168.253.12:3306/warehouse?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8
-  jpa:
-    database: mysql
-    hibernate:
-      ddl-auto: update

+ 0 - 21
warehouse-online-app/src/main/resources/dev/account.properties

@@ -1,21 +0,0 @@
-### account center config, 
-account.us.save.url=http://10.10.100.133/api/userspace
-account.user.save.url=http://10.10.100.133/api/user
-account.user.getPartners.url = http://10.10.100.133/api/partners
-account.user.getContactPage.url = http://113.105.74.135:8001/business/groups
-
-### sso config
-sso.app=warehouse
-# token secretkey
-sso.secretkey=0taQcW073Z7G628g5H
-sso.cookie.secure=false
-sso.login.url=http://113.105.74.135:8001/sso/login
-
-#cross domain
-sso.ask.url=http://113.105.74.135:8001/sso/login/ask
-sso.askout.url=http://113.105.74.135:8001/sso/logout/ask
-sso.proxy.uri=login/proxy
-sso.authcookie.secretkey=Z318866alN6gA0piuO
-sso.client.private_key=MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJa3qfiScPIdpMiE9FwRS7b7naZgeCas3eDsH0rWTf9ThMkFjpU+913vB3krEzUaSsGQl/hwOasoQNdr+/9OW2uw6LR6iUWJhVPVDaDD0frm5SfXIHFdAYb/5XM8rB422x9C8+gDz7dGfjwORl2Xw6TTinavM20w0m6fxYLoxUiJAgMBAAECgYAPzcJs5i4htSoKPKbC4K1nyoqFX6g5pfa+FwRQ/JfBJijOS17gF3Ioz1+hPPsOnmsoUNkem+XwJJBoBlKuOrErOCLZFHSls4C7655K+Ct83D43v9+2YxvTAjw8WNBgelpDRkzD1agyNj/O6u9UzpSxWxdgUwJ4LxnnOzQki2ohYQJBAN8GRQL+aj3zzIlg+ShzpEd+F2O1FevWsi2M8gAkYE1Ano5VdKCqlG9MVojCyb86GmMWCdThu7jxdAbjX7tGVGsCQQCtAH1/+L76RFzQgmNq2TvPkTwIcyunUyJhIDtPucLgj5B6zSkW/+NriLnohaxcgTLUQ7h2FHrfNt79MNMGzXPbAkAtnh2tkBZxF5YFn5U3Jfg7O1pTZa3XMHH/iS3Sw54DDy2fVXFmj52O6mFk1droR10wWUinh4ibOqAN7KIfLzKDAkBlUmcuPxIi40z0tZjiaE42WBov3LwRaIg3GDiEjghLmumEcooBNWcNgOtY+okjOGv7k5oCViZMeweIhELjtgqHAkEAgk3MQtupaIvCBEJsbs71F8sB4AkQ3VeqZC6s/OV336H4ORkXfInnw1YBxFUZ0LcGvSuh5WyvL7YUFxuGah8RGw==
-sso.client.public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWt6n4knDyHaTIhPRcEUu2+52mYHgmrN3g7B9K1k3/U4TJBY6VPvdd7wd5KxM1GkrBkJf4cDmrKEDXa/v/TltrsOi0eolFiYVT1Q2gw9H65uUn1yBxXQGG/+VzPKweNtsfQvPoA8+3Rn48DkZdl8Ok04p2rzNtMNJun8WC6MVIiQIDAQAB
-sso.center.public_key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL2g7CEfuPZtEDy7Iz5AL6iwbHZewWGUBYUWxKnFAwAW4lY8mMavn5Ke5mB25eKj5bvUsB48r8gWTvJNsKRGEw8CAwEAAQ==

+ 0 - 22
warehouse-online-app/src/main/resources/prod/account.properties

@@ -1,22 +0,0 @@
-### account center config, 
-account.us.save.url=http://10.10.100.133:8080/api/userspace
-account.user.save.url=http://10.10.100.133:8080/api/user
-account.user.getPartners.url = http://10.10.100.133:8080/api/partners
-account.user.getContactPage.url=https://account.ubtob.com/business/groups
-
-### sso config
-sso.app=b2b
-# token secretkey
-sso.secretkey=0taQcW073Z7G628g5H
-#sso.cookie.domain=.ubtob.com
-#sso.cookie.secure=false
-sso.login.url=https://account.ubtob.com/sso/login
-
-#cross domain
-sso.ask.url=https://account.ubtob.com/sso/logout/ask
-sso.askout.url=https://account.ubtob.com/sso/logout/ask
-sso.proxy.uri=login/proxy
-sso.authcookie.secretkey=Z318866alN6gA0piuO
-sso.client.private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJ8t+/zzUgWEIPjmlfpvaLH/Yu4Ev8c2fl4eoR71QvX1yM5htcMoGaCaF5g9DKivTZJV6sMomDDRryniI7sCnfcNvbgJkPUXEYtYiL+lKjmq2x0ntCFz/2RhVAvcFpD4KHXrzXzawu/WjcfB3txadjV7eZzruFcigqN1odwgjBXRAgMBAAECgYBC7o4HlbSGd0F6B1NHA7ONLOrHVJ3jQUmvf8eWAeEPFTNDfJh2IBVuj3yeWgVJpLTEdHYLa7VaycCSpvEJQJd00a2H2XUV3yLmGj137juRYBT3orbT+BEuUdavIEL/xjiavCfSRa1RU/JmGLzO/Xv+52rp3uZeaitvdbm1fkVpMQJBANAd3NstLjgYCm42UKQuz5GoWhPv5EhrHU7/TGKkojyNT/+1buT5qIjzl935F8pcOMydjpqMVYhhLhLNRf5Gnd0CQQDDzbcXHovB+VDIjFOG+7vjr4bycust2pRag1Y4l29uouCv9KgCQcunKKo1TiRDmY+NL4W9WY0ohHRYFvz4+DqFAkEAwvkXLic3w8mSDArKpeZNBDLqoP7/qXDgdl/rWgbPD1d8eR2rFM1oPVWpE4YH6cdYVynMrbGHeEtC9M5nIn9Z6QJAf1Kt1CLQznnIxiA50HSxYQUqw01nEJIqFhGBZ5tRoqfXY5O8DHusai5PQApoGm0oo65bUR2CZO58mSuZpGwF4QJBAIFAsKle4pR3NzekGSOMjTiHDTPcJ0BaZG00fXbjytTUnHOe0IACvYy3Xs/N1uDUyRMhaZMSFiubOpqVHgYb/Jw=
-sso.client.public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfLfv881IFhCD45pX6b2ix/2LuBL/HNn5eHqEe9UL19cjOYbXDKBmgmheYPQyor02SVerDKJgw0a8p4iO7Ap33Db24CZD1FxGLWIi/pSo5qtsdJ7Qhc/9kYVQL3BaQ+Ch168182sLv1o3Hwd7cWnY1e3mc67hXIoKjdaHcIIwV0QIDAQAB
-sso.center.public_key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL2g7CEfuPZtEDy7Iz5AL6iwbHZewWGUBYUWxKnFAwAW4lY8mMavn5Ke5mB25eKj5bvUsB48r8gWTvJNsKRGEw8CAwEAAQ==

+ 0 - 13
warehouse-online-app/src/main/resources/spring/context.xml

@@ -1,13 +0,0 @@
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
-       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd">
-
-    <context:property-placeholder location="classpath*:${profile}/*.properties" />
-    <!-- 账户中心配置 -->
-    <bean id="accountConfigurer" class="com.uas.account.web.AccountConfigurer"
-          init-method="init">
-        <property name="configPath" value="classpath:dev/account.properties" />
-    </bean>
-</beans>

BIN
warehouse-online-app/src/main/resources/static/img/loading.gif


BIN
warehouse-online-app/src/main/resources/static/img/u.png


+ 0 - 20
warehouse-online-app/src/main/resources/static/js/loginProxy.js

@@ -1,20 +0,0 @@
-/**
- * Created by uas on 2017/11/16.
- */
-var app = {
-    loading: function(is) {
-        $('#loading').css('display', is ? 'block': 'none');
-    },
-    info: function(message, title, position) {
-        toastr.info(message, title, {positionClass: 'toast-' + (position || 'top-center'), timeOut: 1000});
-    },
-    error: function(message, title, position) {
-        toastr.error(message, title, {positionClass: 'toast-' + (position || 'top-center')});
-    },
-    init: function () {
-
-    }
-}
-$(document).ready(function() {
-    app.init();
-});

+ 0 - 39
warehouse-online-app/src/main/resources/static/views/proxyLogin.html

@@ -1,39 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<meta name="renderer" content="webkit">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="robots" content="none">
-<base href="../" />
-<link href="static/img/icon/u.png" rel="icon" type="image/x-icon" />
-<script type="text/javascript" src="../js/index/jquery.min.js"></script>
-</head>
-<body>
-	<script type="text/javascript">
-		function proxyLogin(askUrl, askData) {
-			$.getJSON(askUrl + "?callback=?", {
-				askData : askData
-			}, function(d) {
-				if (d.error) {
-					window.location.href = '/views/warehousingList.html';
-				} else {
-					// 确认账户中心登录之后
-					$.post('login/crossAfter', {
-						replyTxt : d.content
-					}, function(e) {
-						window.location.href = '/views/warehousingList.html';
-					}, "json");
-				}
-			});
-		}
-		$.getJSON('login/crossBefore', function(data) {
-			proxyLogin(data.askUrl, data.askData);
-		});
-	</script>
-	<div align="center" style="margin-top: 180px;">
-		<img src="../img/loading.gif">
-		<p style="color: #888">正在加载中,请稍候……</p>
-	</div>
-</body>
-</html>

+ 1 - 1
warehouse-online-app/src/main/resources/static/views/warehousingList.html

@@ -388,7 +388,7 @@
             <a href="" class="logo" target="_blank">
                 <img src="../img/uas.png" alt=""/>
             </a>
-            <span class="logo-txt">仓储物流管理</span>
+            <span class="logo-txt">仓储物流管理}</span>
             <span class="logo-name"><i class="fa fa-user-circle-o"></i>优软科技有限公告&nbsp;&gt;&nbsp;<em>张三</em></span>
             <span class="message"><a href=""><i class="fa fa-commenting-o"></i><span class="red"></span></a></span>
         </div>

+ 0 - 22
warehouse-online-app/src/main/resources/test/account.properties

@@ -1,22 +0,0 @@
-### account center config, 
-account.us.save.url=http://113.105.74.135:8001/api/userspace
-account.user.save.url=http://113.105.74.135:8001/api/user
-account.user.getPartners.url = http://113.105.74.135:8001/api/partners
-account.user.getContactPage.url=http://113.105.74.135:8001/business/groups
-
-### sso config
-sso.app=warehouse
-# token secretkey
-sso.secretkey=0taQcW073Z7G628g5H
-sso.cookie.secure=false
-sso.login.url=http://113.105.74.135:8001/sso/login
-sso.logout.url=http://113.105.74.135:8001/sso/logout
-
-#cross domain
-sso.ask.url=http://113.105.74.135:8001/sso/login/ask
-sso.askout.url=http://113.105.74.135:8001/sso/logout/ask
-sso.proxy.uri=login/proxy
-sso.authcookie.secretkey=Z318866alN6gA0piuO
-sso.client.private_key=MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJa3qfiScPIdpMiE9FwRS7b7naZgeCas3eDsH0rWTf9ThMkFjpU+913vB3krEzUaSsGQl/hwOasoQNdr+/9OW2uw6LR6iUWJhVPVDaDD0frm5SfXIHFdAYb/5XM8rB422x9C8+gDz7dGfjwORl2Xw6TTinavM20w0m6fxYLoxUiJAgMBAAECgYAPzcJs5i4htSoKPKbC4K1nyoqFX6g5pfa+FwRQ/JfBJijOS17gF3Ioz1+hPPsOnmsoUNkem+XwJJBoBlKuOrErOCLZFHSls4C7655K+Ct83D43v9+2YxvTAjw8WNBgelpDRkzD1agyNj/O6u9UzpSxWxdgUwJ4LxnnOzQki2ohYQJBAN8GRQL+aj3zzIlg+ShzpEd+F2O1FevWsi2M8gAkYE1Ano5VdKCqlG9MVojCyb86GmMWCdThu7jxdAbjX7tGVGsCQQCtAH1/+L76RFzQgmNq2TvPkTwIcyunUyJhIDtPucLgj5B6zSkW/+NriLnohaxcgTLUQ7h2FHrfNt79MNMGzXPbAkAtnh2tkBZxF5YFn5U3Jfg7O1pTZa3XMHH/iS3Sw54DDy2fVXFmj52O6mFk1droR10wWUinh4ibOqAN7KIfLzKDAkBlUmcuPxIi40z0tZjiaE42WBov3LwRaIg3GDiEjghLmumEcooBNWcNgOtY+okjOGv7k5oCViZMeweIhELjtgqHAkEAgk3MQtupaIvCBEJsbs71F8sB4AkQ3VeqZC6s/OV336H4ORkXfInnw1YBxFUZ0LcGvSuh5WyvL7YUFxuGah8RGw==
-sso.client.public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCKrkx/azsoEdYsjM1NQkkA1xvpSaTEIFpEVjMDt5c0vlCdxkatcscQ/JjxWQriLTEcT+DL7t578Q77CcfJX0V5ODBrMETiAT3HQQJ2rKYTe8EuZg7w3v1QSCr/n4OI+FRJ2pPVVAEIUtYA7afmZkKQnPf4M/L7nhdbniF7KQKFIQIDAQAB
-sso.center.public_key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL2g7CEfuPZtEDy7Iz5AL6iwbHZewWGUBYUWxKnFAwAW4lY8mMavn5Ke5mB25eKj5bvUsB48r8gWTvJNsKRGEw8CAwEAAQ==

+ 0 - 5
warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/dao/NotificationDao.java

@@ -26,11 +26,6 @@ public interface NotificationDao extends MongoRepository<Notification, String> {
   Page<Notification> findByWhNameAndStatus(String whName, TransferStatus toBeDownload, Pageable pageInfo);
 
   Page<Notification> findByReceiverUUAndStatus(String recevierUU, TransferStatus toBeDownload, Pageable pageInfo);
-  /**
-   *
-   */
-  @Override
-  Notification findOne(String s);
 
   /**
    * Paging notification data.

+ 0 - 15
warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/entity/BaseVoucher.java

@@ -48,8 +48,6 @@ public class BaseVoucher {
   @Column(name = "senderUU")
   private String senderUU;
 
-
-
   /**
    * 企业名称
    */
@@ -63,11 +61,6 @@ public class BaseVoucher {
   @JsonIgnore
   private Date operateTime = LocalDateTime.now().toDate();
 
-  /**
-   * billId
-   */
-  @Column(name = "billId")
-  private String billId;
 
   /**
    * 备用字段1.
@@ -147,14 +140,6 @@ public class BaseVoucher {
     return attribute1;
   }
 
-  public String getBillId() {
-    return billId;
-  }
-
-  public void setBillId(String billId) {
-    this.billId = billId;
-  }
-
   public void setAttribute1(String attribute1) {
     this.attribute1 = attribute1;
   }

+ 0 - 84
warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/entity/Status.java

@@ -1,84 +0,0 @@
-package com.uas.platform.warehouse.backend.transport.entity;
-
-import org.joda.time.LocalDateTime;
-
-import java.util.Date;
-
-/**
- * Author liujw
- * Date 2018/1/8 19:32
- */
-public class Status {
-    private long id;
-    /**
-     * 单据ID
-     */
-    private String billId;
-
-    /**
-     * 状态
-     */
-    private BillStatus billStatus;
-
-    /**
-     * 回复时间
-     */
-    private Date replyTime = LocalDateTime.now().toDate();
-
-    /**
-     * 备注
-     */
-    private String remark;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getBillId() {
-        return billId;
-    }
-
-    public void setBillId(String billId) {
-        this.billId = billId;
-    }
-
-    public BillStatus getBillStatus() {
-        return billStatus;
-    }
-
-    public void setBillStatus(BillStatus billStatus) {
-        this.billStatus = billStatus;
-    }
-
-    public Date getReplyTime() {
-        return replyTime;
-    }
-
-    public void setReplyTime(Date replyTime) {
-        this.replyTime = replyTime;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public enum BillStatus{
-        /**
-         * 已获取
-         */
-        OK,
-
-        /**
-         * 未获取成功
-         */
-        ERROR
-    }
-}

+ 0 - 6
warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/service/PullDataService.java

@@ -3,7 +3,6 @@ package com.uas.platform.warehouse.backend.transport.service;
 import com.uas.platform.warehouse.backend.transport.entity.BaseReply;
 import com.uas.platform.warehouse.backend.transport.entity.BaseVoucher;
 import com.uas.platform.warehouse.backend.transport.entity.PostBack;
-import com.uas.platform.warehouse.backend.transport.entity.Status;
 import com.uas.platform.warehouse.core.domain.VoucherType;
 import java.util.List;
 import org.springframework.data.domain.Pageable;
@@ -31,9 +30,4 @@ public interface PullDataService {
    * @return  list of post back
    */
   List<BaseReply> gainReplyNotice(VoucherType type, Pageable pageInfo);
-
-  /**
-   * 更新状态
-   */
-  public boolean updateStatus(Status status);
 }

+ 0 - 5
warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/service/impl/NotificationServiceImpl.java

@@ -15,8 +15,6 @@ import org.joda.time.LocalDateTime;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.UUID;
-
 /**
  * Java Bean implementation of {@code NotificationService}.
  *
@@ -48,9 +46,6 @@ public class NotificationServiceImpl implements NotificationService {
     notification.setStatus(TransferStatus.TO_BE_DOWNLOAD);
     notification.setUploadedTime(LocalDateTime.now().toDate());
 
-    String billId = UUID.randomUUID().toString().replaceAll("-", "");
-    notification.setId(billId);
-    notification.getVoucher().setBillId(billId);
     notificationDao.save(notification);
     return notification.getStatus();
   }

+ 6 - 17
warehouse-transport/src/main/java/com/uas/platform/warehouse/backend/transport/service/impl/PullDataServiceImpl.java

@@ -7,6 +7,7 @@ import com.uas.platform.warehouse.backend.transport.entity.*;
 import com.uas.platform.warehouse.backend.transport.service.PullDataService;
 import com.uas.platform.warehouse.backend.transport.util.AuthenticationUtil;
 import com.uas.platform.warehouse.core.domain.VoucherType;
+import com.uas.platform.warehouse.core.util.JacksonUtils;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -16,6 +17,7 @@ import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
 import org.springframework.util.CollectionUtils;
 
 /**
@@ -57,29 +59,16 @@ public class PullDataServiceImpl implements PullDataService {
     List<BaseVoucher> vouchers = new ArrayList<>();
     List<Notification> content = voucherPage.getContent();
     for (Notification notification : content) {
-      // Update notification status  改为调用状态回传接口更新状态
-      // notification.setStatus(TransferStatus.DOWNLOADED);
-      // notificationDao.save(notification);
+      // Update notification status
+      notification.setStatus(TransferStatus.DOWNLOADED);
+      notificationDao.save(notification);
 
       // Gain json data of voucher
       vouchers.add(notification.getVoucher());
     }
     return vouchers;
   }
-  @Override
-  @Transactional(rollbackFor = RuntimeException.class)
-  public boolean updateStatus(Status status){
-    boolean flag = false;
-    String billId = status.getBillId();
-    Notification notification = notificationDao.findOne(billId);
-    Status.BillStatus billStatus = status.getBillStatus();
-    if(billStatus.equals(Status.BillStatus.OK)){
-      notification.setStatus(TransferStatus.DOWNLOADED);
-      notificationDao.save(notification);
-      flag = true;
-    }
-    return flag;
-  }
+
   @Override
   public List<BaseReply> gainReplyNotice(VoucherType type, Pageable pageInfo) {
     // Using Spring Assertion utility class to validate arguments.

+ 0 - 18
warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/client/AbstractClient.java

@@ -55,24 +55,6 @@ public abstract class AbstractClient implements Client {
     this.secretKey = secretKey;
   }
 
-  /**
-   * update status
-   */
-  public boolean updateStatus(String data) throws Exception{
-    List<NameValuePair> nvpList = getSignKey();
-    URI uri= UrlUtils.buildUrl(host, "api/update-status", nvpList);
-    ResultBean resultBean = HttpClientUtil.postMethod(uri,data);
-
-    if (resultBean == null) {
-      throw new ClientProtocolException("Response contains no content");
-    } else if (!resultBean.getSuccess()) {
-      throw new RequestFailException(resultBean.getMessage());
-    }
-
-    Map<String,Object> res = (Map<String,Object>)resultBean.getData();
-    return Boolean.parseBoolean(res.get("success").toString());
-  }
-
   /**
    * 将单据数据上传到B2B平台
    * @param data ,格式为[{}]

+ 0 - 174
warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/Fee.java

@@ -1,174 +0,0 @@
-package com.uas.platform.warehouse.tools.domain;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import org.joda.time.LocalDateTime;
-
-import java.util.Date;
-
-/**
- * @Author liujw
- * @Date 2017/12/19 13:59
- */
-public class Fee {
-
-    @JsonIgnore
-    private long id;
-
-    /**
-     *出入库单单据编号
-     */
-    private String code;
-
-    /**
-     * 费用产生时间
-     */
-    private Date feeGentime;
-
-    /**
-     * 费用名称
-     */
-    private String feeName;
-
-    /**
-     *费用金额
-     */
-    private double feeAmount;
-
-    /**
-     * 币别
-     */
-    private String feeCurrency;
-
-    /**
-     *备注信息
-     */
-    private String remark;
-
-    /**
-     * 时间
-     */
-    private Date date_= LocalDateTime.now().toDate();
-
-    /**
-     * 数据类型
-     */
-    private String type;
-
-    /**
-     * 接收方UU.
-     */
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String receiverUU;
-
-    /**
-     * 发送方UU.
-     */
-    private String senderUU;
-
-    /**
-     * 企业名称.
-
-     */
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String enterprise;
-
-    public String getReceiverUU() {
-        return receiverUU;
-    }
-
-    public void setReceiverUU(String receiverUU) {
-        this.receiverUU = receiverUU;
-    }
-
-    public String getSenderUU() {
-        return senderUU;
-    }
-
-    public void setSenderUU(String senderUU) {
-        this.senderUU = senderUU;
-    }
-
-    public String getEnterprise() {
-        return enterprise;
-    }
-
-    public void setEnterprise(String enterprise) {
-        this.enterprise = enterprise;
-    }
-
-
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public Date getDate_() {
-        return date_;
-    }
-
-    public void setDate_(Date date_) {
-        this.date_ = date_;
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public Date getFeeGentime() {
-        return feeGentime;
-    }
-
-    public void setFeeGentime(Date feeGentime) {
-        this.feeGentime = feeGentime;
-    }
-
-    public String getFeeName() {
-        return feeName;
-    }
-
-    public void setFeeName(String feeName) {
-        this.feeName = feeName;
-    }
-
-    public double getFeeAmount() {
-        return feeAmount;
-    }
-
-    public void setFeeAmount(double feeAmount) {
-        this.feeAmount = feeAmount;
-    }
-
-    public String getFeeCurrency() {
-        return feeCurrency;
-    }
-
-    public void setFeeCurrency(String feeCurrency) {
-        this.feeCurrency = feeCurrency;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-}

+ 0 - 39
warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/NormalReply.java

@@ -2,8 +2,6 @@ package com.uas.platform.warehouse.tools.domain;
 
 import com.uas.platform.warehouse.core.domain.VoucherType;
 
-import java.util.Date;
-
 /**
  * Created by luhg on 2017/11/3.
  * 用于通用的出入库单据回复.
@@ -100,19 +98,6 @@ public class NormalReply extends AbstractReply {
      */
     private String attribute3;
 
-    /**
-     *物流时间
-     */
-    private Date logisticstime;
-    /**
-     * 物流地址
-     */
-    private String logisticsaddr;
-    /**
-     * 物流备注
-     */
-    private String logisticsremark;
-
     @Override
     public VoucherType getVoucherType() {
         return voucherType;
@@ -215,30 +200,6 @@ public class NormalReply extends AbstractReply {
         return remark;
     }
 
-    public Date getLogisticstime() {
-        return logisticstime;
-    }
-
-    public void setLogisticstime(Date logisticstime) {
-        this.logisticstime = logisticstime;
-    }
-
-    public String getLogisticsaddr() {
-        return logisticsaddr;
-    }
-
-    public void setLogisticsaddr(String logisticsaddr) {
-        this.logisticsaddr = logisticsaddr;
-    }
-
-    public String getLogisticsremark() {
-        return logisticsremark;
-    }
-
-    public void setLogisticsremark(String logisticsremark) {
-        this.logisticsremark = logisticsremark;
-    }
-
     public void setRemark(String remark) {
         this.remark = remark;
     }

+ 0 - 155
warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/ProdioMainfest.java

@@ -1,155 +0,0 @@
-package com.uas.platform.warehouse.tools.domain;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import java.util.Date;
-
-/**
- * @Author liujw
- * @Date 2017/12/19 11:22
- */
-public class ProdioMainfest {
-
-
-    @JsonIgnore
-    private long id;
-    /**
-     * 出入库单单据编号
-     */
-    private String code;
-
-    /**
-     * 数据类型.
-     */
-    private String type="prodio-mainfest";
-
-    /**
-     * 报关时间
-     */
-    private Date customsTime;
-
-    /**
-     * 报关状态
-     */
-    private String customsStatus;
-
-    /**
-     * 备注信息
-     */
-    private String remark;
-
-    private Date date;
-
-    /**
-     * 接收方UU.
-     */
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String receiverUU;
-
-    /**
-     * 发送方UU.
-     */
-    private String senderUU;
-
-    /**
-     * 企业名称.
-     */
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String enterprise;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public Date getCustomsTime() {
-        return customsTime;
-    }
-
-    public void setCustomsTime(Date customsTime) {
-        this.customsTime = customsTime;
-    }
-
-    public String getCustomsStatus() {
-        return customsStatus;
-    }
-
-    public void setCustomsStatus(String customsStatus) {
-        this.customsStatus = customsStatus;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public Date getDate() {
-        return date;
-    }
-
-    public void setDate(Date date) {
-        this.date = date;
-    }
-
-    public String getReceiverUU() {
-        return receiverUU;
-    }
-
-    public void setReceiverUU(String receiverUU) {
-        this.receiverUU = receiverUU;
-    }
-
-    public String getSenderUU() {
-        return senderUU;
-    }
-
-    public void setSenderUU(String senderUU) {
-        this.senderUU = senderUU;
-    }
-
-    public String getEnterprise() {
-        return enterprise;
-    }
-
-    public void setEnterprise(String enterprise) {
-        this.enterprise = enterprise;
-    }
-
-    /**
-     * 出入库报关状态
-     */
-    public enum mainfestState{
-        /**
-         * 已申报
-         */
-        REPORTED,
-        /**
-         * 已放行
-         */
-        PASSED
-    }
-
-}

+ 0 - 167
warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/ProductMainfest.java

@@ -1,167 +0,0 @@
-package com.uas.platform.warehouse.tools.domain;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @Author liujw
- * @Date 2017/12/19 11:27
- */
-public class ProductMainfest {
-
-    @JsonIgnore
-    private long id;
-
-    /**
-     *物料编号
-     */
-    private String code;
-
-    /**
-     *海关编码
-     */
-    private String custoCode;
-
-    /**
-     * 申报要素
-     */
-    private String customsElement;
-
-    /**
-     * 原产国
-     */
-    private String originCountry;
-
-    /**
-     * 币别
-     */
-    private String currency;
-
-    /**
-     *征免
-     */
-    private String customsExemption;
-
-    /**
-     * 备注信息
-     */
-    private String remark;
-
-    /**
-     * 数据类型.
-     */
-    private String type;
-
-    /**
-     * 接收方UU.
-     */
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String receiverUU;
-
-    /**
-     * 发送方UU.
-     */
-    private String senderUU;
-
-    /**
-     * 企业名称.
-     */
-    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
-    private String enterprise;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getCustoCode() {
-        return custoCode;
-    }
-
-    public void setCustoCode(String custoCode) {
-        this.custoCode = custoCode;
-    }
-
-    public String getCustomsElement() {
-        return customsElement;
-    }
-
-    public void setCustomsElement(String customsElement) {
-        this.customsElement = customsElement;
-    }
-
-    public String getOriginCountry() {
-        return originCountry;
-    }
-
-    public void setOriginCountry(String originCountry) {
-        this.originCountry = originCountry;
-    }
-
-    public String getCurrency() {
-        return currency;
-    }
-
-    public void setCurrency(String currency) {
-        this.currency = currency;
-    }
-
-    public String getCustomsExemption() {
-        return customsExemption;
-    }
-
-    public void setCustomsexEmption(String customsExemption) {
-        this.customsExemption = customsExemption;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getReceiverUU() {
-        return receiverUU;
-    }
-
-    public void setReceiverUU(String receiverUU) {
-        this.receiverUU = receiverUU;
-    }
-
-    public String getSenderUU() {
-        return senderUU;
-    }
-
-    public void setSenderUU(String senderUU) {
-        this.senderUU = senderUU;
-    }
-
-    public String getEnterprise() {
-        return enterprise;
-    }
-
-    public void setEnterprise(String enterprise) {
-        this.enterprise = enterprise;
-    }
-}

+ 0 - 85
warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/domain/Status.java

@@ -1,85 +0,0 @@
-package com.uas.platform.warehouse.tools.domain;
-
-import org.joda.time.LocalDateTime;
-
-import java.util.Date;
-
-/**
- * @Author liujw
- * @Date 2018/1/10 9:07
- */
-public class Status {
-
-    private long id;
-    /**
-     * 单据ID
-     */
-    private String billId;
-
-    /**
-     * 状态
-     */
-    private BillStatus billStatus;
-
-    /**
-     * 回复时间
-     */
-    private Date replyTime = LocalDateTime.now().toDate();
-
-    /**
-     * 备注
-     */
-    private String remark;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getBillId() {
-        return billId;
-    }
-
-    public void setBillId(String billId) {
-        this.billId = billId;
-    }
-
-    public BillStatus getBillStatus() {
-        return billStatus;
-    }
-
-    public void setBillStatus(BillStatus billStatus) {
-        this.billStatus = billStatus;
-    }
-
-    public Date getReplyTime() {
-        return replyTime;
-    }
-
-    public void setReplyTime(Date replyTime) {
-        this.replyTime = replyTime;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public enum BillStatus{
-        /**
-         * 已获取
-         */
-        OK,
-
-        /**
-         * 未获取成功
-         */
-        ERROR
-    }
-}

+ 1 - 1
warehouse-uas-sdk/src/main/java/com/uas/platform/warehouse/tools/util/SignUtil.java

@@ -86,7 +86,7 @@ public class SignUtil {
     params.put("appKey", appKey);
     //params.put("sign", sign);
 
-    String md5_sign = SignUtil.getMD5(appKey + timestamp + secretKey );
+    String md5_sign = SignUtil.getMD5(appKey + timestamp + secretKey + "md5");
     params.put("sign", md5_sign);
 
     List<NameValuePair> nameValuePairList = new ArrayList<>();

+ 7 - 8
warehouse-uas-sdk/src/test/java/com/uas/platform/warehouse/sample/ConstantForTest.java

@@ -10,37 +10,36 @@ class ConstantForTest {
   /**
    * Host of service.
    */
-  //static final String ENDPOINT = "218.17.158.219:9443/warehouse";
-  static final String ENDPOINT = "localhost:20320";
+  static final String ENDPOINT = "218.17.158.219:9443/warehouse";
 
   /**
    * UU number of enterprise.
    */
-  static final String ENTERPRISE_UU = "123456";
+  static final String ENTERPRISE_UU = "10030463";
 
   /**
    * Name of warehouse.
    */
-  static final String WH_NAME = "旗丰";
+  static final String WH_NAME = "深圳新宁仓";
 
   /**
    * App key of enterprise.
    */
-  static final String EN_APP_KEY = "178698387fa34c9c969302641f773398";
+  static final String EN_APP_KEY = "0677881a1d5a48dfa3a1e32a7b65e7a5";
 
   /**
    * Secret key of enterprise.
    */
-  static final String EN_SECRET_KEY = "E707D934C24D74CCC5180E64B76176F9DF985855";
+  static final String EN_SECRET_KEY = "6E8958941CB53DC48D7B32F4E7DD57C67E54B8FD";
 
   /**
    * App key of warehouse.
    */
-  static final String WH_APP_KEY = "f4c2f5d483a3404ea98fe417ff2055e3";
+  static final String WH_APP_KEY = "a16b54ce9b5a45b49532a8309dc9f213";
 
   /**
    * Secret key of warehouse.
    */
-  static final String WH_SECRET_KEY = "8063F9D444A63FC4D4E89D34FF1C0083BE13E830";
+  static final String WH_SECRET_KEY = "A2564D54734F2A54C0E9AD8134C24F0C135AF126";
 
 }

+ 25 - 40
warehouse-uas-sdk/src/test/java/com/uas/platform/warehouse/sample/EntityDemo.java

@@ -1,6 +1,5 @@
 package com.uas.platform.warehouse.sample;
 
-import com.uas.platform.warehouse.core.domain.VoucherType;
 import com.uas.platform.warehouse.tools.domain.NormalReply;
 import com.uas.platform.warehouse.tools.domain.ShipmentReply;
 import com.uas.platform.warehouse.tools.domain.StockInReply;
@@ -9,6 +8,7 @@ import org.joda.time.LocalDate;
 import org.joda.time.LocalDateTime;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -21,8 +21,8 @@ public class EntityDemo {
         Product product = new Product();
 
         product.setPn("AB1938");
-        product.setReceiverUU("171102");
-        product.setSenderUU("123456");
+        product.setReceiverUU("10030337");
+        product.setSenderUU("10030463");
         product.setEnterprise("华商龙");
         product.setBrand("AOC");
         product.setRemark("test remark");
@@ -41,16 +41,12 @@ public class EntityDemo {
         reply.setDocType("出货单");
         reply.setState(NormalReply.RespState.GET);
         reply.setOperator("luhg");
-        reply.setReceiverUU("123456");
-        reply.setSenderUU("171102");
+        reply.setReceiverUU("10030463");
+        reply.setSenderUU("10030337");
         reply.setEnterprise("华商龙");
         reply.setType("reply");
-        reply.setVoucherType(VoucherType.STOCK_OUT);
-        reply.setAttribute1("");
+        reply.setAttribute1("调拨单回复");
         reply.setRemark("测试用");
-        reply.setLogisticsaddr("深圳");
-        reply.setLogisticsremark("remark1");
-        reply.setLogisticstime(LocalDate.now().toDate());
         return reply;
     }
 
@@ -64,9 +60,9 @@ public class EntityDemo {
         System.out.println("TRAN_NO:" + tranNo);
         transfer.setWhName(ConstantForTest.WH_NAME);
         transfer.setTranNo("拨出单");
-        transfer.setOperator("liujw");
-        transfer.setSenderUU("123456");
-        transfer.setReceiverUU("171102");
+        transfer.setOperator("luhg");
+        transfer.setSenderUU("10030463");
+        transfer.setReceiverUU("10030337");
         transfer.setEnterprise("华商龙");
         transfer.setAttribute1("transfer attribute");
 
@@ -102,8 +98,8 @@ public class EntityDemo {
         shipment.setWhName(ConstantForTest.WH_NAME);
         shipment.setAddress(address);
         shipment.setCustUU("1234");
-        shipment.setReceiverUU("171102");
-        shipment.setSenderUU("123456");
+        shipment.setReceiverUU("10030337");
+        shipment.setSenderUU("10030463");
         shipment.setLocation("XN");
         shipment.setEnterprise("华商龙");
         shipment.setAttribute1("test attribute1");
@@ -141,8 +137,8 @@ public class EntityDemo {
         stockin.setLocation("XN");
         stockin.setAsnType("采购验收单");
         stockin.setCur("RMB");
-        stockin.setSenderUU("123456");
-        stockin.setReceiverUU("171102");
+        stockin.setSenderUU("10030463");
+        stockin.setReceiverUU("10030337");
         stockin.setEnterprise("华商龙");
 
         List<StockinDetail> details = new ArrayList<>();
@@ -172,9 +168,9 @@ public class EntityDemo {
         reply.setDocType("出货单");
         reply.setPullNo("PU_TEST");
         reply.setState(ShipmentReply.PullState.OK);
-        reply.setOperator("liujw");
-        reply.setReceiverUU("123456");
-        reply.setSenderUU("171102");
+        reply.setOperator("luhg");
+        reply.setReceiverUU("10030463");
+        reply.setSenderUU("10030337");
         reply.setEnterprise("华商龙");
         return reply;
     }
@@ -185,9 +181,9 @@ public class EntityDemo {
         reply.setAsnNo("ASN_TEST");
         reply.setDocType("出货单");
         reply.setState(StockInReply.asnState.OK);
-        reply.setOperator("liujw");
-        reply.setReceiverUU("123456");
-        reply.setSenderUU("171102");
+        reply.setOperator("luhg");
+        reply.setReceiverUU("10030463");
+        reply.setSenderUU("10030337");
         reply.setEnterprise("华商龙");
         return reply;
     }
@@ -201,8 +197,8 @@ public class EntityDemo {
         Packing packing  = new Packing();
         packing.setPackingNo(packingNo);
         packing.setPackingDate(LocalDate.now().toDate());
-        packing.setSenderUU("123456");
-        packing.setReceiverUU("171102");
+        packing.setSenderUU("10030463");
+        packing.setReceiverUU("10030337");
 
         List<PackingDetail> details = new ArrayList<>();
         for (int i = 0; i < detailSize; i++) {
@@ -229,8 +225,8 @@ public class EntityDemo {
         Invoice invoice  = new Invoice();
         invoice.setInvoiceNo("testInvoice");
         invoice.setInvoiceDate(LocalDate.now().toDate());
-        invoice.setSenderUU("123456");
-        invoice.setReceiverUU("171102");
+        invoice.setSenderUU("10030463");
+        invoice.setReceiverUU("10030337");
 
         List<InvoiceDetail> details = new ArrayList<>();
         for (int i = 0; i < detailSize; i++) {
@@ -255,8 +251,8 @@ public class EntityDemo {
         String invoiceNo = "Invoice" + number;
         InvoiceReply invoiceReply  = new InvoiceReply();
         invoiceReply.setInvoiceNo("testInvoice");
-        invoiceReply.setSenderUU("171102");
-        invoiceReply.setReceiverUU("123456");
+        invoiceReply.setSenderUU("10030463");
+        invoiceReply.setReceiverUU("10030337");
 
         List<InvoiceReplyDetail> details = new ArrayList<>();
         for (int i = 0; i < detailSize; i++) {
@@ -272,15 +268,4 @@ public class EntityDemo {
 
         return invoiceReply;
     }
-
-    public static Status getStatus(){
-        String billId ="f8c4a65a7dda47b2bdaf7deb9b2543d4";
-        Status.BillStatus billStatus = Status.BillStatus.OK;
-        String remark ="remark";
-        Status status = new Status();
-        status.setBillId(billId);
-        status.setBillStatus(billStatus);
-        status.setRemark(remark);
-        return status;
-    }
 }

+ 1 - 2
warehouse-uas-sdk/src/test/java/com/uas/platform/warehouse/sample/UASEnterpriseUserDemo.java

@@ -150,7 +150,7 @@ public class UASEnterpriseUserDemo {
 
   public URI getUri() throws Exception {
     List<NameValuePair> nvpList = getSignKey();
-    return UrlUtils.buildUrl(ConstantForTest.ENDPOINT, "api/post", nvpList);
+    return UrlUtils.buildUrl(ConstantForTest.ENDPOINT, "api/warehouse/notice//post-to-b2b", nvpList);
   }
 
   public List<NameValuePair> getSignKey(){
@@ -171,7 +171,6 @@ public class UASEnterpriseUserDemo {
     HttpClientUtil.postMethod(uri,shipments);
   }
 
-
   /**
    * 获取供应商回复信息
    * @throws Exception

+ 1 - 17
warehouse-uas-sdk/src/test/java/com/uas/platform/warehouse/sample/WarehouseProviderSumDemo.java

@@ -3,7 +3,6 @@ package com.uas.platform.warehouse.sample;
 import static com.uas.platform.warehouse.sample.ConstantForTest.ENDPOINT;
 
 import com.uas.platform.warehouse.tools.domain.ShipmentReply;
-import com.uas.platform.warehouse.tools.domain.Status;
 import com.uas.platform.warehouse.tools.domain.StockInReply;
 import com.uas.platform.warehouse.core.util.JacksonUtils;
 import com.uas.platform.warehouse.tools.client.WarehouseProvider;
@@ -78,24 +77,9 @@ public class WarehouseProviderSumDemo {
         NormalReply reply = EntityDemo.getNormalReply();
         List<NormalReply> replys = new ArrayList<>();
         replys.add(reply);
-        System.out.println(replys);
         client.sendToB2b(replys);
     }
 
-    /**
-     *更新状态
-     */
-    @Test
-    public void testUpdateStatus() throws Exception{
-        Status status = EntityDemo.getStatus();
-        List<Status> statuses = new ArrayList<>();
-        statuses.add(status);
-        System.out.println(statuses);
-
-        String data = JacksonUtils.toJson(statuses);
-        client.updateStatus(data);
-    }
-
     /**
      * 获取供应商回复信息 MD5
      * @throws Exception
@@ -107,7 +91,7 @@ public class WarehouseProviderSumDemo {
         String secretKey = "A2564D54734F2A54C0E9AD8134C24F0C135AF126";
         //String url = "https://218.17.158.219:9443/warehouse//api/warehouse/notice//gain-reply-notice";
         String url = "http://localhost:20320/api/gain-notice";
-        String sign = SignUtil.getMD5(appKey + timestamp + secretKey );
+        String sign = SignUtil.getMD5(appKey + timestamp + secretKey + "md5");
         System.out.println("sign:" + sign);
 
         String params = "";