瀏覽代碼

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

lamphua 1 月之前
父節點
當前提交
03d726d8ed

+ 28
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeclare.java 查看文件

48
     @Excel(name = "工作内容")
48
     @Excel(name = "工作内容")
49
     private String workContent;
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
     @Excel(name = "工天")
62
     @Excel(name = "工天")
53
     private String workLoad;
63
     private String workLoad;
175
     {
185
     {
176
         return workContent;
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
     public void setWorkLoad(String workLoad) 
206
     public void setWorkLoad(String workLoad) 
179
     {
207
     {
180
         this.workLoad = workLoad;
208
         this.workLoad = workLoad;

+ 12
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeclareMapper.xml 查看文件

13
         <result property="workType"    column="work_type"    />
13
         <result property="workType"    column="work_type"    />
14
         <result property="workItem"    column="work_item"    />
14
         <result property="workItem"    column="work_item"    />
15
         <result property="workContent"    column="work_content"    />
15
         <result property="workContent"    column="work_content"    />
16
+        <result property="beginDate"    column="begin_date"    />
17
+        <result property="endDate"    column="end_date"    />
16
         <result property="workLoad"    column="work_load"    />
18
         <result property="workLoad"    column="work_load"    />
17
         <result property="price"    column="price"    />
19
         <result property="price"    column="price"    />
18
         <result property="coefficient"    column="coefficient"    />
20
         <result property="coefficient"    column="coefficient"    />
30
     </resultMap>
32
     </resultMap>
31
 
33
 
32
     <sql id="selectCmcDeclareVo">
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
         left join sys_user as u on u.user_id = d.user_id
37
         left join sys_user as u on u.user_id = d.user_id
35
         left join cmc_project as p on p.project_id = d.project_id
38
         left join cmc_project as p on p.project_id = d.project_id
36
     </sql>
39
     </sql>
51
             <if test="workType != null  and workType != ''"> and d.work_type = #{workType}</if>
54
             <if test="workType != null  and workType != ''"> and d.work_type = #{workType}</if>
52
             <if test="workItem != null  and workItem != ''"> and d.work_item = #{workItem}</if>
55
             <if test="workItem != null  and workItem != ''"> and d.work_item = #{workItem}</if>
53
             <if test="workContent != null  and workContent != ''"> and d.work_content = #{workContent}</if>
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
             <if test="workLoad != null  and workLoad != ''"> and d.work_load = #{workLoad}</if>
59
             <if test="workLoad != null  and workLoad != ''"> and d.work_load = #{workLoad}</if>
55
             <if test="price != null "> and d.price = #{price}</if>
60
             <if test="price != null "> and d.price = #{price}</if>
56
             <if test="coefficient != null  and coefficient != ''"> and d.coefficient = #{coefficient}</if>
61
             <if test="coefficient != null  and coefficient != ''"> and d.coefficient = #{coefficient}</if>
76
             <if test="workType != null">work_type,</if>
81
             <if test="workType != null">work_type,</if>
77
             <if test="workItem != null">work_item,</if>
82
             <if test="workItem != null">work_item,</if>
78
             <if test="workContent != null">work_content,</if>
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
             <if test="workLoad != null">work_load,</if>
86
             <if test="workLoad != null">work_load,</if>
80
             <if test="price != null">price,</if>
87
             <if test="price != null">price,</if>
81
             <if test="coefficient != null">coefficient,</if>
88
             <if test="coefficient != null">coefficient,</if>
91
             <if test="workType != null">#{workType},</if>
98
             <if test="workType != null">#{workType},</if>
92
             <if test="workItem != null">#{workItem},</if>
99
             <if test="workItem != null">#{workItem},</if>
93
             <if test="workContent != null">#{workContent},</if>
100
             <if test="workContent != null">#{workContent},</if>
101
+            <if test="beginDate != null">#{beginDate},</if>
102
+            <if test="endDate != null">#{endDate},</if>
94
             <if test="workLoad != null">#{workLoad},</if>
103
             <if test="workLoad != null">#{workLoad},</if>
95
             <if test="price != null">#{price},</if>
104
             <if test="price != null">#{price},</if>
96
             <if test="coefficient != null">#{coefficient},</if>
105
             <if test="coefficient != null">#{coefficient},</if>
109
             <if test="workType != null">work_type = #{workType},</if>
118
             <if test="workType != null">work_type = #{workType},</if>
110
             <if test="workItem != null">work_item = #{workItem},</if>
119
             <if test="workItem != null">work_item = #{workItem},</if>
111
             <if test="workContent != null">work_content = #{workContent},</if>
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
             <if test="workLoad != null">work_load = #{workLoad},</if>
123
             <if test="workLoad != null">work_load = #{workLoad},</if>
113
             <if test="price != null">price = #{price},</if>
124
             <if test="price != null">price = #{price},</if>
114
             <if test="coefficient != null">coefficient = #{coefficient},</if>
125
             <if test="coefficient != null">coefficient = #{coefficient},</if>

Loading…
取消
儲存