songyang пре 2 година
родитељ
комит
e546b4dead

+ 0 - 26
src/main/java/com/dk/mdm/controller/common/CommonController.java

@@ -529,32 +529,6 @@ public class CommonController extends BaseController<Map<String, Object>> {
     }
 
     /**
-     * @desc : 供应商类别
-     * @author : 宋扬
-     * @date : 2024/3/6 10:28
-     */
-    @ApiOperation(value = "获取供应商类别", notes = "获取供应商类别")
-    @PostMapping({"get_supType"})
-    public ResponseResultVO<List<Map<String, Object>>> getSupType(@RequestBody Map<String, Object> param) {
-        return commonService.getSupType(param);
-    }
-
-    /**
-     * @desc : 供应商服务类别
-     * @author : 宋扬
-     * @date : 2024/3/6 10:29
-     */
-    @ApiOperation(value = "获取供应商服务类别", notes = "获取供应商服务类别")
-    @PostMapping({"get_serviceCategories"})
-    public ResponseResultVO<List<Map<String, Object>>> getServiceCategories(@RequestBody Map<String, Object> param) {
-        return commonService.getServiceCategories(param);
-    }
-
-
-
-
-
-    /**
      * @desc : 获取页面数据源集合 (小程序用)
      * @author : 于继渤
      * @date : 2024/2/26 10:36

+ 0 - 23
src/main/java/com/dk/mdm/controller/mst/MoneyAccountController.java

@@ -82,29 +82,6 @@ public class MoneyAccountController{
         return moneyAccountService.update(moneyAccountVO);
     }
 
-
-    /**
-     * @desc : 停用
-     * @author : 宋扬
-     * @date : 2023/2/29 10:34
-     */
-    @ApiOperation(value = "停用", notes = "停用")
-    @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
-        return this.getService().disable(id);
-    }
-
-    /**
-     * @desc : 启用
-     * @author : 宋扬
-     * @date : 2023/2/29 10:34
-     */
-    @ApiOperation(value = "启用", notes = "启用")
-    @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
-        return this.getService().enable(id);
-    }
-
     /**
      * @desc : 批量启用
      * @author : 周兴

+ 12 - 10
src/main/java/com/dk/mdm/controller/mst/SupplierController.java

@@ -16,6 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import io.swagger.annotations.Api;
 import com.dk.mdm.service.mst.SupplierService;
 
+import java.util.List;
+
 @Api(tags = "供应商API接口")
 @RestController
 @RequestMapping("/mst/supplier")
@@ -73,25 +75,25 @@ public class SupplierController{
     }
 
     /**
-     * @desc : 停用
+     * @desc : 停用批量
      * @author : songy
      * @date : 2023/2/29 10:34
      */
-    @ApiOperation(value = "停用", notes = "停用")
-    @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
-        return this.getService().disable(id);
+    @ApiOperation(value = "批量停用", notes = "批量停用")
+    @PostMapping("disable_batch")
+    public ResponseResultVO<Boolean> disableBatch(@RequestBody List<String> ids) {
+        return this.getService().disableBatch(ids);
     }
 
     /**
-     * @desc : 启用
+     * @desc : 启用批量
      * @author : songy
      * @date : 2023/2/29 10:34
      */
-    @ApiOperation(value = "启用", notes = "启用")
-    @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
-        return this.getService().enable(id);
+    @ApiOperation(value = "批量启用", notes = "批量启用")
+    @PostMapping("enable_batch")
+    public ResponseResultVO<Boolean> enableBatch(@RequestBody List<String> ids) {
+        return this.getService().enableBatch(ids);
     }
 
     /**

+ 5 - 14
src/main/java/com/dk/mdm/mapper/common/CommonMapper.java

@@ -378,21 +378,12 @@ public interface CommonMapper extends BaseMapper<Map<String, Object>> {
      */
     Long getInventoryCountByPage(Map param);
 
-    /**
-     * @desc   : 供应商类别
-     * @author : 宋扬
-     * @date   : 2024/3/6 10:45
-     */
-    List<Map<String, Object>> getSupType(Map param);
-
-    /**
-     * @desc   : 供应商服务类别
-     * @author : 宋扬
-     * @date   : 2024/3/6 10:45
+     /**
+     * @desc : 获取账户类别
+     * @author : 王英杰
+     * @date : 2024/3/1 9:21
      */
-    List<Map<String, Object>> getServiceCategories(Map param);
-
-
+    List<Map<String, Object>> getDictionaryDataByPage(Map param);
 
     List<Map<String, Object>> getSaleChannel(Map param);
     List<Map<String, Object>> getStaff(Map param);

+ 14 - 14
src/main/java/com/dk/mdm/mapper/mst/OrgMapper.xml

@@ -9,11 +9,11 @@
         , org_name, parent_id, display_no, top_id, level_upper, level_lower, level_leaf, level_no, level_code, level_name, remarks, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user, org_code
     </sql>
     <sql id="Base_Column_List_view">
-        org_id
-        , org_name, parent_id, display_no, top_id    </sql>
+        parent.org_id
+        , parent.org_name, parent.parent_id, parent.display_no, parent.top_id    </sql>
 
     <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.Org">
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.response.mst.OrgResponse">
         <id column="org_id" property="orgId"/>
         <result column="org_name" property="orgName"/>
         <result column="parent_id" property="parentId" typeHandler="UuidTypeHandler"/>
@@ -124,14 +124,13 @@
         SELECT
         <include refid="Base_Column_List_view"/>
         FROM
-        dkic_b.t_mst_org
-        WHERE
-        flg_valid = true
+        dkic_b.t_mst_org AS parent
+        <where>
         <if test="orgName != null and orgName != ''">
             AND parent.org_name = #{orgName}
         </if>
-        <if test="flgValid != null">
-            AND parent.flg_valid = #{flgValid}
+        <if test="flgValidList != null and flgValidList.size>0">
+            AND parent.flg_valid  =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
         </if>
         <if test="cpId != null">
             AND parent.cp_id = #{cpId}
@@ -142,6 +141,7 @@
         <if test="searchText !=null">
             AND ( parent.org_name LIKE concat('%', #{searchText}, '%')
         </if>
+        </where>
     </select>
     <select id="resetLevelOrg" resultType="java.lang.Boolean">
         select dkic_b.f_reset_level_org(#{cpId}, #{topId}::uuid)
@@ -150,18 +150,18 @@
     <select id="countByCond" resultType="Long">
         SELECT
         count(1)
-        FROM  dkic_b.t_mst_org
-        WHERE
-        flg_valid = true
+        FROM  dkic_b.t_mst_org parent
+        <where>
+        <if test="cpId != null">
+            AND parent.cp_id = #{cpId}
+        </if>
         <if test="orgName != null and orgName != ''">
             AND parent.org_name = #{orgName}
         </if>
         <if test="flgValid != null">
             AND parent.flg_valid = #{flgValid}
         </if>
-        <if test="cpId != null">
-            AND parent.cp_id = #{cpId}
-        </if>
+        </where>
     </select>
     <!-- 查询同父级下 最大的 显示顺序 -->
     <select id="maxDisplayNo" resultType="Integer">

+ 9 - 0
src/main/java/com/dk/mdm/model/query/mst/OrgQuery.java

@@ -78,6 +78,15 @@ public class OrgQuery extends PageInfo<com.dk.mdm.model.query.mst.OrgQuery> impl
     @ApiModelProperty(value = "显示顺序")
     private Integer displayNo;
 
+    /**
+     * @desc   : 有效标识List
+     * @author : 宋扬
+     * @date   : 2024/3/2 9:31
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private List<Boolean> flgValidList;
+
 
 
     private static final long serialVersionUID = 1L;

+ 241 - 0
src/main/java/com/dk/mdm/model/response/mst/OrgResponse.java

@@ -0,0 +1,241 @@
+package com.dk.mdm.model.response.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidListTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ *  组织机构
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("组织机构")
+@TableName(value = "t_mst_org", autoResultMap = true, schema =  "dkic_b")
+@ApiModel(value="实体类:组织机构", description="表名:t_mst_org")
+public class OrgResponse extends PageInfo<OrgResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 组织ID
+     */
+//    @TableId(value = "org_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "组织ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 组织名称
+     */
+    @Excel(name = "组织名称")
+    @ApiModelProperty(value = "组织名称")
+    private String orgName;
+
+
+    /**
+     * 父级ID
+     */
+    @Excel(name = "父级ID")
+    @ApiModelProperty(value = "父级ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String parentId;
+
+
+    /**
+     * 显示顺序 (【1 ~ 46655】)
+     */
+    @Excel(name = "显示顺序 (【1 ~ 46655】)")
+    @ApiModelProperty(value = "显示顺序 (【1 ~ 46655】)")
+    private Integer displayNo;
+
+
+    /**
+     * 顶层ID
+     */
+    @Excel(name = "顶层ID")
+    @ApiModelProperty(value = "顶层ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String topId;
+
+
+    /**
+     * 上层ID
+     */
+    @Excel(name = "上层ID")
+    @ApiModelProperty(value = "上层ID")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private String levelUpper;
+
+
+    /**
+     * 下层ID
+     */
+    @Excel(name = "下层ID")
+    @ApiModelProperty(value = "下层ID")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private String levelLower;
+
+
+    /**
+     * 末级标识
+     */
+    @Excel(name = "末级标识")
+    @ApiModelProperty(value = "末级标识")
+    private Boolean levelLeaf;
+
+
+    /**
+     * 层级序号
+     */
+    @Excel(name = "层级序号")
+    @ApiModelProperty(value = "层级序号")
+    private Integer levelNo;
+
+
+    /**
+     * 层级代码
+     */
+    @Excel(name = "层级代码")
+    @ApiModelProperty(value = "层级代码")
+    private String levelCode;
+
+
+    /**
+     * 层级全称 (【 / 】)
+     */
+    @Excel(name = "层级全称 (【 / 】)")
+    @ApiModelProperty(value = "层级全称 (【 / 】)")
+    private String levelName;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    @ApiModelProperty(value = "")
+    private String orgCode;
+
+    @TableField(exist = false)
+    private List<OrgResponse> itemData;
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 1 - 1
src/main/java/com/dk/mdm/model/response/mst/SpplierResponse.java

@@ -252,7 +252,7 @@ public class SpplierResponse extends PageInfo<SpplierResponse> implements Serial
 
     @TableField(exist = false)
     @ApiModelProperty(value = "供应商类别")
-    private String serviceCategoriesNames;
+    private String serviceCategoriesName;
     /*
      * 相关属性
      * @TableField(exist = false)

+ 0 - 21
src/main/java/com/dk/mdm/service/common/CommonService.java

@@ -670,27 +670,6 @@ public class CommonService extends BaseService<Map<String, Object>> {
                 commonMapper.getInventoryCountByPage(param));
     }
 
-    /**
-     * @desc   : 供应商类别
-     * @author : 宋扬
-     * @date   : 2024/3/6 10:41
-     */
-    public ResponseResultVO<List<Map<String, Object>>> getSupType(Map<String, Object> param) {
-        // 获取系统基础数据
-        List<Map<String, Object>> list = commonMapper.getSupType(param);
-        return ResponseResultUtil.success(list);
-    }
-
-    /**
-     * @desc   : 供应商服务类别
-     * @author : 宋扬
-     * @date   : 2024/3/6 10:43
-     */
-    public ResponseResultVO<List<Map<String, Object>>> getServiceCategories(Map<String, Object> param) {
-        // 获取系统基础数据
-        List<Map<String, Object>> list = commonMapper.getServiceCategories(param);
-        return ResponseResultUtil.success(list);
-    }
 
 
     /**