From 31d3591b34d4f26ad2ab207ca3044048d9adb9df Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 21 八月 2024 17:51:28 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ycl-server/src/main/resources/mapper/zgyw/ContractScoreMapper.xml | 36 +++++++++++++++++++++++++++++------- 1 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ycl-server/src/main/resources/mapper/zgyw/ContractScoreMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/ContractScoreMapper.xml index 523f5af..fdfb7ca 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/ContractScoreMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/ContractScoreMapper.xml @@ -2,7 +2,7 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.ycl.platform.mapper.DefaultScoreMapper"> +<mapper namespace="com.ycl.platform.mapper.ContractScoreMapper"> <resultMap type="com.ycl.platform.domain.entity.ContractScore" id="DefaultScoreResult"> <result property="id" column="id" /> @@ -22,12 +22,33 @@ select id, publish_id, template_id, num, score, create_user, create_user_name, update_user, update_user_name, create_time, update_time from t_contract_score </sql> - <select id="selectDefaultScoreList" resultMap="DefaultScoreResult"> - <include refid="selectDefaultScoreVo"/> - <where> - <if test="publishId != null "> and publish_id = #{publishId}</if> - <if test="templateId != null "> and template_id = #{templateId}</if> - </where> + <select id="selectDefaultScoreList" resultType="com.ycl.platform.domain.entity.ContractScore"> + SELECT + cs.*, + u.unit_name AS unitName, + c.name AS contractName + FROM + t_contract_score cs + LEFT JOIN + t_yw_unit u ON cs.unit_id = u.id and u.deleted = 0 + LEFT JOIN + t_contract c ON cs.contract_id = c.id and c.deleted = 0 + where + cs.deleted = 0 + <if test="unitId != null"> + AND cs.unit_id = #{unitId} + </if> + <if test="createStartTime != null"> + AND cs.create_time BETWEEN #{createStartTime} AND #{createEndTime} + </if> + <if test="auditingStartTime != null"> + AND cs.auditing_time BETWEEN #{auditingStartTime} AND #{auditingEndTime} + </if> + <if test="auditingStatus != null"> + AND cs.auditing_status = #{auditingStatus} + </if> + ORDER BY + cs.create_time DESC </select> <select id="selectDefaultScoreById" resultMap="DefaultScoreResult"> @@ -90,4 +111,5 @@ #{id} </foreach> </delete> + </mapper> -- Gitblit v1.8.0