Bladeren bron

2023年9月26日13:42:50

纪新园 2 jaren geleden
bovenliggende
commit
40293e87f3

+ 18 - 7
ruoyi-admin/pom.xml

@@ -17,6 +17,17 @@
 
     <dependencies>
 
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpmime</artifactId>
+            <version>4.4</version>
+        </dependency>
+
         <!-- spring-boot-devtools -->
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -80,17 +91,17 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>   
-                <groupId>org.apache.maven.plugins</groupId>   
-                <artifactId>maven-war-plugin</artifactId>   
-                <version>3.1.0</version>   
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.1.0</version>
                 <configuration>
                     <failOnMissingWebXml>false</failOnMissingWebXml>
                     <warName>${project.artifactId}</warName>
-                </configuration>   
-           </plugin>   
+                </configuration>
+           </plugin>
         </plugins>
         <finalName>${project.artifactId}</finalName>
     </build>
 
-</project>
+</project>

+ 24 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/OrderController.java

@@ -62,4 +62,28 @@ public class OrderController extends BaseController {
         return orderService.deviceDetails(device);
     }
 
+    /**
+     * 银行端订单中心
+     */
+    @GetMapping("/bankList")
+    public TableDataInfo bankList(Order order) {
+        return orderService.bankList(order);
+    }
+
+    /**
+     * 银行端订单中心详情
+     */
+    @GetMapping("/bankDetails")
+    public AjaxResult bankDetails(Order order) {
+        return orderService.bankDetails(order);
+    }
+
+    /**
+     * 银行端企业管理
+     */
+    @GetMapping("/enterpriseList")
+    public TableDataInfo enterpriseList(Order order) {
+        return orderService.enterpriseList(order);
+    }
+
 }

+ 159 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/domain/Enterprise.java

@@ -0,0 +1,159 @@
+package com.ruoyi.web.controller.iot.domain;
+
+import java.util.List;
+
+/**
+ * @author :jixinyuan
+ * @date : 2023/9/25
+ */
+public class Enterprise {
+
+    /**
+     * ID
+     */
+    private Long id;
+    /**
+     * 业务主键
+     */
+    private String enterpriseOpenid;
+    /**
+     * 企业名称
+     */
+    private String enterpriseName;
+    /**
+     * 企业简称
+     */
+    private Long enterpriseAbbreviation;
+
+    /**
+     * 企业编码
+     */
+    private String enterpriseCode;
+
+    /**
+     * 企业登录标识
+     */
+    private String enterpriseLogincode;
+
+    /**
+     * 企业最大注册人数
+     */
+    private Integer enterpriseMaxRegister;
+
+    /**
+     * 企业联系人
+     */
+    private String enterpriseContacts;
+    /**
+     * 固定电话
+     */
+    private String enterpriseTelephone;
+
+    /**
+     * 联系电话
+     */
+    private String enterprisePhone;
+
+    /**
+     * 邮箱地址
+     */
+    private Long enterpriseEmail;
+    /**
+     * 企业logo
+     */
+    private Long enterpriseLogo;
+    /**
+     * 省
+     */
+    private String enterpriseProvince;
+    /**
+     * 市
+     */
+    private String enterpriseCity;
+    /**
+     * 区
+     */
+    private String enterpriseDistrict;
+    /**
+     * 企业地址
+     */
+    private String enterpriseAddress;
+    /**
+     * 经度
+     */
+    private String enterpriseLng;
+    /**
+     * 纬度
+     */
+    private String enterpriseLat;
+    /**
+     * 初始化状态
+     */
+    private String enterpriseInit;
+    /**
+     * 系统定制logo
+     */
+    private String enterpriseSysLogo;
+    /**
+     * 系统定制名称
+     */
+    private String enterpriseSysName;
+    /**
+     * 授权码
+     */
+    private String enterpriseAuthorization;
+    /**
+     * 过期日期
+     */
+    private String enterpriseValidity;
+    /**
+     * 访问域名
+     */
+    private String enterpriseDomainName;
+    /**
+     * 企业租户数据库版本号
+     */
+    private Integer enterpriseDatabaseVersion;
+    /**
+     * 租户数据库连接驱动
+     */
+    private String enterpriseDatabaseDriver;
+    /**
+     * 租户数据库地址
+     */
+    private String enterpriseDatabaseUrl;
+    /**
+     * 租户数据库用户名
+     */
+    private String enterpriseDatabaseUsername;
+    /**
+     * 租户数据库密码
+     */
+    private String enterpriseDatabasePassword;
+    /**
+     * 看板地址
+     */
+    private String enterpriseScreen;
+    /**
+     * 状态 1启用 0停用
+     */
+    private String enterpriseStatus;
+    /**
+     * 企业创建人所属部门
+     */
+    private String creatUserDep;
+    /**
+     * 创建时间
+     */
+    private String createTime;
+    /**
+     * 更新时间
+     */
+    private String updateTime;
+    /**
+     * 是否开通数字工厂
+     */
+    private Integer factoryStatus;
+
+
+}

+ 93 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/domain/IotRealData.java

@@ -0,0 +1,93 @@
+package com.ruoyi.web.controller.iot.domain;
+
+/**
+ * @author :jixinyuan
+ * @date : 2023/9/26
+ */
+public class IotRealData {
+
+    /**
+     *设备编码
+     */
+    private String deviceCode;
+    /**
+     *设备名称
+     */
+    private String deviceName;
+    /**
+     *属性编码
+     */
+    private String tag;
+    /**
+     *属性中文名称
+     */
+    private String tagName;
+    /**
+     *值
+     */
+    private String val;
+    /**
+     *更新时间
+     */
+    private String updateTime;
+    /**
+     *key
+     */
+    private String key;
+
+    public String getDeviceCode() {
+        return deviceCode;
+    }
+
+    public void setDeviceCode(String deviceCode) {
+        this.deviceCode = deviceCode;
+    }
+
+    public String getDeviceName() {
+        return deviceName;
+    }
+
+    public void setDeviceName(String deviceName) {
+        this.deviceName = deviceName;
+    }
+
+    public String getTag() {
+        return tag;
+    }
+
+    public void setTag(String tag) {
+        this.tag = tag;
+    }
+
+    public String getTagName() {
+        return tagName;
+    }
+
+    public void setTagName(String tagName) {
+        this.tagName = tagName;
+    }
+
+    public String getVal() {
+        return val;
+    }
+
+    public void setVal(String val) {
+        this.val = val;
+    }
+
+    public String getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(String updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+}

+ 409 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/domain/Material.java

@@ -0,0 +1,409 @@
+package com.ruoyi.web.controller.iot.domain;
+
+import java.math.BigDecimal;
+
+/**
+ * @author :jixinyuan
+ * @date : 2023/9/25
+ */
+public class Material {
+
+    /**
+     * ID
+     */
+    private Long id;
+    /**
+     * 业务主键
+     */
+    private String materielOpenid;
+    /**
+     * 物料名称
+     */
+    private String materielName;
+    /**
+     * 物料简称
+     */
+    private String materielAbbreviation;
+    /**
+     * 物料编码
+     */
+    private String materielCode;
+    /**
+     * 物料类型
+     */
+    private String materielType;
+    /**
+     * 物料描述
+     */
+    private String materielDesc;
+    /**
+     * 计量单位
+     */
+    private String materielUnit;
+    /**
+     * 物料类别
+     */
+    private String materielAbc;
+    /**
+     * 规格型号
+     */
+    private String materielNorms;
+    /**
+     * 最大库存
+     */
+    private BigDecimal maxStock;
+    /**
+     * 最大库存警戒值
+     */
+    private BigDecimal maxWarning;
+    /**
+     * 最小库存
+     */
+    private BigDecimal minStock;
+    /**
+     * 最小库存警戒值
+     */
+    private BigDecimal minWarning;
+    /**
+     * 最短存储时间(天)
+     */
+    private Integer minTime;
+    /**
+     * 最长存储时间(天)
+     */
+    private Integer maxTime;
+    /**
+     * 物料来源 生产、采购、外协
+     */
+    private String materielSource;
+    /**
+     * 供应商
+     */
+    private String materielSupplier;
+    /**
+     * 状态 1启用 0停用
+     */
+    private String materielStatus;
+    /**
+     * 物料图片
+     */
+    private String materielImg;
+    /**
+     * 次要单位
+     */
+    private String materielSunit;
+    /**
+     * 净重
+     */
+    private String materielNetWeight;
+    /**
+     * 物料管理方式,1-批次,2-关键件
+     */
+    private String materielKeyParts;
+    /**
+     * 毛重
+     */
+    private String materielGrossWeight;
+    /**
+     * 生产标准值
+     */
+    private String materielMpq;
+    /**
+     * 创建时间
+     */
+    private String createdAt;
+    /**
+     * 创建用户
+     */
+    private String createdUser;
+    /**
+     * 修改时间
+     */
+    private String updatedAt;
+    /**
+     * 修改人
+     */
+    private String updatedUser;
+    /**
+     * 所属仓库编码
+     */
+    private String materielWarehouseCode;
+    /**
+     * 所属仓库名称
+     */
+    private String materielWarehouseOpenid;
+
+    /**
+     * 计划数量
+     */
+    private Integer productionNum;
+    /**
+     * 交期
+     */
+    private String deliveryDate;
+
+
+    public Integer getProductionNum() {
+        return productionNum;
+    }
+
+    public void setProductionNum(Integer productionNum) {
+        this.productionNum = productionNum;
+    }
+
+    public String getDeliveryDate() {
+        return deliveryDate;
+    }
+
+    public void setDeliveryDate(String deliveryDate) {
+        this.deliveryDate = deliveryDate;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getMaterielOpenid() {
+        return materielOpenid;
+    }
+
+    public void setMaterielOpenid(String materielOpenid) {
+        this.materielOpenid = materielOpenid;
+    }
+
+    public String getMaterielName() {
+        return materielName;
+    }
+
+    public void setMaterielName(String materielName) {
+        this.materielName = materielName;
+    }
+
+    public String getMaterielAbbreviation() {
+        return materielAbbreviation;
+    }
+
+    public void setMaterielAbbreviation(String materielAbbreviation) {
+        this.materielAbbreviation = materielAbbreviation;
+    }
+
+    public String getMaterielCode() {
+        return materielCode;
+    }
+
+    public void setMaterielCode(String materielCode) {
+        this.materielCode = materielCode;
+    }
+
+    public String getMaterielType() {
+        return materielType;
+    }
+
+    public void setMaterielType(String materielType) {
+        this.materielType = materielType;
+    }
+
+    public String getMaterielDesc() {
+        return materielDesc;
+    }
+
+    public void setMaterielDesc(String materielDesc) {
+        this.materielDesc = materielDesc;
+    }
+
+    public String getMaterielUnit() {
+        return materielUnit;
+    }
+
+    public void setMaterielUnit(String materielUnit) {
+        this.materielUnit = materielUnit;
+    }
+
+    public String getMaterielAbc() {
+        return materielAbc;
+    }
+
+    public void setMaterielAbc(String materielAbc) {
+        this.materielAbc = materielAbc;
+    }
+
+    public String getMaterielNorms() {
+        return materielNorms;
+    }
+
+    public void setMaterielNorms(String materielNorms) {
+        this.materielNorms = materielNorms;
+    }
+
+    public BigDecimal getMaxStock() {
+        return maxStock;
+    }
+
+    public void setMaxStock(BigDecimal maxStock) {
+        this.maxStock = maxStock;
+    }
+
+    public BigDecimal getMaxWarning() {
+        return maxWarning;
+    }
+
+    public void setMaxWarning(BigDecimal maxWarning) {
+        this.maxWarning = maxWarning;
+    }
+
+    public BigDecimal getMinStock() {
+        return minStock;
+    }
+
+    public void setMinStock(BigDecimal minStock) {
+        this.minStock = minStock;
+    }
+
+    public BigDecimal getMinWarning() {
+        return minWarning;
+    }
+
+    public void setMinWarning(BigDecimal minWarning) {
+        this.minWarning = minWarning;
+    }
+
+    public Integer getMinTime() {
+        return minTime;
+    }
+
+    public void setMinTime(Integer minTime) {
+        this.minTime = minTime;
+    }
+
+    public Integer getMaxTime() {
+        return maxTime;
+    }
+
+    public void setMaxTime(Integer maxTime) {
+        this.maxTime = maxTime;
+    }
+
+    public String getMaterielSource() {
+        return materielSource;
+    }
+
+    public void setMaterielSource(String materielSource) {
+        this.materielSource = materielSource;
+    }
+
+    public String getMaterielSupplier() {
+        return materielSupplier;
+    }
+
+    public void setMaterielSupplier(String materielSupplier) {
+        this.materielSupplier = materielSupplier;
+    }
+
+    public String getMaterielStatus() {
+        return materielStatus;
+    }
+
+    public void setMaterielStatus(String materielStatus) {
+        this.materielStatus = materielStatus;
+    }
+
+    public String getMaterielImg() {
+        return materielImg;
+    }
+
+    public void setMaterielImg(String materielImg) {
+        this.materielImg = materielImg;
+    }
+
+    public String getMaterielSunit() {
+        return materielSunit;
+    }
+
+    public void setMaterielSunit(String materielSunit) {
+        this.materielSunit = materielSunit;
+    }
+
+    public String getMaterielNetWeight() {
+        return materielNetWeight;
+    }
+
+    public void setMaterielNetWeight(String materielNetWeight) {
+        this.materielNetWeight = materielNetWeight;
+    }
+
+    public String getMaterielKeyParts() {
+        return materielKeyParts;
+    }
+
+    public void setMaterielKeyParts(String materielKeyParts) {
+        this.materielKeyParts = materielKeyParts;
+    }
+
+    public String getMaterielGrossWeight() {
+        return materielGrossWeight;
+    }
+
+    public void setMaterielGrossWeight(String materielGrossWeight) {
+        this.materielGrossWeight = materielGrossWeight;
+    }
+
+    public String getMaterielMpq() {
+        return materielMpq;
+    }
+
+    public void setMaterielMpq(String materielMpq) {
+        this.materielMpq = materielMpq;
+    }
+
+    public String getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(String createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public String getCreatedUser() {
+        return createdUser;
+    }
+
+    public void setCreatedUser(String createdUser) {
+        this.createdUser = createdUser;
+    }
+
+    public String getUpdatedAt() {
+        return updatedAt;
+    }
+
+    public void setUpdatedAt(String updatedAt) {
+        this.updatedAt = updatedAt;
+    }
+
+    public String getUpdatedUser() {
+        return updatedUser;
+    }
+
+    public void setUpdatedUser(String updatedUser) {
+        this.updatedUser = updatedUser;
+    }
+
+    public String getMaterielWarehouseCode() {
+        return materielWarehouseCode;
+    }
+
+    public void setMaterielWarehouseCode(String materielWarehouseCode) {
+        this.materielWarehouseCode = materielWarehouseCode;
+    }
+
+    public String getMaterielWarehouseOpenid() {
+        return materielWarehouseOpenid;
+    }
+
+    public void setMaterielWarehouseOpenid(String materielWarehouseOpenid) {
+        this.materielWarehouseOpenid = materielWarehouseOpenid;
+    }
+}

+ 117 - 18
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/domain/Order.java

@@ -103,32 +103,51 @@ public class Order {
      */
     private Integer workOrderNum;
 
-    public String getStatus() {
-        return status;
-    }
+    /**
+     * 企业名称
+     */
+    private String enterpriseName;
 
-    public void setStatus(String status) {
-        this.status = status;
-    }
+    /**
+     * 企业法人
+     */
+    private String enterpriseLegalPerson;
 
-    private List<ProductOrder> productOrderList;
+    /**
+     * 联系方式
+     */
+    private String contactInformation;
 
-    private TransportOrder transportOrder;
+    /**
+     * 企业类型
+     */
+    private String enterpriseType;
 
-    public TransportOrder getTransportOrder() {
-        return transportOrder;
-    }
+    /**
+     * 成立日期
+     */
+    private String dateEstablishment;
 
-    public void setTransportOrder(TransportOrder transportOrder) {
-        this.transportOrder = transportOrder;
-    }
+    /**
+     * 注册资本
+     */
+    private String registeredCapital;
 
-    public List<ProductOrder> getProductOrderList() {
-        return productOrderList;
+
+    private List<ProductOrderDetail> productOrderDetailList;
+
+    private List<ProductOrder> productOrderList;
+
+    private List<Material> materialList;
+
+    private TransportOrder transportOrder;
+
+    public List<Material> getMaterialList() {
+        return materialList;
     }
 
-    public void setProductOrderList(List<ProductOrder> productOrderList) {
-        this.productOrderList = productOrderList;
+    public void setMaterialList(List<Material> materialList) {
+        this.materialList = materialList;
     }
 
     public Long getId() {
@@ -187,6 +206,14 @@ public class Order {
         this.orderStatus = orderStatus;
     }
 
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
     public String getOrderManager() {
         return orderManager;
     }
@@ -307,6 +334,78 @@ public class Order {
         this.workOrderNum = workOrderNum;
     }
 
+    public String getEnterpriseName() {
+        return enterpriseName;
+    }
+
+    public void setEnterpriseName(String enterpriseName) {
+        this.enterpriseName = enterpriseName;
+    }
+
+    public String getEnterpriseLegalPerson() {
+        return enterpriseLegalPerson;
+    }
+
+    public void setEnterpriseLegalPerson(String enterpriseLegalPerson) {
+        this.enterpriseLegalPerson = enterpriseLegalPerson;
+    }
+
+    public String getContactInformation() {
+        return contactInformation;
+    }
+
+    public void setContactInformation(String contactInformation) {
+        this.contactInformation = contactInformation;
+    }
+
+    public String getEnterpriseType() {
+        return enterpriseType;
+    }
+
+    public void setEnterpriseType(String enterpriseType) {
+        this.enterpriseType = enterpriseType;
+    }
+
+    public String getDateEstablishment() {
+        return dateEstablishment;
+    }
+
+    public void setDateEstablishment(String dateEstablishment) {
+        this.dateEstablishment = dateEstablishment;
+    }
+
+    public String getRegisteredCapital() {
+        return registeredCapital;
+    }
+
+    public void setRegisteredCapital(String registeredCapital) {
+        this.registeredCapital = registeredCapital;
+    }
+
+    public List<ProductOrderDetail> getProductOrderDetailList() {
+        return productOrderDetailList;
+    }
+
+    public void setProductOrderDetailList(List<ProductOrderDetail> productOrderDetailList) {
+        this.productOrderDetailList = productOrderDetailList;
+    }
+
+    public List<ProductOrder> getProductOrderList() {
+        return productOrderList;
+    }
+
+    public void setProductOrderList(List<ProductOrder> productOrderList) {
+        this.productOrderList = productOrderList;
+    }
+
+    public TransportOrder getTransportOrder() {
+        return transportOrder;
+    }
+
+    public void setTransportOrder(TransportOrder transportOrder) {
+        this.transportOrder = transportOrder;
+    }
+
     @Override
     public String toString() {
         return "Order{" +

+ 260 - 91
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/domain/ProductOrder.java

@@ -10,66 +10,115 @@ public class ProductOrder {
      * 主键
      */
     private Long id;
-     /**
-     * 工单id
+    /**
+     * 任务编号
+     */
+    private String orderNum;
+    /**
+     * 产品id
+     */
+    private Long productionId;
+    /**
+     * 计划数量
+     */
+    private Integer productionNum;
+    /**
+     * 交期
      */
-    private Long orderId;
-     /**
-     * 工序id
+    private String deliveryDate;
+    /**
+     * 客户id
      */
-    private Long processId;
+    private Long customerId;
     /**
-     * 工序名
+     * 订单状态 0:新建 1:执行中 2:完工 3:作废
      */
-    private String processName;
-     /**
-     * 设备id
+    private String orderStatus;
+    /**
+     * 开始执行时间
      */
-    private Long equipmentId;
-     /**
-     * 用户id
+    private String executeTime;
+    /**
+     * 完工时间
      */
-    private Long userId;
-     /**
-     * 用户名
+    private String completeTime;
+    /**
+     * 作废时间
      */
-    private String userName;
-     /**
-     * 开始时间
+    private String cancelTime;
+    /**
+     * 对应工序组id
      */
-    private String startTime;
-     /**
-     * 结束时间
+    private Long processGroupId;
+
+    /**
+     * 工艺名称
      */
-    private String endTime;
-     /**
+    private String processGroupName;
+    /**
+     * 创建时间
+     */
+    private String createTime;
+    /**
+     * 创建人
+     */
+    private Long createUserId;
+    /**
      * 订单id
      */
-    private Long taskId;
-     /**
-     * 实际生产数
+    private String taskId;
+    /**
+     * 实际生产数
      */
-    private Integer productNum;
-     /**
-     * 0:执行中 1:待质检 2:完成
+    private Double actualNum;
+    /**
+     * 图片介绍
      */
-    private Integer status;
-     /**
-     * 暂停时间
+    private String picture;
+    /**
+     * 订单编码
      */
-    private String stopTime;
-     /**
-     * 暂停时产量
+    private String taskNum;
+    /**
+     * 订单名称
      */
-    private Integer stopNumber;
-
-    public String getProcessName() {
-        return processName;
-    }
-
-    public void setProcessName(String processName) {
-        this.processName = processName;
-    }
+    private String taskName;
+    /**
+     * 单位
+     */
+    private String unit;
+    /**
+     * 创建者
+     */
+    private String createUserName;
+    /**
+     * 工单完成数量
+     */
+    private Integer orderFinishNum;
+    /**
+     * 生成状态
+     */
+    private String createStatus;
+    /**
+     * 车间
+     */
+    private String workShop;
+    /**
+     * 订单生产数量
+     */
+    private String orderAmounts;
+    /**
+     * 交付周期
+     */
+    private Integer deliveryCycle;
+    /**
+     * 工单计划数量
+     */
+    private Integer orderNumber;
+    /**
+     * 工单名称
+     */
+    private String orderName;
 
     public Long getId() {
         return id;
@@ -79,99 +128,219 @@ public class ProductOrder {
         this.id = id;
     }
 
-    public Long getOrderId() {
-        return orderId;
+    public String getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(String orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public Long getProductionId() {
+        return productionId;
+    }
+
+    public void setProductionId(Long productionId) {
+        this.productionId = productionId;
+    }
+
+    public Integer getProductionNum() {
+        return productionNum;
     }
 
-    public void setOrderId(Long orderId) {
-        this.orderId = orderId;
+    public void setProductionNum(Integer productionNum) {
+        this.productionNum = productionNum;
     }
 
-    public Long getProcessId() {
-        return processId;
+    public String getDeliveryDate() {
+        return deliveryDate;
     }
 
-    public void setProcessId(Long processId) {
-        this.processId = processId;
+    public void setDeliveryDate(String deliveryDate) {
+        this.deliveryDate = deliveryDate;
     }
 
-    public Long getEquipmentId() {
-        return equipmentId;
+    public Long getCustomerId() {
+        return customerId;
     }
 
-    public void setEquipmentId(Long equipmentId) {
-        this.equipmentId = equipmentId;
+    public void setCustomerId(Long customerId) {
+        this.customerId = customerId;
     }
 
-    public Long getUserId() {
-        return userId;
+    public String getOrderStatus() {
+        return orderStatus;
     }
 
-    public void setUserId(Long userId) {
-        this.userId = userId;
+    public void setOrderStatus(String orderStatus) {
+        this.orderStatus = orderStatus;
     }
 
-    public String getUserName() {
-        return userName;
+    public String getExecuteTime() {
+        return executeTime;
     }
 
-    public void setUserName(String userName) {
-        this.userName = userName;
+    public void setExecuteTime(String executeTime) {
+        this.executeTime = executeTime;
     }
 
-    public String getStartTime() {
-        return startTime;
+    public String getCompleteTime() {
+        return completeTime;
     }
 
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
+    public void setCompleteTime(String completeTime) {
+        this.completeTime = completeTime;
     }
 
-    public String getEndTime() {
-        return endTime;
+    public String getCancelTime() {
+        return cancelTime;
     }
 
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
+    public void setCancelTime(String cancelTime) {
+        this.cancelTime = cancelTime;
     }
 
-    public Long getTaskId() {
+    public Long getProcessGroupId() {
+        return processGroupId;
+    }
+
+    public void setProcessGroupId(Long processGroupId) {
+        this.processGroupId = processGroupId;
+    }
+
+    public String getProcessGroupName() {
+        return processGroupName;
+    }
+
+    public void setProcessGroupName(String processGroupName) {
+        this.processGroupName = processGroupName;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public Long getCreateUserId() {
+        return createUserId;
+    }
+
+    public void setCreateUserId(Long createUserId) {
+        this.createUserId = createUserId;
+    }
+
+    public String getTaskId() {
         return taskId;
     }
 
-    public void setTaskId(Long taskId) {
+    public void setTaskId(String taskId) {
         this.taskId = taskId;
     }
 
-    public Integer getProductNum() {
-        return productNum;
+    public Double getActualNum() {
+        return actualNum;
+    }
+
+    public void setActualNum(Double actualNum) {
+        this.actualNum = actualNum;
+    }
+
+    public String getPicture() {
+        return picture;
+    }
+
+    public void setPicture(String picture) {
+        this.picture = picture;
+    }
+
+    public String getTaskNum() {
+        return taskNum;
+    }
+
+    public void setTaskNum(String taskNum) {
+        this.taskNum = taskNum;
+    }
+
+    public String getTaskName() {
+        return taskName;
+    }
+
+    public void setTaskName(String taskName) {
+        this.taskName = taskName;
+    }
+
+    public String getUnit() {
+        return unit;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit;
+    }
+
+    public String getCreateUserName() {
+        return createUserName;
+    }
+
+    public void setCreateUserName(String createUserName) {
+        this.createUserName = createUserName;
+    }
+
+    public Integer getOrderFinishNum() {
+        return orderFinishNum;
+    }
+
+    public void setOrderFinishNum(Integer orderFinishNum) {
+        this.orderFinishNum = orderFinishNum;
+    }
+
+    public String getCreateStatus() {
+        return createStatus;
+    }
+
+    public void setCreateStatus(String createStatus) {
+        this.createStatus = createStatus;
+    }
+
+    public String getWorkShop() {
+        return workShop;
+    }
+
+    public void setWorkShop(String workShop) {
+        this.workShop = workShop;
+    }
+
+    public String getOrderAmounts() {
+        return orderAmounts;
     }
 
-    public void setProductNum(Integer productNum) {
-        this.productNum = productNum;
+    public void setOrderAmounts(String orderAmounts) {
+        this.orderAmounts = orderAmounts;
     }
 
-    public Integer getStatus() {
-        return status;
+    public Integer getDeliveryCycle() {
+        return deliveryCycle;
     }
 
-    public void setStatus(Integer status) {
-        this.status = status;
+    public void setDeliveryCycle(Integer deliveryCycle) {
+        this.deliveryCycle = deliveryCycle;
     }
 
-    public String getStopTime() {
-        return stopTime;
+    public Integer getOrderNumber() {
+        return orderNumber;
     }
 
-    public void setStopTime(String stopTime) {
-        this.stopTime = stopTime;
+    public void setOrderNumber(Integer orderNumber) {
+        this.orderNumber = orderNumber;
     }
 
-    public Integer getStopNumber() {
-        return stopNumber;
+    public String getOrderName() {
+        return orderName;
     }
 
-    public void setStopNumber(Integer stopNumber) {
-        this.stopNumber = stopNumber;
+    public void setOrderName(String orderName) {
+        this.orderName = orderName;
     }
 }

+ 177 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/domain/ProductOrderDetail.java

@@ -0,0 +1,177 @@
+package com.ruoyi.web.controller.iot.domain;
+
+/**
+ * @author :jixinyuan
+ * @date : 2023/9/25
+ */
+public class ProductOrderDetail {
+
+    /**
+     * 主键
+     */
+    private Long id;
+     /**
+     * 工单id
+     */
+    private Long orderId;
+     /**
+     * 工序id
+     */
+    private Long processId;
+    /**
+     * 工序名
+     */
+    private String processName;
+     /**
+     * 设备id
+     */
+    private Long equipmentId;
+     /**
+     * 用户id
+     */
+    private Long userId;
+     /**
+     * 用户名
+     */
+    private String userName;
+     /**
+     * 开始时间
+     */
+    private String startTime;
+     /**
+     * 结束时间
+     */
+    private String endTime;
+     /**
+     * 订单id
+     */
+    private Long taskId;
+     /**
+     * 实际生产数
+     */
+    private Integer productNum;
+     /**
+     * 0:执行中 1:待质检 2:完成
+     */
+    private Integer status;
+     /**
+     * 暂停时间
+     */
+    private String stopTime;
+     /**
+     * 暂停时产量
+     */
+    private Integer stopNumber;
+
+    public String getProcessName() {
+        return processName;
+    }
+
+    public void setProcessName(String processName) {
+        this.processName = processName;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(Long orderId) {
+        this.orderId = orderId;
+    }
+
+    public Long getProcessId() {
+        return processId;
+    }
+
+    public void setProcessId(Long processId) {
+        this.processId = processId;
+    }
+
+    public Long getEquipmentId() {
+        return equipmentId;
+    }
+
+    public void setEquipmentId(Long equipmentId) {
+        this.equipmentId = equipmentId;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public Long getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(Long taskId) {
+        this.taskId = taskId;
+    }
+
+    public Integer getProductNum() {
+        return productNum;
+    }
+
+    public void setProductNum(Integer productNum) {
+        this.productNum = productNum;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getStopTime() {
+        return stopTime;
+    }
+
+    public void setStopTime(String stopTime) {
+        this.stopTime = stopTime;
+    }
+
+    public Integer getStopNumber() {
+        return stopNumber;
+    }
+
+    public void setStopNumber(Integer stopNumber) {
+        this.stopNumber = stopNumber;
+    }
+}

+ 6 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/service/IOrderService.java

@@ -23,4 +23,10 @@ public interface IOrderService {
     AjaxResult deviceDetails(Device device);
 
     AjaxResult accounting();
+
+    TableDataInfo bankList(Order order);
+
+    AjaxResult bankDetails(Order order);
+
+    TableDataInfo enterpriseList(Order order);
 }

+ 226 - 87
ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/service/impl/OrderServiceImpl.java

@@ -1,17 +1,19 @@
 package com.ruoyi.web.controller.iot.service.impl;
 
+import com.alibaba.fastjson2.JSONObject;
 import com.ruoyi.common.constant.HttpStatus;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.PageDomain;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.page.TableSupport;
-import com.ruoyi.common.utils.SecurityUtils;
-import com.ruoyi.web.controller.iot.domain.Device;
-import com.ruoyi.web.controller.iot.domain.Order;
-import com.ruoyi.web.controller.iot.domain.ProductOrder;
-import com.ruoyi.web.controller.iot.domain.TransportOrder;
+import com.ruoyi.web.controller.iot.domain.*;
 import com.ruoyi.web.controller.iot.service.IOrderService;
 import com.ruoyi.web.dataBase.DatabaseConnectionMap;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
@@ -22,6 +24,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @author :jixinyuan
@@ -34,6 +37,9 @@ public class OrderServiceImpl implements IOrderService {
     @Autowired
     private DatabaseConnectionMap databaseConnectionMap;
 
+    private static String url = "http://open.api.tianyancha.com/services/open/cb/ic/2.0?keyword=";
+    private static String token = "55b0db34-2573-48f3-bc40-ef2db0077606";
+
     @Override
     public TableDataInfo list(Order order) {
         List<Order> orderList = new ArrayList<>();
@@ -68,45 +74,36 @@ public class OrderServiceImpl implements IOrderService {
         if (!ObjectUtils.isEmpty(order.getEndTime())) {
             condition += "and fo.end_time <= '" + order.getEndTime() + "'";
         }
-        Integer count = 0;
         try {
             List<JdbcTemplate> jdbcTemplate = databaseConnectionMap.getJdbcTemplate();
-            JdbcTemplate template = jdbcTemplate.get(0);
-//            DriverManagerDataSource dataSource = new DriverManagerDataSource();
-//            dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-//            dataSource.setUrl("jdbc:mysql://47.94.195.4:3525/boyo_fb4a88d6f6f24d67953f68c4fe829f63?useUnicode=true&useSSL=false&characterEncoding=utf8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai");
-//            dataSource.setUsername("db_cdyq6tkqn1ioja179i8b");
-//            dataSource.setPassword("By@#5c9i75sgtx3b620g6m6e");
-//            JdbcTemplate template = new JdbcTemplate(dataSource);
-            orderList = template.query("SELECT fo.*,tto.shipping_status as status FROM t_factory_order fo left join t_transport_order tto on fo.order_num = tto.order_num where 1=1 "
-                            + (ObjectUtils.isEmpty(condition) ? "" : condition)
-                            + " limit " + pageNum + "," + pageSize + ";" ,
-                    new BeanPropertyRowMapper<Order>(Order.class));
-            for (Order item : orderList) {
-                if (item.getOrderStatus().equals(1)) {
-                    item.setStatus("生产中");
-                }
-                if ("1".equals(item.getStatus())) {
-                    item.setStatus("已发货");
-                }
-                if ("2".equals(item.getStatus())) {
-                    item.setStatus("已签收");
-                }
-                if (item.getOverdue().contains("逾期")) {
-                    item.setStatus("已逾期");
+            for (JdbcTemplate template : jdbcTemplate) {
+                List<Order> orders = template.query("SELECT fo.*,tto.shipping_status as status FROM t_factory_order fo left join t_transport_order tto on fo.order_num = tto.order_num where 1=1 "
+                                + (ObjectUtils.isEmpty(condition) ? "" : condition) + ";",
+                        new BeanPropertyRowMapper<Order>(Order.class));
+                for (Order item : orders) {
+                    if (item.getOrderStatus().equals(1)) {
+                        item.setStatus("生产中");
+                    }
+                    if ("1".equals(item.getStatus())) {
+                        item.setStatus("已发货");
+                    }
+                    if ("2".equals(item.getStatus())) {
+                        item.setStatus("已签收");
+                    }
+                    if (item.getOverdue().contains("逾期")) {
+                        item.setStatus("已逾期");
+                    }
                 }
+                orderList.addAll(orders);
             }
-            count = template.queryForObject("SELECT count(fo.id) FROM t_factory_order fo " +
-                    "left join t_transport_order tto on fo.order_num = tto.order_num " +
-                    "where 1=1 " + (ObjectUtils.isEmpty(condition) ? "" : condition)+";" , Integer.class);
         } catch (Exception e) {
             throw new RuntimeException(e.getMessage());
         }
         TableDataInfo tableDataInfo = new TableDataInfo();
         tableDataInfo.setCode(HttpStatus.SUCCESS);
         tableDataInfo.setMsg("查询成功");
-        tableDataInfo.setRows(orderList);
-        tableDataInfo.setTotal(count);
+        tableDataInfo.setRows(orderList.stream().skip(pageNum).limit(pageSize).collect(Collectors.toList()));
+        tableDataInfo.setTotal(orderList.size());
         return tableDataInfo;
     }
 
@@ -116,22 +113,16 @@ public class OrderServiceImpl implements IOrderService {
         try {
             List<JdbcTemplate> jdbcTemplate = databaseConnectionMap.getJdbcTemplate();
             JdbcTemplate template = jdbcTemplate.get(0);
-//            DriverManagerDataSource dataSource = new DriverManagerDataSource();
-//            dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-//            dataSource.setUrl("jdbc:mysql://47.94.195.4:3525/boyo_fb4a88d6f6f24d67953f68c4fe829f63?useUnicode=true&useSSL=false&characterEncoding=utf8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai");
-//            dataSource.setUsername("db_cdyq6tkqn1ioja179i8b");
-//            dataSource.setPassword("By@#5c9i75sgtx3b620g6m6e");
-//            JdbcTemplate template = new JdbcTemplate(dataSource);
-            detail = template.queryForObject("SELECT * FROM t_factory_order where id = " + order.getId() + ";" , new BeanPropertyRowMapper<Order>(Order.class));
+            detail = template.queryForObject("SELECT * FROM t_factory_order where id = " + order.getId() + ";", new BeanPropertyRowMapper<Order>(Order.class));
             if (!ObjectUtils.isEmpty(detail)) {
-                List<ProductOrder> productOrderList = template.query("SELECT pod.* ,pp.process_name as processName FROM " +
+                List<ProductOrderDetail> productOrderDetailList = template.query("SELECT pod.* ,pp.process_name as processName FROM " +
                                 "t_product_order_detail pod LEFT JOIN t_product_process pp ON pod.process_id = pp.id  " +
-                                "WHERE order_id = " + detail.getId() + ";" ,
-                        new BeanPropertyRowMapper<ProductOrder>(ProductOrder.class));
-                if (!ObjectUtils.isEmpty(productOrderList)) {
-                    detail.setProductOrderList(productOrderList);
+                                "WHERE order_id = " + detail.getId() + ";",
+                        new BeanPropertyRowMapper<ProductOrderDetail>(ProductOrderDetail.class));
+                if (!ObjectUtils.isEmpty(productOrderDetailList)) {
+                    detail.setProductOrderDetailList(productOrderDetailList);
                 }
-                List<TransportOrder> transportOrders = template.query("SELECT * FROM t_transport_order where order_num = '" + detail.getOrderNum() + "';" ,
+                List<TransportOrder> transportOrders = template.query("SELECT * FROM t_transport_order where order_num = '" + detail.getOrderNum() + "';",
                         new BeanPropertyRowMapper<TransportOrder>(TransportOrder.class));
                 if (!ObjectUtils.isEmpty(transportOrders) && transportOrders.size() > 0) {
                     detail.setTransportOrder(transportOrders.get(0));
@@ -166,70 +157,218 @@ public class OrderServiceImpl implements IOrderService {
             condition += "and equipment_code >= '" + device.getConnectionTimeList().get(0) + "'";
             condition += "and equipment_code <= '" + device.getConnectionTimeList().get(1) + "'";
         }
-        Integer count = 0;
         try {
             List<JdbcTemplate> jdbcTemplate = databaseConnectionMap.getJdbcTemplate();
-            JdbcTemplate template = jdbcTemplate.get(0);
-//            DriverManagerDataSource dataSource = new DriverManagerDataSource();
-//            dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-//            dataSource.setUrl("jdbc:mysql://47.94.195.4:3525/boyo_fb4a88d6f6f24d67953f68c4fe829f63?useUnicode=true&useSSL=false&characterEncoding=utf8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai");
-//            dataSource.setUsername("db_cdyq6tkqn1ioja179i8b");
-//            dataSource.setPassword("By@#5c9i75sgtx3b620g6m6e");
-//            JdbcTemplate template = new JdbcTemplate(dataSource);
-            orderList = template.query("SELECT ie.* ,it.tsl_name as tslName FROM iot_equipment ie " +
-                            "LEFT JOIN iot_tsl it ON ie.tsl_id = it.id " +
-                            " where 1=1 " + (ObjectUtils.isEmpty(condition) ? "" : condition)
-                            + " limit " + pageNum + "," + pageSize + ";" ,
-                    new BeanPropertyRowMapper<Device>(Device.class));
-
-            count = template.queryForObject("SELECT count(*) FROM iot_equipment ;" , Integer.class);
+            for (JdbcTemplate template : jdbcTemplate) {
+                List<Device> deviceList = template.query("SELECT ie.* ,it.tsl_name as tslName FROM iot_equipment ie " +
+                                "LEFT JOIN iot_tsl it ON ie.tsl_id = it.id " +
+                                " where 1=1 " + (ObjectUtils.isEmpty(condition) ? "" : condition) + ";",
+                        new BeanPropertyRowMapper<Device>(Device.class));
+                orderList.addAll(deviceList);
+            }
         } catch (Exception e) {
             throw new RuntimeException(e.getMessage());
         }
         TableDataInfo tableDataInfo = new TableDataInfo();
         tableDataInfo.setCode(HttpStatus.SUCCESS);
         tableDataInfo.setMsg("查询成功");
-        tableDataInfo.setRows(orderList);
-        tableDataInfo.setTotal(count);
+        tableDataInfo.setRows(orderList.stream().skip(pageNum).limit(pageSize).collect(Collectors.toList()));
+        tableDataInfo.setTotal(orderList.size());
         return tableDataInfo;
     }
 
     @Override
     public AjaxResult accounting() {
         Map<String, String> map = new HashMap<>();
+        int count0 = 0;
+        int count1 = 0;
+        int count2 = 0;
+        int count3 = 0;
+        int count4 = 0;
         try {
             List<JdbcTemplate> jdbcTemplate = databaseConnectionMap.getJdbcTemplate();
-            JdbcTemplate template = jdbcTemplate.get(0);
-//            DriverManagerDataSource dataSource = new DriverManagerDataSource();
-//            dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-//            dataSource.setUrl("jdbc:mysql://47.94.195.4:3525/boyo_fb4a88d6f6f24d67953f68c4fe829f63?useUnicode=true&useSSL=false&characterEncoding=utf8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai");
-//            dataSource.setUsername("db_cdyq6tkqn1ioja179i8b");
-//            dataSource.setPassword("By@#5c9i75sgtx3b620g6m6e");
-//            JdbcTemplate template = new JdbcTemplate(dataSource);
-            int count0 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
-                    "left join t_transport_order tto on fo.order_num = tto.order_num ;" , Integer.class);
-            int count1 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
-                    "left join t_transport_order tto on fo.order_num = tto.order_num where fo.overdue like '%逾期%' ;" , Integer.class);
-            int count2 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
-                    "left join t_transport_order tto on fo.order_num = tto.order_num where fo.order_status = 1 ;" , Integer.class);
-            int count3 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
-                    "left join t_transport_order tto on fo.order_num = tto.order_num where tto.shipping_status = 1 ;" , Integer.class);
-            int count4 = template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
-                    "left join t_transport_order tto on fo.order_num = tto.order_num where tto.shipping_status = 2 ;" , Integer.class);
-            map.put("count0" , count0 + "");
-            map.put("count1" , count1 + "");
-            map.put("count2" , count2 + "");
-            map.put("count3" , count3 + "");
-            map.put("count4" , count4 + "");
+            for (JdbcTemplate template : jdbcTemplate) {
+                count0 += template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
+                        "left join t_transport_order tto on fo.order_num = tto.order_num ;", Integer.class);
+                count1 += template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
+                        "left join t_transport_order tto on fo.order_num = tto.order_num where fo.overdue like '%逾期%' ;", Integer.class);
+                count2 += template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
+                        "left join t_transport_order tto on fo.order_num = tto.order_num where fo.order_status = 1 ;", Integer.class);
+                count3 += template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
+                        "left join t_transport_order tto on fo.order_num = tto.order_num where tto.shipping_status = 1 ;", Integer.class);
+                count4 += template.queryForObject("SELECT count(*) as status FROM t_factory_order fo " +
+                        "left join t_transport_order tto on fo.order_num = tto.order_num where tto.shipping_status = 2 ;", Integer.class);
+            }
         } catch (Exception e) {
             throw new RuntimeException(e.getMessage());
         }
+        map.put("count0", count0 + "");
+        map.put("count1", count1 + "");
+        map.put("count2", count2 + "");
+        map.put("count3", count3 + "");
+        map.put("count4", count4 + "");
         return AjaxResult.success(map);
     }
 
     @Override
-    public AjaxResult deviceDetails(Device device) {
+    public TableDataInfo bankList(Order order) {
+        List<Order> orderList = new ArrayList<>();
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = (pageDomain.getPageNum() - 1) * pageDomain.getPageSize();
+        Integer pageSize = pageDomain.getPageSize();
+        String condition = "";
+        if (!ObjectUtils.isEmpty(order.getOrderNum())) {
+            condition += "and fo.order_num like '%" + order.getOrderNum() + "%'";
+        }
+        if (!ObjectUtils.isEmpty(order.getOrderName())) {
+            condition += "and fo.order_name like '%" + order.getOrderName() + "%'";
+        }
+        if (!ObjectUtils.isEmpty(order.getCustomerName())) {
+            condition += "and fo.customer_name like '%" + order.getCustomerName() + "%'";
+        }
+        if (!ObjectUtils.isEmpty(order.getOrderStatus())) {
+            condition += "and fo.order_status =" + order.getOrderStatus();
+        }
+        if (!ObjectUtils.isEmpty(order.getDeliveryCycle())) {
+            condition += "and fo.delivery_cycle = " + order.getDeliveryCycle();
+        }
+        if (!ObjectUtils.isEmpty(order.getStartTime())) {
+            condition += "and fo.start_time >= '" + order.getStartTime() + "'";
+        }
+        if (!ObjectUtils.isEmpty(order.getEndTime())) {
+            condition += "and fo.end_time <= '" + order.getEndTime() + "'";
+        }
+        try {
+            List<JdbcTemplate> jdbcTemplate = databaseConnectionMap.getJdbcTemplate();
+            for (JdbcTemplate template : jdbcTemplate) {
+                List<Order> orders = template.query("SELECT fo.*,tto.shipping_status as status FROM t_factory_order fo left join t_transport_order tto on fo.order_num = tto.order_num where 1=1 "
+                                + (ObjectUtils.isEmpty(condition) ? "" : condition) + ";",
+                        new BeanPropertyRowMapper<Order>(Order.class));
+                for (Order item : orders) {
+                    if (item.getOrderStatus().equals(1)) {
+                        item.setStatus("生产中");
+                    }
+                    if ("1".equals(item.getStatus())) {
+                        item.setStatus("已发货");
+                    }
+                    if ("2".equals(item.getStatus())) {
+                        item.setStatus("已签收");
+                    }
+                    if (item.getOverdue().contains("逾期")) {
+                        item.setStatus("已逾期");
+                    }
+                    String jsonString = executeGet(url + item.getCustomerName(), token);
+                    JSONObject jsonObject = JSONObject.parseObject(jsonString);
+                    if ("0".equals(jsonObject.getString("error_code"))) {
+                        String result = jsonObject.getString("result");
+                        JSONObject jsonData = JSONObject.parseObject(result);
+                        item.setEnterpriseName(jsonData.getString("name"));
+                        item.setEnterpriseLegalPerson(jsonData.getString("legalPersonName"));
+                        item.setContactInformation(jsonData.getString("phoneNumber"));
+                        item.setEnterpriseType(jsonData.getString("industry"));
+                        item.setDateEstablishment(jsonData.getString("estiblishTime"));
+                        item.setRegisteredCapital(jsonData.getString("regCapital"));
+                    }
+                }
+                orderList.addAll(orders);
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e.getMessage());
+        }
+        TableDataInfo tableDataInfo = new TableDataInfo();
+        tableDataInfo.setCode(HttpStatus.SUCCESS);
+        tableDataInfo.setMsg("查询成功");
+        tableDataInfo.setRows(orderList.stream().skip(pageNum).limit(pageSize).collect(Collectors.toList()));
+        tableDataInfo.setTotal(orderList.size());
+        return tableDataInfo;
+    }
+
+    @Override
+    public AjaxResult bankDetails(Order order) {
+        Order detail = new Order();
+        try {
+            List<JdbcTemplate> jdbcTemplate = databaseConnectionMap.getJdbcTemplate();
+            JdbcTemplate template = jdbcTemplate.get(0);
+            detail = template.queryForObject("SELECT * FROM t_factory_order where id = " + order.getId() + ";", new BeanPropertyRowMapper<Order>(Order.class));
+            if (!ObjectUtils.isEmpty(detail)) {
+                List<ProductOrder> productOrderList = template.query("SELECT po.* ,pg.group_name as processGroupName FROM " +
+                                "t_product_order po LEFT JOIN t_process_group pg ON po.process_group_id = pg.id  " +
+                                "WHERE po.task_id = " + detail.getId() + ";",
+                        new BeanPropertyRowMapper<ProductOrder>(ProductOrder.class));
+                if (!ObjectUtils.isEmpty(productOrderList)) {
+                    detail.setProductOrderList(productOrderList);
+                    List<Material> materialList = new ArrayList<>();
+                    for (ProductOrder item : productOrderList) {
+                        List<Material> materials = template.query("SELECT * FROM t_material where id = "
+                                        + item.getProductionId() + ";",
+                                new BeanPropertyRowMapper<Material>(Material.class));
+                        if (!ObjectUtils.isEmpty(materials)) {
+                            for (Material material : materials) {
+                                material.setProductionNum(item.getProductionNum());
+                                material.setDeliveryDate(item.getDeliveryDate());
+                            }
+                            materialList.addAll(materials);
+                        }
+                    }
+                    detail.setMaterialList(materialList);
+                }
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e.getMessage());
+        }
+        return AjaxResult.success(detail);
+    }
+
+    @Override
+    public TableDataInfo enterpriseList(Order order) {
         return null;
     }
 
+    @Override
+    public AjaxResult deviceDetails(Device device) {
+        List<IotRealData> iotRealDataList = new ArrayList<>();
+        try {
+            List<JdbcTemplate> jdbcTemplate = databaseConnectionMap.getJdbcTemplate();
+            JdbcTemplate template = jdbcTemplate.get(0);
+            iotRealDataList = template.query("SELECT ird.*,ie.equipment_name AS deviceName," +
+                            "ita.attr_name AS tagName " +
+                            "FROM iot_real_data ird " +
+                            "LEFT JOIN iot_equipment ie ON ird.device_code = ie.equipment_code " +
+                            "LEFT JOIN iot_tsl_attr ita ON ird.tag = ita.attr_code " +
+                            "where ird.device_code = '" + device.getEquipmentCode() + "';",
+                    new BeanPropertyRowMapper<IotRealData>(IotRealData.class));
+        } catch (Exception e) {
+            throw new RuntimeException(e.getMessage());
+        }
+        return AjaxResult.success(iotRealDataList);
+    }
+
+    /**
+     * http get请求
+     *
+     * @param url   接口url
+     * @param token token
+     * @return 返回接口数据
+     */
+    protected static String executeGet(String url, String token) {
+        String result = "";
+        try {
+            // 根据地址获取请求
+            HttpGet request = new HttpGet(url);//这⾥发送get请求
+            // 获取当前客户端对象
+            request.setHeader("Authorization", token);
+            HttpClient httpClient = new DefaultHttpClient();
+            // 通过请求对象获取响应对象
+            HttpResponse response = httpClient.execute(request);
+            // 判断⽹络连接状态码是否正常(0--200都数正常)
+            if (response.getStatusLine().getStatusCode() == HttpStatus.SUCCESS) {
+                result = EntityUtils.toString(response.getEntity(), "utf-8");
+            }
+        } catch (Exception e) {
+            // TODO Auto-generated catch block e.printStackTrace();
+            e.printStackTrace();
+        }
+        return result;
+    }
+
 }