my-csc-config-file.git 3 年 前
コミット
3db81535be
共有1 個のファイルを変更した31 個の追加9 個の削除を含む
  1. 31 9
      src/main/java/com/unissoft/mapper/ProcessAuditMapper.xml

+ 31 - 9
src/main/java/com/unissoft/mapper/ProcessAuditMapper.xml

@@ -45,15 +45,37 @@
45 45
     </select>
46 46
 
47 47
     <select id="getCurrentMonthData" resultType="com.unissoft.model.ProcessAudit">
48
-        SELECT
49
-        <include refid="Base_Column_List"/>
50
-        FROM
51
-        process_audit
52
-        WHERE
53
-        to_people is not null and
54
-        audit_state is not null and
55
-        end_date is not null and
56
-        DATE_FORMAT(`apply_time`, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
48
+      SELECT
49
+	p.id,
50
+	p.main_id,
51
+	p.sub_id,
52
+	p.sub_data,
53
+	p.audit_state,
54
+	p.operation_time,
55
+	p.type,
56
+	p.house_id,
57
+	p.depot_id,
58
+	p.from_people,
59
+	p.to_people,
60
+	p.result,
61
+	p.apply_people,
62
+	p.audit_time,
63
+	p.process_id,
64
+	p.ongoing_step,
65
+	p.apply_time,
66
+	p.work_name,
67
+	p.start_date,
68
+	p.end_date,
69
+	p.to_page
70
+FROM
71
+	process_audit p
72
+LEFT JOIN basics_depot b ON p.depot_id = b.d_id
73
+WHERE
74
+	b.p_belonging = 0
75
+AND p.to_people IS NOT NULL
76
+AND p.audit_state IS NOT NULL
77
+AND p.end_date IS NOT NULL
78
+AND DATE_FORMAT(p.apply_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
57 79
     </select>
58 80
 
59 81
 </mapper>