|
@@ -14,6 +14,7 @@ import thyyxxk.webserver.entity.highreport.XYBean;
|
|
|
import thyyxxk.webserver.entity.highreport.ZbReportMonthScore;
|
|
|
import thyyxxk.webserver.entity.highreport.ZbReportResult;
|
|
|
import thyyxxk.webserver.entity.highreport.ZdReportType;
|
|
|
+import thyyxxk.webserver.entity.targetmanagement.TargetManagement;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -125,9 +126,9 @@ public interface HighReportDao {
|
|
|
|
|
|
@Insert("<script>" +
|
|
|
" insert into zb_report_result " +
|
|
|
- " (id, pid, year, data_type, child_result, mom_result, calc_result, op, op_id, op_time) values " +
|
|
|
+ " (id, pid, year, data_type, child_result, mom_result, calc_result, op, op_id, op_time, report_cycle) values " +
|
|
|
" (#{id},#{pid},#{year},#{dataType},#{childResult}, " +
|
|
|
- " #{momResult},#{calcResult},#{op},#{opId},#{opTime} " +
|
|
|
+ " #{momResult},#{calcResult},#{op},#{opId},#{opTime},#{reportCycle} " +
|
|
|
" ) " +
|
|
|
"</script>")
|
|
|
int saveTargetReportResult(ZbReportResult result);
|
|
@@ -214,4 +215,55 @@ public interface HighReportDao {
|
|
|
"</script>")
|
|
|
int saveTargetReportMonthResult(ZbReportMonthScore score);
|
|
|
|
|
|
+ @Select("<script>" +
|
|
|
+ "select info.id, info.pid, info.name, info.dept, info.dept_code, info.op, info.op_id, info.op, info.op_id as opId, " +
|
|
|
+ " f.report_cycle as reportCycle, f.report_score as reportScore, f. criterion_score as criterionScore, " +
|
|
|
+ " f.year_range as yearRange, f.remark " +
|
|
|
+ "from zb_zd_base_info info " +
|
|
|
+ "left join (select score.*, cycle.year_range, cycle.remark " +
|
|
|
+ " from zb_report_cycle_score score, zb_report_cycle cycle " +
|
|
|
+ " where score.report_cycle = cycle.report_cycle and cycle.report_cycle = #{reportCycle}) f on info.id = f.id " +
|
|
|
+ "where info.state = 'Y' and info.is_leaf = '1' " +
|
|
|
+ " <if test=\"dept != null and dept != '' \"> " +
|
|
|
+ " and info.dept_code = #{dept} " +
|
|
|
+ " </if> " +
|
|
|
+ " <if test=\"id != null and id != '' \"> " +
|
|
|
+ " and info.id = #{id} " +
|
|
|
+ " </if> " +
|
|
|
+ " order by len(case when charindex('-', info.sort) = 0 then info.sort else substring(info.sort,1,charindex('-',info.sort)-1) end) " +
|
|
|
+ "</script>")
|
|
|
+ List<Map<String, Object>> selectTargetCycleScore(TargetManagement dto);
|
|
|
+
|
|
|
+ @Select("<script>" +
|
|
|
+ "select r.* from zb_report_result r " +
|
|
|
+ " where r.report_cycle = #{reportCycle} " +
|
|
|
+ " <if test=\"id != null and id != '' \"> " +
|
|
|
+ " and r.id = #{id} " +
|
|
|
+ " </if> " +
|
|
|
+ " <if test=\"pid != null and pid != '' \"> " +
|
|
|
+ " and r.pid = #{id} " +
|
|
|
+ " </if> " +
|
|
|
+ "</script>")
|
|
|
+ List<ZbReportResult> selectTargetReportResultByCycle(@Param("reportCycle") String reportCycle, @Param("id") String id, @Param("pid") String pid);
|
|
|
+
|
|
|
+ @Select("<script>" +
|
|
|
+ " select zb.* from zb_report_month_score zb " +
|
|
|
+ " where 1 = 1" +
|
|
|
+ " <if test=\"id != null and id != '' \"> " +
|
|
|
+ " and zb.id = #{id} " +
|
|
|
+ " </if> " +
|
|
|
+ " <if test=\"pid != null and pid != '' \"> " +
|
|
|
+ " and zb.pid = #{pid} " +
|
|
|
+ " </if> " +
|
|
|
+ " <if test=\"dept != null and dept != '' \"> " +
|
|
|
+ " and zb.dept_id = #{dept} " +
|
|
|
+ " </if> " +
|
|
|
+ " <if test=\"startTime != null and startTime != '' \"> " +
|
|
|
+ " and zb.month >= #{startTime} " +
|
|
|
+ " </if> " +
|
|
|
+ " <if test=\"endTime != null and endTime != '' \"> " +
|
|
|
+ " and zb.month <= #{endTime} " +
|
|
|
+ " </if> " +
|
|
|
+ "</script>")
|
|
|
+ List<ZbReportMonthScore> selectTargetMonthScoreSummary(TargetManagement dto);
|
|
|
}
|