提交代码

dev_xds
姜玉琦 2024-08-13 22:21:06 +08:00
parent 78df575406
commit 0ff793ce80
3 changed files with 66 additions and 69 deletions

View File

@ -44,8 +44,8 @@ wechat:
# 日志配置 # 日志配置
logging: logging:
level: level:
com.ruoyi: error com.ruoyi: info
com.yanzhu.jh: error com.yanzhu.jh: info
org.springframework: error org.springframework: error
org.flowable: error org.flowable: error

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.jh.project.mapper.SurProjectBuildNodeDataMapper"> <mapper namespace="com.yanzhu.jh.project.mapper.SurProjectBuildNodeDataMapper">
<resultMap type="SurProjectBuildNodeData" id="SurProjectBuildNodeDataResult"> <resultMap type="SurProjectBuildNodeData" id="SurProjectBuildNodeDataResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="nodeId" column="node_id" /> <result property="nodeId" column="node_id" />
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectSurProjectBuildNodeDataList" parameterType="SurProjectBuildNodeData" resultMap="SurProjectBuildNodeDataResultNode"> <select id="selectSurProjectBuildNodeDataList" parameterType="SurProjectBuildNodeData" resultMap="SurProjectBuildNodeDataResultNode">
<include refid="selectSurProjectBuildNodeDataVoByNode"/> <include refid="selectSurProjectBuildNodeDataVoByNode"/>
<where> <where>
<if test="nodeId != null "> and node_id = #{nodeId}</if> <if test="nodeId != null "> and node_id = #{nodeId}</if>
<if test="projectId != null "> and project_id = #{projectId}</if> <if test="projectId != null "> and project_id = #{projectId}</if>
<if test="startDate != null "> and start_date = #{startDate}</if> <if test="startDate != null "> and start_date = #{startDate}</if>
@ -71,12 +71,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
order by node_lvl,id order by node_lvl,id
</select> </select>
<select id="selectSurProjectBuildNodeDataById" parameterType="Long" resultMap="SurProjectBuildNodeDataResult"> <select id="selectSurProjectBuildNodeDataById" parameterType="Long" resultMap="SurProjectBuildNodeDataResult">
<include refid="selectSurProjectBuildNodeDataVo"/> <include refid="selectSurProjectBuildNodeDataVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertSurProjectBuildNodeData" parameterType="SurProjectBuildNodeData" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSurProjectBuildNodeData" parameterType="SurProjectBuildNodeData" useGeneratedKeys="true" keyProperty="id">
insert into sur_project_build_node_data insert into sur_project_build_node_data
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeId != null">#{nodeId},</if> <if test="nodeId != null">#{nodeId},</if>
<if test="projectId != null">#{projectId},</if> <if test="projectId != null">#{projectId},</if>
@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateSurProjectBuildNodeData" parameterType="SurProjectBuildNodeData"> <update id="updateSurProjectBuildNodeData" parameterType="SurProjectBuildNodeData">
@ -139,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteSurProjectBuildNodeDataByIds" parameterType="String"> <delete id="deleteSurProjectBuildNodeDataByIds" parameterType="String">
delete from sur_project_build_node_data where id in delete from sur_project_build_node_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
@ -147,19 +147,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectScheduledAlerts" parameterType="SurProjectBuildNodeData" resultMap="SurProjectBuildNodeDataResultNode"> <select id="selectScheduledAlerts" parameterType="SurProjectBuildNodeData" resultMap="SurProjectBuildNodeDataResultNode">
SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN ( SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN (
SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn
left join sur_project sp on sp.id = vbn.project_id left join sur_project sp on sp.id = vbn.project_id
WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 and sp.progressVisible=0
<if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if> <if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if>
<if test="id!=null and id!=0">and sp.deptId=#{id}</if> <if test="id!=null and id!=0">and sp.deptId=#{id}</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if> <if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
<if test="prjIds !=null and prjIds.size()>0"> <if test="prjIds !=null and prjIds.size()>0">
and vbn.project_id in and vbn.project_id in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=","> <foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
GROUP BY vbn.project_id) order by projectSort GROUP BY vbn.project_id) order by projectSort
</select> </select>
<select id="selectCurrent" parameterType="SurProjectBuildNodeData" resultMap="SurProjectBuildNodeDataResultNode"> <select id="selectCurrent" parameterType="SurProjectBuildNodeData" resultMap="SurProjectBuildNodeDataResultNode">
@ -173,55 +173,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="countCompletionRate" parameterType="SurProjectBuildNodeData" resultMap="SurProjectBuildNodeDataResultNode"> <select id="countCompletionRate" parameterType="SurProjectBuildNodeData" resultMap="SurProjectBuildNodeDataResultNode">
SELECT IF(b.cnt,b.cnt,0) id ,IF(c.cnt,c.cnt,0) node_id,a.project_id,a.projectName,a.node_text,a.node_lvl FROM ( SELECT IF(b.cnt,b.cnt,0) id ,IF(c.cnt,c.cnt,0) node_id,a.project_id,a.projectName,a.node_text,a.node_lvl FROM (
SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN ( SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN (
SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn
left join sur_project sp on sp.id = vbn.project_id left join sur_project sp on sp.id = vbn.project_id
WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 and sp.progressVisible=0
<if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if> <if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if>
<if test="id!=null and id!=0">and sp.deptId=#{id}</if> <if test="id!=null and id!=0">and sp.deptId=#{id}</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if> <if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
<if test="prjIds !=null and prjIds.size()>0"> <if test="prjIds !=null and prjIds.size()>0">
and vbn.project_id in and vbn.project_id in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=","> <foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
GROUP BY vbn.project_id)) a LEFT JOIN ( GROUP BY vbn.project_id)) a LEFT JOIN (
SELECT a.project_id,COUNT(1) cnt FROM vw_sur_project_build_node_data_current a, SELECT a.project_id,COUNT(1) cnt FROM vw_sur_project_build_node_data_current a,
(SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN ( (SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN (
SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn
left join sur_project sp on sp.id = vbn.project_id left join sur_project sp on sp.id = vbn.project_id
WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 and sp.progressVisible=0
<if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if> <if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if>
<if test="id!=null and id!=0">and sp.deptId=#{id}</if> <if test="id!=null and id!=0">and sp.deptId=#{id}</if>
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if> <if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
<if test="prjIds !=null and prjIds.size()>0"> <if test="prjIds !=null and prjIds.size()>0">
and vbn.project_id in and vbn.project_id in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=","> <foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
GROUP BY vbn.project_id)) b WHERE a.project_id=b.project_id AND LEFT(a.node_lvl,2)=b.node_lvl AND LENGTH(a.node_lvl)>2 GROUP BY vbn.project_id)) b WHERE a.project_id=b.project_id AND LEFT(a.node_lvl,2)=b.node_lvl AND LENGTH(a.node_lvl)>2
GROUP BY a.project_id) b ON a.project_id =b.project_id GROUP BY a.project_id) b ON a.project_id =b.project_id
LEFT JOIN( LEFT JOIN(
SELECT a.project_id,COUNT(1) cnt FROM vw_sur_project_build_node_data_current a, SELECT a.project_id,COUNT(1) cnt FROM vw_sur_project_build_node_data_current a,
(SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN ( (SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN (
SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn
left join sur_project sp on sp.id = vbn.project_id left join sur_project sp on sp.id = vbn.project_id
WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 and sp.progressVisible=0
<if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if> <if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if>
<if test="id!=null and id!=0">and sp.deptId=#{id}</if> <if test="id!=null and id!=0">and sp.deptId=#{id}</if>
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if> <if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
<if test="prjIds !=null and prjIds.size()>0"> <if test="prjIds !=null and prjIds.size()>0">
and vbn.project_id in and vbn.project_id in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=","> <foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
GROUP BY vbn.project_id)) b WHERE a.project_id=b.project_id AND LEFT(a.node_lvl,2)=b.node_lvl AND LENGTH(a.node_lvl)>2 AND a.end_date IS NOT NULL GROUP BY vbn.project_id)) b WHERE a.project_id=b.project_id AND LEFT(a.node_lvl,2)=b.node_lvl AND LENGTH(a.node_lvl)>2 AND a.end_date IS NOT NULL
GROUP BY a.project_id GROUP BY a.project_id
) c ON a.project_id=c.project_id ) c ON a.project_id=c.project_id
</select> </select>
@ -231,7 +231,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT id FROM sur_project WHERE isdel=0 AND projectType=#{type}) SELECT id FROM sur_project WHERE isdel=0 AND projectType=#{type})
</select> </select>
<select id="queryFinishProject" parameterType="Long" resultMap="SurProjectBuildNodeDataResultNode"> <select id="queryFinishProject" parameterType="Long" resultMap="SurProjectBuildNodeDataResultNode">
<include refid="selectSurProjectBuildNodeDataVoByNode"/> <include refid="selectSurProjectBuildNodeDataVoByNode"/>
WHERE is_del=0 AND project_id =#{projectId} and end_date is not null WHERE is_del=0 AND project_id =#{projectId} and end_date is not null

View File

@ -298,7 +298,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT b.dict_value id,b.dict_label projectName,cnt deptId FROM ( SELECT b.dict_value id,b.dict_label projectName,cnt deptId FROM (
SELECT b.dict_value, b.dict_label,sum(c.money) SELECT b.dict_value, b.dict_label,sum(c.money)
cnt FROM sur_project a, sys_dict_data b,sur_project_cost_output c WHERE b.dict_type='project_category' AND a.id=c.project_id AND c.cost_type=2 and c.year=#{isDel} cnt FROM sur_project a, sys_dict_data b,sur_project_cost_output c WHERE b.dict_type='project_category' AND a.id=c.project_id AND c.cost_type=2 and c.year=#{isDel}
AND a.projectType=b.dict_value and a.isDel=0 and a.progressVisible=0 AND a.projectType=b.dict_value and a.isDel=0
<if test="deptId>0">AND deptid=#{deptId}</if> <if test="deptId>0">AND deptid=#{deptId}</if>
<if test="proType != null and proType != ''"> and a.projectType = #{proType}</if> <if test="proType != null and proType != ''"> and a.projectType = #{proType}</if>
GROUP BY dict_value,dict_label GROUP BY dict_value,dict_label
@ -312,7 +312,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id==2">COUNT(1)*10000</if> <if test="id==2">COUNT(1)*10000</if>
cnt FROM sur_project a, sys_dict_data b,vw_sur_project_cost_output c WHERE b.dict_type='project_category' AND a.id=c.project_id cnt FROM sur_project a, sys_dict_data b,vw_sur_project_cost_output c WHERE b.dict_type='project_category' AND a.id=c.project_id
AND a.projectType=b.dict_value and a.isDel=0 AND a.projectType=b.dict_value and a.isDel=0
<if test="id!=0"> and a.progressVisible=0</if>
<if test="deptId>0">AND deptid=#{deptId}</if> <if test="deptId>0">AND deptid=#{deptId}</if>
<if test="proType != null and proType != ''"> and projectType = #{proType}</if> <if test="proType != null and proType != ''"> and projectType = #{proType}</if>
GROUP BY dict_value,dict_label GROUP BY dict_value,dict_label
@ -325,7 +324,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT b.dict_value id,b.dict_label projectName,cnt deptId FROM ( SELECT b.dict_value id,b.dict_label projectName,cnt deptId FROM (
SELECT b.dict_value, b.dict_label,sum(c.money) cnt SELECT b.dict_value, b.dict_label,sum(c.money) cnt
FROM sur_project a,sys_dict_data b ,sur_project_cost_output c WHERE b.dict_type='project_level' AND a.id=c.project_id AND c.cost_type=2 and c.year=#{isDel} FROM sur_project a,sys_dict_data b ,sur_project_cost_output c WHERE b.dict_type='project_level' AND a.id=c.project_id AND c.cost_type=2 and c.year=#{isDel}
AND a.projiectLevel=b.dict_value and a.isDel=0 and a.progressVisible=0 AND a.projiectLevel=b.dict_value and a.isDel=0
<if test="deptId>0">AND deptid=#{deptId}</if> <if test="deptId>0">AND deptid=#{deptId}</if>
<if test="proType != null and proType != ''"> and projectType = #{proType}</if> <if test="proType != null and proType != ''"> and projectType = #{proType}</if>
GROUP BY dict_value,dict_label GROUP BY dict_value,dict_label
@ -339,7 +338,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
cnt FROM sur_project a, sys_dict_data b ,vw_sur_project_cost_output c WHERE b.dict_type='project_level' AND a.id=c.project_id cnt FROM sur_project a, sys_dict_data b ,vw_sur_project_cost_output c WHERE b.dict_type='project_level' AND a.id=c.project_id
AND a.projiectLevel=b.dict_value and a.isDel=0 AND a.projiectLevel=b.dict_value and a.isDel=0
<if test="id!=0"> and a.progressVisible=0</if>
<if test="deptId>0">AND deptid=#{deptId}</if> <if test="deptId>0">AND deptid=#{deptId}</if>
<if test="proType != null and proType != ''"> and projectType = #{proType}</if> <if test="proType != null and proType != ''"> and projectType = #{proType}</if>
GROUP BY dict_value,dict_label GROUP BY dict_value,dict_label
@ -350,7 +348,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectProgressProjects" parameterType="SurProject" resultMap="SurProjectResult"> <select id="selectProgressProjects" parameterType="SurProject" resultMap="SurProjectResult">
<include refid="selectSurProjectVo"/> <include refid="selectSurProjectVo"/>
where progressVisible = 0 where 1=1
<if test="deptId!=0">and deptid=#{deptId}</if> <if test="deptId!=0">and deptid=#{deptId}</if>
<if test="projectType != null and projectType != ''"> and projectType = #{projectType}</if> <if test="projectType != null and projectType != ''"> and projectType = #{projectType}</if>
<if test="prjIds !=null and prjIds.size()>0"> <if test="prjIds !=null and prjIds.size()>0">
@ -385,7 +383,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSurProjectListByBuser" parameterType="SurProject" resultMap="SurProjectResult"> <select id="selectSurProjectListByBuser" parameterType="SurProject" resultMap="SurProjectResult">
select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel, sp.projectRegional, a.areaName as projectRegionalName, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude, sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime, sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize, sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time, sp.update_by, sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel, sp.projectRegional, a.areaName as projectRegionalName, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude, sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime, sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize, sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time, sp.update_by, sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name
from ( from (
select * from sur_project sp where sp.isdel=0 and sp.progressVisible=0 select * from sur_project sp where sp.isdel=0
<if test='proType != null and proType !=""'> and sp.projectType = #{proType}</if> <if test='proType != null and proType !=""'> and sp.projectType = #{proType}</if>
<if test="id!=null and id>0"> <if test="id!=null and id>0">
and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{id} and spu.is_del=0) and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{id} and spu.is_del=0)