Quellcode durchsuchen

工作填报增加开始结束日期字段

lamphua vor 1 Monat
Ursprung
Commit
03d726d8ed

+ 28
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeclare.java Datei anzeigen

@@ -48,6 +48,16 @@ public class CmcDeclare extends BaseEntity
48 48
     @Excel(name = "工作内容")
49 49
     private String workContent;
50 50
 
51
+    /** 开始日期 */
52
+    @JsonFormat(pattern = "yyyy-MM-dd")
53
+    @Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
54
+    private Date beginDate;
55
+
56
+    /** 结束日期 */
57
+    @JsonFormat(pattern = "yyyy-MM-dd")
58
+    @Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
59
+    private Date endDate;
60
+
51 61
     /** 工天 */
52 62
     @Excel(name = "工天")
53 63
     private String workLoad;
@@ -175,6 +185,24 @@ public class CmcDeclare extends BaseEntity
175 185
     {
176 186
         return workContent;
177 187
     }
188
+    public void setBeginDate(Date beginDate)
189
+    {
190
+        this.beginDate = beginDate;
191
+    }
192
+
193
+    public Date getBeginDate()
194
+    {
195
+        return beginDate;
196
+    }
197
+    public void setEndDate(Date endDate)
198
+    {
199
+        this.endDate = endDate;
200
+    }
201
+
202
+    public Date getEndDate()
203
+    {
204
+        return endDate;
205
+    }
178 206
     public void setWorkLoad(String workLoad) 
179 207
     {
180 208
         this.workLoad = workLoad;

+ 12
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeclareMapper.xml Datei anzeigen

@@ -13,6 +13,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
13 13
         <result property="workType"    column="work_type"    />
14 14
         <result property="workItem"    column="work_item"    />
15 15
         <result property="workContent"    column="work_content"    />
16
+        <result property="beginDate"    column="begin_date"    />
17
+        <result property="endDate"    column="end_date"    />
16 18
         <result property="workLoad"    column="work_load"    />
17 19
         <result property="price"    column="price"    />
18 20
         <result property="coefficient"    column="coefficient"    />
@@ -30,7 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
30 32
     </resultMap>
31 33
 
32 34
     <sql id="selectCmcDeclareVo">
33
-        select d.form_id, d.project_id, p.project_number, p.project_name, p.project_leader, d.user_id, u.dept_id, u.nick_name, d.work_type, d.work_item, d.work_content, d.work_load, d.price, d.coefficient, d.check_status, d.audit_status, d.submit_time, d.confirm_status from cmc_declare as d
35
+        select d.form_id, d.project_id, p.project_number, p.project_name, p.project_leader, d.user_id, u.dept_id, u.nick_name, d.work_type, d.work_item, d.work_content,
36
+               d.begin_date, d.end_date, d.work_load, d.price, d.coefficient, d.check_status, d.audit_status, d.submit_time, d.confirm_status from cmc_declare as d
34 37
         left join sys_user as u on u.user_id = d.user_id
35 38
         left join cmc_project as p on p.project_id = d.project_id
36 39
     </sql>
@@ -51,6 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
51 54
             <if test="workType != null  and workType != ''"> and d.work_type = #{workType}</if>
52 55
             <if test="workItem != null  and workItem != ''"> and d.work_item = #{workItem}</if>
53 56
             <if test="workContent != null  and workContent != ''"> and d.work_content = #{workContent}</if>
57
+            <if test="beginDate != null "> and date_format(d.begin_date, '%y%m') = date_format(#{beginDate}, '%y%m')</if>
58
+            <if test="endDate != null "> and date_format(d.end_date, '%y%m') = date_format(#{endDate}, '%y%m')</if>
54 59
             <if test="workLoad != null  and workLoad != ''"> and d.work_load = #{workLoad}</if>
55 60
             <if test="price != null "> and d.price = #{price}</if>
56 61
             <if test="coefficient != null  and coefficient != ''"> and d.coefficient = #{coefficient}</if>
@@ -76,6 +81,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
76 81
             <if test="workType != null">work_type,</if>
77 82
             <if test="workItem != null">work_item,</if>
78 83
             <if test="workContent != null">work_content,</if>
84
+            <if test="beginDate != null">begin_date,</if>
85
+            <if test="endDate != null">end_date,</if>
79 86
             <if test="workLoad != null">work_load,</if>
80 87
             <if test="price != null">price,</if>
81 88
             <if test="coefficient != null">coefficient,</if>
@@ -91,6 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
91 98
             <if test="workType != null">#{workType},</if>
92 99
             <if test="workItem != null">#{workItem},</if>
93 100
             <if test="workContent != null">#{workContent},</if>
101
+            <if test="beginDate != null">#{beginDate},</if>
102
+            <if test="endDate != null">#{endDate},</if>
94 103
             <if test="workLoad != null">#{workLoad},</if>
95 104
             <if test="price != null">#{price},</if>
96 105
             <if test="coefficient != null">#{coefficient},</if>
@@ -109,6 +118,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
109 118
             <if test="workType != null">work_type = #{workType},</if>
110 119
             <if test="workItem != null">work_item = #{workItem},</if>
111 120
             <if test="workContent != null">work_content = #{workContent},</if>
121
+            <if test="beginDate != null">begin_date = #{beginDate},</if>
122
+            <if test="endDate != null">end_date = #{endDate},</if>
112 123
             <if test="workLoad != null">work_load = #{workLoad},</if>
113 124
             <if test="price != null">price = #{price},</if>
114 125
             <if test="coefficient != null">coefficient = #{coefficient},</if>

Laden…
Abbrechen
Speichern