caozj 2 年之前
父節點
當前提交
c79301ebee
共有 38 個文件被更改,包括 2006 次插入5 次删除
  1. 15 0
      bladex/blade-common/src/main/java/org/springblade/common/constant/ConfigConstant.java
  2. 70 0
      hx-saas-project/saas-entity/src/main/java/com/fjhx/base/BaseStockEntity.java
  3. 121 0
      hx-saas-project/saas-entity/src/main/java/com/fjhx/base/TreeNode.java
  4. 54 0
      hx-saas-project/saas-entity/src/main/java/com/fjhx/config/entity/Config.java
  5. 61 0
      hx-saas-project/saas-entity/src/main/java/com/fjhx/house/entity/House.java
  6. 118 0
      hx-saas-project/saas-entity/src/main/java/com/fjhx/material/entity/Material.java
  7. 73 0
      hx-saas-project/saas-entity/src/main/java/com/fjhx/material/entity/MaterialCategory.java
  8. 61 0
      hx-saas-project/saas-entity/src/main/java/com/fjhx/material/entity/MaterialExtend.java
  9. 70 0
      hx-saas-project/saas-entity/src/main/java/com/fjhx/material/enums/TechnologtTypeEnum.java
  10. 88 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/config/controller/ConfigController.java
  11. 30 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/config/mapper/ConfigMapper.java
  12. 17 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/config/mapper/ConfigMapper.xml
  13. 35 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/config/service/IConfigService.java
  14. 61 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/config/service/impl/ConfigServiceImpl.java
  15. 109 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/house/controller/HouseController.java
  16. 49 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/house/mapper/HouseMapper.java
  17. 47 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/house/mapper/HouseMapper.xml
  18. 46 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/house/service/IHouseService.java
  19. 57 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/house/service/impl/HouseServiceImpl.java
  20. 94 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/controller/MaterialCategoryController.java
  21. 111 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/controller/MaterialController.java
  22. 48 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/controller/MaterialExtendController.java
  23. 30 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialCategoryMapper.java
  24. 20 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialCategoryMapper.xml
  25. 30 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialExtendMapper.java
  26. 13 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialExtendMapper.xml
  27. 51 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialMapper.java
  28. 65 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialMapper.xml
  29. 39 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/IMaterialCategoryService.java
  30. 30 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/IMaterialExtendService.java
  31. 66 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/IMaterialService.java
  32. 59 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/impl/MaterialCategoryServiceImpl.java
  33. 35 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/impl/MaterialExtendServiceImpl.java
  34. 128 0
      hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/impl/MaterialServiceImpl.java
  35. 1 1
      hx-service/a/src/main/java/com/fjhx/material/mapper/MaterialMapper.xml
  36. 1 1
      hx-service/storage/src/main/java/com/fjhx/material/mapper/MaterialMapper.xml
  37. 1 1
      hx-service/storage/src/main/java/com/fjhx/material/mapper/MaterialSMapper.java
  38. 2 2
      hx-service/storage/src/main/java/com/fjhx/material/service/impl/MaterialServiceImpl.java

+ 15 - 0
bladex/blade-common/src/main/java/org/springblade/common/constant/ConfigConstant.java

@@ -0,0 +1,15 @@
+package org.springblade.common.constant;
+
+/**
+ * 基础配置常量
+ * @Author:caozj
+ * @DATE:2022/7/18 10:56
+ */
+public class ConfigConstant {
+
+    /**
+     * 物料设置
+     */
+    public static final String MATERIAL_SETTING = "material:setting";
+
+}

+ 70 - 0
hx-saas-project/saas-entity/src/main/java/com/fjhx/base/BaseStockEntity.java

@@ -0,0 +1,70 @@
+package com.fjhx.base;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.utils.DateUtil;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class BaseStockEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    @TableId(value = "id", type = IdType.ASSIGN_ID)
+    private String id;
+
+    /**
+     * 是否删除
+     */
+    @TableLogic
+    private String isDelete;
+    /**
+     * 创建人id
+     */
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
+    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
+    private Date createTime;
+
+    /**
+     * 更新人id
+     */
+    private String updateUser;
+
+    /**
+     * 更新时间
+     */
+    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
+    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
+    private Date updateTime;
+
+    /**
+     * 赋值创建时间和创建人
+     */
+    public void setCreate() {
+        setCreateTime(new Date());
+        setCreateUser(AuthUtil.getUserIdStr());
+    }
+
+    /**
+     * 赋值更新时间和更新人
+     */
+    public void setUpdate() {
+        setUpdateTime(new Date());
+        setUpdateUser(AuthUtil.getUserIdStr());
+    }
+}

+ 121 - 0
hx-saas-project/saas-entity/src/main/java/com/fjhx/base/TreeNode.java

@@ -0,0 +1,121 @@
+package com.fjhx.base;
+
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * 树节点
+ */
+public class TreeNode implements Serializable {
+
+    private static final long serialVersionUID = 9014732915522174992L;
+
+    //节点ID
+    private String id;
+
+    //节点名称
+    private String text;
+
+    //节点父级ID
+    private String pId;
+
+    //节点所有的上级ID
+    private String pIds;
+
+    //节点其余属性
+    private HashMap<String, Object> attrs = new HashMap<>();
+
+    //子节点
+    private List<TreeNode> children;
+
+    public TreeNode() {
+
+    }
+
+    public TreeNode(String id, String text) {
+        this.id = id;
+        this.text = text;
+    }
+
+    public TreeNode(String id, String text, String pId) {
+        this.id = id;
+        this.text = text;
+        this.pId = pId;
+    }
+
+    public TreeNode(String id, String text, String pId, String pIds) {
+        this.id = id;
+        this.text = text;
+        this.pId = pId;
+        this.pIds = pIds;
+    }
+
+    /**
+     * 新增节点属性
+     *
+     * @param key
+     * @param value
+     */
+    public void putAttrs(String key, Object value) {
+        if (StringUtils.isBlank(key) || value == null) {
+            return;
+        }
+        attrs.put(key, value);
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public String getpId() {
+        return pId;
+    }
+
+    public void setpId(String pId) {
+        this.pId = pId;
+    }
+
+    public String getpIds() {
+        return pIds;
+    }
+
+    public void setpIds(String pIds) {
+        this.pIds = pIds;
+    }
+
+    public HashMap<String, Object> getAttrs() {
+        return attrs;
+    }
+
+    public void setAttrs(HashMap<String, Object> attrs) {
+        if (MapUtils.isEmpty(attrs)) {
+            return;
+        }
+        this.attrs.putAll(attrs);
+    }
+
+    public List<TreeNode> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<TreeNode> children) {
+        this.children = children;
+    }
+
+}

+ 54 - 0
hx-saas-project/saas-entity/src/main/java/com/fjhx/config/entity/Config.java

@@ -0,0 +1,54 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.config.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+import com.fjhx.base.BaseStockEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 仓库实体类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Data
+@TableName("stock_config")
+@ApiModel(value = "Config对象", description = "仓库")
+public class Config extends BaseStockEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* key值
+	*/
+	@ApiModelProperty(value = "key值")
+	private String cKey;
+	/**
+	* value值
+	*/
+	@ApiModelProperty(value = "value值")
+	private String cValue;
+
+
+}

+ 61 - 0
hx-saas-project/saas-entity/src/main/java/com/fjhx/house/entity/House.java

@@ -0,0 +1,61 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.house.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+import com.fjhx.base.BaseStockEntity;
+import com.fjhx.base.BasicEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 仓库实体类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Data
+@TableName("stock_house")
+@ApiModel(value = "House对象", description = "仓库")
+public class House extends BaseStockEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 仓库名称
+	*/
+	@ApiModelProperty(value = "仓库名称")
+	private String name;
+	/**
+	* 备注
+	*/
+	@ApiModelProperty(value = "备注")
+	private String remark;
+	/**
+	* plc编号 (枚举定义:1=一号仓库,2=二号仓库)
+	*/
+	@ApiModelProperty(value = "plc编号 (枚举定义:1=一号仓库,2=二号仓库)")
+	private Integer plcCode;
+}

+ 118 - 0
hx-saas-project/saas-entity/src/main/java/com/fjhx/material/entity/Material.java

@@ -0,0 +1,118 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+import com.fjhx.base.BaseStockEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 物料实体类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Data
+@TableName("stock_material")
+@ApiModel(value = "Material对象", description = "物料")
+public class Material extends BaseStockEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 物料名称
+	*/
+	@ApiModelProperty(value = "物料名称")
+	private String name;
+	/**
+	* 编码
+	*/
+	@ApiModelProperty(value = "编码")
+	private String code;
+
+	/**
+	* 分类
+	*/
+	@ApiModelProperty(value = "分类")
+	private String categoryId;
+	/**
+	* 安全库存
+	*/
+	@ApiModelProperty(value = "安全库存")
+	private Integer safetyStock;
+	/**
+	* 抽检⽐例
+	*/
+	@ApiModelProperty(value = "抽检⽐例")
+	private BigDecimal checkRate;
+	/**
+	* 安全预警天数/采购周期
+	*/
+	@ApiModelProperty(value = "安全预警天数/采购周期")
+	private Integer safetyWarnDay;
+	/**
+	* 规格
+	*/
+	@ApiModelProperty(value = "规格")
+	private String spec;
+	/**
+	* 备注
+	*/
+	@ApiModelProperty(value = "备注")
+	private String remark;
+	/**
+	* 标准价格
+	*/
+	@ApiModelProperty(value = "标准价格")
+	private BigDecimal price;
+	/**
+	* 标准库存
+	*/
+	@ApiModelProperty(value = "标准库存")
+	private BigDecimal stockStandard;
+	/**
+	* 用途
+	*/
+	@ApiModelProperty(value = "用途")
+	private String purpose;
+	/**
+	* 工艺类型 (枚举定义:0=直喷,1=热转,2=打纸,3=墨水,4=其他)
+	*/
+	@ApiModelProperty(value = "工艺类型 (枚举定义:0=直喷,1=热转,2=打纸,3=墨水,4=其他)")
+	private Integer technologyType;
+	/**
+	 * 克重
+	 */
+	@ApiModelProperty(value = "克重")
+	@TableField(exist = false)
+	private Float unitWeight;
+	/**
+	 * 门幅
+	 */
+	@ApiModelProperty(value = "门幅")
+	@TableField(exist = false)
+	private Float width;
+}

+ 73 - 0
hx-saas-project/saas-entity/src/main/java/com/fjhx/material/entity/MaterialCategory.java

@@ -0,0 +1,73 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+import com.fjhx.base.BaseStockEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 物料分类实体类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Data
+@TableName("stock_material_category")
+@ApiModel(value = "MaterialCategory对象", description = "物料分类")
+public class MaterialCategory extends BaseStockEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 编码
+	*/
+	@ApiModelProperty(value = "编码")
+	private String code;
+	/**
+	* 名称
+	*/
+	@ApiModelProperty(value = "名称")
+	private String name;
+	/**
+	* 父级ID
+	*/
+	@ApiModelProperty(value = "父级ID")
+	private String parentId;
+	/**
+	* 是否选择
+	*/
+	@ApiModelProperty(value = "是否选择")
+	private Integer isForChose;
+	/**
+	* 仓库
+	*/
+	@ApiModelProperty(value = "仓库")
+	private String warehouse;
+
+	/**
+	 * 该节点的所有上级ID,多个用“,”隔开
+	 */
+	private String ancestors;
+
+}

+ 61 - 0
hx-saas-project/saas-entity/src/main/java/com/fjhx/material/entity/MaterialExtend.java

@@ -0,0 +1,61 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 物料扩展实体类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Data
+@TableName("stock_material_extend")
+@ApiModel(value = "MaterialExtend对象", description = "物料")
+public class MaterialExtend implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键ID
+	*/
+	@ApiModelProperty(value = "主键ID")
+	private String id;
+	/**
+	* 物料ID
+	*/
+	@ApiModelProperty(value = "物料ID")
+	private String materialId;
+	/**
+	* 克重
+	*/
+	@ApiModelProperty(value = "克重")
+	private Float unitWeight;
+	/**
+	* 门幅
+	*/
+	@ApiModelProperty(value = "门幅")
+	private Float width;
+
+
+}

+ 70 - 0
hx-saas-project/saas-entity/src/main/java/com/fjhx/material/enums/TechnologtTypeEnum.java

@@ -0,0 +1,70 @@
+package com.fjhx.material.enums;
+
+import org.apache.commons.collections4.MapUtils;
+import org.springblade.core.tool.utils.StringPool;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 物料工艺类型
+ * 0=直喷,1=热转,2=打纸,3=墨水,4=其他)
+ */
+public enum TechnologtTypeEnum {
+
+    type_1(0, "直喷"),
+    type_2(1, "热转"),
+    type_3(2, "打纸"),
+    type_4(3, "墨水"),
+    type_5(4, "其他"),
+    ;
+
+    private int key;
+
+    private String value;
+
+    private static Map<Integer, String> map = new HashMap<>();
+
+    TechnologtTypeEnum(int key, String value) {
+        this.key = key;
+        this.value = value;
+    }
+
+    /**
+     * 获取枚举map
+     *
+     * @return
+     */
+    public static Map<Integer, String> getMap() {
+        if (MapUtils.isNotEmpty(map)) {
+            return map;
+        }
+        for (TechnologtTypeEnum ms : values()) {
+            map.put(ms.key, ms.value);
+        }
+        return map;
+    }
+
+    /**
+     * 通过key获取名称
+     *
+     * @param key
+     * @return
+     */
+    public static String getNameByKey(Integer key) {
+        if (key == null || key < 0) {
+            return StringPool.EMPTY;
+        }
+        Map<Integer, String> map = getMap();
+        return map.getOrDefault(key, StringPool.EMPTY);
+    }
+
+    public int getKey() {
+        return key;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+}

+ 88 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/config/controller/ConfigController.java

@@ -0,0 +1,88 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.config.controller;
+
+import com.fjhx.config.service.IConfigService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.common.constant.ApiConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.fjhx.config.entity.Config;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 仓库 控制器
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping(ApiConstant.Project.SAAS_STORAGE_REQUEST_PREFIX+ "/config")
+@Api(value = "仓库", tags = "仓库接口")
+public class ConfigController extends BladeController {
+
+	private final IConfigService configService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	public R<Config> detail(Config config) {
+		Config detail = configService.getOne(Condition.getQueryWrapper(config));
+		return R.data(detail);
+	}
+	/**
+	 * 详情
+	 */
+	@PostMapping("/submit")
+	public R submit(@RequestBody Config config) {
+		configService.submit(config);
+		return R.success();
+	}
+	/**
+	 * 新增 仓库
+	 */
+	@PostMapping("/save")
+	public R save(@Valid @RequestBody Config config) {
+		return R.status(configService.save(config));
+	}
+
+	/**
+	 * 修改 仓库
+	 */
+	@PostMapping("/update")
+	public R update(@Valid @RequestBody Config config) {
+		return R.status(configService.updateById(config));
+	}
+
+	/**
+	 * 删除 仓库
+	 */
+	@PostMapping("/remove")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(configService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 30 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/config/mapper/ConfigMapper.java

@@ -0,0 +1,30 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.config.mapper;
+
+import com.fjhx.config.entity.Config;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 仓库 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface ConfigMapper extends BaseMapper<Config> {
+
+}

+ 17 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/config/mapper/ConfigMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fjhx.config.mapper.ConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="configResultMap" type="com.fjhx.config.entity.Config">
+        <id column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="c_key" property="cKey"/>
+        <result column="c_value" property="cValue"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="create_user" property="createUser"/>
+        <result column="update_user" property="updateUser"/>
+    </resultMap>
+
+</mapper>

+ 35 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/config/service/IConfigService.java

@@ -0,0 +1,35 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.config.service;
+
+import com.fjhx.config.entity.Config;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 仓库 服务类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface IConfigService extends IService<Config> {
+
+    /**
+     * 提交
+     * @param config
+     */
+    void submit(Config config);
+}

+ 61 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/config/service/impl/ConfigServiceImpl.java

@@ -0,0 +1,61 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.config.service.impl;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.fjhx.config.entity.Config;
+import com.fjhx.config.mapper.ConfigMapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.config.service.IConfigService;
+import org.apache.commons.lang3.StringUtils;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+
+/**
+ * 仓库 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Service
+public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> implements IConfigService {
+
+
+    /**
+     * 提交
+     * @param config
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void submit(Config config) {
+        if(StringUtils.isEmpty(config.getCKey())){
+            throw new ServiceException("参数异常");
+        }
+        Config c = getOne(Wrappers.<Config>query().lambda().eq(Config::getCKey,config.getCKey()));
+        if(ObjectUtil.isNotEmpty(c)){//修改
+            config.setUpdate();
+            update(config, Wrappers.<Config>query().lambda().eq(Config::getCKey,config.getCKey()));
+        }else{//添加
+            config.setCreate();
+            save(config);
+        }
+    }
+}

+ 109 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/house/controller/HouseController.java

@@ -0,0 +1,109 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.house.controller;
+
+import com.fjhx.house.entity.House;
+import com.fjhx.house.service.IHouseService;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.common.constant.ApiConstant;
+import org.springblade.common.utils.ListPageMap;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springblade.core.boot.ctrl.BladeController;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 仓库 控制器
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping(ApiConstant.Project.SAAS_STORAGE_REQUEST_PREFIX+"/house")
+public class HouseController extends BladeController {
+
+	private final IHouseService houseService;
+
+	/**
+	 * 列表
+	 *
+	 * @param condition 查询条件
+	 * @return
+	 */
+	@PostMapping("/list")
+	public R getList(@RequestBody Map<String, Object> condition) {
+		ListPageMap.getListPageMap(condition);
+		List<House> list = houseService.getList(condition);
+		return R.list(list);
+	}
+
+	/**
+	 * 列表-总条数
+	 *
+	 * @param condition 查询条件
+	 * @return
+	 */
+	@PostMapping("/list/count")
+	public R getListCount(@RequestBody Map<String, Object> condition) {
+		Integer count = houseService.getListCount(condition);
+		return R.count(count);
+	}
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	public R<House> detail(House house) {
+		House detail = houseService.getOne(Condition.getQueryWrapper(house));
+		return R.data(detail);
+	}
+
+	/**
+	 * 新增 仓库
+	 */
+	@PostMapping("/save")
+	public R save(@Valid @RequestBody House house) {
+		house.setCreate();
+		return R.status(houseService.save(house));
+	}
+
+	/**
+	 * 修改 仓库
+	 */
+	@PostMapping("/update")
+	public R update(@Valid @RequestBody House house) {
+		house.setUpdate();
+		return R.status(houseService.updateById(house));
+	}
+
+	
+	/**
+	 * 删除 仓库
+	 */
+	@GetMapping("/remove")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(houseService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 49 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/house/mapper/HouseMapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.house.mapper;
+
+import com.fjhx.house.entity.House;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.core.tenant.annotation.TenantIgnore;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 仓库 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface HouseMapper extends BaseMapper<House> {
+
+    /**
+     * 列表
+     *
+     * @param condition 查询条件
+     */
+    @TenantIgnore
+    List<House> getList(Map<String, Object> condition);
+
+    /**
+     * 列表-总条数
+     *
+     * @param condition 查询条件
+     */
+    @TenantIgnore
+    Integer getListCount(Map<String, Object> condition);
+}

+ 47 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/house/mapper/HouseMapper.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fjhx.house.mapper.HouseMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="houseResultMap" type="com.fjhx.house.entity.House">
+        <id column="ID" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="name" property="name"/>
+        <result column="remark" property="remark"/>
+        <result column="plc_code" property="plcCode"/>
+    </resultMap>
+
+    <select id="getList" resultMap="houseResultMap">
+        SELECT
+            *
+        FROM
+            stock_house
+        <include refid="list_condition"/>
+        ORDER BY create_time DESC
+        <include refid="sql_limit"/>
+    </select>
+    <select id="getListCount" resultType="java.lang.Integer">
+        SELECT
+            count(1)
+        FROM
+            stock_house
+        <include refid="list_condition"/>
+    </select>
+    <sql id="list_condition">
+        <where>
+            is_delete = 0
+            <if test="name neq null and name neq '' ">
+                AND INSTR( `name`, #{name} ) > 0
+            </if>
+        </where>
+    </sql>
+
+    <sql id="sql_limit">
+        <if test="start != null and end != null">
+            LIMIT #{start},#{end}
+        </if>
+    </sql>
+</mapper>

+ 46 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/house/service/IHouseService.java

@@ -0,0 +1,46 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.house.service;
+
+import com.fjhx.house.entity.House;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 仓库 服务类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface IHouseService extends IService<House> {
+
+    /**
+     * 列表
+     *
+     * @param condition 查询条件
+     */
+    List<House> getList(Map<String, Object> condition);
+
+    /**
+     * 列表-总条数
+     *
+     * @param condition 查询条件
+     */
+    Integer getListCount(Map<String, Object> condition);
+}

+ 57 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/house/service/impl/HouseServiceImpl.java

@@ -0,0 +1,57 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.house.service.impl;
+
+import com.fjhx.house.entity.House;
+import com.fjhx.house.mapper.HouseMapper;
+import com.fjhx.house.service.IHouseService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 仓库 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Service
+public class HouseServiceImpl extends ServiceImpl<HouseMapper, House> implements IHouseService {
+
+
+    /**
+     * 列表
+     * @param condition 查询条件
+     * @return
+     */
+    @Override
+    public List<House> getList(Map<String, Object> condition) {
+        return baseMapper.getList(condition);
+    }
+
+    /**
+     * 列表条数
+     * @param condition 查询条件
+     * @return
+     */
+    @Override
+    public Integer getListCount(Map<String, Object> condition) {
+        return baseMapper.getListCount(condition);
+    }
+}

+ 94 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/controller/MaterialCategoryController.java

@@ -0,0 +1,94 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.controller;
+
+import com.fjhx.base.TreeNode;
+import com.fjhx.material.entity.MaterialCategory;
+import com.fjhx.material.service.IMaterialCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.common.constant.ApiConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+
+/**
+ * 物料分类 控制器
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping(ApiConstant.Project.SAAS_STORAGE_REQUEST_PREFIX+"/materialcategory")
+@Api(value = "物料分类", tags = "物料分类接口")
+public class MaterialCategoryController extends BladeController {
+
+	private final IMaterialCategoryService materialCategoryService;
+
+	/**
+	 * 树列表
+	 */
+	@GetMapping("/treeList")
+	public R treeList() {
+		List<TreeNode> list = materialCategoryService.getTreeList();
+		return R.list(list);
+	}
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	public R<MaterialCategory> detail(MaterialCategory materialCategory) {
+		MaterialCategory detail = materialCategoryService.getOne(Condition.getQueryWrapper(materialCategory));
+		return R.data(detail);
+	}
+	/**
+	 * 新增 物料分类
+	 */
+	@PostMapping("/save")
+	public R save(@Valid @RequestBody MaterialCategory materialCategory) {
+		materialCategory.setCreate();
+		return R.status(materialCategoryService.save(materialCategory));
+	}
+
+	/**
+	 * 修改 物料分类
+	 */
+	@PostMapping("/update")
+	public R update(@Valid @RequestBody MaterialCategory materialCategory) {
+		materialCategory.setUpdate();
+		return R.status(materialCategoryService.updateById(materialCategory));
+	}
+
+	/**
+	 * 删除 物料分类
+	 */
+	@GetMapping("/remove")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(materialCategoryService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 111 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/controller/MaterialController.java

@@ -0,0 +1,111 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.controller;
+
+import com.fjhx.material.entity.Material;
+import com.fjhx.material.service.IMaterialService;
+import io.swagger.annotations.Api;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.common.constant.ApiConstant;
+import org.springblade.common.utils.ListPageMap;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.api.R;
+import org.springframework.web.bind.annotation.*;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 物料 控制器
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping(ApiConstant.Project.SAAS_STORAGE_REQUEST_PREFIX+"/material")
+@Api(value = "物料", tags = "物料接口")
+public class MaterialController extends BladeController {
+
+	private final IMaterialService materialService;
+
+	/**
+	 * 列表
+	 *
+	 * @param condition 查询条件
+	 * @return
+	 */
+	@PostMapping("/list")
+	public R getList(@RequestBody Map<String, Object> condition) {
+		ListPageMap.getListPageMap(condition);
+		List<Material> list = materialService.getList(condition);
+		return R.list(list);
+	}
+
+	/**
+	 * 列表-总条数
+	 *
+	 * @param condition 查询条件
+	 * @return
+	 */
+	@PostMapping("/list/count")
+	public R getListCount(@RequestBody Map<String, Object> condition) {
+		Integer count = materialService.getListCount(condition);
+		return R.count(count);
+	}
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	public R<Material> detail(Material material) {
+		Material detail = materialService.getOne(Condition.getQueryWrapper(material));
+		return R.data(detail);
+	}
+
+	/**
+	 * 新增 物料
+	 */
+	@PostMapping("/save")
+	public R save(@Valid @RequestBody Material material) {
+		materialService.addMaterial(material);
+		return R.success();
+	}
+
+	/**
+	 * 修改 物料
+	 */
+	@PostMapping("/update")
+	public R update(@Valid @RequestBody Material material) {
+		materialService.editMaterial(material);
+		return R.success();
+	}
+	
+	/**
+	 * 删除 物料
+	 */
+	@GetMapping("/remove")
+	public R remove(@RequestParam("id") String id) {
+		materialService.delMaterial(id);
+		return R.success();
+	}
+
+	
+}

+ 48 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/controller/MaterialExtendController.java

@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.controller;
+
+import com.fjhx.material.service.IMaterialExtendService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.common.constant.ApiConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 物料扩展 控制器
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping(ApiConstant.Project.SAAS_STORAGE_REQUEST_PREFIX+"/materialextend")
+@Api(value = "物料扩展", tags = "物料接口")
+public class MaterialExtendController extends BladeController {
+
+	private final IMaterialExtendService materialExtendService;
+	
+}

+ 30 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialCategoryMapper.java

@@ -0,0 +1,30 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.mapper;
+
+import com.fjhx.material.entity.MaterialCategory;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 物料分类 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface MaterialCategoryMapper extends BaseMapper<MaterialCategory> {
+
+}

+ 20 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialCategoryMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fjhx.material.mapper.MaterialCategoryMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="materialCategoryResultMap" type="com.fjhx.material.entity.MaterialCategory">
+        <id column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="create_user" property="createUser"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="code" property="code"/>
+        <result column="name" property="name"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="is_for_chose" property="isForChose"/>
+        <result column="warehouse" property="warehouse"/>
+    </resultMap>
+
+</mapper>

+ 30 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialExtendMapper.java

@@ -0,0 +1,30 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fjhx.material.entity.MaterialExtend;
+
+/**
+ * 物料扩展 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface MaterialExtendMapper extends BaseMapper<MaterialExtend> {
+
+}

+ 13 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialExtendMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fjhx.material.mapper.MaterialExtendMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="materialExtendResultMap" type="com.fjhx.material.entity.MaterialExtend">
+        <id column="id" property="id"/>
+        <result column="material_id" property="materialId"/>
+        <result column="unit_weight" property="unitWeight"/>
+        <result column="width" property="width"/>
+    </resultMap>
+
+</mapper>

+ 51 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialMapper.java

@@ -0,0 +1,51 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.mapper;
+
+import com.fjhx.material.entity.Material;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.core.tenant.annotation.TenantIgnore;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 物料 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface MaterialMapper extends BaseMapper<Material> {
+
+    /**
+     * 列表
+     *
+     * @param condition
+     * @return
+     */
+    @TenantIgnore
+    List<Material> getList(Map<String, Object> condition);
+
+    /**
+     * 列表-总条数
+     *
+     * @param condition
+     * @return
+     */
+    @TenantIgnore
+    Integer getListCount(Map<String, Object> condition);
+}

+ 65 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/mapper/MaterialMapper.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fjhx.material.mapper.MaterialMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="materialResultMap" type="com.fjhx.material.entity.Material">
+        <id column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="create_user" property="createUser"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="name" property="name"/>
+        <result column="code" property="code"/>
+        <result column="unit_weight" property="unitWeight"/>
+        <result column="width" property="width"/>
+        <result column="category_id" property="categoryId"/>
+        <result column="safety_stock" property="safetyStock"/>
+        <result column="check_rate" property="checkRate"/>
+        <result column="safety_warn_day" property="safetyWarnDay"/>
+        <result column="spec" property="spec"/>
+        <result column="remark" property="remark"/>
+        <result column="price" property="price"/>
+        <result column="stock_standard" property="stockStandard"/>
+        <result column="purpose" property="purpose"/>
+        <result column="technology_type" property="technologyType"/>
+    </resultMap>
+
+    <select id="getList" resultMap="materialResultMap">
+        SELECT
+            t1.*,
+            t3.`unit_weight`,
+            t3.width
+        FROM
+            stock_material t1
+        LEFT JOIN stock_material_category t2 ON t1.category_id = t2.id
+        LEFT JOIN stock_material_extend t3 ON t1.id = t3.material_id
+        <include refid="list_condition"/>
+        ORDER BY create_time DESC
+        <include refid="com.fjhx.house.mapper.HouseMapper.sql_limit"/>
+    </select>
+    <select id="getListCount" resultType="java.lang.Integer">
+        SELECT
+            count(1)
+        FROM
+            stock_material t1
+        LEFT JOIN stock_material_category t2 ON t1.category_id = t2.id
+        LEFT JOIN stock_material_extend t3 ON t1.id = t3.material_id
+        <include refid="list_condition"/>
+    </select>
+    <sql id="list_condition">
+        <where>
+            t1.is_delete = 0
+            <if test="search neq null and search neq '' ">
+                AND ((INSTR(t1.`name`, #{search}) > 0) OR (INSTR(t1.`code`, #{search}) > 0) )
+            </if>
+            <if test="categoryId neq null and categoryId neq '' ">
+                AND (
+                t1.category_id = #{categoryId}
+                OR FIND_IN_SET( #{categoryId}, t2.ancestors )
+                )
+            </if>
+        </where>
+    </sql>
+</mapper>

+ 39 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/IMaterialCategoryService.java

@@ -0,0 +1,39 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.service;
+
+import com.fjhx.base.TreeNode;
+import com.fjhx.material.entity.MaterialCategory;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 物料分类 服务类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface IMaterialCategoryService extends IService<MaterialCategory> {
+
+    /**
+     * 获取分类树
+     * @return
+     */
+    List<TreeNode> getTreeList ();
+}

+ 30 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/IMaterialExtendService.java

@@ -0,0 +1,30 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.service;
+
+import com.fjhx.material.entity.MaterialExtend;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 物料扩展 服务类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface IMaterialExtendService extends IService<MaterialExtend> {
+
+}

+ 66 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/IMaterialService.java

@@ -0,0 +1,66 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.service;
+
+import com.fjhx.material.entity.Material;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 物料 服务类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+public interface IMaterialService extends IService<Material> {
+
+    /**
+     * 添加
+     * @param material
+     */
+    void addMaterial(Material material);
+
+    /**
+     * 修改
+     * @param material
+     */
+    void editMaterial(Material material);
+
+    /**
+     * 删除
+     * @param id
+     */
+    void delMaterial(String id);
+
+    /**
+     * 列表
+     *
+     * @param condition
+     * @return
+     */
+    List<Material> getList(Map<String, Object> condition);
+
+    /**
+     * 列表-总条数
+     *
+     * @param condition
+     * @return
+     */
+    Integer getListCount(Map<String, Object> condition);
+}

+ 59 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/impl/MaterialCategoryServiceImpl.java

@@ -0,0 +1,59 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.fjhx.base.TreeNode;
+import com.fjhx.material.entity.MaterialCategory;
+import com.fjhx.material.mapper.MaterialCategoryMapper;
+import com.fjhx.material.service.IMaterialCategoryService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 物料分类 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Service
+public class MaterialCategoryServiceImpl extends ServiceImpl<MaterialCategoryMapper, MaterialCategory> implements IMaterialCategoryService {
+
+    /**
+     * 树列表
+     * @return
+     */
+    @Override
+    public List<TreeNode> getTreeList() {
+        List<MaterialCategory> list = baseMapper.selectList(Wrappers.<MaterialCategory>query().lambda().
+                eq(MaterialCategory::getIsDelete,0).orderByDesc(MaterialCategory::getCreateTime));
+        List<TreeNode> treeNodes = new ArrayList<>();
+        if (CollectionUtils.isNotEmpty(list)) {
+            for (MaterialCategory m : list) {
+                TreeNode treeNode = new TreeNode(m.getId(), m.getName(), m.getParentId(), m.getAncestors());
+                treeNodes.add(treeNode);
+            }
+        }
+        return treeNodes;
+    }
+}

+ 35 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/impl/MaterialExtendServiceImpl.java

@@ -0,0 +1,35 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.service.impl;
+
+import com.fjhx.material.entity.MaterialExtend;
+import com.fjhx.material.mapper.MaterialExtendMapper;
+import com.fjhx.material.service.IMaterialExtendService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * 物料 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Service
+public class MaterialExtendServiceImpl extends ServiceImpl<MaterialExtendMapper, MaterialExtend> implements IMaterialExtendService {
+
+
+}

+ 128 - 0
hx-saas-project/saas-storage/src/main/java/com/fjhx/material/service/impl/MaterialServiceImpl.java

@@ -0,0 +1,128 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.fjhx.material.service.impl;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.fjhx.material.entity.Material;
+import com.fjhx.material.entity.MaterialExtend;
+import com.fjhx.material.mapper.MaterialMapper;
+import com.fjhx.material.service.IMaterialExtendService;
+import com.fjhx.material.service.IMaterialService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.apache.commons.lang3.StringUtils;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.core.tool.utils.StringUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 物料 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-07-21
+ */
+@Service
+public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> implements IMaterialService {
+
+
+    @Autowired
+    private IMaterialExtendService materialExtendService;
+
+    /**
+     * 新增接口
+     * @param material
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void addMaterial(Material material) {
+        if(StringUtil.isEmpty(material.getCategoryId())||
+                StringUtil.isEmpty(material.getCode())||
+                StringUtil.isEmpty(material.getName())){
+            throw new ServiceException("参数异常");
+        }
+        material.setCreate();
+        save(material);
+        if(ObjectUtil.isNotEmpty(material.getWidth())||
+                ObjectUtil.isNotEmpty(material.getUnitWeight())){
+            //添加扩展表
+            MaterialExtend extend = new MaterialExtend();
+            extend.setUnitWeight(material.getUnitWeight());
+            extend.setWidth(material.getWidth());
+            extend.setMaterialId(material.getId());
+            materialExtendService.save(extend);
+        }
+    }
+
+    /**
+     * 修改
+     * @param material
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void editMaterial(Material material) {
+        if(StringUtils.isEmpty(material.getId())){
+            throw new ServiceException("参数异常");
+        }
+        //扩展表不能修改
+//        if(ObjectUtil.isNotEmpty(material.getWidth())||
+//                ObjectUtil.isNotEmpty(material.getUnitWeight())){
+//            //修改数据
+//            MaterialExtend extend = new MaterialExtend();
+//            extend.setUnitWeight(material.getUnitWeight());
+//            extend.setWidth(material.getWidth());
+//            materialExtendService.update(extend,Wrappers.<MaterialExtend>query().lambda().eq(MaterialExtend::getMaterialId,material.getId()));
+//        }
+        material.setUpdate();
+        updateById(material);
+    }
+
+    /**
+     * 删除
+     * @param id
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delMaterial(String id) {
+        removeById(id);
+//        materialExtendService.remove(Wrappers.<MaterialExtend>query().lambda().eq(MaterialExtend::getMaterialId,id));
+    }
+
+    /**
+     * 列表
+     * @param condition
+     * @return
+     */
+    @Override
+    public List<Material> getList(Map<String, Object> condition) {
+        return baseMapper.getList(condition);
+    }
+
+    /**
+     * 列表条数
+     * @param condition
+     * @return
+     */
+    @Override
+    public Integer getListCount(Map<String, Object> condition) {
+        return baseMapper.getListCount(condition);
+    }
+}

+ 1 - 1
hx-service/a/src/main/java/com/fjhx/material/mapper/MaterialMapper.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.fjhx.material.mapper.MaterialMapper">
+<mapper namespace="com.fjhx.material.mapper.MaterialSMapper">
 
 </mapper>

+ 1 - 1
hx-service/storage/src/main/java/com/fjhx/material/mapper/MaterialMapper.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.fjhx.material.mapper.MaterialMapper">
+<mapper namespace="com.fjhx.material.mapper.MaterialSMapper">
 
     <select id="selectMaList" resultType="com.fjhx.entity.material.Material">
         SELECT

+ 1 - 1
hx-service/storage/src/main/java/com/fjhx/material/mapper/MaterialMapper.java → hx-service/storage/src/main/java/com/fjhx/material/mapper/MaterialSMapper.java

@@ -16,7 +16,7 @@ import java.util.Map;
  * @author ${author}
  * @since 2022-07-20
  */
-public interface MaterialMapper extends BaseMapper<Material> {
+public interface MaterialSMapper extends BaseMapper<Material> {
 
     /**
      * 下拉列表

+ 2 - 2
hx-service/storage/src/main/java/com/fjhx/material/service/impl/MaterialServiceImpl.java

@@ -2,7 +2,7 @@ package com.fjhx.material.service.impl;
 
 
 import com.fjhx.entity.material.Material;
-import com.fjhx.material.mapper.MaterialMapper;
+import com.fjhx.material.mapper.MaterialSMapper;
 import com.fjhx.material.service.MaterialService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
@@ -19,7 +19,7 @@ import java.util.Map;
  * @since 2022-07-20
  */
 @Service
-public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> implements MaterialService {
+public class MaterialServiceImpl extends ServiceImpl<MaterialSMapper, Material> implements MaterialService {
 
 
     /**