|
@@ -20,9 +20,31 @@
|
|
|
<result column="create_dept" property="createDept"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <!-- 通用查询映射结果 -->
|
|
|
+ <resultMap id="workFocusVOResultMap" type="org.springblade.modules.project.pojo.vo.WorkFocusVO">
|
|
|
+ <result column="id" property="id"/>
|
|
|
+ <result column="work_focus_stage" property="workFocusStage"/>
|
|
|
+ <result column="target_plan" property="targetPlan"/>
|
|
|
+ <result column="start_year" property="startYear"/>
|
|
|
+ <result column="end_year" property="endYear"/>
|
|
|
+ <result column="work_plan" property="workPlan"/>
|
|
|
+ <result column="duty_unit" property="dutyUnit"/>
|
|
|
+ <result column="create_time" property="createTime"/>
|
|
|
+ <result column="create_user" property="createUser"/>
|
|
|
+ <result column="update_user" property="updateUser"/>
|
|
|
+ <result column="update_time" property="updateTime"/>
|
|
|
+ <result column="is_deleted" property="isDeleted"/>
|
|
|
+ <result column="status" property="status"/>
|
|
|
+ <result column="create_dept" property="createDept"/>
|
|
|
+ <result column="workFocusStageName" property="workFocusStageName"/>
|
|
|
+ <result column="comRate" property="comRate"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
- <select id="selectWorkFocusPage" resultMap="workfocusResultMap">
|
|
|
- select * from d_work_focus where is_deleted = 0
|
|
|
+ <select id="selectWorkFocusPage" resultMap="workFocusVOResultMap">
|
|
|
+ select * ,(SELECT dict_value from blade_dict_biz where code='workFocusStage' and is_deleted=0 and dict_key=b.work_focus_stage) as workFocusStageName,
|
|
|
+ FLOOR((SELECT sum(a.schedule is not null and schedule!='' and month <=12) + sum(a.progress is not null and progress!='') from d_work_focus_progress a where work_focus_id=b.id and is_deleted=0)/
|
|
|
+ ((end_year-start_year+1)*28)*100) as comRate
|
|
|
+ from d_work_focus b where is_deleted = 0
|
|
|
<if test="param2.startYear!=null and param2.startYear != ''">
|
|
|
and start_year <= #{param2.startYear}
|
|
|
</if>
|
|
@@ -36,6 +58,7 @@
|
|
|
<if test="param2.workFocusStage!=null and param2.workFocusStage != '' ">
|
|
|
and work_focus_stage = #{param2.workFocusStage}
|
|
|
</if>
|
|
|
+ order by target_plan
|
|
|
</select>
|
|
|
|
|
|
|
|
@@ -43,4 +66,14 @@
|
|
|
SELECT * FROM d_work_focus ${ew.customSqlSegment}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="queryWorkFocusDataInfo" resultType="org.springblade.modules.project.pojo.vo.WorkFocusProgressDataInfoVO">
|
|
|
+ SELECT id,
|
|
|
+ (SELECT dict_value from blade_dict_biz where code='workFocusStage' and is_deleted=0 and dict_key=b.work_focus_stage) as workFocusStageName,
|
|
|
+ target_plan,work_plan,duty_unit,
|
|
|
+ a.month1,a.month2,a.month3,a.month4,a.month5,a.month6,a.month7,a.month8,a.month9,a.month10,a.month11,a.month12
|
|
|
+ from d_work_focus b,d_work_focus_view a where is_deleted=0 and b.id=a.work_focus_id
|
|
|
+ <if test="workfocus.year!=null and workfocus.year != '' ">
|
|
|
+ and a.year = #{workfocus.year}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|