Pārlūkot izejas kodu

项目管理-业务类型

lizhenhao 2 gadi atpakaļ
vecāks
revīzija
24781a5e9f
12 mainītis faili ar 502 papildinājumiem un 5 dzēšanām
  1. 131 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/controller/CwProjectBusinessTypeController.java
  2. 46 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/domain/CwProjectBusinessType.java
  3. 30 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/mapper/CwProjectBusinessTypeMapper.java
  4. 79 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/mapper/xml/CwManageLevelTypeMapper.xml
  5. 85 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/service/CwProjectBusinessTypeService.java
  6. 52 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/service/dto/CwProjectBusinessTypeDTO.java
  7. 17 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/service/mapstruct/CwProjectBusinessTypeWrapper.java
  8. 10 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/domain/CwProjectRecords.java
  9. 12 3
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/mapper/xml/CwProjectRecordsMapper.xml
  10. 14 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/service/dto/CwProjectRecordsDTO.java
  11. 16 2
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/workClientInfo/mapper/xml/CwWorkClientBaseMapper.xml
  12. 10 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/workClientInfo/service/dto/CwWorkClientBaseDTO.java

+ 131 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/controller/CwProjectBusinessTypeController.java

@@ -0,0 +1,131 @@
+package com.jeeplus.test.cw.projectBusinessType.controller;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.aop.logging.annotation.ApiLog;
+import com.jeeplus.sys.constant.enums.LogTypeEnum;
+import com.jeeplus.sys.utils.StringUtils;
+import com.jeeplus.test.cw.projectBusinessType.domain.CwProjectBusinessType;
+import com.jeeplus.test.cw.projectBusinessType.service.CwProjectBusinessTypeService;
+import com.jeeplus.test.cw.projectBusinessType.service.dto.CwProjectBusinessTypeDTO;
+import io.swagger.annotations.Api;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Api("项目管理-业务类型管理")
+@RestController
+@RequestMapping(value = "/projectRecords/cw_project_business_type")
+public class CwProjectBusinessTypeController {
+
+    @Resource
+    private CwProjectBusinessTypeService cwProjectBusinessTypeService;
+
+    /**
+     * 查询业务类型列表
+     * @param cwProjectBusinessTypeDTO
+     * @param page
+     * @return
+     * @throws Exception
+     */
+    @ApiLog("查询业务类型列表")
+//    @PreAuthorize("hasAuthority('cw_project_business_type:list')")
+    @GetMapping("list")
+    public ResponseEntity<IPage<CwProjectBusinessTypeDTO>> data(CwProjectBusinessTypeDTO cwProjectBusinessTypeDTO, Page<CwProjectBusinessTypeDTO> page) throws Exception {
+        page.setSize(-1);
+        IPage<CwProjectBusinessTypeDTO> result = new Page<CwProjectBusinessTypeDTO>();
+        if(ObjectUtil.isNotEmpty(cwProjectBusinessTypeDTO)){
+            if(StringUtils.isNotBlank(cwProjectBusinessTypeDTO.getName())){
+                //根据type模糊查询
+                List<CwProjectBusinessType> cwProjectBusinessTypeList = cwProjectBusinessTypeService.list(new QueryWrapper<CwProjectBusinessType>().lambda()
+                        .like(StringUtils.isNotBlank(cwProjectBusinessTypeDTO.getName()), CwProjectBusinessType::getName, cwProjectBusinessTypeDTO.getName())
+                );
+                List<String> idList = new ArrayList<>();
+                cwProjectBusinessTypeList.stream().forEach(item->{
+                    if (StringUtils.isNotBlank(item.getParentIds())){
+                        String[] split = item.getParentIds().split(",");
+                        for (String s : split) {
+                            idList.add(s);
+                        }
+                    }
+                    List<CwProjectBusinessType> list = cwProjectBusinessTypeService.list(new QueryWrapper<CwProjectBusinessType>().lambda().like(CwProjectBusinessType::getParentIds, "," + item.getId() + ","));
+                    idList.addAll(list.stream().map(CwProjectBusinessType::getId).collect(Collectors.toList()));
+                    idList.add(item.getId());
+                });
+                List<String> ids = idList.stream().distinct().filter(item->{
+                    if (!"0".equals(item)){
+                        return true;
+                    }
+                    return false;
+                }).collect(Collectors.toList());
+                if(CollectionUtil.isNotEmpty(ids)){
+                    QueryWrapper<CwProjectBusinessType> wrapper = new QueryWrapper<CwProjectBusinessType>()
+                            .in("cw_pbt.id",idList);
+                    result = cwProjectBusinessTypeService.findList (page,wrapper);
+                }
+            }else{
+                result = cwProjectBusinessTypeService.findList (page,new QueryWrapper<CwProjectBusinessType>());
+            }
+        }
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 查询业务类型数据
+     * @param id
+     * @return
+     */
+    @ApiLog("查询业务类型数据")
+    @PreAuthorize ("hasAnyAuthority('cw_project_business_type:view','cw_project_business_type:add','cw_project_business_type:edit')")
+    @GetMapping("queryById")
+    public ResponseEntity queryById(@RequestParam("id") String id) {
+        CwProjectBusinessTypeDTO cwProjectBusinessTypeDTO = cwProjectBusinessTypeService.queryById ( id );
+        return ResponseEntity.ok (cwProjectBusinessTypeDTO);
+    }
+
+    /**
+     * 查询全部一级业务类型
+     * @return
+     */
+    @ApiLog("查询全部一级业务类型")
+    @GetMapping("getList")
+    public ResponseEntity<List<CwProjectBusinessTypeDTO>> getList() {
+        List<CwProjectBusinessTypeDTO> list = cwProjectBusinessTypeService.getList();
+        return ResponseEntity.ok (list);
+    }
+
+    /**
+     * 保存业务类型
+     * @param cwProjectBusinessTypeDTO
+     * @return
+     */
+    @ApiLog(value = "修改/新增业务类型", type = LogTypeEnum.SAVE)
+    @PreAuthorize("hasAnyAuthority('cw_project_business_type:save','cw_project_business_type:edit')")
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody CwProjectBusinessTypeDTO cwProjectBusinessTypeDTO) {
+        cwProjectBusinessTypeService.saveType(cwProjectBusinessTypeDTO);
+        return ResponseEntity.ok ("操作成功");
+    }
+
+    /**
+     * 删除业务类型
+     * @param ids
+     * @return
+     */
+    @ApiLog(value = "删除业务类型", type = LogTypeEnum.SAVE)
+    @PreAuthorize ("hasAuthority('cw_project_business_type:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity delete(String ids) {
+        return cwProjectBusinessTypeService.deleteByIds(ids);
+    }
+
+}

+ 46 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/domain/CwProjectBusinessType.java

@@ -0,0 +1,46 @@
+package com.jeeplus.test.cw.projectBusinessType.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 财务-项目管理-业务类型管理
+ * @TableName cw_project_business_type
+ */
+@Data
+@TableName("cw_project_business_type")
+public class CwProjectBusinessType extends BaseEntity {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 分类名称
+     */
+    private String name;
+
+    /**
+     * 父id
+     */
+    private String parentId;
+
+    /**
+     * 等级
+     */
+    private Integer level;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+    /**
+     * 父ids
+     */
+    private String parentIds;
+
+    private static final long serialVersionUID = 1L;
+}

+ 30 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/mapper/CwProjectBusinessTypeMapper.java

@@ -0,0 +1,30 @@
+package com.jeeplus.test.cw.projectBusinessType.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.test.cw.projectBusinessType.domain.CwProjectBusinessType;
+import com.jeeplus.test.cw.projectBusinessType.service.dto.CwProjectBusinessTypeDTO;
+import com.jeeplus.test.cw.workClientInfo.domain.CwManageLevelType;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.cw.workClientInfo.service.dto.CwManageLevelTypeDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface CwProjectBusinessTypeMapper extends BaseMapper<CwProjectBusinessType> {
+
+    public IPage<CwProjectBusinessTypeDTO> findList(Page<CwProjectBusinessTypeDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwProjectBusinessType> queryWrapper);
+
+    public CwProjectBusinessTypeDTO queryById(@Param("id") String id);
+
+    public List<CwProjectBusinessTypeDTO> getList();
+
+}
+
+
+
+

+ 79 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/mapper/xml/CwManageLevelTypeMapper.xml

@@ -0,0 +1,79 @@
+<?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.jeeplus.test.cw.projectBusinessType.mapper.CwProjectBusinessTypeMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.test.cw.projectBusinessType.service.dto.CwProjectBusinessTypeDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+            <result property="name" column="name" jdbcType="VARCHAR"/>
+            <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
+            <result property="level" column="level" jdbcType="INTEGER"/>
+            <result property="sort" column="sort" jdbcType="INTEGER"/>
+            <result property="parentIds" column="parent_ids" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        cw_pbt.id,
+        cw_pbt.create_by,
+        cw_pbt.create_date,
+        cw_pbt.update_by,
+        cw_pbt.update_date,
+        cw_pbt.del_flag,
+        cw_pbt.remarks,
+        cw_pbt.name,
+        cw_pbt.parent_id,
+        cw_pbt.level,
+        cw_pbt.sort
+    </sql>
+
+    <select id="findList" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"></include>
+        from cw_project_business_type cw_pbt
+        ${ew.customSqlSegment}
+    </select>
+
+    <select id="queryById" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"></include>
+        from cw_project_business_type cw_pbt
+        where cw_pbt.del_flag = '0' and cw_pbt.id = #{id}
+    </select>
+
+    <select id="getList" resultMap="map">
+        select
+        <include refid="Base_Column_List"></include>
+        from cw_project_business_type cw_pbt
+        where cw_pbt.del_flag = '0' and cw_pbt.parent_id = '0'
+    </select>
+
+    <resultMap id="map" type="com.jeeplus.test.cw.workClientInfo.service.dto.CwManageLevelTypeDTO">
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+        <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
+        <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+        <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
+        <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+        <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+        <result property="name" column="name" jdbcType="VARCHAR"/>
+        <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
+        <result property="level" column="level" jdbcType="INTEGER"/>
+        <result property="sort" column="sort" jdbcType="INTEGER"/>
+        <result property="parentIds" column="parent_ids" jdbcType="VARCHAR"/>
+        <collection property="childrenList" column="id" select="getChildList" ofType="com.jeeplus.test.cw.workClientInfo.service.dto.CwManageLevelTypeDTO"/>
+    </resultMap>
+
+    <select id="getChildList" resultType="com.jeeplus.test.cw.workClientInfo.service.dto.CwManageLevelTypeDTO">
+        select
+        <include refid="Base_Column_List"></include>
+        from cw_project_business_type cw_pbt
+        where cw_pbt.del_flag = '0' and cw_pbt.parent_id = ${id}
+    </select>
+</mapper>

+ 85 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/service/CwProjectBusinessTypeService.java

@@ -0,0 +1,85 @@
+package com.jeeplus.test.cw.projectBusinessType.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
+import com.jeeplus.sys.utils.StringUtils;
+import com.jeeplus.test.cw.projectBusinessType.domain.CwProjectBusinessType;
+import com.jeeplus.test.cw.projectBusinessType.mapper.CwProjectBusinessTypeMapper;
+import com.jeeplus.test.cw.projectBusinessType.service.dto.CwProjectBusinessTypeDTO;
+import com.jeeplus.test.cw.projectBusinessType.service.mapstruct.CwProjectBusinessTypeWrapper;
+import com.jeeplus.test.cw.workClientInfo.domain.CwManageLevelType;
+import com.jeeplus.test.cw.workClientInfo.domain.CwOrganizationType;
+import com.jeeplus.test.cw.workClientInfo.mapper.CwManageLevelTypeMapper;
+import com.jeeplus.test.cw.workClientInfo.service.dto.CwManageLevelTypeDTO;
+import com.jeeplus.test.cw.workClientInfo.service.mapstruct.CwManageLevelTypeWrapper;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+@Transactional
+public class CwProjectBusinessTypeService extends ServiceImpl<CwProjectBusinessTypeMapper, CwProjectBusinessType> {
+
+    @Resource
+    private CwProjectBusinessTypeMapper cwProjectBusinessTypeMapper;
+
+    public IPage<CwProjectBusinessTypeDTO> findList(Page<CwProjectBusinessTypeDTO> page, QueryWrapper<CwProjectBusinessType> queryWrapper){
+        queryWrapper.eq("cw_pbt.del_flag","0").orderByAsc("cw_pbt.sort");
+        return cwProjectBusinessTypeMapper.findList(page,queryWrapper);
+    }
+
+    public CwProjectBusinessTypeDTO queryById(String id) {
+
+        CwProjectBusinessTypeDTO cwProjectBusinessTypeDTO = cwProjectBusinessTypeMapper.queryById(id);
+
+        return cwProjectBusinessTypeDTO;
+    }
+
+    public List<CwProjectBusinessTypeDTO> getList() {
+        List<CwProjectBusinessTypeDTO> list = cwProjectBusinessTypeMapper.getList();
+        return list;
+    }
+
+    public ResponseEntity saveType(CwProjectBusinessTypeDTO cwProjectBusinessTypeDTO) {
+        CwProjectBusinessType cwProjectBusinessType = CwProjectBusinessTypeWrapper.INSTANCE.toEntity(cwProjectBusinessTypeDTO);
+        if (ObjectUtil.isNotEmpty(cwProjectBusinessTypeDTO)) {
+            if (StringUtils.isBlank(cwProjectBusinessTypeDTO.getId())) {
+                if (StringUtils.isNotBlank(cwProjectBusinessTypeDTO.getParentId())){
+                    if ("0".equals(cwProjectBusinessTypeDTO.getParentId())){
+                        cwProjectBusinessType.setLevel(1);
+                        cwProjectBusinessType.setParentIds("0,");
+                    }else{
+                        CwProjectBusinessType byId = this.getById(cwProjectBusinessTypeDTO.getParentId());
+                        CwProjectBusinessTypeDTO pbt = CwProjectBusinessTypeWrapper.INSTANCE.toDTO(byId);
+                        if(ObjectUtil.isNotEmpty(pbt)){
+                            cwProjectBusinessType.setLevel(pbt.getLevel()+1);
+                            cwProjectBusinessType.setParentIds(pbt.getParentIds()+pbt.getId()+",");
+                        }
+                    }
+                }
+            }
+        }
+        this.saveOrUpdate(cwProjectBusinessType);
+        return ResponseEntity.ok("保存成功");
+    }
+
+    public ResponseEntity deleteByIds(String ids) {
+        String idArray[] =ids.split(",");
+        if(CollectionUtil.isNotEmpty(Lists.newArrayList (idArray))){
+            List<String> list = this.list(new QueryWrapper<CwProjectBusinessType>().lambda().in(CwProjectBusinessType::getParentId, Lists.newArrayList(idArray))).stream().distinct().map(CwProjectBusinessType::getId).collect(Collectors.toList());
+            this.removeByIds (list);
+        }
+        this.removeByIds (Lists.newArrayList (idArray));
+        return ResponseEntity.ok ("删除成功");
+    }
+
+}

+ 52 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/service/dto/CwProjectBusinessTypeDTO.java

@@ -0,0 +1,52 @@
+package com.jeeplus.test.cw.projectBusinessType.service.dto;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import com.jeeplus.test.cw.workClientInfo.domain.CwManageLevelType;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 财务-项目管理-业务类型管理
+ * @TableName cw_project_business_type
+ */
+@Data
+public class CwProjectBusinessTypeDTO extends BaseDTO {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 分类名称
+     */
+    private String name;
+
+    /**
+     * 父id
+     */
+    private String parentId;
+
+    /**
+     * 等级
+     */
+    private Integer level;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+    /**
+     * 父ids
+     */
+    private String parentIds;
+
+    /**
+     * 子集合
+     */
+    private List<CwProjectBusinessTypeDTO> childrenList;
+
+    private static final long serialVersionUID = 1L;
+}

+ 17 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/service/mapstruct/CwProjectBusinessTypeWrapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.test.cw.projectBusinessType.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.test.cw.projectBusinessType.domain.CwProjectBusinessType;
+import com.jeeplus.test.cw.projectBusinessType.service.dto.CwProjectBusinessTypeDTO;
+import com.jeeplus.test.cw.workClientInfo.domain.CwManageLevelType;
+import com.jeeplus.test.cw.workClientInfo.service.dto.CwManageLevelTypeDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
+public interface CwProjectBusinessTypeWrapper extends EntityWrapper<CwProjectBusinessTypeDTO, CwProjectBusinessType>{
+
+        CwProjectBusinessTypeWrapper INSTANCE = Mappers.getMapper(CwProjectBusinessTypeWrapper.class);
+
+}

+ 10 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/domain/CwProjectRecords.java

@@ -88,4 +88,14 @@ public class CwProjectRecords extends BaseEntity {
      */
     private String contractId;
 
+    /**
+     * 业务类型
+     */
+    private String businessType;
+
+    /**
+     * 风险等级
+     */
+    private String riskLevel;
+
 }

+ 12 - 3
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/mapper/xml/CwProjectRecordsMapper.xml

@@ -35,6 +35,9 @@
         <result property="paymentMethod" column="payment_method" jdbcType="VARCHAR"/>
         <result property="createName" column="user_name" jdbcType="VARCHAR"/>
         <result property="createDateT" column="create_date" jdbcType="VARCHAR"/>
+        <result property="businessType" column="business_type" jdbcType="VARCHAR"/>
+        <result property="riskLevel" column="risk_level" jdbcType="VARCHAR"/>
+        <result property="businessTypeName" column="business_type_name" jdbcType="VARCHAR"/>
         <collection property="cwProjectClientInfoDTOList" ofType="com.jeeplus.test.cw.workClientInfo.service.dto.CwWorkClientBaseDTO" column="id" select="getProjectClient"></collection>
         <collection property="workAttachmentDtoList" ofType="com.jeeplus.test.workContract.service.dto.WorkAttachmentDto" column="id" select="getFileList"></collection>
     </resultMap>
@@ -72,7 +75,9 @@
         a.proc_ins_id,
         a.status,
         a.process_definition_id,
-        a.contract_id
+        a.contract_id,
+        a.business_type,
+        a.risk_level
     </sql>
     <sql id="File_Column_List">
         wa.id,
@@ -162,11 +167,13 @@
         cw_wci.contract_amount,
         cw_wci.contract_num,
         cw_wci.payer_subject,
-        cw_wci.payment_method
+        cw_wci.payment_method,
+        cw_pbt.name as business_type_name
         from cw_project_records a
         left join sys_user su on su.id = a.create_by and su.del_flag = '0'
         left join sys_user su2 on su2.id = a.project_master_id and su2.del_flag = '0'
         left join cw_work_contract_info cw_wci on cw_wci.id = a.contract_id and cw_wci.del_flag = '0'
+        left join cw_project_business_type cw_pbt on cw_pbt.id = a.business_type and cw_pbt.del_flag = '0'
         ${ew.customSqlSegment}
     </select>
 
@@ -179,11 +186,13 @@
         cw_wci.contract_amount,
         cw_wci.contract_num,
         cw_wci.payer_subject,
-        cw_wci.payment_method
+        cw_wci.payment_method,
+        cw_pbt.name as business_type_name
         from cw_project_records a
         left join sys_user su on su.id = a.create_by and su.del_flag = '0'
         left join sys_user su2 on su2.id = a.project_master_id and su2.del_flag = '0'
         left join cw_work_contract_info cw_wci on cw_wci.id = a.contract_id and cw_wci.del_flag = '0'
+        left join cw_project_business_type cw_pbt on cw_pbt.id = a.business_type and cw_pbt.del_flag = '0'
         where a.del_flag = '0' and a.id = ${id}
     </select>
 

+ 14 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/service/dto/CwProjectRecordsDTO.java

@@ -168,4 +168,18 @@ public class CwProjectRecordsDTO extends BaseDTO {
     @Excel(name = "创建时间",exportFormat = "yyyy-MM-dd HH:mm:ss",width = 25,orderNum = "4")
     private String createDateT;
 
+    /**
+     * 业务类型
+     */
+    private String businessType;
+
+    /**
+     * 风险等级
+     */
+    private String riskLevel;
+
+    /**
+     * 业务类型名称
+     */
+    private String businessTypeName;
 }

+ 16 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/workClientInfo/mapper/xml/CwWorkClientBaseMapper.xml

@@ -46,6 +46,8 @@
             <result property="address" column="address" jdbcType="VARCHAR"/>
             <result property="mobile" column="mobile" jdbcType="VARCHAR"/>
             <result property="isUscCode" column="is_usc_code" jdbcType="VARCHAR"/>
+            <result property="manageLevelTypeName" column="manage_level_type_name" jdbcType="VARCHAR"/>
+            <result property="organizationTypeName" column="organization_type_name" jdbcType="VARCHAR"/>
             <association property="cwWorkClientTypeDTO" column="id" select="getType" javaType="com.jeeplus.test.cw.workClientInfo.service.dto.CwWorkClientTypeDTO"></association>
             <collection property="workAttachmentDtoList" ofType="com.jeeplus.test.workContract.service.dto.WorkAttachmentDto" column="id" select="getFileList"></collection>
             <collection property="cwWorkClientBillingDTOList" ofType="com.jeeplus.test.cw.workClientInfo.service.dto.CwWorkClientBillingDTO" column="id" select="getBilling"></collection>
@@ -223,10 +225,14 @@
         su.name as user_name,
         cw_wct.is_listed as is_listed,
         cw_wct.ownership_type as ownership_type,
-        cw_wct.final_status_type as final_status_type
+        cw_wct.final_status_type as final_status_type,
+        cw_mlt.name as manage_level_type_name,
+        cw_ot.name as organization_type_name
         from cw_work_client_base cw_wcb
         left join sys_user su on su.id = cw_wcb.create_by
         left join cw_work_client_type cw_wct on cw_wct.client_id = cw_wcb.id and cw_wct.del_flag = '0'
+        left join cw_manage_level_type cw_mlt on cw_mlt.id = cw_wcb.manage_level_type and cw_mlt.del_flag = '0'
+        left join cw_organization_type cw_ot on cw_ot.id = cw_wcb.organization_type and cw_ot.del_flag = '0'
         ${ew.customSqlSegment}
     </select>
 
@@ -234,10 +240,18 @@
         select
         <include refid="Base_Column_List"></include>,
         wcb.name as one_up_company_name,
-        su.name as user_name
+        su.name as user_name,
+        cw_wct.is_listed as is_listed,
+        cw_wct.ownership_type as ownership_type,
+        cw_wct.final_status_type as final_status_type,
+        cw_mlt.name as manage_level_type_name,
+        cw_ot.name as organization_type_name
         from cw_work_client_base cw_wcb
         left join cw_work_client_base wcb on cw_wcb.one_up_company = wcb.id and wcb.del_flag = '0'
         left join sys_user su on su.id = cw_wcb.create_by
+        left join cw_work_client_type cw_wct on cw_wct.client_id = cw_wcb.id and cw_wct.del_flag = '0'
+        left join cw_manage_level_type cw_mlt on cw_mlt.id = cw_wcb.manage_level_type and cw_mlt.del_flag = '0'
+        left join cw_organization_type cw_ot on cw_ot.id = cw_wcb.organization_type and cw_ot.del_flag = '0'
         where cw_wcb.del_flag = '0' and cw_wcb.id = ${id}
     </select>
 </mapper>

+ 10 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/workClientInfo/service/dto/CwWorkClientBaseDTO.java

@@ -243,5 +243,15 @@ public class CwWorkClientBaseDTO extends BaseDTO {
      */
     private String isUscCode;
 
+    /**
+     * 管理级次分类名称
+     */
+    private String manageLevelTypeName;
+
+    /**
+     * 按组织类型分类名称
+     */
+    private String organizationTypeName;
+
     private static final long serialVersionUID = 1L;
 }