From 5d2cfd4562f74496a5263db3451c1e78ff53aead Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期四, 27 三月 2025 08:44:16 +0800 Subject: [PATCH] 单据增加查询返回字段 --- assess-system/src/main/resources/mapper/AssProjectMapper.xml | 41 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 38 insertions(+), 3 deletions(-) diff --git a/assess-system/src/main/resources/mapper/AssProjectMapper.xml b/assess-system/src/main/resources/mapper/AssProjectMapper.xml index 941e57a..4e9126c 100644 --- a/assess-system/src/main/resources/mapper/AssProjectMapper.xml +++ b/assess-system/src/main/resources/mapper/AssProjectMapper.xml @@ -43,6 +43,7 @@ <resultMap id="userResult" type="com.gkhy.assess.system.domain.SysUser"> <id property="id" column="leader_id" /> <result property="name" column="leader_name" /> + <result property="phone" column="link_phone" /> </resultMap> <resultMap id="contractResult" type="com.gkhy.assess.system.domain.AssContract"> @@ -55,7 +56,7 @@ select distinct p.id,p.name, p.code,p.client,p.province,p.city,p.district,p.business,p.invest,p.address,p.agency_id, p.actual_location,p.location,p.estimate_type,p.filing_date, p.credit_code,p.report_progress,p.phase,p.state,p.introduction,p.is_review,p.del_flag,p.create_by,p.create_time, - p.update_by,p.update_time,p.remark,d1.label as business_name,d2.label as estimate_type_name,e.leader_id,u.name as leader_name, + p.update_by,p.update_time,p.remark,d1.label as business_name,d2.label as estimate_type_name,e.leader_id,u.name as leader_name,e.link_phone, c.id as contract_id,c.contract_money,c.actual_contract_money,a.name as agency_name, (select count(*) from ass_project_material m where m.project_id=p.id and m.file_id is not null) as material_cnt from ass_project p @@ -78,6 +79,18 @@ </if> <where> and p.del_flag = 0 + <if test="safetyCheck != null and safetyCheck == 0"> + and p.estimate_type != 33 + </if> + <if test="safetyCheck != null and safetyCheck == 1"> + and p.estimate_type = 33 + </if> + <if test="unFinish != null and unFinish == 1"> + and p.report_progress != 14 + </if> + <if test="agencyName != null and agencyName != ''"> + and a.name=#{agencyName} + </if> <if test="name != null and name != ''"> AND p.name like concat('%', #{name}, '%') </if> @@ -131,7 +144,14 @@ <select id="getProjectByName" resultType="com.gkhy.assess.system.domain.AssProject"> select id,name from ass_project - where name=#{name} and agency_id=#{agencyId} and del_flag=0 limit 1 + where name=#{name} and agency_id=#{agencyId} and del_flag=0 + <if test="safetyCheck != null and safetyCheck == 0"> + and estimate_type != 33 + </if> + <if test="safetyCheck != null and safetyCheck == 1"> + and estimate_type = 33 + </if> + limit 1 </select> <select id="getReportProgress" resultType="java.lang.Integer"> @@ -176,15 +196,30 @@ </select> <select id="getProjectCount" resultType="java.lang.Integer"> - select count(distinct p.id) from ass_project p + select Ifnull(count(distinct p.id),0) from ass_project p <if test="params.lostMaterial != null"> left join ass_project_material m on m.project_id=p.id </if> + <if test="agencyName != null and agencyName != ''"> + left join sys_agency a on a.id=p.agency_id + </if> <where> and p.del_flag=0 + <if test="safetyCheck != null and safetyCheck == 0"> + and p.estimate_type != 33 + </if> + <if test="safetyCheck != null and safetyCheck == 1"> + and p.estimate_type = 33 + </if> + <if test="unFinish != null and unFinish == 1"> + and p.report_progress != 14 + </if> <if test="agencyId!=null and agencyId!=''"> and p.agency_id=#{agencyId} </if> + <if test="agencyName != null and agencyName != ''"> + and a.name=#{agencyName} + </if> <if test="name != null and name != ''"> AND p.name like concat('%', #{name}, '%') </if> -- Gitblit v1.9.2