bug修改+资源开发

This commit is contained in:
2025-04-09 14:24:30 +08:00
parent 1e46e7bea0
commit 0da52d0a93
50 changed files with 2217 additions and 377 deletions

View File

@ -73,6 +73,9 @@
<if test="qo.project != null and qo.project != 0">
and project =#{qo.project}
</if>
<if test="qo.bugType != null and qo.bugType != ''">
and bug_type =#{qo.bugType}
</if>
<if test="qo.id != null and qo.id != 0">
and id = #{qo.id}

View File

@ -0,0 +1,66 @@
<?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.sa.zentao.mapper.ZtComputerSourceMapper">
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtComputerSource">
<result column="id" property="id" />
<result column="source_type" property="sourceType" />
<result column="inner_ip" property="innerIp" />
<result column="bread" property="bread" />
<result column="cpu_core" property="cpuCore" />
<result column="memory" property="memory" />
<result column="disk" property="disk" />
<result column="system_type" property="systemType" />
<result column="purpose" property="purpose" />
<result column="server_name" property="serverName" />
<result column="house" property="house" />
<result column="id_no" property="idNo" />
<result column="address" property="address" />
<result column="buy_date" property="buyDate" />
<result column="status" property="status" />
<result column="create_user" property="createUser" />
<result column="create_date" property="createDate" />
<result column="update_user" property="updateUser" />
<result column="update_date" property="updateDate" />
</resultMap>
<select id="pageList" resultType="com.sa.zentao.dao.ZtComputerSourceDTO">
SELECT * from zt_computer_source WHERE 1=1
<if test="qo.yearSearch != null and qo.yearSearch != ''">
-- 1年内、3年内、3~5年、5~7年7年以上
<if test="qo.yearSearch == 1">
and DATE_ADD(buy_date, INTERVAL 1 YEAR) <![CDATA[>=]]> now()
</if>
<if test="qo.yearSearch == 2">
and DATE_ADD(buy_date, INTERVAL 3 YEAR) <![CDATA[>]]> now()
</if>
<if test="qo.yearSearch == 3">
and DATE_ADD(buy_date, INTERVAL 3 YEAR) <![CDATA[<]]> now()
and DATE_ADD(buy_date, INTERVAL 5 YEAR) <![CDATA[>]]> now()
</if>
<if test="qo.yearSearch == 4">
and DATE_ADD(buy_date, INTERVAL 5 YEAR) <![CDATA[<]]> now()
and DATE_ADD(buy_date, INTERVAL 7 YEAR) <![CDATA[>]]> now()
</if>
<if test="qo.yearSearch == 5">
and DATE_ADD(buy_date, INTERVAL 7 YEAR) <![CDATA[<]]> now()
</if>
</if>
<if test=" qo.sourceType != null and qo.sourceType != ''">
and source_type = #{qo.sourceType}
</if>
<if test=" qo.systemType != null and qo.systemType != ''">
and system_type = #{qo.systemType}
</if>
<if test=" qo.idNo != null and qo.idNo != ''">
and id_no = #{qo.idNo}
</if>
<if test=" qo.status != null and qo.status != ''">
and status = #{qo.status}
</if>
<if test=" qo.house != null and qo.house != ''">
and house = #{qo.house}
</if>
</select>
</mapper>

View File

@ -17,8 +17,8 @@
<select id="pageList" resultType="com.sa.zentao.dao.ZtMeetingDTO">
SELECT m.* from zt_meeting m left join zt_product p on p.id = m.product_id
SELECT m.*,us.title userStoryName from zt_meeting m left join zt_product p on p.id = m.product_id
left join zt_story_user us on m.user_story = us.id
WHERE 1=1
<if test="qo.productId != null ">

View File

@ -7,7 +7,7 @@
<result column="object_id" property="objectId" />
<result column="status" property="status" />
</resultMap>
<select id="releasePageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
<select id="releaseStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.*,sp.spec ,sp.verify,sp.files from (zt_story s,zt_projectstory ps,zt_release_details details ) left join zt_storyspec sp on s.id = sp.story
@ -30,6 +30,23 @@
group by s.id
</select>
<select id="releaseBugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
select b.* from (zt_bug b,zt_release_details details )
WHERE b.id = details.object_id
and details.object_type='bug'
and details.release_id = #{qo.id}
and details.status != 'closed'
<if test="qo.name != null and qo.name != '' ">
and b.title like concat('%', #{qo.name}, '%')
</if>
<if test="qo.bugId != null ">
and b.id = #{qo.bugId}
</if>
order by b.id desc
</select>
<select id="storyPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.*,sp.spec ,sp.verify,sp.files from zt_story s
@ -37,7 +54,7 @@
left join zt_storyspec sp on s.id = sp.story
where 1=1
and s.status='active'
and s.stage='tested'
and stage in ('wait','projected','developing','developed','testing','tested')
and s.id in
<foreach collection="qo.storyList" item="id" index="index"
open="(" close=")" separator=",">
@ -54,5 +71,21 @@
group by s.id
</select>
<select id="releaseNotSyncBugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
SELECT b.* from zt_bug b WHERE 1= 1
and b.id not in
(select d.object_id from zt_release_details d,zt_release re
WHERE d.release_id = re.id and re.project = #{qo.project}
and d.object_type = 'bug' and d.`status` != 'closed')
and b.project = #{qo.project}
<if test="qo.name != null and qo.name != '' ">
and b.title like concat('%', #{qo.name}, '%')
</if>
<if test="qo.bugId != null ">
and b.id = #{qo.bugId}
</if>
</select>
</mapper>

View File

@ -55,6 +55,7 @@
or account like concat('%', #{qo.account}, '%')
or pinyin like concat('%', #{qo.account}, '%')
</if>
and deleted = '0'
order by id desc
</select>
@ -82,5 +83,13 @@
GROUP BY date_str,u.account
</select>
<select id="oaUserByNikeName" resultType="com.sa.zentao.dao.BaseStaff">
SELECT * from os_system.base_staff staff WHERE staff.`name` = #{nickname}
</select>
<select id="getDepart" resultType="com.sa.zentao.dao.BaseDepartment">
select * from os_system.base_department WHERE id = #{departId}
</select>
</mapper>