瀏覽代碼

bom查询增加分类

home 2 年之前
父節點
當前提交
aea70470f6

+ 2 - 2
hx-common/hx-tool/src/main/java/com/fjhx/constants/lock/IotManagementLockConstant.java → hx-api/iot-management-api/src/main/java/com/fjhx/constant/IotManagementLockConstant.java

@@ -1,7 +1,7 @@
-package com.fjhx.constants.lock;
+package com.fjhx.constant;
 
 /**
- * 针筒生产管理系统模块锁常量
+ * 锁常量
  */
 public interface IotManagementLockConstant {
 

+ 5 - 0
hx-api/iot-management-api/src/main/java/com/fjhx/params/bom/BomVo.java

@@ -19,4 +19,9 @@ public class BomVo extends Bom {
      */
     private String updateUserName;
 
+    /**
+     * 分类名称
+     */
+    private String classifName;
+
 }

+ 3 - 0
hx-common/hx-tool/src/main/java/com/fjhx/constants/ErrorMsgConstant.java

@@ -1,5 +1,8 @@
 package com.fjhx.constants;
 
+/**
+ * 通用错误常量
+ */
 public interface ErrorMsgConstant {
 
     // 乐观锁修改失败,或等待锁超时 异常提示

+ 33 - 0
hx-common/hx-tool/src/main/java/com/fjhx/constants/FileConstant.java

@@ -0,0 +1,33 @@
+package com.fjhx.constants;
+
+/**
+ * 文件常量
+ */
+public interface FileConstant {
+
+    // 文件类型
+    interface FileType {
+        // 图片
+        Integer IMAGE = 1;
+        // 视频
+        Integer VIDEO = 2;
+        // 音频
+        Integer AUDIO = 3;
+        // word
+        Integer WORD = 4;
+        // excel
+        Integer EXCEL = 5;
+        // ppt
+        Integer PPT = 6;
+        // 文本
+        Integer TXT = 7;
+        // zip
+        Integer ZIP = 8;
+    }
+
+    // 文件后缀
+    interface FileSuffix {
+
+    }
+
+}

+ 9 - 2
hx-common/hx-tool/src/main/java/com/fjhx/constants/CommonConstant.java → hx-common/hx-tool/src/main/java/com/fjhx/constants/StatusConstant.java

@@ -1,9 +1,9 @@
 package com.fjhx.constants;
 
 /**
- * 通用常量
+ * 通用状态常量
  */
-public interface CommonConstant {
+public interface StatusConstant {
 
     /**
      * 是否
@@ -17,4 +17,11 @@ public interface CommonConstant {
     Integer ENABLE = 1;
     Integer DISABLE = 0;
 
+    /**
+     * 删除 未删除
+     */
+    Integer NOT_DELETED = 0;
+    Integer DELETED = 1;
+
+
 }

+ 3 - 3
hx-common/hx-tool/src/main/java/com/fjhx/utils/TreeUtil.java

@@ -11,17 +11,17 @@ public class TreeUtil {
     /**
      * 节点ID名称
      */
-    public static final String ID_NAME = "id";
+    private static final String ID_NAME = "id";
 
     /**
      * 节点名称
      */
-    public static final String LABEL_NAME = "label";
+    private static final String LABEL_NAME = "label";
 
     /**
      * 子节点名称
      */
-    public static final String CHILDREN_NAME = "children";
+    private static final String CHILDREN_NAME = "children";
 
     /**
      * 父id名称

+ 3 - 1
hx-serve/iot-management/src/main/java/com/fjhx/bom/mapper/BomMapper.xml

@@ -10,9 +10,11 @@
                b.update_time,
                p.id   productId,
                p.name productName,
-               p.code productCode
+               p.code productCode,
+               c.name classifName
         from bom b
                  inner join product p on b.product_id = p.id
+                 left join classif c on p.classif_id = c.id
             ${ew.customSqlSegment}
     </select>
 

+ 5 - 4
hx-serve/iot-management/src/main/java/com/fjhx/bom/service/impl/BomServiceImpl.java

@@ -3,12 +3,12 @@ package com.fjhx.bom.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.fjhx.entity.bom.Bom;
-import com.fjhx.enums.bom.BomTypeEnum;
 import com.fjhx.bom.mapper.BomMapper;
 import com.fjhx.bom.service.BomService;
+import com.fjhx.constants.StatusConstant;
+import com.fjhx.entity.bom.Bom;
+import com.fjhx.enums.bom.BomTypeEnum;
 import com.fjhx.params.bom.BomVo;
-import com.fjhx.constants.CommonConstant;
 import com.fjhx.utils.WrapperUtil;
 import com.fjhx.utils.feign.UserClientUtil;
 import org.springframework.stereotype.Service;
@@ -33,10 +33,11 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, Bom> implements BomSe
                 .eq("p.classif_id", "classifId") // 分类查询
                 .keyword("p.name", "p.code") // 关键字查询
                 .eqTenantId("b") // 租户id
+                .notDelete("b", "p") // 未删除
                 .getWrapper();
 
         wrapper.eq("b.type", BomTypeEnum.PRODUCT_TYPE.getCode()); // 产品bom
-        wrapper.eq("b.current_edition", CommonConstant.YES); // 当前版本
+        wrapper.eq("b.current_edition", StatusConstant.YES); // 当前版本
         wrapper.orderByAsc("p.code"); // 产品编码排序
 
         Page<BomVo> result = baseMapper.getPage(createPage(condition), wrapper);

+ 3 - 3
hx-serve/iot-management/src/main/java/com/fjhx/material/service/impl/MaterialServiceImpl.java

@@ -7,9 +7,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fjhx.base.BaseEntity;
 import com.fjhx.classif.service.ClassifService;
-import com.fjhx.constants.CommonConstant;
+import com.fjhx.constants.StatusConstant;
 import com.fjhx.constants.ErrorMsgConstant;
-import com.fjhx.constants.lock.IotManagementLockConstant;
+import com.fjhx.constant.IotManagementLockConstant;
 import com.fjhx.entity.material.Material;
 import com.fjhx.material.mapper.MaterialMapper;
 import com.fjhx.material.service.MaterialService;
@@ -85,7 +85,7 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
             materialVo.setQualityTestingRate(BigDecimal.ZERO);
         }
 
-        if (ObjectUtil.isEmpty(materialVo.getLoss()) || coiled.equals(CommonConstant.No)) {
+        if (ObjectUtil.isEmpty(materialVo.getLoss()) || coiled.equals(StatusConstant.No)) {
             materialVo.setLoss(BigDecimal.ZERO);
         }
 

+ 1 - 1
hx-serve/iot-management/src/main/java/com/fjhx/product/service/impl/ProductServiceImpl.java

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fjhx.base.BaseEntity;
 import com.fjhx.classif.service.ClassifService;
 import com.fjhx.constants.ErrorMsgConstant;
-import com.fjhx.constants.lock.IotManagementLockConstant;
+import com.fjhx.constant.IotManagementLockConstant;
 import com.fjhx.entity.product.Product;
 import com.fjhx.product.mapper.ProductMapper;
 import com.fjhx.product.service.ProductService;