Selaa lähdekoodia

fix 资料审核

he2802 4 vuotta sitten
vanhempi
commit
324b41d772

+ 1 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/ProfileTpController.java

@@ -50,7 +50,7 @@ public class ProfileTpController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo<ProfileTpVo> list(ProfileTpQueryBo bo) {
         startPage();
-        List<ProfileTpVo> list = iProfileTpService.queryList(bo);
+        List<ProfileTpVo> list = iProfileTpService.selectList(bo);
         return getDataTable(list);
     }
 

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpAddBo.java

@@ -39,4 +39,7 @@ public class ProfileTpAddBo {
     /** key值,多个,拼接 */
     @ApiModelProperty("key值")
     private String keyValue;
+    /** 审核员ID,多个,拼接 */
+    @ApiModelProperty("审核员ID,多个,拼接")
+    private String userIds;
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpEditBo.java

@@ -45,5 +45,8 @@ public class ProfileTpEditBo {
     /** key值,多个,拼接 */
     @ApiModelProperty("key值")
     private String keyValue;
+    /** 审核员ID,多个,拼接 */
+    @ApiModelProperty("审核员ID,多个,拼接")
+    private String userIds;
 
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/domain/ProfileTp.java

@@ -40,4 +40,6 @@ private static final long serialVersionUID=1L;
     private Long updateTime;
     /** key值,多个,拼接 */
     private String keyValue;
+    /** 审核员ID,多个,拼接 */
+    private String userIds;
 }

+ 7 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/ProfileTpMapper.java

@@ -1,7 +1,13 @@
 package com.zhongzheng.modules.base.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zhongzheng.modules.base.bo.ProfileTpQueryBo;
 import com.zhongzheng.modules.base.domain.ProfileTp;
+import com.zhongzheng.modules.base.vo.ProfileTpVo;
+import com.zhongzheng.modules.course.bo.CourseQueryBo;
+import com.zhongzheng.modules.course.vo.CourseVo;
+
+import java.util.List;
 
 /**
  * 资料模板Mapper接口
@@ -10,5 +16,5 @@ import com.zhongzheng.modules.base.domain.ProfileTp;
  * @date 2021-11-19
  */
 public interface ProfileTpMapper extends BaseMapper<ProfileTp> {
-
+    List<ProfileTpVo> selectList(ProfileTpQueryBo bo);
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IProfileTpService.java

@@ -28,6 +28,8 @@ public interface IProfileTpService extends IService<ProfileTp> {
 	 */
 	List<ProfileTpVo> queryList(ProfileTpQueryBo bo);
 
+	List<ProfileTpVo> selectList(ProfileTpQueryBo bo);
+
 	/**
 	 * 根据新增业务对象插入资料模板
 	 * @param bo 资料模板新增业务对象

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpServiceImpl.java

@@ -3,6 +3,7 @@ package com.zhongzheng.modules.base.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.base.bo.ProfileTpAddBo;
 import com.zhongzheng.modules.base.bo.ProfileTpBusinessAddBo;
 import com.zhongzheng.modules.base.bo.ProfileTpEditBo;
@@ -44,6 +45,9 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
     @Autowired
     private IProfileTpBusinessService iProfileTpBusinessService;
 
+    @Autowired
+    private ProfileTpMapper profileTpMapper;
+
     @Override
     public ProfileTpVo queryById(Long profileTpId){
         ProfileTp db = this.baseMapper.selectById(profileTpId);
@@ -59,6 +63,11 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
         return entity2Vo(this.list(lqw));
     }
 
+    @Override
+    public List<ProfileTpVo> selectList(ProfileTpQueryBo bo) {
+        return profileTpMapper.selectList(bo);
+    }
+
     /**
     * 实体类转化成视图对象
     *
@@ -84,6 +93,7 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
     public Boolean insertByAddBo(ProfileTpAddBo bo) {
         ProfileTp add = BeanUtil.toBean(bo, ProfileTp.class);
         validEntityBeforeSave(add);
+        add.setCode(ServletUtils.getEncoded("ZL"));
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
         boolean result = this.save(add);

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileTpBusinessVo.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.base.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.zhongzheng.common.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -40,4 +41,13 @@ public class ProfileTpBusinessVo {
 	@Excel(name = "项目ID")
 	@ApiModelProperty("项目ID")
 	private Long projectId;
+
+
+	private String educationName;
+
+	private String projectName;
+
+	private String businessName;
+
+
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileTpVo.java

@@ -40,4 +40,8 @@ public class ProfileTpVo {
 	@Excel(name = "key值")
 	@ApiModelProperty("key值")
 	private String keyValue;
+	/** 审核员ID,多个,拼接 */
+	@Excel(name = "审核员ID,多个,拼接")
+	@ApiModelProperty("审核员ID,多个,拼接")
+	private String userIds;
 }

+ 55 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/ProfileTpMapper.xml

@@ -12,7 +12,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime" column="create_time"/>
         <result property="updateTime" column="update_time"/>
         <result property="keyValue" column="key_value"/>
+        <result property="userIds" column="user_ids"/>
     </resultMap>
 
+    <resultMap type="com.zhongzheng.modules.base.vo.ProfileTpVo" id="ProfileTpVoResult">
+        <result property="profileTpId" column="profile_tp_id"/>
+        <result property="name" column="name"/>
+        <result property="code" column="code"/>
+        <result property="status" column="status"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="keyValue" column="key_value"/>
+        <collection property="businessList" column="profile_tp_id" select="findBusinessList"/>
+        <result property="userIds" column="user_ids"/>
+    </resultMap>
+
+    <resultMap type="com.zhongzheng.modules.base.vo.ProfileTpBusinessVo" id="ProfileTpBusiness">
+        <result property="id" column="id"/>
+        <result property="educationTypeId" column="education_type_id"/>
+        <result property="businessId" column="business_id"/>
+        <result property="projectId" column="project_id"/>
+
+        <result property="educationName" column="education_name"/>
+        <result property="projectName" column="project_name"/>
+        <result property="businessName" column="business_name"/>
+    </resultMap>
+
+    <select id="findBusinessList" resultMap="ProfileTpBusiness">
+        SELECT
+            b.education_type_id,
+            b.id,
+            b.business_id,
+            b.project_id,
+            cet.education_name,
+            cpt.project_name,
+            cb.business_name
+        FROM
+            profile_tp_business b
+                LEFT JOIN course_education_type cet ON b.education_type_id = cet.id
+                LEFT JOIN course_project_type cpt ON b.project_id = cpt.id
+                LEFT JOIN course_business cb ON b.business_id = cb.id
+        WHERE
+            b.profile_tp_id=#{profile_tp_id}
+    </select>
 
+    <select id="selectList" parameterType="com.zhongzheng.modules.base.bo.ProfileTpQueryBo" resultMap="ProfileTpVoResult">
+        SELECT
+            *
+        FROM
+            profile_tp p
+        WHERE
+            1 =1
+        <if test="status != null and status.size()!=0 ">
+            AND p.status in
+            <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+    </select>
 </mapper>