sunyj 8 lat temu
rodzic
commit
861879fc46
40 zmienionych plików z 89 dodań i 4454 usunięć
  1. 4 0
      pom.xml
  2. 30 0
      src/main/java/com/uas/ps/product/RepositoryConfiguration.java
  3. 11 17
      src/main/java/com/uas/ps/product/controller/ProductController.java
  4. 0 14
      src/main/java/com/uas/ps/product/dao/EnterpriseDao.java
  5. 0 28
      src/main/java/com/uas/ps/product/dao/ProductDao.java
  6. 0 24
      src/main/java/com/uas/ps/product/dao/ProductStoreStatusDao.java
  7. 0 17
      src/main/java/com/uas/ps/product/dao/ProductUsersDao.java
  8. 0 15
      src/main/java/com/uas/ps/product/dao/UsageLogDao.java
  9. 27 0
      src/main/java/com/uas/ps/product/entity/Prod.java
  10. 0 17
      src/main/java/com/uas/ps/product/logging/BufferedLogable.java
  11. 0 113
      src/main/java/com/uas/ps/product/logging/BufferedLogger.java
  12. 0 34
      src/main/java/com/uas/ps/product/logging/BufferedLoggerManager.java
  13. 0 12
      src/main/java/com/uas/ps/product/logging/LogService.java
  14. 0 65
      src/main/java/com/uas/ps/product/logging/UsageBufferedLogger.java
  15. 0 32
      src/main/java/com/uas/ps/product/logging/erp/ErpBufferedLogger.java
  16. 0 199
      src/main/java/com/uas/ps/product/logging/erp/ErpLog.java
  17. 0 15
      src/main/java/com/uas/ps/product/logging/erp/ErpLogDao.java
  18. 0 11
      src/main/java/com/uas/ps/product/logging/erp/ErpLogService.java
  19. 0 25
      src/main/java/com/uas/ps/product/logging/erp/ErpLogServiceImpl.java
  20. 0 194
      src/main/java/com/uas/ps/product/model/Attach.java
  21. 0 35
      src/main/java/com/uas/ps/product/model/Constant.java
  22. 0 721
      src/main/java/com/uas/ps/product/model/Enterprise.java
  23. 0 126
      src/main/java/com/uas/ps/product/model/EnterpriseInfo.java
  24. 0 359
      src/main/java/com/uas/ps/product/model/Prod.java
  25. 0 715
      src/main/java/com/uas/ps/product/model/Product.java
  26. 0 245
      src/main/java/com/uas/ps/product/model/ProductMatchResult.java
  27. 0 92
      src/main/java/com/uas/ps/product/model/ProductStoreStatus.java
  28. 0 98
      src/main/java/com/uas/ps/product/model/ProductUsers.java
  29. 0 84
      src/main/java/com/uas/ps/product/model/ResourceItem.java
  30. 0 195
      src/main/java/com/uas/ps/product/model/Role.java
  31. 0 130
      src/main/java/com/uas/ps/product/model/Status.java
  32. 0 232
      src/main/java/com/uas/ps/product/model/UsageLog.java
  33. 0 360
      src/main/java/com/uas/ps/product/model/User.java
  34. 0 99
      src/main/java/com/uas/ps/product/model/UserBaseInfo.java
  35. 5 4
      src/main/java/com/uas/ps/product/repository/ProductDao.java
  36. 2 9
      src/main/java/com/uas/ps/product/repository/ProductMatchResultDao.java
  37. 3 3
      src/main/java/com/uas/ps/product/service/ProductService.java
  38. 0 11
      src/main/java/com/uas/ps/product/service/UsageLogService.java
  39. 7 75
      src/main/java/com/uas/ps/product/service/impl/ProductServiceImpl.java
  40. 0 29
      src/main/java/com/uas/ps/product/service/impl/UsageLogServiceImpl.java

+ 4 - 0
pom.xml

@@ -20,6 +20,10 @@
             <groupId>com.uas.ps</groupId>
             <artifactId>ps-core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.uas.ps</groupId>
+            <artifactId>ps-entity</artifactId>
+        </dependency>
 
         <!-- spring boot -->
         <dependency>

+ 30 - 0
src/main/java/com/uas/ps/product/RepositoryConfiguration.java

@@ -0,0 +1,30 @@
+package com.uas.ps.product;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+
+import javax.sql.DataSource;
+
+/**
+ * @author sunyj
+ * @since 2018/1/13 16:26
+ */
+@Configuration
+@EnableJpaRepositories
+public class RepositoryConfiguration {
+
+    @Autowired
+    private DataSource dataSource;
+
+    @Bean
+    @Primary
+    public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder builder) {
+        return builder.dataSource(dataSource)
+                .packages("com.uas.ps.entity", "com.uas.ps.product.**.*").build();
+    }
+}

+ 11 - 17
src/main/java/com/uas/ps/product/controller/ProductController.java

@@ -1,11 +1,7 @@
 package com.uas.ps.product.controller;
 
 import com.alibaba.fastjson.JSONObject;
-import com.uas.ps.product.dao.UserDao;
-import com.uas.ps.product.logging.BufferedLoggerManager;
-import com.uas.ps.product.logging.erp.ErpBufferedLogger;
-import com.uas.ps.product.model.Prod;
-import com.uas.ps.product.model.User;
+import com.uas.ps.product.entity.Prod;
 import com.uas.ps.product.service.ProductService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -29,13 +25,11 @@ import java.util.List;
 @RequestMapping("/product")
 public class ProductController {
 
-    private final static ErpBufferedLogger logger = BufferedLoggerManager.getLogger(ErpBufferedLogger.class);
-
     @Autowired
     private ProductService productService;
 
-    @Autowired
-    private UserDao userDao;
+//    @Autowired
+//    private UserDao userDao;
 
     /**
      * 将ERP的产品资料写到平台
@@ -69,14 +63,14 @@ public class ProductController {
     }
 
     private void log(List<Prod> prods, String message) {
-        if (prods.size() < 1) {
-            throw new IllegalArgumentException("物料资料为空");
-        }
-        Prod prod = prods.get(0);
-        Long enUU = prod.getEnUU();
-        Long userUU = prod.getUserUU();
-        User user = userDao.findOne(userUU);
-        logger.log(enUU, userUU, user.getIp(), "物料资料", message, prods.size());
+//        if (prods.size() < 1) {
+//            throw new IllegalArgumentException("物料资料为空");
+//        }
+//        Prod prod = prods.get(0);
+//        Long enUU = prod.getEnUU();
+//        Long userUU = prod.getUserUU();
+//        User user = userDao.findOne(userUU);
+//        logger.log(enUU, userUU, user.getIp(), "物料资料", message, prods.size());
     }
 
     /**

+ 0 - 14
src/main/java/com/uas/ps/product/dao/EnterpriseDao.java

@@ -1,14 +0,0 @@
-package com.uas.ps.product.dao;
-
-import com.uas.ps.product.model.Enterprise;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.stereotype.Repository;
-
-/**
- * @author sunyj
- * @since 2018/1/8 11:44
- */
-@Repository
-public interface EnterpriseDao extends JpaSpecificationExecutor<Enterprise>, JpaRepository<Enterprise, Long> {
-}

+ 0 - 28
src/main/java/com/uas/ps/product/dao/ProductDao.java

@@ -1,28 +0,0 @@
-package com.uas.ps.product.dao;
-
-import com.uas.ps.product.model.Product;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.QueryHints;
-import org.springframework.stereotype.Repository;
-
-import javax.persistence.QueryHint;
-import java.util.List;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:20
- */
-@Repository
-public interface ProductDao extends JpaSpecificationExecutor<Product>, JpaRepository<Product, Long> {
-
-    /**
-     * 按所属企业的ID和产品的编号查找产品
-     *
-     * @param enUU
-     * @param code
-     * @return
-     */
-    @QueryHints({@QueryHint(name = "org.hibernate.cacheable", value = "true")})
-    public List<Product> findByEnUUAndCode(long enUU, String code);
-}

+ 0 - 24
src/main/java/com/uas/ps/product/dao/ProductStoreStatusDao.java

@@ -1,24 +0,0 @@
-package com.uas.ps.product.dao;
-
-import com.uas.ps.product.model.ProductStoreStatus;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.stereotype.Repository;
-
-/**
- * @author sunyj
- * @since 2018/1/9 15:15
- */
-@Repository
-public interface ProductStoreStatusDao
-        extends JpaRepository<ProductStoreStatus, Long>, JpaSpecificationExecutor<ProductStoreStatus> {
-
-    /**
-     * 通过uu号查询当前操作状态
-     *
-     * @param enuu
-     * @return
-     */
-    ProductStoreStatus findByEnuu(Long enuu);
-
-}

+ 0 - 17
src/main/java/com/uas/ps/product/dao/ProductUsersDao.java

@@ -1,17 +0,0 @@
-package com.uas.ps.product.dao;
-
-import com.uas.ps.product.model.ProductUsers;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.stereotype.Repository;
-
-/**
- * @author sunyj
- * @since 2018/1/9 17:21
- */
-@Repository
-public interface ProductUsersDao extends JpaSpecificationExecutor<ProductUsers>, JpaRepository<ProductUsers, Long> {
-
-    ProductUsers findByUserUUAndProductId(Long userUU, Long productId);
-
-}

+ 0 - 15
src/main/java/com/uas/ps/product/dao/UsageLogDao.java

@@ -1,15 +0,0 @@
-package com.uas.ps.product.dao;
-
-import com.uas.ps.product.model.UsageLog;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.stereotype.Repository;
-
-/**
- * @author sunyj
- * @since 2018/1/9 16:30
- */
-@Repository
-public interface UsageLogDao extends JpaSpecificationExecutor<UsageLog>, JpaRepository<UsageLog, Long> {
-
-}

+ 27 - 0
src/main/java/com/uas/ps/product/entity/Prod.java

@@ -0,0 +1,27 @@
+package com.uas.ps.product.entity;
+
+import com.uas.ps.entity.Product;
+
+import java.io.Serializable;
+
+/**
+ * ERP系统的产品
+ *
+ * @author sunyj
+ * @since 2018/1/6 16:52
+ */
+public class Prod implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 转为平台的产品
+     *
+     * @return
+     */
+    public Product convert() {
+        // TODO
+        return null;
+    }
+
+}

+ 0 - 17
src/main/java/com/uas/ps/product/logging/BufferedLogable.java

@@ -1,17 +0,0 @@
-package com.uas.ps.product.logging;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:32
- */
-public abstract class BufferedLogable {
-
-    protected static final String separator = "#";
-
-    public BufferedLogable() {
-    }
-
-    public abstract String bufferedMessage();
-
-    public abstract void bufferedLog(String var1);
-}

+ 0 - 113
src/main/java/com/uas/ps/product/logging/BufferedLogger.java

@@ -1,113 +0,0 @@
-package com.uas.ps.product.logging;
-
-import com.uas.ps.product.util.FileBuffer;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:38
- */
-public abstract class BufferedLogger<T extends BufferedLogable> {
-    private String logPath;
-    private String currentLogFile;
-    private Class<T> logClass;
-    private FileBuffer fileBuffer;
-    private LogService<T> logService;
-
-    public BufferedLogger() {
-    }
-
-    public BufferedLogger(String basePath, Class<T> logClass, LogService<T> logService) {
-        this.logPath = basePath + File.separator + "buff_log" + File.separator + logClass.getName();
-        this.logClass = logClass;
-        this.fileBuffer = new FileBuffer(this.logPath, this.getFileName());
-        this.logService = logService;
-        this.leaveOver();
-    }
-
-    public void log(T bufferedLogable) {
-        if (!this.fileBuffer.append(bufferedLogable.bufferedMessage()) && this.logService != null) {
-            this.logService.save(bufferedLogable);
-        }
-
-    }
-
-    protected Set<T> read(FileBuffer buffer) {
-        Set<T> logs = new HashSet();
-        String bufferedMessage;
-
-        while ((bufferedMessage = buffer.readLine()) != null) {
-            try {
-                T instance = this.logClass.newInstance();
-                instance.bufferedLog(bufferedMessage);
-                logs.add(instance);
-            } catch (InstantiationException var5) {
-                ;
-            } catch (IllegalAccessException var6) {
-                ;
-            }
-        }
-
-        return logs;
-    }
-
-    protected String getFileName() {
-        this.currentLogFile = String.valueOf(System.currentTimeMillis());
-        return this.currentLogFile;
-    }
-
-    public void switchOver() {
-        FileBuffer oldFileBuffer = this.fileBuffer;
-        if (!oldFileBuffer.isEmpty()) {
-            this.fileBuffer = new FileBuffer(this.logPath, this.getFileName());
-            if (this.logService != null) {
-                this.logService.save(this.read(oldFileBuffer));
-            }
-
-            oldFileBuffer.delete();
-        }
-
-    }
-
-    protected void leaveOver() {
-        if (this.logService != null) {
-            File folder = new File(this.logPath);
-            if (folder.isDirectory()) {
-                File[] files = folder.listFiles();
-                if (files != null) {
-                    String fileName = null;
-                    File[] var4 = files;
-                    int var5 = files.length;
-
-                    for (int var6 = 0; var6 < var5; ++var6) {
-                        File file = var4[var6];
-                        fileName = file.getName();
-                        if (!fileName.equals(this.currentLogFile)) {
-                            FileBuffer buffer = new FileBuffer(this.logPath, fileName);
-
-                            try {
-                                this.logService.save(this.read(buffer));
-                            } catch (Exception var13) {
-                                ;
-                            } finally {
-                                buffer.delete();
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-    }
-
-    protected void finalize() throws Throwable {
-        super.finalize();
-        if (this.fileBuffer != null) {
-            this.fileBuffer.close();
-        }
-
-    }
-}

+ 0 - 34
src/main/java/com/uas/ps/product/logging/BufferedLoggerManager.java

@@ -1,34 +0,0 @@
-package com.uas.ps.product.logging;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:41
- */
-public class BufferedLoggerManager {
-    private static Map<String, BufferedLogger> loggers = new HashMap();
-
-    public BufferedLoggerManager() {
-    }
-
-    public static <T extends BufferedLogger<S>, S extends BufferedLogable> T getLogger(Class<T> cls) {
-        String clsName = cls.getName();
-        if (loggers.containsKey(clsName)) {
-            return (T) loggers.get(clsName);
-        } else {
-            try {
-                T instance = cls.newInstance();
-                loggers.put(clsName, instance);
-                return instance;
-            } catch (InstantiationException var3) {
-                ;
-            } catch (IllegalAccessException var4) {
-                ;
-            }
-
-            return null;
-        }
-    }
-}

+ 0 - 12
src/main/java/com/uas/ps/product/logging/LogService.java

@@ -1,12 +0,0 @@
-package com.uas.ps.product.logging;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:37
- */
-public interface LogService<T extends BufferedLogable> {
-
-    void save(T var1);
-
-    void save(Iterable<T> var1);
-}

+ 0 - 65
src/main/java/com/uas/ps/product/logging/UsageBufferedLogger.java

@@ -1,65 +0,0 @@
-package com.uas.ps.product.logging;
-
-import com.uas.ps.product.model.UsageLog;
-import com.uas.ps.product.service.UsageLogService;
-import com.uas.ps.product.util.ContextUtils;
-import com.uas.ps.product.util.PathUtils;
-
-/**
- * 平台的异步日志记录的工具
- *
- * @author sunyj
- * @since 2018/1/9 15:17
- */
-public class UsageBufferedLogger extends BufferedLogger<UsageLog> {
-
-    public UsageBufferedLogger() {
-        super(PathUtils.getFilePath(), UsageLog.class, ContextUtils.getBean(UsageLogService.class));
-    }
-
-    /**
-     * 记录平台使用日志
-     *
-     * @param title   消息标题
-     * @param message 消息
-     */
-    public void log(Long enUU, Long userUU, String ip, String title, String message) {
-        log(new UsageLog(enUU, userUU, ip, title, message, null, null, null));
-    }
-
-    /**
-     * 记录平台密码找回日志
-     *
-     * @param title   消息标题
-     * @param message 消息
-     */
-    public void log(String title, String message, Long userUU, String ip) {
-        log(new UsageLog(title, message, userUU, ip, null, null));
-    }
-
-    /**
-     * 记录平台使用日志
-     *
-     * @param title       消息标题
-     * @param message     消息
-     * @param description 消息详细描述
-     */
-    public void log(Long enUU, Long userUU, String ip, String title, String message, String description) {
-        log(new UsageLog(enUU, userUU, ip, title, message, description, null, null));
-    }
-
-    /**
-     * 记录平台使用日志
-     *
-     * @param title        消息标题
-     * @param message      消息
-     * @param description  消息详细描述
-     * @param relativeCode 相关单据号
-     * @param relativeKey  相关单据主键
-     */
-    public void log(Long enUU, Long userUU, String ip, String title, String message, String description,
-                    String relativeCode, Long relativeKey) {
-        log(new UsageLog(enUU, userUU, ip, title, message, description, relativeCode, relativeKey));
-    }
-
-}

+ 0 - 32
src/main/java/com/uas/ps/product/logging/erp/ErpBufferedLogger.java

@@ -1,32 +0,0 @@
-package com.uas.ps.product.logging.erp;
-
-import com.uas.ps.product.logging.BufferedLogger;
-import com.uas.ps.product.util.ContextUtils;
-import com.uas.ps.product.util.PathUtils;
-
-/**
- * erp交互的异步日志记录的工具
- *
- * @author sunyj
- * @since 2018/1/6 17:30
- */
-public class ErpBufferedLogger extends BufferedLogger<ErpLog> {
-
-    public ErpBufferedLogger() {
-        super(PathUtils.getFilePath(), ErpLog.class, ContextUtils.getBean(ErpLogService.class));
-    }
-
-    /**
-     * 记录erp交互日志
-     *
-     * @param title   消息标题
-     * @param message 消息
-     * @param total   数据量
-     */
-    public void log(Long enUU, Long userUU, String ip, String title, String message, int total) {
-        // 有数据量才记录
-        if (total > 0)
-            log(new ErpLog(enUU, userUU, ip, title, message, total));
-    }
-
-}

+ 0 - 199
src/main/java/com/uas/ps/product/logging/erp/ErpLog.java

@@ -1,199 +0,0 @@
-package com.uas.ps.product.logging.erp;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.uas.ps.core.util.DateFormatUtils;
-import com.uas.ps.product.logging.BufferedLogable;
-import com.uas.ps.product.model.EnterpriseInfo;
-import com.uas.ps.product.model.User;
-
-import javax.persistence.*;
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 与ERP交互的日志
- *
- * @author sunyj
- * @since 2018/1/6 17:31
- */
-@Entity
-@Table(name = "log$erp", indexes = {@Index(name = "log$erp_enuu_idx", columnList = "log_enuu")})
-public class ErpLog extends BufferedLogable implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "log_id")
-    private Long id;
-
-    @OneToOne(cascade = {CascadeType.REFRESH})
-    @JoinColumn(name = "log_enuu", insertable = false, updatable = false)
-    private EnterpriseInfo enterpriseInfo;
-
-    @Column(name = "log_enuu")
-    private Long enUU;
-
-    @OneToOne(cascade = {CascadeType.REFRESH})
-    @JoinColumn(name = "log_useruu", insertable = false, updatable = false)
-    private User user;
-
-    @NotNull
-    @Column(name = "log_useruu")
-    private Long userUU;
-
-    /**
-     * 日志时间
-     */
-    @Column(name = "log_time")
-    private Long time;
-
-    /**
-     * ip
-     */
-    @Column(name = "log_ip")
-    private String ip;
-
-    @Column(name = "log_title")
-    private String title;
-
-    @Column(name = "log_message")
-    private String message;
-
-    /**
-     * 传输的总数据量
-     */
-    @Column(name = "log_total")
-    private Integer total;
-
-    public ErpLog() {
-
-    }
-
-    public ErpLog(Long enUU, Long userUU, String ip, String title, String message, int total) {
-        this.enUU = enUU;
-        this.title = title;
-        this.message = message;
-        this.time = new Date().getTime();
-        this.total = total;
-        this.userUU = userUU;
-        this.ip = ip;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getEnUU() {
-        return enUU;
-    }
-
-    public void setEnUU(Long enUU) {
-        this.enUU = enUU;
-    }
-
-    public Long getUserUU() {
-        return userUU;
-    }
-
-    public void setUserUU(Long userUU) {
-        this.userUU = userUU;
-    }
-
-    public Long getTime() {
-        return time;
-    }
-
-    public void setTime(Long time) {
-        this.time = time;
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public Integer getTotal() {
-        return total;
-    }
-
-    public void setTotal(Integer total) {
-        this.total = total;
-    }
-
-    public User getUser() {
-        return user;
-    }
-
-    public void setUser(User user) {
-        this.user = user;
-    }
-
-    public EnterpriseInfo getEnterpriseInfo() {
-        return enterpriseInfo;
-    }
-
-    public void setEnterpriseInfo(EnterpriseInfo enterpriseInfo) {
-        this.enterpriseInfo = enterpriseInfo;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public String getTimeString() {
-        return DateFormatUtils.DATETIME_FORMAT.format(getTime());
-    }
-
-    public void bufferedLog(String bufferedMessage) {
-        String[] strArray = bufferedMessage.split(separator);
-        if (strArray.length == 7) {
-            this.time = Long.parseLong(strArray[0]);
-            this.ip = strArray[1];
-            this.enUU = Long.parseLong(strArray[2]);
-            this.userUU = Long.parseLong(strArray[3]);
-            this.title = strArray[4];
-            this.message = strArray[5];
-            this.total = Integer.parseInt(strArray[6]);
-        }
-    }
-
-    @Override
-    public String bufferedMessage() {
-        StringBuffer sb = new StringBuffer();
-        sb.append(this.time).append(separator);
-        sb.append(this.ip).append(separator);
-        sb.append(this.enUU).append(separator);
-        sb.append(this.userUU).append(separator);
-        sb.append(this.title).append(separator);
-        sb.append(this.message).append(separator);
-        sb.append(this.total);
-        return sb.toString();
-    }
-
-}

+ 0 - 15
src/main/java/com/uas/ps/product/logging/erp/ErpLogDao.java

@@ -1,15 +0,0 @@
-package com.uas.ps.product.logging.erp;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.stereotype.Repository;
-
-/**
- * @author sunyj
- * @since 2018/1/8 14:37
- */
-
-@Repository
-public interface ErpLogDao extends JpaSpecificationExecutor<ErpLog>, JpaRepository<ErpLog, Long> {
-
-}

+ 0 - 11
src/main/java/com/uas/ps/product/logging/erp/ErpLogService.java

@@ -1,11 +0,0 @@
-package com.uas.ps.product.logging.erp;
-
-
-import com.uas.ps.product.logging.LogService;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:37
- */
-public interface ErpLogService extends LogService<ErpLog> {
-}

+ 0 - 25
src/main/java/com/uas/ps/product/logging/erp/ErpLogServiceImpl.java

@@ -1,25 +0,0 @@
-package com.uas.ps.product.logging.erp;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * @author sunyj
- * @since 2018/1/8 14:35
- */
-@Service
-public class ErpLogServiceImpl implements ErpLogService {
-
-    @Autowired
-    private ErpLogDao erpLogDao;
-
-    @Override
-    public void save(ErpLog log) {
-        erpLogDao.save(log);
-    }
-
-    @Override
-    public void save(Iterable<ErpLog> logs) {
-        erpLogDao.save(logs);
-    }
-}

+ 0 - 194
src/main/java/com/uas/ps/product/model/Attach.java

@@ -1,194 +0,0 @@
-package com.uas.ps.product.model;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @author sunyj
- * @since 2018/1/6 16:53
- */
-@Entity
-@Table(name = "attachs")
-public class Attach implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "at_id")
-    private Long id;
-    /**
-     * 路径
-     */
-    @Column(name = "at_path")
-    private String path;
-    /**
-     * 描述语
-     */
-    @Column(name = "at_description")
-    private String description;
-    /**
-     * 文件名称
-     */
-    @Column(name = "at_name")
-    private String name;
-
-    /**
-     * 文件大小
-     */
-    @Column(name = "at_size")
-    private Long size;
-
-    /**
-     * 关联的表
-     */
-    @Column(name = "rel_table")
-    private String relativeTable;
-
-    /**
-     * 关联的数据主键值
-     */
-    @Column(name = "rel_key")
-    private Long relativeKey;
-
-    /**
-     * 保存时间
-     */
-    @Column(name = "at_date")
-    private Date date;
-
-    @Transient
-    private String sourceId;
-
-    public Attach() {
-    }
-
-    /**
-     * @param fileName    文件名
-     * @param filePath    文件物理路径
-     * @param description 描述
-     * @param size        大小
-     */
-    public Attach(String fileName, String filePath, String description, long size) {
-        this.name = fileName;
-        this.path = filePath;
-        this.description = description;
-        this.size = size;
-    }
-
-    /**
-     * @param fileName
-     * @param filePath
-     * @param description
-     * @param size
-     * @param date
-     */
-    public Attach(String fileName, String filePath, String description, long size, Date date) {
-        this.name = fileName;
-        this.path = filePath;
-        this.description = description;
-        this.size = size;
-        this.date = date;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public Date getDate() {
-        return date;
-    }
-
-    public void setDate(Date date) {
-        this.date = date;
-    }
-
-    //	@JsonIgnore
-    //	@JSONField(serialize = false)
-    public String getPath() {
-        return path;
-    }
-
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Long getSize() {
-        return size;
-    }
-
-    public void setSize(Long size) {
-        this.size = size;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public String getSourceId() {
-        return sourceId;
-    }
-
-    public void setSourceId(String sourceId) {
-        this.sourceId = sourceId;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public String getRelativeTable() {
-        return relativeTable;
-    }
-
-    /**
-     * 不再用这种关联方式,如果一对一直接保存ID,如果一对多采用中间表 @since 2017年03月19日 suntg
-     *
-     * @param relativeTable
-     */
-    @Deprecated
-    public void setRelativeTable(String relativeTable) {
-        this.relativeTable = relativeTable;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public Long getRelativeKey() {
-        return relativeKey;
-    }
-
-    /**
-     * 不再用这种关联方式,如果一对一直接保存ID,如果一对多采用中间表 @since 2017年03月19日 suntg
-     *
-     * @param relativeKey
-     */
-    @Deprecated
-    public void setRelativeKey(Long relativeKey) {
-        this.relativeKey = relativeKey;
-    }
-
-}

+ 0 - 35
src/main/java/com/uas/ps/product/model/Constant.java

@@ -1,35 +0,0 @@
-package com.uas.ps.product.model;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:05
- */
-public class Constant {
-    public static final int PAGEMAX = 40;
-    public static final short YES = 1;
-    public static final short NO = 0;
-    public static final short TOP = 9;
-    public static final String ENV_PRODUCTION = "prod";
-    public static final String ENV_TEST = "test";
-    public static final String SUCCESS = "success";
-    public static final Map<String, String> defaultAddr = new HashMap();
-    public static final String testWeixinAccessToken = "o26W5l6ZoyAyxcyLx5xmU5Ia_hVryiwBpD3-0GALDL31EkXMGc-vEX6yilq8iB1nG_VyaF-Tly4BLrisYW5aoENFgSPXhOKqFsG1jGh94pbLqnsGqzs--Y2vClET0E7cCEGeABAWYA";
-
-    static {
-        defaultAddr.put("type", "1001");
-        defaultAddr.put("receivingName", "B2C平台");
-        defaultAddr.put("area", "广东省,深圳市,南山区");
-        defaultAddr.put("detailAddress", "广东省深圳市南山区英唐大厦");
-        defaultAddr.put("tel", "0755-26994808");
-        defaultAddr.put("email", "yingp@usoftchina.com");
-        defaultAddr.put("useruu", "");
-        defaultAddr.put("enuu", "10030994");
-        defaultAddr.put("num", "1");
-    }
-
-    public Constant() {
-    }
-}

+ 0 - 721
src/main/java/com/uas/ps/product/model/Enterprise.java

@@ -1,721 +0,0 @@
-package com.uas.ps.product.model;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import javax.persistence.*;
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 企业信息
- *
- * @author sunyj
- * @since 2018/1/6 17:01
- */
-@Entity
-@Table(name = "sec$enterprises")
-public class Enterprise implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "en_uu")
-    private Long uu;
-
-    /**
-     * 公司名称
-     */
-    @NotNull
-    @Column(name = "en_name")
-    private String enName;
-
-    /**
-     * 简称
-     */
-    @Column(name = "en_shortname")
-    private String enShortname;
-
-    /**
-     * 公司类型
-     */
-    @Column(name = "en_type")
-    private String enType;
-
-    /**
-     * 企业注册地区
-     */
-    @Column(name = "en_area")
-    private String enArea;
-
-    /**
-     * 状态
-     */
-    @Column(name = "en_status")
-    private Short enStatus;
-
-    /**
-     * 传输到管理平台的状态
-     */
-    @Column(name = "en_sendstatus")
-    private Short enSendStatus;
-
-    /**
-     * 注册地址
-     */
-    @Column(name = "en_address")
-    private String enAddress;
-
-    /**
-     * 默认送货地址
-     */
-    @Column(name = "en_deliveraddr")
-    private String enDeliverAddr;
-
-    /**
-     * 公司电话
-     */
-    @Column(name = "en_tel")
-    private String enTel;
-
-    /**
-     * 传真
-     */
-    @Column(name = "en_fax")
-    private String enFax;
-
-    /**
-     * 公司邮箱
-     */
-    @Column(name = "en_email")
-    private String enEmail;
-
-    /**
-     * 员工人数
-     */
-    @Column(name = "en_emcount")
-    private Integer emcount;
-
-    /**
-     * 开户银行
-     */
-    @Column(name = "en_enbank")
-    private String enbank;
-
-    /**
-     * 公司法人
-     */
-    @Column(name = "en_corporation")
-    private String enCorporation;
-
-    /**
-     * 商业登记证号
-     */
-    @Column(name = "en_businesscode")
-    private String enBussinessCode;
-
-    /**
-     * 营业执照号服务器路径,账户中心同步时同步过来
-     */
-    @Column(name = "en_businesscodeimg")
-    private String businesscodeimg;
-
-    /**
-     * 营业执照图片路径id
-     */
-    @OneToOne(cascade = {CascadeType.ALL})
-    @JoinColumn(name = "en_bussinesscodeattach")
-    private Attach enBussinessCodeAttach;
-
-    /**
-     * 纳税人识别号
-     */
-    @Column(name = "en_taxcode")
-    private String enTaxcode;
-
-    /**
-     * 注册资本
-     */
-    @Column(name = "en_registercapital")
-    private String enRegistercapital;
-
-    /**
-     * 公司主页地址
-     */
-    @Column(name = "en_url")
-    private String enUrl;
-
-    /**
-     * 注册时间
-     */
-    @Column(name = "en_time")
-    private Date enDate;
-
-    /**
-     * 管理员UU号
-     */
-    @Column(name = "en_adminuu")
-    private Long enAdminuu;
-
-    /**
-     * 所属行业
-     */
-    @Column(name = "en_industry")
-    private String enIndustry;
-
-    /**
-     * 优企云服域名
-     */
-    @Column(name = "en_saasurl")
-    private String enSaasUrl;
-
-    /**
-     * 优企云服状态
-     */
-    @Column(name = "en_saasstatus")
-    private Short enSaasStatus;
-
-    /**
-     * 优企云服传输状态
-     */
-    @Column(name = "en_saassendstatus")
-    private Short enSaasSendStatus;
-
-    /**
-     * enIsErp
-     */
-    @Column(name = "en_iserp")
-    private Short enIsErp;
-
-    /**
-     * log路径
-     */
-    @Column(name = "en_logurl")
-    private String logUrl;
-    /**
-     * en_management 经营模式
-     */
-    @Column(name = "en_management")
-    private String enManagement;
-    /**
-     * en_brands 主营品牌(多个用逗号分隔)
-     */
-    @Column(name = "en_brands")
-    private String enBrands;
-    /**
-     * en_products 主营产品
-     */
-    @Column(name = "en_products")
-    private String enProducts;
-    /**
-     * 记录产品的销售状态<br>
-     * 1. 开启<br>
-     * 0. 关闭
-     */
-    @Column(name = "en_prodsale")
-    private Short prodsale;
-    /**
-     * 记录物料的采购状态<br>
-     * 1. 开启<br>
-     * 0. 关闭
-     *
-     * @return
-     */
-    @Column(name = "en_prodpurc")
-    private Short prodpurc;
-    /**
-     * 行业
-     */
-    @Column(name = "en_profession")
-    private String profession;
-    /**
-     * 主营业务
-     */
-    @Column(name = "en_tags")
-    private String tags;
-    /**
-     * 联系人
-     */
-    @Column(name = "en_contactman")
-    private String contactMan;
-    /**
-     * 联系人电话
-     */
-    @Column(name = "en_contacttel")
-    private String contactTel;
-    /**
-     * 联系人邮箱
-     */
-    @Column(name = "en_contactemail")
-    private String contactEmail;
-    /**
-     * en_info 公司简介
-     */
-    @Column(name = "en_info")
-    private String enInfo;
-    /**
-     * 管理员密码
-     */
-    @Column(name = "en_adminpassword")
-    private String enAdminPassword;
-    @Transient
-    private User admin;// 管理员(前台页面显示)
-    @Transient
-    private Long enBussinesscodeImg;// 营业执照号附件id(转化传到管理平台)
-    @Transient
-    private String enAdminName;// 管理员名字(转化传到管理平台)
-    @Transient
-    private String enAdminTel;// 管理员手机号(转化传到管理平台)
-    @Transient
-    private String enAdminEmail;// 管理员邮箱(转化传到管理平台)
-    @Transient
-    private String enAuditRemark;// 审核(从管理平台传过来)
-    /**
-     * 私钥
-     */
-    @Column(name = "en_accesssecret")
-    private String accessSecret;
-    /**
-     * en_masterId 企业对应管理系统ID
-     */
-    @Column(name = "en_masterid")
-    private Long enMasterId;
-    private Short enable;
-
-    public Short getEnIsErp() {
-        return enIsErp;
-    }
-
-    public void setEnIsErp(Short enIsErp) {
-        this.enIsErp = enIsErp;
-    }
-
-    public String getEnManagement() {
-        return enManagement;
-    }
-
-    public void setEnManagement(String enManagement) {
-        this.enManagement = enManagement;
-    }
-
-    public String getEnProducts() {
-        return enProducts;
-    }
-
-    public void setEnProducts(String enProducts) {
-        this.enProducts = enProducts;
-    }
-
-    public String getEnInfo() {
-        return enInfo;
-    }
-
-    public void setEnInfo(String enInfo) {
-        this.enInfo = enInfo;
-    }
-
-    public Long getEnMasterId() {
-        return enMasterId;
-    }
-
-    public void setEnMasterId(Long enMasterId) {
-        this.enMasterId = enMasterId;
-    }
-
-    @JSONField(serialize = false)
-    @JsonIgnore
-    public String getEnAuditRemark() {
-        return enAuditRemark;
-    }
-
-    public void setEnAuditRemark(String enAuditRemark) {
-        this.enAuditRemark = enAuditRemark;
-    }
-
-    public Long getEnAdminuu() {
-        return enAdminuu;
-    }
-
-    public void setEnAdminuu(Long enAdminuu) {
-        this.enAdminuu = enAdminuu;
-    }
-
-    public Long getUu() {
-        return uu;
-    }
-
-    public void setUu(Long uu) {
-        this.uu = uu;
-    }
-
-    public String getEnName() {
-        return enName;
-    }
-
-    public void setEnName(String enName) {
-        this.enName = enName;
-    }
-
-    public String getEnShortname() {
-        return enShortname;
-    }
-
-    public void setEnShortname(String enShortname) {
-        this.enShortname = enShortname;
-    }
-
-    public String getEnType() {
-        return enType;
-    }
-
-    public void setEnType(String enType) {
-        this.enType = enType;
-    }
-
-    public Short getEnStatus() {
-        return enStatus;
-    }
-
-    public void setEnStatus(Short enStatus) {
-        this.enStatus = enStatus;
-    }
-
-    public String getEnAddress() {
-        return enAddress;
-    }
-
-    public void setEnAddress(String enAddress) {
-        this.enAddress = enAddress;
-    }
-
-    public String getEnDeliverAddr() {
-        return enDeliverAddr;
-    }
-
-    public void setEnDeliverAddr(String enDeliverAddr) {
-        this.enDeliverAddr = enDeliverAddr;
-    }
-
-    public String getEnTel() {
-        return enTel;
-    }
-
-    public void setEnTel(String enTel) {
-        this.enTel = enTel;
-    }
-
-    public String getEnFax() {
-        return enFax;
-    }
-
-    public void setEnFax(String enFax) {
-        this.enFax = enFax;
-    }
-
-    public String getEnCorporation() {
-        return enCorporation;
-    }
-
-    public void setEnCorporation(String enCorporation) {
-        this.enCorporation = enCorporation;
-    }
-
-    public String getEnBussinessCode() {
-        return enBussinessCode;
-    }
-
-    public void setEnBussinessCode(String enBussinessCode) {
-        this.enBussinessCode = enBussinessCode;
-    }
-
-    public String getEnBrands() {
-        return enBrands;
-    }
-
-    public void setEnBrands(String enBrands) {
-        this.enBrands = enBrands;
-    }
-
-    public String getEnTaxcode() {
-        return enTaxcode;
-    }
-
-    public void setEnTaxcode(String enTaxcode) {
-        this.enTaxcode = enTaxcode;
-    }
-
-    public String getEnRegistercapital() {
-        return enRegistercapital;
-    }
-
-    public void setEnRegistercapital(String enRegistercapital) {
-        this.enRegistercapital = enRegistercapital;
-    }
-
-    public String getEnUrl() {
-        return enUrl;
-    }
-
-    public void setEnUrl(String enUrl) {
-        this.enUrl = enUrl;
-    }
-
-    public Date getEnDate() {
-        return enDate;
-    }
-
-    public void setEnDate(Date enDate) {
-        this.enDate = enDate;
-    }
-
-    public Short getEnable() {
-        return enable;
-    }
-
-    public void setEnable(Short enable) {
-        this.enable = enable;
-    }
-
-    public String getEnEmail() {
-        return enEmail;
-    }
-
-    public void setEnEmail(String enEmail) {
-        this.enEmail = enEmail;
-    }
-
-    public Attach getEnBussinessCodeAttach() {
-        return enBussinessCodeAttach;
-    }
-
-    public void setEnBussinessCodeAttach(Attach enBussinessCodeAttach) {
-        this.enBussinessCodeAttach = enBussinessCodeAttach;
-    }
-
-    public String getEnAdminTel() {
-        return enAdminTel;
-    }
-
-    public void setEnAdminTel(String enAdminTel) {
-        this.enAdminTel = enAdminTel;
-    }
-
-    public String getEnAdminEmail() {
-        return enAdminEmail;
-    }
-
-    public void setEnAdminEmail(String enAdminEmail) {
-        this.enAdminEmail = enAdminEmail;
-    }
-
-    public Long getEnBussinesscodeImg() {
-        return enBussinesscodeImg;
-    }
-
-    public void setEnBussinesscodeImg(Long enBussinesscodeImg) {
-        this.enBussinesscodeImg = enBussinesscodeImg;
-    }
-
-    public Short getEnSendStatus() {
-        return enSendStatus;
-    }
-
-    public void setEnSendStatus(Short enSendStatus) {
-        this.enSendStatus = enSendStatus;
-    }
-
-    public String getEnArea() {
-        return enArea;
-    }
-
-    public void setEnArea(String enArea) {
-        this.enArea = enArea;
-    }
-
-    public User getAdmin() {
-        return admin;
-    }
-
-    public void setAdmin(User admin) {
-        this.admin = admin;
-    }
-
-    public String getEnAdminName() {
-        return enAdminName;
-    }
-
-    public void setEnAdminName(String enAdminName) {
-        this.enAdminName = enAdminName;
-    }
-
-    public String getEnIndustry() {
-        return enIndustry;
-    }
-
-    public void setEnIndustry(String enIndustry) {
-        this.enIndustry = enIndustry;
-    }
-
-    public String getEnSaasUrl() {
-        return enSaasUrl;
-    }
-
-    public void setEnSaasUrl(String enSaasUrl) {
-        this.enSaasUrl = enSaasUrl;
-    }
-
-    public Short getEnSaasStatus() {
-        return enSaasStatus;
-    }
-
-    public void setEnSaasStatus(Short enSaasStatus) {
-        this.enSaasStatus = enSaasStatus;
-    }
-
-    public Short getEnSaasSendStatus() {
-        return enSaasSendStatus;
-    }
-
-    public void setEnSaasSendStatus(Short enSaasSendStatus) {
-        this.enSaasSendStatus = enSaasSendStatus;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public String getEnAdminPassword() {
-        return enAdminPassword;
-    }
-
-    public void setEnAdminPassword(String enAdminPassword) {
-        this.enAdminPassword = enAdminPassword;
-    }
-
-    public String getAccessSecret() {
-        return accessSecret;
-    }
-
-    public void setAccessSecret(String accessSecret) {
-        this.accessSecret = accessSecret;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public boolean isEnabled() {
-        return this.getEnable() != null && this.getEnable() == Constant.YES;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((uu == null) ? 0 : uu.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        Enterprise other = (Enterprise) obj;
-        if (uu == null) {
-            if (other.uu != null)
-                return false;
-        } else if (!uu.equals(other.uu))
-            return false;
-        return true;
-    }
-
-    public String getLogUrl() {
-        return logUrl;
-    }
-
-    public void setLogUrl(String logUrl) {
-        this.logUrl = logUrl;
-    }
-
-    public Integer getEmcount() {
-        return emcount;
-    }
-
-    public void setEmcount(Integer emcount) {
-        this.emcount = emcount;
-    }
-
-    public String getEnbank() {
-        return enbank;
-    }
-
-    public void setEnbank(String enbank) {
-        this.enbank = enbank;
-    }
-
-    public Short getProdsale() {
-        return prodsale;
-    }
-
-    public void setProdsale(Short prodsale) {
-        this.prodsale = prodsale;
-    }
-
-    public Short getProdpurc() {
-        return prodpurc;
-    }
-
-    public void setProdpurc(Short prodpurc) {
-        this.prodpurc = prodpurc;
-    }
-
-    public String getBusinesscodeimg() {
-        return businesscodeimg;
-    }
-
-    public void setBusinesscodeimg(String businesscodeimg) {
-        this.businesscodeimg = businesscodeimg;
-    }
-
-    public String getProfession() {
-        return profession;
-    }
-
-    public void setProfession(String profession) {
-        this.profession = profession;
-    }
-
-    public String getTags() {
-        return tags;
-    }
-
-    public void setTags(String tags) {
-        this.tags = tags;
-    }
-
-    public String getContactMan() {
-        return contactMan;
-    }
-
-    public void setContactMan(String contactMan) {
-        this.contactMan = contactMan;
-    }
-
-    public String getContactTel() {
-        return contactTel;
-    }
-
-    public void setContactTel(String contactTel) {
-        this.contactTel = contactTel;
-    }
-
-    public String getContactEmail() {
-        return contactEmail;
-    }
-
-    public void setContactEmail(String contactEmail) {
-        this.contactEmail = contactEmail;
-    }
-}

+ 0 - 126
src/main/java/com/uas/ps/product/model/EnterpriseInfo.java

@@ -1,126 +0,0 @@
-package com.uas.ps.product.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-
-/**
- * 企业简洁信息,只含UU号和企业名称
- *
- * @author sunyj
- * @since 2018/1/6 17:33
- */
-@Entity
-@Table(name = "sec$enterprises")
-public class EnterpriseInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @Column(name = "en_uu")
-    private Long uu;
-
-    /**
-     * 公司名称
-     */
-    @NotNull
-    @Column(name = "en_name")
-    private String enName;
-
-    /**
-     * 公司电话
-     */
-    @Column(name = "en_tel")
-    private String enTel;
-
-    /**
-     * 注册地址
-     */
-    @Column(name = "en_address")
-    private String enAddress;
-
-    /**
-     * 营业执照号
-     */
-    @Column(name = "en_businesscode")
-    private String businesscode;
-
-    public EnterpriseInfo(Enterprise enterprise) {
-        this.uu = enterprise.getUu();
-        this.enTel = enterprise.getEnTel();
-        this.enName = enterprise.getEnName();
-        this.enAddress = enterprise.getEnAddress();
-        this.businesscode = enterprise.getEnBussinessCode();
-    }
-
-    public EnterpriseInfo() {
-    }
-
-    public Long getUu() {
-        return uu;
-    }
-
-    public void setUu(Long uu) {
-        this.uu = uu;
-    }
-
-    public String getEnName() {
-        return enName;
-    }
-
-    public void setEnName(String enName) {
-        this.enName = enName;
-    }
-
-    public String getEnTel() {
-        return enTel;
-    }
-
-    public void setEnTel(String enTel) {
-        this.enTel = enTel;
-    }
-
-    public String getEnAddress() {
-        return enAddress;
-    }
-
-    public void setEnAddress(String enAddress) {
-        this.enAddress = enAddress;
-    }
-
-    public String getBusinesscode() {
-        return businesscode;
-    }
-
-    public void setBusinesscode(String businesscode) {
-        this.businesscode = businesscode;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((uu == null) ? 0 : uu.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        EnterpriseInfo other = (EnterpriseInfo) obj;
-        if (uu == null) {
-            if (other.uu != null)
-                return false;
-        } else if (!uu.equals(other.uu))
-            return false;
-        return true;
-    }
-}

+ 0 - 359
src/main/java/com/uas/ps/product/model/Prod.java

@@ -1,359 +0,0 @@
-package com.uas.ps.product.model;
-
-import com.uas.ps.product.dao.EnterpriseDao;
-import com.uas.ps.product.util.ContextUtils;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * ERP系统的产品
- *
- * @author sunyj
- * @since 2018/1/6 16:52
- */
-public class Prod implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long pr_id;// 买方ERP物料ID
-    private String pr_code;
-    private String pr_detail;
-    private String pr_spec;
-    private String pr_unit;
-    private Double pr_zxbzs;
-    private Double pr_zxdhl;
-    private Double pr_leadtime;
-    private Double pr_ltinstock;// 备料提前期,天数
-    private String pr_brand;
-    private String pr_orispeccode;// 原厂型号
-    private String pr_uuid; // 标准料号
-    private String pr_status; // 状态: ‘已审核’->有效;‘已禁用’->失效
-    private Short pr_issale; // 可销售
-    private Short pr_ispurchase; // 可采购
-    private Short pr_isshow; // 开放采购物料
-    private Short pr_ispubsale; // 开发销售物料
-    private Long b2b_id; // 平台id
-    /**
-     * 类目(平台)
-     */
-    private String kind;
-
-    /**
-     * 品牌(平台)
-     */
-    private String pbrand;
-
-    /**
-     * 型号(平台)
-     */
-    private String pcmpcode;
-
-    /**
-     * 类目英文
-     */
-    private String kinden;
-
-    /**
-     * 品牌英文
-     */
-    private String pbranden;
-
-    /**
-     * 是否是标准
-     */
-    private Short standard;
-
-    /**
-     * 所属企业UU
-     */
-    private Long enUU;
-
-    /**
-     * 个人UU
-     */
-    private Long userUU;
-
-    public String getPr_code() {
-        return pr_code;
-    }
-
-    public void setPr_code(String pr_code) {
-        this.pr_code = pr_code;
-    }
-
-    public String getPr_detail() {
-        return pr_detail;
-    }
-
-    public void setPr_detail(String pr_detail) {
-        this.pr_detail = pr_detail;
-    }
-
-    public String getPr_spec() {
-        return pr_spec;
-    }
-
-    public void setPr_spec(String pr_spec) {
-        this.pr_spec = pr_spec;
-    }
-
-    public String getPr_unit() {
-        return pr_unit;
-    }
-
-    public void setPr_unit(String pr_unit) {
-        this.pr_unit = pr_unit;
-    }
-
-    public Double getPr_zxbzs() {
-        return pr_zxbzs;
-    }
-
-    public void setPr_zxbzs(Double pr_zxbzs) {
-        this.pr_zxbzs = pr_zxbzs;
-    }
-
-    public Double getPr_zxdhl() {
-        return pr_zxdhl;
-    }
-
-    public void setPr_zxdhl(Double pr_zxdhl) {
-        this.pr_zxdhl = pr_zxdhl;
-    }
-
-    public Double getPr_leadtime() {
-        return pr_leadtime;
-    }
-
-    public void setPr_leadtime(Double pr_leadtime) {
-        this.pr_leadtime = pr_leadtime;
-    }
-
-    public Double getPr_ltinstock() {
-        return pr_ltinstock;
-    }
-
-    public void setPr_ltinstock(Double pr_ltinstock) {
-        this.pr_ltinstock = pr_ltinstock;
-    }
-
-    public Long getPr_id() {
-        return pr_id;
-    }
-
-    public void setPr_id(Long pr_id) {
-        this.pr_id = pr_id;
-    }
-
-    public String getPr_orispeccode() {
-        return pr_orispeccode;
-    }
-
-    public void setPr_orispeccode(String pr_orispeccode) {
-        this.pr_orispeccode = pr_orispeccode;
-    }
-
-    public String getPr_uuid() {
-        return pr_uuid;
-    }
-
-    public void setPr_uuid(String pr_uuid) {
-        this.pr_uuid = pr_uuid;
-    }
-
-    public String getPr_status() {
-        return pr_status;
-    }
-
-    public void setPr_status(String pr_status) {
-        this.pr_status = pr_status;
-    }
-
-    public Short getPr_issale() {
-        return pr_issale;
-    }
-
-    public void setPr_issale(Short pr_issale) {
-        this.pr_issale = pr_issale;
-    }
-
-    public Short getPr_ispurchase() {
-        return pr_ispurchase;
-    }
-
-    public void setPr_ispurchase(Short pr_ispurchase) {
-        this.pr_ispurchase = pr_ispurchase;
-    }
-
-    public Short getPr_isshow() {
-        return pr_isshow;
-    }
-
-    public void setPr_isshow(Short pr_isshow) {
-        this.pr_isshow = pr_isshow;
-    }
-
-    public Short getPr_ispubsale() {
-        return pr_ispubsale;
-    }
-
-    public void setPr_ispubsale(Short pr_ispubsale) {
-        this.pr_ispubsale = pr_ispubsale;
-    }
-
-    public String getKind() {
-        return kind;
-    }
-
-    public void setKind(String kind) {
-        this.kind = kind;
-    }
-
-    public String getPbrand() {
-        return pbrand;
-    }
-
-    public void setPbrand(String pbrand) {
-        this.pbrand = pbrand;
-    }
-
-    public String getPcmpcode() {
-        return pcmpcode;
-    }
-
-    public void setPcmpcode(String pcmpcode) {
-        this.pcmpcode = pcmpcode;
-    }
-
-    public String getPr_brand() {
-        return pr_brand;
-    }
-
-    public void setPr_brand(String pr_brand) {
-        this.pr_brand = pr_brand;
-    }
-
-    public String getKinden() {
-        return kinden;
-    }
-
-    public void setKinden(String kinden) {
-        this.kinden = kinden;
-    }
-
-    public String getPbranden() {
-        return pbranden;
-    }
-
-    public void setPbranden(String pbranden) {
-        this.pbranden = pbranden;
-    }
-
-    public Short getStandard() {
-        return standard;
-    }
-
-    public void setStandard(Short standard) {
-        this.standard = standard;
-    }
-
-    public Long getB2b_id() {
-        return b2b_id;
-    }
-
-    public void setB2b_id(Long b2b_id) {
-        this.b2b_id = b2b_id;
-    }
-
-    public Long getEnUU() {
-        return enUU;
-    }
-
-    public void setEnUU(Long enUU) {
-        this.enUU = enUU;
-    }
-
-    public Long getUserUU() {
-        return userUU;
-    }
-
-    public void setUserUU(Long userUU) {
-        this.userUU = userUU;
-    }
-
-    /**
-     * 转为平台的产品
-     *
-     * @return
-     */
-    public Product convert() {
-        if (this.enUU == null || this.userUU == null) {
-            throw new IllegalArgumentException("enUU 或 userUU 为空");
-        }
-        Product product = new Product();
-        product.setCode(this.pr_code);
-        product.setEnUU(this.enUU);
-        product.setUserUU(this.userUU);
-        product.setTitle(this.pr_detail);
-        product.setSpec(this.pr_spec);
-        product.setUnit(this.pr_unit);
-        product.setMinPack(this.pr_zxbzs);
-        product.setMinOrder(this.pr_zxdhl);
-        product.setLeadtime(this.pr_leadtime);
-        product.setLtinstock(this.pr_ltinstock);
-        product.setSourceId(this.pr_id);
-        product.setBrand(this.pr_brand);
-        if (this.pr_status != null) {
-            if (this.pr_status.equals(Status.DISABLED.getPhrase())) {
-                product.setB2benabled(Constant.YES);
-            } else {
-                product.setB2benabled(null);
-            }
-
-//			if (this.pr_status.equals(Status.AUDITED.getPhrase())) {
-//				//product.setIsSale((short) 1);
-//			} else if (this.pr_status.equals(Status.DISABLED.getPhrase())) {
-//				//product.setIsSale((short) 0);
-//			}
-        }
-        if (this.pr_orispeccode != null) {
-            product.setCmpCode(this.pr_orispeccode);
-        } else {
-            product.setCmpCode(this.pr_spec);
-        }
-        // if (this.pr_uuid != null) {
-        // // 如果传过来的数据是有UUID,则把原来的信息赋值给标准信息上
-        // product.setStandard(Constant.YES);
-        // product.setPcmpcode(product.getCmpCode());
-        // product.setPbrand(product.getBrand());
-        // product.setKind(product.getTitle());
-        // } else {
-        // product.setStandard(Constant.NO);
-        // }
-        product.setStandard(Constant.NO);// 默认设置为非标准,到平台做匹配更新
-        Enterprise enter = ContextUtils.getBean(EnterpriseDao.class).findOne(this.enUU);
-        // 默认开启关闭状态都是开启
-        product.setIsPurchase(Constant.YES);
-        product.setIsSale(Constant.YES);
-        if (null != enter.getProdpurc() && enter.getProdpurc().equals(Constant.NO)) {
-            product.setIsPurchase(Constant.NO);
-        }
-        if (null != enter.getProdsale() && enter.getProdsale().equals(Constant.NO)) {
-            product.setIsSale(Constant.NO);
-        }
-        // erp上传的数据默认赋值给标准信息
-        product.setPbrand(product.getBrand());
-        product.setPcmpcode(product.getCmpCode());
-        product.setKind(product.getTitle());
-        product.setIsPubsale(this.pr_ispubsale);
-        product.setIsPurchase(this.pr_ispurchase);
-        product.setIsSale(this.pr_issale);
-        product.setIsShow(this.pr_isshow);
-        product.setStandard(this.standard);
-        product.setSourceApp("ERP");
-        product.setErpDate(new Date());
-        return product;
-    }
-
-}

+ 0 - 715
src/main/java/com/uas/ps/product/model/Product.java

@@ -1,715 +0,0 @@
-package com.uas.ps.product.model;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-import java.util.Set;
-
-/**
- * 商品信息
- *
- * @author sunyj
- * @since 2018/1/6 16:52
- */
-@Entity
-@Table(name = "products")
-public class Product implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "pr_id")
-    private Long id;
-
-    /**
-     * 商品信息标题
-     */
-    @Column(name = "pr_title")
-    private String title;
-
-    /**
-     * 产品编号
-     */
-    @Column(name = "pr_code")
-    private String code;
-
-    /**
-     * 产品规格
-     */
-    @Column(name = "pr_spec")
-    private String spec;
-
-    /**
-     * 单位
-     */
-    @Column(name = "pr_unit")
-    private String unit;
-
-    /**
-     * 所属企业UU
-     */
-    @Column(name = "pr_enuu")
-    // TODO @EnterpriseUU
-    private Long enUU;
-
-    /**
-     * 个人UU
-     */
-    @Column(name = "pr_useruu")
-    // TODO @UserUU
-    private Long userUU;
-
-    /**
-     * 最小包装量
-     */
-    @Column(name = "pr_minpack")
-    private Double minPack;
-
-    /**
-     * 最小采购量
-     */
-    @Column(name = "pr_minorder")
-    private Double minOrder;
-
-    /**
-     * 采购提前期
-     */
-    @Column(name = "pr_leadtime")
-    private Double leadtime;
-
-    /**
-     * 备货提前期(天数)
-     */
-    @Column(name = "pr_ltinstock")
-    private Double ltinstock;
-
-    /**
-     * 状态
-     */
-    @Column(name = "pr_status")
-    // TODO @StatusColumn
-    private Integer status;
-
-    /**
-     * 库存数
-     */
-    @Column(name = "pr_stock")
-    private Double stock;
-
-    /**
-     * 价格
-     */
-    @Column(name = "pr_price")
-    private Double price;
-
-    /**
-     * 品牌(ERP)
-     */
-    @Column(name = "pr_brand")
-    private String brand;
-
-    /**
-     * 发货地址
-     */
-    @Column(name = "pr_shipaddr")
-    private String shipAddr;
-
-    /**
-     * 买方ERP物料ID
-     */
-    @Column(name = "pr_sourceid")
-    private Long sourceId;
-
-    /**
-     * 保存erp传入数据的时间
-     *
-     * @return
-     */
-    @Column(name = "pr_erpdate")
-    private Date erpDate;
-
-    /**
-     * 原厂型号(erp)
-     *
-     * @return
-     */
-    @Column(name = "pr_cmpcode")
-    private String cmpCode;
-
-    /**
-     * UUID 标准料号
-     *
-     * @return
-     */
-    @Column(name = "pr_cmpuuid")
-    private String cmpUuId;
-
-    /**
-     * 应用来源<br>
-     * 平台上传的为可以销售的
-     *
-     * @return
-     */
-    @Column(name = "pr_sourceapp")
-    private String sourceApp;
-
-    /**
-     * 是否可卖<br>
-     * 1. 可以卖 <br>
-     * 0. 不可
-     */
-    @Column(name = "pr_issale")
-    private Short isSale;
-
-    /**
-     * 是否可买<br>
-     * 1. 可以买<br>
-     * 0. 不可
-     */
-    @Column(name = "pr_ispurchase")
-    private Short isPurchase;
-
-    /**
-     * 公开展示<br>
-     * <p>
-     * 1. 是<br>
-     * 0. 否
-     */
-    @Column(name = "pr_isshow")
-    private Short isShow;
-
-    /**
-     * 公开销售 <br>
-     * 1. 是<br>
-     * 0. 否
-     */
-    @Column(name = "pr_ispubsale")
-    private Short isPubsale;
-
-    /**
-     * 附件
-     */
-    @OneToOne(cascade = {CascadeType.ALL})
-    @JoinColumn(name = "pr_attachment")
-    private Attach attach;
-
-    /**
-     * 类目(平台)(中文)
-     */
-    @Column(name = "pr_kind")
-    private String kind;
-
-    /**
-     * 品牌(平台)(中文)
-     */
-    @Column(name = "pr_pbrand")
-    private String pbrand;
-
-    /**
-     * 型号(平台)
-     */
-    @Column(name = "pr_pcmpcode")
-    private String pcmpcode;
-
-    /**
-     * 信息提示(导入物料时给出提示)
-     */
-    @Column(name = "pr_message")
-    private String message;
-
-    /**
-     * 是否是标准物料<br>
-     * 1.YES<br>
-     * 0.NO
-     */
-    @Column(name = "pr_standard")
-    private Short standard;
-
-    /**
-     * 类目(平台)(英文)
-     */
-    @Column(name = "pr_kinden")
-    private String kinden;
-
-    /**
-     * 品牌(平台)(英文)
-     */
-    @Column(name = "pr_pbranden")
-    private String pbranden;
-
-    /**
-     * 匹配状态(记录匹配状态,方便下次查看)
-     */
-    @Column(name = "pr_matchstatus")
-    private Integer matchstatus;
-
-    /**
-     * 匹配数量(用作排序)
-     */
-    @Column(name = "pr_matchsize")
-    private Integer matchsize;
-
-    /**
-     * 匹配结果
-     */
-    @OneToMany(mappedBy = "product", cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
-    private Set<ProductMatchResult> matchresults;
-
-    /**
-     * 下载状态,平台更新ERP的数据后,将数据回传回ERP更新
-     */
-    @Column(name = "pr_downloadstatus")
-    private Integer downloadstatus;
-
-    /**
-     * 是否有业务逻辑关系<br>
-     * 1. 是<br>
-     * 0. 否
-     */
-    @Column(name = "pr_isbusiness")
-    private Short isbusiness;
-
-    /**
-     * 图片
-     */
-    @Column(name = "pr_cmpimg")
-    private String img;
-
-    /**
-     * 包装
-     */
-    @Column(name = "pr_encapsulation")
-    private String encapsulation;
-
-    /**
-     * b2c可用状态;<br>
-     * 1 为不存在相同的记录。<br>
-     * 0 为已经存在相同的记录
-     */
-    @Column(name = "pr_b2cenabled")
-    private Short b2cenabled;
-
-    /**
-     * uas与b2b可用状态;<br>
-     * 1 已禁用 <br>
-     * 0 可用状态,未禁用
-     */
-    @Column(name = "pr_b2benabled")
-    private Short b2benabled;
-
-    /**
-     * 匹配成标准的日期
-     */
-    @Column(name = "pr_tostandard")
-    private Date tostandard;
-
-    /**
-     * 编码版本号
-     */
-    @Column(name = "pr_goodsnover")
-    private String goodsnover;
-
-    /**
-     * 税收分类编码
-     */
-    @Column(name = "pr_goodstaxno")
-    private String goodstaxno;
-
-    /**
-     * 是否享受优惠政策
-     */
-    @Column(name = "pr_taxpre")
-    private String taxpre;
-
-    /**
-     * 享受优惠政策内容
-     */
-    @Column(name = "pr_taxprecon")
-    private String taxprecon;
-
-
-    public Product() {
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getSpec() {
-        return spec;
-    }
-
-    public void setSpec(String spec) {
-        this.spec = spec;
-    }
-
-    public String getUnit() {
-        return unit;
-    }
-
-    public void setUnit(String unit) {
-        this.unit = unit;
-    }
-
-    public Long getEnUU() {
-        return enUU;
-    }
-
-    public void setEnUU(Long enUU) {
-        this.enUU = enUU;
-    }
-
-    public Long getUserUU() {
-        return userUU;
-    }
-
-    public void setUserUU(Long userUU) {
-        this.userUU = userUU;
-    }
-
-    public Double getMinPack() {
-        return minPack;
-    }
-
-    public void setMinPack(Double minPack) {
-        this.minPack = minPack;
-    }
-
-    public Double getMinOrder() {
-        return minOrder;
-    }
-
-    public void setMinOrder(Double minOrder) {
-        this.minOrder = minOrder;
-    }
-
-    public Double getLeadtime() {
-        return leadtime;
-    }
-
-    public void setLeadtime(Double leadtime) {
-        this.leadtime = leadtime;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public Double getStock() {
-        return stock;
-    }
-
-    public void setStock(Double stock) {
-        this.stock = stock;
-    }
-
-    public Double getPrice() {
-        return price;
-    }
-
-    public void setPrice(Double price) {
-        this.price = price;
-    }
-
-    public String getBrand() {
-        return brand;
-    }
-
-    public void setBrand(String brand) {
-        this.brand = brand;
-    }
-
-    public String getShipAddr() {
-        return shipAddr;
-    }
-
-    public void setShipAddr(String shipAddr) {
-        this.shipAddr = shipAddr;
-    }
-
-    public Double getLtinstock() {
-        return ltinstock;
-    }
-
-    public void setLtinstock(Double ltinstock) {
-        this.ltinstock = ltinstock;
-    }
-
-    public Long getSourceId() {
-        return sourceId;
-    }
-
-    public void setSourceId(Long sourceId) {
-        this.sourceId = sourceId;
-    }
-
-    public Date getErpDate() {
-        return erpDate;
-    }
-
-    public void setErpDate(Date erpDate) {
-        this.erpDate = erpDate;
-    }
-
-    public String getCmpCode() {
-        return cmpCode;
-    }
-
-    public void setCmpCode(String cmpCode) {
-        this.cmpCode = cmpCode;
-    }
-
-    public String getCmpUuId() {
-        return cmpUuId;
-    }
-
-    public void setCmpUuId(String cmpUuId) {
-        this.cmpUuId = cmpUuId;
-    }
-
-    @Override
-    public String toString() {
-        return "编号:" + getCode() + ",标题:" + getTitle() + ",规格型号:" + getSpec();
-    }
-
-    public String getSourceApp() {
-        return sourceApp;
-    }
-
-    public void setSourceApp(String sourceApp) {
-        this.sourceApp = sourceApp;
-    }
-
-    public Attach getAttach() {
-        return attach;
-    }
-
-    public void setAttach(Attach attach) {
-        this.attach = attach;
-    }
-
-    public Short getIsSale() {
-        return isSale;
-    }
-
-    public void setIsSale(Short isSale) {
-        this.isSale = isSale;
-    }
-
-    public Short getIsPurchase() {
-        return isPurchase;
-    }
-
-    public void setIsPurchase(Short isPurchase) {
-        this.isPurchase = isPurchase;
-    }
-
-    public Short getIsShow() {
-        return isShow;
-    }
-
-    public void setIsShow(Short isShow) {
-        this.isShow = isShow;
-    }
-
-    public Short getIsPubsale() {
-        return isPubsale;
-    }
-
-    public void setIsPubsale(Short isPubsale) {
-        this.isPubsale = isPubsale;
-    }
-
-    public String getKind() {
-        return kind;
-    }
-
-    public void setKind(String kind) {
-        this.kind = kind;
-    }
-
-    public String getPbrand() {
-        return pbrand;
-    }
-
-    public void setPbrand(String pbrand) {
-        this.pbrand = pbrand;
-    }
-
-    public String getPcmpcode() {
-        return pcmpcode;
-    }
-
-    public void setPcmpcode(String pcmpcode) {
-        this.pcmpcode = pcmpcode;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public Short getStandard() {
-        return standard;
-    }
-
-    public void setStandard(Short standard) {
-        this.standard = standard;
-    }
-
-    public String getKinden() {
-        return kinden;
-    }
-
-    public void setKinden(String kinden) {
-        this.kinden = kinden;
-    }
-
-    public String getPbranden() {
-        return pbranden;
-    }
-
-    public void setPbranden(String pbranden) {
-        this.pbranden = pbranden;
-    }
-
-    public Integer getMatchstatus() {
-        return matchstatus;
-    }
-
-    public void setMatchstatus(Integer matchstatus) {
-        this.matchstatus = matchstatus;
-    }
-
-    public Integer getMatchsize() {
-        return matchsize;
-    }
-
-    public void setMatchsize(Integer matchsize) {
-        this.matchsize = matchsize;
-    }
-
-    public Set<ProductMatchResult> getMatchresults() {
-        return matchresults;
-    }
-
-    public void setMatchresults(Set<ProductMatchResult> matchresults) {
-        this.matchresults = matchresults;
-    }
-
-    public Integer getDownloadstatus() {
-        return downloadstatus;
-    }
-
-    public void setDownloadstatus(Integer downloadstatus) {
-        this.downloadstatus = downloadstatus;
-    }
-
-    public Short getIsbusiness() {
-        return isbusiness;
-    }
-
-    public void setIsbusiness(Short isbusiness) {
-        this.isbusiness = isbusiness;
-    }
-
-    public String getImg() {
-        return img;
-    }
-
-    public void setImg(String img) {
-        this.img = img;
-    }
-
-    public String getEncapsulation() {
-        return encapsulation;
-    }
-
-    public void setEncapsulation(String encapsulation) {
-        this.encapsulation = encapsulation;
-    }
-
-    public Short getB2cenabled() {
-        return b2cenabled;
-    }
-
-    public void setB2cenabled(Short b2cenabled) {
-        this.b2cenabled = b2cenabled;
-    }
-
-    public Short getB2benabled() {
-        return b2benabled;
-    }
-
-    public void setB2benabled(Short b2benabled) {
-        this.b2benabled = b2benabled;
-    }
-
-    public Date getTostandard() {
-        return tostandard;
-    }
-
-    public void setTostandard(Date tostandard) {
-        this.tostandard = tostandard;
-    }
-
-    public String getGoodsnover() {
-        return goodsnover;
-    }
-
-    public void setGoodsnover(String goodsnover) {
-        this.goodsnover = goodsnover;
-    }
-
-    public String getGoodstaxno() {
-        return goodstaxno;
-    }
-
-    public void setGoodstaxno(String goodstaxno) {
-        this.goodstaxno = goodstaxno;
-    }
-
-    public String getTaxpre() {
-        return taxpre;
-    }
-
-    public void setTaxpre(String taxpre) {
-        this.taxpre = taxpre;
-    }
-
-    public String getTaxprecon() {
-        return taxprecon;
-    }
-
-    public void setTaxprecon(String taxprecon) {
-        this.taxprecon = taxprecon;
-    }
-}

+ 0 - 245
src/main/java/com/uas/ps/product/model/ProductMatchResult.java

@@ -1,245 +0,0 @@
-package com.uas.ps.product.model;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-/**
- * @author sunyj
- * @since 2018/1/6 16:55
- */
-@Entity
-@Table(name = "productmatchresults")
-public class ProductMatchResult implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "pr_id")
-    private Long id;
-
-    /**
-     * 产品id
-     */
-    @Column(name = "pr_prid")
-    private Long prid;
-
-    /**
-     * 产品
-     */
-    @ManyToOne(cascade = {CascadeType.REFRESH})
-    @JoinColumn(name = "pr_prid", insertable = false, updatable = false)
-    private Product product;
-
-    /**
-     * 序号
-     */
-    @Column(name = "pr_number")
-    private Short number;
-
-    /**
-     * 品牌id
-     */
-    @Column(name = "pr_brid")
-    private Long brid;
-
-    /**
-     * 品牌英文
-     */
-    @Column(name = "pr_branden")
-    private String branden;
-
-    /**
-     * 品牌中文
-     */
-    @Column(name = "pr_brandcn")
-    private String brandcn;
-
-    /**
-     * 类目id
-     */
-    @Column(name = "pr_kindid")
-    private Long kindid;
-
-    /**
-     * 类目英文
-     */
-    @Column(name = "pr_kinden")
-    private String kinden;
-
-    /**
-     * 类目中文
-     */
-    @Column(name = "pr_kindcn")
-    private String kindcn;
-
-    /**
-     * uuid
-     */
-    @Column(name = "pr_uuid")
-    private String uuid;
-
-    /**
-     * 器件id
-     */
-    @Column(name = "pr_cmpid")
-    private Long cmpid;
-
-    /**
-     * 原厂型号
-     */
-    @Column(name = "pr_cmpcode")
-    private String cmpcode;
-
-    /**
-     * 企业uu
-     */
-    @Column(name = "pr_enuu")
-    private Long enuu;
-
-    /**
-     * 图片
-     */
-    @Column(name = "pr_cmpimg")
-    private String img;
-
-    /**
-     * 包装
-     */
-    @Column(name = "pr_encapsulation")
-    private String encapsulation;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getPrid() {
-        return prid;
-    }
-
-    public void setPrid(Long prid) {
-        this.prid = prid;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public Product getProduct() {
-        return product;
-    }
-
-    public void setProduct(Product product) {
-        this.product = product;
-    }
-
-    public Short getNumber() {
-        return number;
-    }
-
-    public void setNumber(Short number) {
-        this.number = number;
-    }
-
-    public String getBranden() {
-        return branden;
-    }
-
-    public void setBranden(String branden) {
-        this.branden = branden;
-    }
-
-    public String getBrandcn() {
-        return brandcn;
-    }
-
-    public void setBrandcn(String brandcn) {
-        this.brandcn = brandcn;
-    }
-
-    public String getKinden() {
-        return kinden;
-    }
-
-    public void setKinden(String kinden) {
-        this.kinden = kinden;
-    }
-
-    public String getKindcn() {
-        return kindcn;
-    }
-
-    public void setKindcn(String kindcn) {
-        this.kindcn = kindcn;
-    }
-
-    public String getUuid() {
-        return uuid;
-    }
-
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-
-    public String getCmpcode() {
-        return cmpcode;
-    }
-
-    public void setCmpcode(String cmpcode) {
-        this.cmpcode = cmpcode;
-    }
-
-    public Long getBrid() {
-        return brid;
-    }
-
-    public void setBrid(Long brid) {
-        this.brid = brid;
-    }
-
-    public Long getKindid() {
-        return kindid;
-    }
-
-    public void setKindid(Long kindid) {
-        this.kindid = kindid;
-    }
-
-    public Long getCmpid() {
-        return cmpid;
-    }
-
-    public void setCmpid(Long cmpid) {
-        this.cmpid = cmpid;
-    }
-
-    public Long getEnuu() {
-        return enuu;
-    }
-
-    public void setEnuu(Long enuu) {
-        this.enuu = enuu;
-    }
-
-    public String getImg() {
-        return img;
-    }
-
-    public void setImg(String img) {
-        this.img = img;
-    }
-
-    public String getEncapsulation() {
-        return encapsulation;
-    }
-
-    public void setEncapsulation(String encapsulation) {
-        this.encapsulation = encapsulation;
-    }
-
-}

+ 0 - 92
src/main/java/com/uas/ps/product/model/ProductStoreStatus.java

@@ -1,92 +0,0 @@
-package com.uas.ps.product.model;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 产品物料存储状态<br>
- * 如果一家企业有人操作单据,其他人不允许操作
- *
- * @author sunyj
- * @since 2018/1/9 15:14
- */
-@Entity
-@Table(name = "product$storestaus")
-public class ProductStoreStatus implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "pr_id")
-    private Long id;
-
-    /**
-     * 操作企业uu
-     */
-    @Column(name = "pr_enuu")
-    private Long enuu;
-
-    /**
-     * 操作人uu
-     */
-    @Column(name = "pr_useruu")
-    private Long useruu;
-
-    /**
-     * 操作时间
-     */
-    @Column(name = "pr_date")
-    private Date date;
-
-    /**
-     * 操作状态<br>
-     * RUNNING 351 运行中<br>
-     * FINISH 111 已结束
-     */
-    @Column(name = "pr_status")
-    private Integer status;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getEnuu() {
-        return enuu;
-    }
-
-    public void setEnuu(Long enuu) {
-        this.enuu = enuu;
-    }
-
-    public Long getUseruu() {
-        return useruu;
-    }
-
-    public void setUseruu(Long useruu) {
-        this.useruu = useruu;
-    }
-
-    public Date getDate() {
-        return date;
-    }
-
-    public void setDate(Date date) {
-        this.date = date;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-}

+ 0 - 98
src/main/java/com/uas/ps/product/model/ProductUsers.java

@@ -1,98 +0,0 @@
-package com.uas.ps.product.model;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 个人物料
- *
- * @author sunyj
- * @since 2018/1/9 17:13
- */
-@Entity
-@Table(name = "product$users", indexes = {@Index(name = "product$users_useruu_prid", columnList = "pu_useruu,pu_prid", unique = true)})
-public class ProductUsers implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "pu_id")
-    private Long id;
-
-    @Column(name = "pu_useruu")
-    private Long userUU;
-
-    @JoinColumn(name = "pu_useruu", insertable = false, updatable = false)
-    private User user;
-
-    @Column(name = "pu_prid")
-    private Long productId;
-
-    @JoinColumn(name = "pu_prid", insertable = false, updatable = false)
-    private Product product;
-
-    @Column(name = "pu_date")
-    private Date date;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getUserUU() {
-        return userUU;
-    }
-
-    public void setUserUU(Long userUU) {
-        this.userUU = userUU;
-    }
-
-    public User getUser() {
-        return user;
-    }
-
-    public void setUser(User user) {
-        this.user = user;
-    }
-
-    public Long getProductId() {
-        return productId;
-    }
-
-    public void setProductId(Long productId) {
-        this.productId = productId;
-    }
-
-    public Product getProduct() {
-        return product;
-    }
-
-    public void setProduct(Product product) {
-        this.product = product;
-    }
-
-    public Date getDate() {
-        return date;
-    }
-
-    public void setDate(Date date) {
-        this.date = date;
-    }
-
-    @Override
-    public String toString() {
-        return "ProductUsers{" +
-                "id=" + id +
-                ", userUU=" + userUU +
-                ", user=" + user +
-                ", productId=" + productId +
-                ", product=" + product +
-                ", date=" + date +
-                '}';
-    }
-}

+ 0 - 84
src/main/java/com/uas/ps/product/model/ResourceItem.java

@@ -1,84 +0,0 @@
-package com.uas.ps.product.model;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-/**
- * 系统可请求资源
- *
- * @author sunyj
- * @since 2018/1/6 17:04
- */
-@Table(name = "sec$resourceitems")
-@Entity
-public class ResourceItem implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "item_id")
-    private Long id;
-
-    /**
-     * 资源名称
-     */
-    @Column(name = "item_name")
-    private String name;
-    /**
-     * 资源类型GET、POST、PUT、DELETE等
-     */
-    @Column(name = "item_method")
-    private String method;
-    /**
-     * 资源请求URL链接
-     */
-    @Column(name = "item_url")
-    private String url;
-    /**
-     * 对资源的具体操作对象及行为的描述
-     */
-    @Column(name = "item_desc")
-    private String desc;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getMethod() {
-        return method == null ? "" : method;
-    }
-
-    public void setMethod(String method) {
-        this.method = method;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-}

+ 0 - 195
src/main/java/com/uas/ps/product/model/Role.java

@@ -1,195 +0,0 @@
-package com.uas.ps.product.model;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import org.hibernate.annotations.Cache;
-import org.hibernate.annotations.CacheConcurrencyStrategy;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Set;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:04
- */
-@Entity
-@Table(name = "sec$roles", indexes = {@Index(name = "sec$roles_enuu_name", columnList = "role_enuu,role_name", unique = true),
-        @Index(name = "sec$roles_enuu_desc", columnList = "role_enuu,role_desc", unique = true)})
-public class Role implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "role_id")
-    private Long id;
-
-    /**
-     * 角色名称
-     */
-    @Column(name = "role_name")
-    private String name;
-
-    /**
-     * 角色是否属于超级用户组
-     */
-    @Column(name = "issys")
-    private Short issys;
-
-    /**
-     * 角色是否系统默认创建
-     */
-    @Column(name = "isdefault")
-    private Short isdefault;
-
-    /**
-     * 角色详细描述
-     */
-    @Column(name = "role_desc")
-    private String desc;
-
-    /**
-     * 角色拥有的权限
-     */
-    @ManyToMany(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
-    @JoinTable(name = "sec$roleresource", joinColumns = @JoinColumn(name = "role_id", referencedColumnName = "role_id"), inverseJoinColumns = @JoinColumn(name = "res_id", referencedColumnName = "item_id"))
-    @OrderBy("id")
-    @Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
-    private Set<ResourceItem> resourceItems;
-
-    /**
-     * 所属企业UU
-     */
-    @Column(name = "role_enuu")
-    private Long enUU;
-
-    /**
-     * 职责
-     */
-    @Column(name = "role_duty")
-    private String duty;
-
-    /**
-     * 下标,用于排序
-     */
-    @Column(name = "role_index")
-    private Long index;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-    public Short getIssys() {
-        return issys;
-    }
-
-    public void setIssys(Short issys) {
-        this.issys = issys;
-    }
-
-    public Set<ResourceItem> getResourceItems() {
-        return resourceItems;
-    }
-
-    public void setResourceItems(Set<ResourceItem> resourceItems) {
-        this.resourceItems = resourceItems;
-    }
-
-    public Long getEnUU() {
-        return enUU;
-    }
-
-    public void setEnUU(Long enUU) {
-        this.enUU = enUU;
-    }
-
-    public Short getIsdefault() {
-        return isdefault;
-    }
-
-    public void setIsdefault(Short isdefault) {
-        this.isdefault = isdefault;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public boolean isSys() {
-        return getIssys() != null && getIssys() == Constant.YES;
-    }
-
-    public String getDuty() {
-        return duty;
-    }
-
-    public void setDuty(String duty) {
-        this.duty = duty;
-    }
-
-    public Long getIndex() {
-        return index;
-    }
-
-    public void setIndex(Long index) {
-        this.index = index;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((id == null) ? 0 : id.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        Role other = (Role) obj;
-        if (id == null) {
-            if (other.id != null)
-                return false;
-        } else if (!id.equals(other.id))
-            return false;
-        return true;
-    }
-
-    @Override
-    public String toString() {
-        return "Role{" +
-                "id=" + id +
-                ", name='" + name + '\'' +
-                ", issys=" + issys +
-                ", isdefault=" + isdefault +
-                ", desc='" + desc + '\'' +
-                ", resourceItems=" + resourceItems +
-                ", enUU=" + enUU +
-                ", duty='" + duty + '\'' +
-                '}';
-    }
-}

+ 0 - 130
src/main/java/com/uas/ps/product/model/Status.java

@@ -1,130 +0,0 @@
-package com.uas.ps.product.model;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:16
- */
-public enum Status {
-    INPUTTING(100, "在录入"),
-    SUBMITTED(101, "已提交"),
-    AUDITED(102, "已审核"),
-    NOTALLOW(103, "未通过"),
-    ALLOW(104, "已通过"),
-    FINISH(111, "已结束"),
-    DELETED(112, "已删除"),
-    NOT_REPLY(200, "未回复"),
-    REPLIED(201, "已回复"),
-    NOT_UPLOAD(202, "待上传"),
-    DOWNLOADED(203, "已下载"),
-    NOT_READ(210, "未阅读"),
-    READ(211, "已阅读"),
-    AGREED(221, "已同意"),
-    NOTAGREED(222, "不同意"),
-    UNAPPLY(310, "未启用"),
-    UNAUDIT(311, "申请中"),
-    UNACT(312, "未激活"),
-    ENABLED(313, "已激活"),
-    DISABLED(314, "已禁用"),
-    CANCELLED(315, "已注销"),
-    CREATED(317, "已开账"),
-    PENDING(350, "未完成"),
-    RUNNING(351, "运行中"),
-    SEND(400, "已发货"),
-    UNSEND(401, "未发货"),
-    PART_SEND(402, "部分发货"),
-    SHIPPINGIN(403, "出货中"),
-    INBOUND(404, "待收货"),
-    RECEIVED(405, "已收货"),
-    TOBESHIPPED(406, "待出货"),
-    SHIPPED(407, "已出货"),
-    SENDING(408, "发货中"),
-    TOBESHIPPEDBACK(409, "待回寄"),
-    INSPECTING(410, "验货中"),
-    INSPECTED(411, "已验货"),
-    WAITSELLERCOMFIRM(412, "等待卖家同意"),
-    ORDERTAKE(413, "卖家接单"),
-    TOBECONFIRMED(501, "待确认"),
-    CONFIRMED(502, "已确认"),
-    TOBEPAID(503, "待付款"),
-    PAID(504, "已付款"),
-    MONEYRECEIVED(505, "已收款"),
-    TORECEIVEMONEY(506, "待收款"),
-    TOBEREFUNDED(507, "待退款"),
-    REFUNDED(508, "已退款"),
-    RETURNINGGOODS(509, "退货中"),
-    RETURN(521, "退货"),
-    EXCHANGEGOODS(510, "换货中"),
-    INAFTERSALES(511, "售后处理中"),
-    TOBEMADEOUTANINVOICE(512, "待开发票"),
-    MADEOUTANINVOICE(513, "已开发票"),
-    NOTSETTLED(514, "待结算"),
-    SETTLED(515, "已结算"),
-    CHECKDEADLINE(516, "已到结算期"),
-    NOCHECKDEADLINE(517, "未到结算期"),
-    PROOFED(518, "已送样"),
-    COMPLETED(520, "已完成"),
-    TO_BE_REVIEWED(521, "待评论"),
-    REVIEWED(522, "已评论"),
-    AVAILABLE(601, "有效地"),
-    UNAVAILABLE(602, "无效的(因库存不足而失效)"),
-    UNAVAILABLE_NOPAID(603, "无效的(因未按时付款)"),
-    UNAVAILABLE_DISAGREE(604, "无效的(因供应商拒绝)"),
-    UNAVAILABLE_RETURN(605, "无效的(因全部退货完成的)"),
-    UNAVAILABLE_PERSONAL(606, "无效的(因用户本人取消而失效)"),
-    CHARGE_APPLY(607, "申请议价中"),
-    CHARGE_ACCEPT(608, "议价结束(同意)"),
-    CHARGE_REFUSE(609, "议价结束(不同意)"),
-    COMFIRM_DISAGREE(610, " 确认状态取消(供应商拒绝取消)"),
-    PAIDED_DISAGREE(611, "已付款状态取消(供应商拒绝取消)"),
-    REMOVED(612, "已下架"),
-    PREPARE_BILL(699, "准备发票"),
-    TOBEMAKE_BILL(700, "待开发票"),
-    TOBERECEIVE_BILL(701, "待收发票"),
-    RECEIVED_BILL(702, "已收发票"),
-    NEEDNO_BILL(703, "不需开票"),
-    TOCONFIRM_BILL(704, "存在待收票的订单"),
-    OPENED_RECEIVED_BILL(705, "已开票的全部收票"),
-    TOBE_HANDLE(810, "未处理"),
-    HANDLED(811, "已处理"),
-    TO_CROWL(812, "未完成"),
-    CROWLED(813, "已完成"),
-    CROWLED_FAILED(814, "任务失败");
-
-    private final int value;
-    private final String phrase;
-
-    private Status(int value, String phrase) {
-        this.value = value;
-        this.phrase = phrase;
-    }
-
-    public static Status valueOf(int statusCode) {
-        Status[] var1 = values();
-        int var2 = var1.length;
-
-        for (int var3 = 0; var3 < var2; ++var3) {
-            Status status = var1[var3];
-            if (status.value == statusCode) {
-                return status;
-            }
-        }
-
-        throw new IllegalArgumentException("没有与编号 [" + statusCode + "]匹配的状态");
-    }
-
-    public static boolean isUnavailable(Integer status) {
-        return UNAVAILABLE.value() == status.intValue() || UNAVAILABLE_DISAGREE.value() == status.intValue() || UNAVAILABLE_NOPAID.value() == status.intValue() || UNAVAILABLE_PERSONAL.value() == status.intValue() || UNAVAILABLE_RETURN.value() == status.intValue() || RETURN.value() == status.intValue();
-    }
-
-    public int value() {
-        return this.value;
-    }
-
-    public String getPhrase() {
-        return this.phrase;
-    }
-
-    public String toString() {
-        return Integer.toString(this.value);
-    }
-}

+ 0 - 232
src/main/java/com/uas/ps/product/model/UsageLog.java

@@ -1,232 +0,0 @@
-package com.uas.ps.product.model;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.uas.ps.core.util.DateFormatUtils;
-import com.uas.ps.product.logging.BufferedLogable;
-import org.springframework.util.StringUtils;
-
-import javax.persistence.*;
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 平台使用日志
- *
- * @author sunyj
- * @since 2018/1/9 15:19
- */
-@Entity
-@Table(name = "log$usage", indexes = {
-        @Index(name = "log$usage_enuu_idx", columnList = "log_enuu")})
-public class UsageLog extends BufferedLogable implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "log_id")
-    private Long id;
-
-    @Column(name = "log_enuu")
-    private Long enUU;
-
-    @OneToOne(cascade = {CascadeType.REFRESH})
-    @JoinColumn(name = "log_useruu", insertable = false, updatable = false)
-    private UserBaseInfo user;
-
-    @NotNull
-    @Column(name = "log_useruu")
-    private Long userUU;
-
-    /**
-     * 日志时间
-     */
-    @Column(name = "log_time")
-    private Long time;
-
-    /**
-     * ip
-     */
-    @Column(name = "log_ip")
-    private String ip;
-
-    @Column(name = "log_title")
-    private String title;
-
-    @Column(name = "log_message")
-    private String message;
-
-    @Column(name = "log_detail", length = 1000)
-    private String detail;
-
-    /**
-     * 相关单据号
-     */
-    @Column(name = "rel_code")
-    private String code;
-
-    /**
-     * 相关单据主键
-     */
-    @Column(name = "rel_key")
-    private Long key;
-
-    public UsageLog() {
-
-    }
-
-    public UsageLog(Long enUU, Long userUU, String ip, String title, String message, String detail, String code,
-                    Long key) {
-        this.enUU = enUU;
-        this.title = title;
-        this.message = message;
-        this.detail = detail;
-        this.code = code;
-        this.key = key;
-        this.time = new Date().getTime();
-        this.userUU = userUU;
-        this.ip = ip;
-    }
-
-    public UsageLog(String title, String message, Long userUU, String ip,
-                    String code, Long key) {
-        this.enUU = 0L;
-        this.title = title;
-        this.message = message;
-        this.code = code;
-        this.key = key;
-        this.time = new Date().getTime();
-        this.userUU = userUU;
-        this.ip = ip;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getEnUU() {
-        return enUU;
-    }
-
-    public void setEnUU(Long enUU) {
-        this.enUU = enUU;
-    }
-
-    public Long getUserUU() {
-        return userUU;
-    }
-
-    public void setUserUU(Long userUU) {
-        this.userUU = userUU;
-    }
-
-    public Long getTime() {
-        return time;
-    }
-
-    public void setTime(Long time) {
-        this.time = time;
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public String getDetail() {
-        return detail;
-    }
-
-    public void setDetail(String detail) {
-        this.detail = detail;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public Long getKey() {
-        return key;
-    }
-
-    public void setKey(Long key) {
-        this.key = key;
-    }
-
-    public UserBaseInfo getUser() {
-        return user;
-    }
-
-    public void setUser(UserBaseInfo user) {
-        this.user = user;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public String getTimeString() {
-        return DateFormatUtils.DATETIME_FORMAT.format(getTime());
-    }
-
-    public void bufferedLog(String bufferedMessage) {
-        String[] strArray = bufferedMessage.split(separator);
-        if (strArray.length == 9) {
-            this.time = Long.parseLong(strArray[0]);
-            this.ip = strArray[1];
-            this.enUU = Long.parseLong(strArray[2]);
-            this.userUU = Long.parseLong(strArray[3]);
-            this.title = strArray[4];
-            this.message = strArray[5];
-            this.detail = StringUtils.hasText(strArray[6]) ? strArray[6] : null;
-            this.code = StringUtils.hasText(strArray[7]) ? strArray[7] : null;
-            this.key = StringUtils.hasText(strArray[8]) ? Long
-                    .parseLong(strArray[8]) : null;
-        }
-    }
-
-    @Override
-    public String bufferedMessage() {
-        StringBuffer sb = new StringBuffer();
-        sb.append(this.time).append(separator);
-        sb.append(this.ip).append(separator);
-        sb.append(this.enUU).append(separator);
-        sb.append(this.userUU).append(separator);
-        sb.append(this.title).append(separator);
-        sb.append(this.message).append(separator);
-        sb.append(this.detail == null ? "" : this.detail).append(separator);
-        sb.append(this.code == null ? "" : this.code).append(separator);
-        sb.append(this.key == null ? " " : this.key);
-        return sb.toString();
-    }
-
-}

+ 0 - 360
src/main/java/com/uas/ps/product/model/User.java

@@ -1,360 +0,0 @@
-package com.uas.ps.product.model;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import org.hibernate.annotations.Cache;
-import org.hibernate.annotations.CacheConcurrencyStrategy;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-import org.springframework.util.CollectionUtils;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * @author sunyj
- * @since 2018/1/6 17:02
- */
-@Entity
-@Table(name = "sec$users")
-public class User implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "user_uu")
-    private Long userUU;
-    @Column(name = "user_name", length = 50)
-    private String userName;
-    @Column(name = "user_pwd", length = 32)
-    private String userPwd;
-    @Column(name = "user_email", length = 50)
-    private String userEmail;
-    @Column(name = "user_tel", length = 30)
-    private String userTel;
-    @Column(name = "user_sex", length = 10)
-    private String userSex;
-    @Column(name = "user_idcode", length = 20)
-    private String userIdcode;
-    private Short enable;
-    private Short issys;
-    @Column(name = "user_imid")
-    private Long userIMId;
-    /**
-     * 用户类型
-     */
-    @Column(name = "user_type", length = 20)
-    private String userType;
-    /**
-     * 所属公司
-     */
-    @ManyToMany(cascade = {CascadeType.REFRESH, CascadeType.REMOVE}, fetch = FetchType.EAGER)
-    @JoinTable(name = "sec$userenterprise", joinColumns = @JoinColumn(name = "user_uu", referencedColumnName = "user_uu"), inverseJoinColumns = @JoinColumn(name = "en_uu", referencedColumnName = "en_uu"))
-    @OrderBy("uu")
-    @Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
-    private Set<Enterprise> enterprises;
-    /**
-     * 所属公司
-     */
-    @Transient
-    @NotFound(action = NotFoundAction.IGNORE)
-    private Enterprise enterprise;
-    /**
-     * 角色
-     */
-    @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.EAGER)
-    @JoinTable(name = "sec$userrole", joinColumns = @JoinColumn(name = "user_uu", referencedColumnName = "user_uu"), inverseJoinColumns = @JoinColumn(name = "role_id", referencedColumnName = "role_id"))
-    @OrderBy("id")
-    @Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
-    private Set<Role> roles;
-    /**
-     * 最近登录IP地址
-     */
-    @Transient
-    @NotFound(action = NotFoundAction.IGNORE)
-    private String ip;
-    /**
-     * 判断是否被分配
-     */
-    @Transient
-    private boolean distribute;
-    /**
-     * 判断是否被转移权限
-     */
-    @Transient
-    private boolean transfer;
-
-    public User() {
-    }
-
-    public User(Long userUU) {
-        this.userUU = userUU;
-    }
-
-    public Long getUserIMId() {
-        return userIMId;
-    }
-
-    public void setUserIMId(Long userIMId) {
-        this.userIMId = userIMId;
-    }
-
-    public Long getUserUU() {
-        return userUU;
-    }
-
-    public void setUserUU(Long userUU) {
-        this.userUU = userUU;
-    }
-
-    public String getUserEmail() {
-        return userEmail;
-    }
-
-    public void setUserEmail(String userEmail) {
-        this.userEmail = userEmail;
-    }
-
-    public String getUserTel() {
-        return userTel;
-    }
-
-    public void setUserTel(String userTel) {
-        this.userTel = userTel;
-    }
-
-    public String getUserIdcode() {
-        return userIdcode;
-    }
-
-    public void setUserIdcode(String userIdcode) {
-        this.userIdcode = userIdcode;
-    }
-
-    public void setUserIccode(String userIdcode) {
-        this.userIdcode = userIdcode;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public String getUserPwd() {
-        return userPwd;
-    }
-
-    public void setUserPwd(String userPwd) {
-        this.userPwd = userPwd;
-    }
-
-    public Short getEnable() {
-        return enable;
-    }
-
-    public void setEnable(Short enable) {
-        this.enable = enable;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public Short getIssys() {
-        return issys;
-    }
-
-    public void setIssys(Short issys) {
-        this.issys = issys;
-    }
-
-    public String getUserSex() {
-        return userSex;
-    }
-
-    public void setUserSex(String userSex) {
-        this.userSex = userSex;
-    }
-
-    public Enterprise getEnterprise() {
-        return enterprise;
-    }
-
-    public void setEnterprise(Enterprise enterprise) {
-        this.enterprise = enterprise;
-    }
-
-    public String getUserType() {
-        return userType;
-    }
-
-    public void setUserType(String userType) {
-        this.userType = userType;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public Set<Enterprise> getEnterprises() {
-        return enterprises;
-    }
-
-    public void setEnterprises(Set<Enterprise> enterprises) {
-        this.enterprises = enterprises;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public boolean enable() {
-        return this.getEnable() != null && this.getEnable() == Constant.YES;
-    }
-
-    public void setCurrentEnterprise() {
-        if (this.enterprises != null && this.enterprises.size() > 0)
-            this.enterprise = this.enterprises.iterator().next();
-    }
-
-    public void setCurrentEnterprise(long enUU) {
-        if (this.enterprises != null && this.enterprises.size() > 0)
-            for (Enterprise enterprise : enterprises) {
-                if (enterprise.getUu() == enUU) {
-                    this.enterprise = enterprise;
-                    break;
-                }
-            }
-        if (this.enterprise == null)
-            setCurrentEnterprise();
-    }
-
-    public Set<Role> getRoles() {
-        return roles;
-    }
-
-    public void setRoles(Set<Role> roles) {
-        this.roles = roles;
-    }
-
-    public void addEnterprise(Enterprise enterprise) {
-        if (this.enterprises == null) {
-            Set<Enterprise> enterprises = new HashSet<Enterprise>();
-            enterprises.add(enterprise);
-            this.enterprises = enterprises;
-            return;
-        }
-        if (!this.enterprises.contains(enterprise)) {
-            this.enterprises.add(enterprise);
-        }
-    }
-
-    public void removeEnterprise(Enterprise enterprise) {
-        if (this.enterprises.contains(enterprise)) {
-            this.enterprises.remove(enterprise);
-        }
-    }
-
-    public boolean isSys() {
-        return getIssys() != null && getIssys() == Constant.YES;
-    }
-
-    @JsonIgnore
-    @JSONField(serialize = false)
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public boolean getDistribute() {
-        return distribute;
-    }
-
-    public void setDistribute(boolean distribute) {
-        this.distribute = distribute;
-    }
-
-    public boolean getTransfer() {
-        return transfer;
-    }
-
-    public void setTransfer(boolean transfer) {
-        this.transfer = transfer;
-    }
-
-    /**
-     * 获取用户所属企业UU号
-     *
-     * @return
-     */
-    @JSONField(serialize = false)
-    @JsonIgnore
-    public Set<Long> getEnUUs() {
-        Set<Long> enUUs = new HashSet<Long>();
-        if (!CollectionUtils.isEmpty(enterprises)) {
-            for (Enterprise en : enterprises) {
-                enUUs.add(en.getUu());
-            }
-        }
-        return enUUs;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((userEmail == null) ? 0 : userEmail.hashCode());
-        result = prime * result + ((userTel == null) ? 0 : userTel.hashCode());
-        result = prime * result + ((userUU == null) ? 0 : userUU.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        User other = (User) obj;
-        if (userEmail == null) {
-            if (other.userEmail != null)
-                return false;
-        } else if (!userEmail.equals(other.userEmail))
-            return false;
-        if (userTel == null) {
-            if (other.userTel != null)
-                return false;
-        } else if (!userTel.equals(other.userTel))
-            return false;
-        if (userUU == null) {
-            if (other.userUU != null)
-                return false;
-        } else if (!userUU.equals(other.userUU))
-            return false;
-        return true;
-    }
-
-    /**
-     * 设置当前登录企业的角色
-     */
-    public void setCurrentEnterpriseRoles() {
-        if (!CollectionUtils.isEmpty(this.roles) && this.enterprise != null) {
-            Iterator<Role> iterator = this.roles.iterator();
-            Long enuu = this.enterprise.getUu();
-            while (iterator.hasNext()) {
-                Role role = iterator.next();
-                if (!role.getEnUU().equals(enuu)) {
-                    iterator.remove();
-                }
-            }
-        }
-    }
-
-}

+ 0 - 99
src/main/java/com/uas/ps/product/model/UserBaseInfo.java

@@ -1,99 +0,0 @@
-package com.uas.ps.product.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.io.Serializable;
-
-/**
- * 只包含最基本的信息,用与跟单据关联展现
- *
- * @author sunyj
- * @since 2018/1/6 17:10
- */
-@Entity
-@Table(name = "sec$users")
-public class UserBaseInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @Column(name = "user_uu")
-    private Long userUU;
-
-    @Column(name = "user_name")
-    private String userName;
-
-    @Column(name = "user_pwd")
-    private String userPwd;
-
-    @Column(name = "user_email")
-    private String userEmail;
-
-    @Column(name = "user_tel")
-    private String userTel;
-
-    @Column(name = "user_sex")
-    private String userSex;
-
-    @Column(name = "user_imid")
-    private Long userIMId;
-
-    public Long getUserUU() {
-        return userUU;
-    }
-
-    public void setUserUU(Long userUU) {
-        this.userUU = userUU;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getUserPwd() {
-        return userPwd;
-    }
-
-    public void setUserPwd(String userPwd) {
-        this.userPwd = userPwd;
-    }
-
-    public String getUserEmail() {
-        return userEmail;
-    }
-
-    public void setUserEmail(String userEmail) {
-        this.userEmail = userEmail;
-    }
-
-    public String getUserTel() {
-        return userTel;
-    }
-
-    public void setUserTel(String userTel) {
-        this.userTel = userTel;
-    }
-
-    public String getUserSex() {
-        return userSex;
-    }
-
-    public void setUserSex(String userSex) {
-        this.userSex = userSex;
-    }
-
-    public Long getUserIMId() {
-        return userIMId;
-    }
-
-    public void setUserIMId(Long userIMId) {
-        this.userIMId = userIMId;
-    }
-
-}

+ 5 - 4
src/main/java/com/uas/ps/product/dao/UserDao.java → src/main/java/com/uas/ps/product/repository/ProductDao.java

@@ -1,14 +1,15 @@
-package com.uas.ps.product.dao;
+package com.uas.ps.product.repository;
 
-import com.uas.ps.product.model.User;
+import com.uas.ps.entity.Product;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.stereotype.Repository;
 
 /**
  * @author sunyj
- * @since 2018/1/8 11:43
+ * @since 2018/1/6 17:20
  */
 @Repository
-public interface UserDao extends JpaSpecificationExecutor<User>, JpaRepository<User, Long> {
+public interface ProductDao extends JpaSpecificationExecutor<Product>, JpaRepository<Product, Long> {
+
 }

+ 2 - 9
src/main/java/com/uas/ps/product/dao/ProductMatchResultDao.java → src/main/java/com/uas/ps/product/repository/ProductMatchResultDao.java

@@ -1,6 +1,6 @@
-package com.uas.ps.product.dao;
+package com.uas.ps.product.repository;
 
-import com.uas.ps.product.model.ProductMatchResult;
+import com.uas.ps.entity.ProductMatchResult;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.stereotype.Repository;
@@ -12,11 +12,4 @@ import org.springframework.stereotype.Repository;
 @Repository
 public interface ProductMatchResultDao extends JpaSpecificationExecutor<ProductMatchResult>, JpaRepository<ProductMatchResult, Long> {
 
-    /**
-     * 清除掉原来匹配的数据
-     *
-     * @param enuu
-     * @return
-     */
-    int deleteByEnuu(Long enuu);
 }

+ 3 - 3
src/main/java/com/uas/ps/product/service/ProductService.java

@@ -1,7 +1,7 @@
 package com.uas.ps.product.service;
 
-import com.uas.ps.product.model.Prod;
-import com.uas.ps.product.model.Product;
+import com.uas.ps.entity.Product;
+import com.uas.ps.product.entity.Prod;
 import org.springframework.ui.ModelMap;
 
 import java.util.List;
@@ -18,7 +18,7 @@ public interface ProductService {
      * @param products
      * @return
      */
-    public List<Product> save(List<Product> products);
+    List<Product> save(List<Product> products);
 
     /**
      * 将ERP系统的产品,转为平台的产品

+ 0 - 11
src/main/java/com/uas/ps/product/service/UsageLogService.java

@@ -1,11 +0,0 @@
-package com.uas.ps.product.service;
-
-import com.uas.ps.product.logging.LogService;
-import com.uas.ps.product.model.UsageLog;
-
-/**
- * @author sunyj
- * @since 2018/1/9 16:07
- */
-public interface UsageLogService extends LogService<UsageLog> {
-}

+ 7 - 75
src/main/java/com/uas/ps/product/service/impl/ProductServiceImpl.java

@@ -1,17 +1,15 @@
 package com.uas.ps.product.service.impl;
 
-import com.uas.ps.product.dao.*;
-import com.uas.ps.product.logging.BufferedLoggerManager;
-import com.uas.ps.product.logging.UsageBufferedLogger;
-import com.uas.ps.product.model.*;
+import com.uas.ps.entity.Product;
+import com.uas.ps.product.entity.Prod;
+import com.uas.ps.product.repository.ProductDao;
+import com.uas.ps.product.repository.ProductMatchResultDao;
 import com.uas.ps.product.service.ProductService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.ui.ModelMap;
-import org.springframework.util.CollectionUtils;
 
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 
 /**
@@ -21,22 +19,12 @@ import java.util.List;
 @Service
 public class ProductServiceImpl implements ProductService {
 
-    private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
     @Autowired
     private ProductDao productDao;
 
     @Autowired
     private ProductMatchResultDao productMatchResultDao;
 
-    @Autowired
-    private ProductStoreStatusDao productStoreStatusDao;
-
-    @Autowired
-    private UserDao userDao;
-
-    @Autowired
-    private ProductUsersDao productUsersDao;
-
     @Override
     public List<Product> save(List<Product> products) {
         return productDao.save(products);
@@ -45,77 +33,21 @@ public class ProductServiceImpl implements ProductService {
     @Override
     public List<Product> convertProduct(List<Prod> prods) {
         List<Product> products = new ArrayList<Product>();
-        for (Prod prod : prods) {
-            if (prod.getEnUU() == null) {
-                throw new IllegalArgumentException("enUU 为空");
-            }
-            prod.setKind(prod.getPr_detail());
-            if (prod.getPr_orispeccode() == null) {// 如果原厂型号不存在,将规格赋值给原厂型号
-                prod.setPr_orispeccode(prod.getPr_spec());
-            }
-            List<Product> prodResult = productDao.findByEnUUAndCode(prod.getEnUU(), prod.getPr_code());
-            if (CollectionUtils.isEmpty(prodResult)) {// 平台上不存在的新上传上来的物料,新增
-                products.add(prod.convert());
-            } else {// 平台上已经存在的物料,修改
-                Product product = prod.convert();
-                product.setId(prodResult.get(0).getId());
-                product.setCode(prodResult.get(0).getCode());
-                products.add(product);
-            }
-        }
+        // TODO
         return products;
     }
 
     @Override
     public ModelMap match(Long enUU, Long userUU) {
         ModelMap map = new ModelMap();
-        boolean flag = true;
-        ProductStoreStatus status = productStoreStatusDao.findByEnuu(enUU);
-        if (status != null) {
-            if (status.getStatus().equals(Status.RUNNING.value())) {// 有人正在操作这张单据,不能进行操作
-                map.put("error", "当前有人正在进行匹配操作,无法进行匹配");
-                flag = false;
-            } else {
-                status.setStatus(Status.RUNNING.value());
-                status = productStoreStatusDao.save(status);
-            }
-        } else {
-            ProductStoreStatus stroestatus = new ProductStoreStatus();
-            stroestatus.setDate(new Date());
-            stroestatus.setEnuu(enUU);
-            stroestatus.setUseruu(userUU);
-            stroestatus.setStatus(Status.RUNNING.value());
-            status = productStoreStatusDao.save(stroestatus);
-        }
-        int num = 0;
-        if (flag) {
-            // 清除掉原来匹配的数据
-            productMatchResultDao.deleteByEnuu(enUU);
-            User user = userDao.findOne(userUU);
-            logger.log(enUU, userUU, user.getIp(), "物料匹配", "一键匹配了产品(物料)信息", "大小" + num);
-            // TODO 匹配
-            map.put("size", num);
-            status.setStatus(Status.FINISH.value());
-            productStoreStatusDao.save(status);
-        }
+        // TODO
         return map;
     }
 
     @Override
     public ModelMap assignPersonalProduct(Long userUU, Long productId) {
         ModelMap map = new ModelMap();
-        // TODO 分配个人物料
-        ProductUsers productUsers = productUsersDao.findByUserUUAndProductId(userUU, productId);
-        if (productUsers != null) {
-            map.put("error", "物料已分配给个人");
-        } else {
-            productUsers = new ProductUsers();
-            productUsers.setUserUU(userUU);
-            productUsers.setProductId(productId);
-            productUsers.setDate(new Date());
-            productUsersDao.save(productUsers);
-            map.put("size", 1);
-        }
+        // TODO
         return map;
     }
 

+ 0 - 29
src/main/java/com/uas/ps/product/service/impl/UsageLogServiceImpl.java

@@ -1,29 +0,0 @@
-package com.uas.ps.product.service.impl;
-
-import com.uas.ps.product.dao.UsageLogDao;
-import com.uas.ps.product.model.UsageLog;
-import com.uas.ps.product.service.UsageLogService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * @author sunyj
- * @since 2018/1/9 16:30
- */
-@Service
-public class UsageLogServiceImpl implements UsageLogService {
-
-    @Autowired
-    private UsageLogDao usageLogDao;
-
-    @Override
-    public void save(UsageLog logable) {
-        usageLogDao.save(logable);
-    }
-
-    @Override
-    public void save(Iterable<UsageLog> logables) {
-        usageLogDao.save(logables);
-    }
-
-}