From 2d27b24029adafdbfc5703b38a519d65beda6a68 Mon Sep 17 00:00:00 2001 From: heheng <heheng@123456> Date: 星期三, 20 十一月 2024 16:23:23 +0800 Subject: [PATCH] 更改 --- expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml | 98 ++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 84 insertions(+), 14 deletions(-) diff --git a/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml b/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml index 484be7f..e636c7d 100644 --- a/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml +++ b/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml @@ -17,9 +17,15 @@ <result property="remark" column="remark" /> <result property="projectDateStart" column="project_date_start" /> <result property="projectDateEnd" column="project_date_end" /> + <result property="projectCheckTime" column="project_check_time" /> <result property="expertCertificate" column="expert_certificate" /> - <result property="envaluationState" column="envaluation_state" /> + <result property="evaluationState" column="evaluation_state" /> <result property="expertNum" column="expert_num" /> + <result property="expertId" column="expert_id" /> + <result property="expertName" column="expert_name" /> + <result property="projectEndTime" column="project_end_time" /> + <result property="desc" column="desc" /> + <result property="step" column="step" /> <result property="delFlag" column="del_flag" /> <result property="createBy" column="create_by" /> <result property="createTime" column="create_time" /> @@ -27,13 +33,45 @@ <result property="updateTime" column="update_time" /> </resultMap> + <resultMap type="com.gkhy.system.domain.vo.response.ProjectExpertManagementInfoRes" id="ProjectManagementInfoResult"> + <result property="id" column="id" /> + <result property="projectName" column="project_name" /> + <result property="deptName" column="dept_name" /> + <result property="remark" column="remark" /> + <result property="state" column="state" /> + <result property="step" column="step" /> + <result property="companyName" column="company_name" /> + <result property="projectAddress" column="project_address" /> +<!-- <result property="deptUserName" column="dept_user_name" />--> + <result property="projectDateStart" column="project_date_start" /> + <result property="projectDateEnd" column="project_date_end" /> + <result property="projectCheckTime" column="project_check_time" /> + <collection property="projectExpertCheckResp" javaType="java.util.List" resultMap="ExpertCheck" /> + </resultMap> + <resultMap id="ExpertCheck" type="com.gkhy.system.domain.vo.response.ProjectExpertCheckResp"> + <result property="id" column="project_expert_id" /> + <result property="expertId" column="expert_id_info" /> + <result property="name" column="name" /> + <result property="sex" column="sex" /> + <result property="idCard" column="id_card" /> + <result property="domain" column="domain" /> + <result property="ratingLevel" column="rating_level" /> + <result property="selectionMode" column="selection_mode" /> + <result property="teamLeader" column="team_leader" /> + </resultMap> + <sql id="selectProjectManagementVo"> - select id, project_name, dept_id, dept_name, company_name, project_address, dept_user_name, version, state, remark, project_date_start, project_date_end, expert_certificate, envaluation_state, expert_num, del_flag, create_by, create_time, update_by, update_time from project_management + select id, project_name, dept_id, dept_name, company_name, project_address, dept_user_name, + version, state, remark, project_date_start, project_date_end, expert_certificate, + evaluation_state, expert_num, del_flag, create_by, create_time, update_by, update_time,project_check_time,expert_id, + expert_name,project_end_time,'desc',step + from project_management </sql> <select id="selectProjectManagementList" parameterType="ProjectManagement" resultMap="ProjectManagementResult"> <include refid="selectProjectManagementVo"/> - <where> + <where> + and del_flag = 0 <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if> <if test="deptId != null "> and dept_id = #{deptId}</if> <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> @@ -42,17 +80,18 @@ <if test="deptUserName != null and deptUserName != ''"> and dept_user_name like concat('%', #{deptUserName}, '%')</if> <if test="version != null "> and version = #{version}</if> <if test="state != null "> and state = #{state}</if> + <if test="step!= null "> and step = #{step}</if> <if test="projectDateStart != null "> and project_date_start = #{projectDateStart}</if> <if test="projectDateEnd != null "> and project_date_end = #{projectDateEnd}</if> <if test="expertCertificate != null and expertCertificate != ''"> and expert_certificate = #{expertCertificate}</if> - <if test="envaluationState != null "> and envaluation_state = #{envaluationState}</if> + <if test="evaluationState != null "> and evaluation_state = #{evaluationState}</if> <if test="expertNum != null "> and expert_num = #{expertNum}</if> </where> </select> <select id="selectProjectManagementById" parameterType="Long" resultMap="ProjectManagementResult"> <include refid="selectProjectManagementVo"/> - where id = #{id} + where id = #{id} and del_flag = 0 </select> <insert id="insertProjectManagement" parameterType="ProjectManagement" useGeneratedKeys="true" keyProperty="id"> @@ -66,11 +105,12 @@ <if test="deptUserName != null and deptUserName != ''">dept_user_name,</if> <if test="version != null">version,</if> <if test="state != null">state,</if> + <if test="step != null">step,</if> <if test="remark != null">remark,</if> <if test="projectDateStart != null">project_date_start,</if> <if test="projectDateEnd != null">project_date_end,</if> <if test="expertCertificate != null">expert_certificate,</if> - <if test="envaluationState != null">envaluation_state,</if> + <if test="evaluationState != null">evaluation_state,</if> <if test="expertNum != null">expert_num,</if> <if test="delFlag != null">del_flag,</if> <if test="createBy != null">create_by,</if> @@ -87,11 +127,12 @@ <if test="deptUserName != null and deptUserName != ''">#{deptUserName},</if> <if test="version != null">#{version},</if> <if test="state != null">#{state},</if> + <if test="step != null">#{step},</if> <if test="remark != null">#{remark},</if> <if test="projectDateStart != null">#{projectDateStart},</if> <if test="projectDateEnd != null">#{projectDateEnd},</if> <if test="expertCertificate != null">#{expertCertificate},</if> - <if test="envaluationState != null">#{envaluationState},</if> + <if test="evaluationState != null">#{evaluationState},</if> <if test="expertNum != null">#{expertNum},</if> <if test="delFlag != null">#{delFlag},</if> <if test="createBy != null">#{createBy},</if> @@ -112,12 +153,18 @@ <if test="deptUserName != null and deptUserName != ''">dept_user_name = #{deptUserName},</if> <if test="version != null">version = #{version},</if> <if test="state != null">state = #{state},</if> + <if test="step != null">step = #{step},</if> <if test="remark != null">remark = #{remark},</if> <if test="projectDateStart != null">project_date_start = #{projectDateStart},</if> <if test="projectDateEnd != null">project_date_end = #{projectDateEnd},</if> + <if test="projectCheckTime != null">project_check_time = #{projectCheckTime},</if> <if test="expertCertificate != null">expert_certificate = #{expertCertificate},</if> - <if test="envaluationState != null">envaluation_state = #{envaluationState},</if> + <if test="evaluationState != null">evaluation_state = #{evaluationState},</if> <if test="expertNum != null">expert_num = #{expertNum},</if> + <if test="expertId != null">expert_id = #{expertId},</if> + <if test="expertName != null and expertName != ''">expert_name = #{expertName},</if> + <if test="projectEndTime != null">project_end_time = #{projectEndTime},</if> + <if test="desc != null and desc != ''">`desc` = #{desc},</if> <if test="delFlag != null">del_flag = #{delFlag},</if> <if test="createBy != null">create_by = #{createBy},</if> <if test="createTime != null">create_time = #{createTime},</if> @@ -127,14 +174,37 @@ where id = #{id} </update> - <delete id="deleteProjectManagementById" parameterType="Long"> - delete from project_management where id = #{id} - </delete> + <update id="deleteProjectManagementById" parameterType="Long"> + update project_management set del_flag = 1 where id = #{id} + </update> - <delete id="deleteProjectManagementByIds" parameterType="String"> - delete from project_management where id in + <update id="deleteProjectManagementByIds" parameterType="String"> + update project_management set del_flag = 1 where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> - </delete> + </update> + + <select id="projectExpertCheckInfo" parameterType="Long" resultMap="ProjectManagementInfoResult"> + select a.id,a.step, a.project_name, a.dept_name, a.company_name, a.project_address, a.project_date_start, a.project_date_end, a.remark,a.project_check_time,a.state, + b.id project_expert_id,b.expert_id expert_id_info,c.name,c.sex,c.id_card,c.domain,c.rating_level,b.selection_mode,b.team_leader + from project_management a + left join project_expert b on a.id = b.project_id and b.del_flag = 0 + left join sys_expert_info c on b.expert_id = c.id + where a.id = #{id} + order by b.team_leader asc , b.create_time desc + </select> + <select id="getProjectExpertSate" parameterType="com.gkhy.system.domain.vo.request.ProjectExpertStateReq" resultType="com.gkhy.system.domain.vo.response.ProjectExpertStateResp"> + select a.id, a.project_name, a.evaluation_state, a.project_check_time, a.project_end_time, a.dept_name, a.expert_num + from project_management a + where a.del_flag = 0 and a.state = 4 + <if test="projectCheckTime != null "> and a.project_check_time = #{projectCheckTime}</if> + <if test="projectName != null and projectName != ''"> and a.project_name like concat('%', #{projectName}, '%')</if> + <if test="evaluationState != null "> and a.evaluation_state = #{evaluationState}</if> + </select> + + <select id="getDataNum" parameterType="Long" resultType="Integer"> + select state from project_management where del_flag = 0 + <if test="deptId != null "> and dept_id = #{deptId}</if> + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.2