Browse Source

矿山域

ltt 1 year ago
parent
commit
f2ac884760

+ 1 - 0
.idea/compiler.xml

@@ -9,6 +9,7 @@
         <module name="business-usual-transport" />
         <module name="business-transport-start" />
         <module name="business-goods" />
+        <module name="business-mine" />
         <module name="business-common-datasource" />
         <module name="business-common-core" />
         <module name="business-address" />

+ 2 - 0
.idea/encodings.xml

@@ -23,6 +23,8 @@
     <file url="file://$PROJECT_DIR$/business-modules/business-driver/src/main/resources" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/business-modules/business-goods/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/business-modules/business-goods/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/business-modules/business-mine/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/business-modules/business-mine/src/main/resources" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/business-modules/business-path/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/business-modules/business-path/src/main/resources" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/business-modules/business-truck/src/main/java" charset="UTF-8" />

+ 5 - 0
business-modules-web/business-transport-start/pom.xml

@@ -85,6 +85,11 @@
             <artifactId>business-path</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>business-mine</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>com.sckw</groupId>

+ 5 - 0
business-modules-web/business-transport-start/src/main/resources/application.yml

@@ -49,6 +49,11 @@ spring:
           username: business_user
           password: business_user
           driver-class-name: com.mysql.cj.jdbc.Driver
+        mine:
+          url: jdbc:mysql://10.10.10.221:3306/business_mine?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
+          username: business_mine
+          password: business_mine
+          driver-class-name: com.mysql.cj.jdbc.Driver
   data:
     redis:
       host: 10.10.10.221

+ 42 - 0
business-modules/business-mine/pom.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>business-modules</artifactId>
+        <groupId>com.sckw</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>business-mine</artifactId>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>business-common-core</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>business-common-datasource</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+    </dependencies>
+</project>

+ 22 - 0
business-modules/business-mine/src/main/java/com/sckw/mine/controller/MIneController.java

@@ -0,0 +1,22 @@
+package com.sckw.mine.controller;
+
+import com.sckw.core.web.response.HttpResult;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @desc:
+ * @author: Lt
+ * @date: 2024-05-24
+ */
+@RestController
+@RequestMapping("/mine")
+public class MIneController {
+
+    @PostMapping(value = "/order/add")
+    public HttpResult mineOrderAdd()
+    {
+        return HttpResult.ok("hello world");
+    }
+}

+ 73 - 0
business-modules/business-mine/src/main/java/com/sckw/mine/entity/KwBusinessMine.java

@@ -0,0 +1,73 @@
+package com.sckw.mine.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @desc: 生产资料
+ * @author: Lt
+ * @date: 2024-05-24
+ */
+@Data
+public class KwBusinessMine implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 矿山订单关联id
+     */
+    private Long mainOrderId;
+
+    /**
+     * 矿料管理id
+     */
+    private Long mineId;
+
+    /**
+     * 矿料体积
+     */
+    private String mineVol;
+
+    /**
+     * 矿料数量
+     */
+    private BigDecimal purchaseNum;
+
+    /*
+    矿料重量
+     */
+    private BigDecimal mineWeight;
+
+    /**
+     * create_by
+     */
+    private String createBy;
+
+    /**
+     * update_by
+     */
+    private String updateBy;
+
+    /**
+     * create_time
+     */
+    private Date createTime;
+
+    /**
+     * update_time
+     */
+    private Date updateTime;
+
+    /**
+     * del_flag
+     */
+    private Integer delFlag;
+}

+ 122 - 0
business-modules/business-mine/src/main/java/com/sckw/mine/entity/KwBusinessMineOrder.java

@@ -0,0 +1,122 @@
+package com.sckw.mine.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc: 矿山订单表
+ * @author: Lt
+ * @date: 2024-05-24
+ */
+@Data
+public class KwBusinessMineOrder implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 订单编号
+     */
+    private String mineOrderNo;
+
+    /**
+     * 订单来源
+     */
+    private Integer orderSource;
+
+    /**
+     * 采购企业id
+     */
+    private Long cgCompanyId;
+
+    /**
+     * 采购企业
+     */
+    private String cgCompany;
+
+    /**
+     * 采购联系方式
+     */
+    private String cgCompanyConcat;
+
+    /**
+     * 采购联系人昵称
+     */
+    private String cgCompanyName;
+
+    /**
+     * 付款单位id
+     */
+    private Long fkEptId;
+
+    /**
+     * 付款单位
+     */
+    private String fkDept;
+
+    /**
+     * 收款部门
+     */
+    private Long skDeptId;
+
+    /**
+     * 收款部门
+     */
+    private String skDept;
+
+    /**
+     * 客户下单时间
+     */
+    private Date customerOrderTime;
+
+    /**
+     * 交货截止时间
+     */
+    private Date deliveryCutoffTime;
+
+    /**
+     * 是否物流承接
+     */
+    private Integer isTransport;
+
+    /**
+     * 订单状态
+     */
+    private Integer status;
+
+    /*
+    生产流程
+     */
+    private String workFlow;
+
+    /**
+     * create_by
+     */
+    private String createBy;
+
+    /**
+     * update_by
+     */
+    private String updateBy;
+
+    /**
+     * create_time
+     */
+    private Date createTime;
+
+    /**
+     * update_time
+     */
+    private Date updateTime;
+
+    /**
+     * del_flag
+     */
+    private Integer delFlag;
+}

+ 56 - 0
business-modules/business-mine/src/main/java/com/sckw/mine/entity/KwBusinessTransportOrderNo.java

@@ -0,0 +1,56 @@
+package com.sckw.mine.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc: 矿山订单关联的物流订单
+ * @author: Lt
+ * @date: 2024-05-24
+ */
+@Data
+public class KwBusinessTransportOrderNo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * main_order_id
+     */
+    private Long mainOrderId;
+
+    /**
+     * 物流订单关联订单号
+     */
+    private String transportOrderNo;
+
+    /**
+     * create_by
+     */
+    private String createBy;
+
+    /**
+     * update_by
+     */
+    private String updateBy;
+
+    /**
+     * create_time
+     */
+    private Date createTime;
+
+    /**
+     * update_time
+     */
+    private Date updateTime;
+
+    /**
+     * del_flag
+     */
+    private Integer delFlag;
+}

+ 100 - 0
business-modules/business-mine/src/main/java/com/sckw/mine/entity/req/MineAddParam.java

@@ -0,0 +1,100 @@
+package com.sckw.mine.entity.req;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import jakarta.validation.constraints.NotBlank;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @desc: 矿山域-订单新增
+ * @author: Lt
+ * @date: 2024-05-24
+ */
+public class MineAddParam {
+
+    /*
+    采购企业Id
+     */
+    @NotBlank(message = "采购企业Id不能为空")
+    private String cgCompanyId;
+
+    /*
+    采购企业名称
+     */
+    @NotBlank(message = "采购企业名称不能为空")
+    private String cgCompany;
+
+    /*
+    采购企业经理
+     */
+    private String cgCompanyName;
+
+    /*
+    企业联系方式
+     */
+    private String cgCompanyConcat;
+
+    /*
+    付款单位id
+     */
+    private String fkDeptId;
+
+    /*
+    付款单位
+     */
+    private String fkDept;
+
+    /*
+    收款单位
+     */
+    private String skDeptId;
+
+    /*
+    收款单位
+     */
+    private String skDept;
+
+    /*
+    矿料id
+     */
+    @NotBlank(message = "矿料id必填")
+    private String mineId;
+
+    /*
+    采购数量
+     */
+    private BigDecimal purchaseNum;
+
+    /*
+    矿料体积
+     */
+    private String mineVol;
+
+    /*
+    矿料重量
+     */
+    private BigDecimal mineWeight;
+
+    /*
+    客户下单时间
+     */
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date customerOrderTime;
+
+    /*
+    交货截止时间
+     */
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date deliveryCutoffTime;
+
+    /*
+    生产流程
+     */
+    private String workFlow;
+
+
+
+
+
+}

+ 47 - 0
business-modules/business-mine/src/main/java/com/sckw/mine/enums/MineStatusEnum.java

@@ -0,0 +1,47 @@
+package com.sckw.mine.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * @author lt
+ * @desc: 订单状态枚举
+ */
+@AllArgsConstructor
+@Getter
+public enum MineStatusEnum {
+
+    ONE(1, "已保存"),
+    TWO(2, "确认下单"),
+    THREE(3, "订单审核"),
+    FOUR(4, "计划排产"),
+    FIVE(5, "执行生产"),
+    SIX(6, "原料加工"),
+    SEVEN(7, "矿料清点"),
+    EIGHT(8, "完成订单");
+
+    private final Integer code;
+    private final String msg;
+
+
+    public static String getNameByCode(Integer code) {
+        MineStatusEnum[] enums = MineStatusEnum.values();
+        for (MineStatusEnum instance : enums) {
+            if (Objects.equals(instance.getCode(), code)) {
+                return instance.getMsg();
+            }
+        }
+        return null;
+    }
+
+    public static List<MineStatusEnum> getSortList() {
+        MineStatusEnum[] enums = MineStatusEnum.values();
+        return Arrays.stream(enums).sorted(Comparator.comparingInt(MineStatusEnum::getCode)).collect(Collectors.toList());
+    }
+}

+ 40 - 0
business-modules/business-mine/src/main/java/com/sckw/mine/enums/TransportUnderEnum.java

@@ -0,0 +1,40 @@
+package com.sckw.mine.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/*
+物流承接方式
+ */
+@AllArgsConstructor
+@Getter
+public enum TransportUnderEnum {
+
+    ONE(1, "自有物流"),
+    TWO(2, "非自有/不承接");
+
+    private final Integer code;
+    private final String msg;
+
+
+    public static String getNameByCode(Integer code) {
+        TransportUnderEnum[] enums = TransportUnderEnum.values();
+        for (TransportUnderEnum instance : enums) {
+            if (Objects.equals(instance.getCode(), code)) {
+                return instance.getMsg();
+            }
+        }
+        return null;
+    }
+
+    public static List<TransportUnderEnum> getSortList() {
+        TransportUnderEnum[] enums = TransportUnderEnum.values();
+        return Arrays.stream(enums).sorted(Comparator.comparingInt(TransportUnderEnum::getCode)).collect(Collectors.toList());
+    }
+}

+ 1 - 0
business-modules/pom.xml

@@ -21,6 +21,7 @@
         <module>business-truck</module>
         <module>business-usual-transport</module>
         <module>business-user</module>
+        <module>business-mine</module>
     </modules>
 
     <properties>