소스 검색

专家评估模块代码实现

user5 5 년 전
부모
커밋
5b2d1dbcd2

+ 0 - 9
src/main/java/com/jeeplus/modules/projectplanweekly/entity/ProjectPlanWeekly.java

@@ -33,15 +33,6 @@ public class ProjectPlanWeekly extends DataEntity<ProjectPlanWeekly> {
     }
 
     private ProjectRecords projectRecords;
-    private Office company;
-
-    public Office getCompany() {
-        return company;
-    }
-
-    public void setCompany(Office company) {
-        this.company = company;
-    }
 
     public ProjectRecords getProjectRecords() {
         return projectRecords;

+ 3 - 0
src/main/java/com/jeeplus/modules/projectplanweekly/web/ProjectPlanWeeklyController.java

@@ -54,6 +54,9 @@ public class ProjectPlanWeeklyController extends BaseController {
         Page<ProjectPlanWeekly> page = projectPlanWeeklyService.findPageWeekly(new Page<ProjectPlanWeekly>(request,response),projectPlanWeekly);
         List<ProjectPlanWeekly> list = page.getList();
         model.addAttribute("page", page);
+        model.addAttribute("weeklyStatus", projectPlanWeekly.getWeeklyStatus());
+        model.addAttribute("beginDate", projectPlanWeekly.getBeginDate());
+        model.addAttribute("endDate", projectPlanWeekly.getEndDate());
         return "modules/projectplanweekly/projectPlanWeeklyList";
     }
 

+ 7 - 6
src/main/resources/mappings/modules/projectplanweekly/ProjectPlanWeeklyDao.xml

@@ -242,22 +242,23 @@
 			  from
 				project_plan_info i
 		left join project_records r on  i.project_id = r.id
+		where r.status = 5 and r.del_flag=0
 		) as a
 		left join project_records r on  a.project_id = r.id
 		left join work_project_user wpu on wpu.project_id = r.id
 		<where>
 
-			<if test="weeklyStatus !=null and weeklyStatus == '0'">
+			<if test="weeklyStatus !=null and weeklyStatus == 0">
 				AND a.weekly_status = #{weeklyStatus}
 				and a.end_date 	&lt;= #{endDate}
 			</if>
-			<if test="weeklyStatus !=null and weeklyStatus == '1'">
+			<if test="weeklyStatus !=null and weeklyStatus == 1">
 				AND a.weekly_status = #{weeklyStatus}
-				and a.begin_date >= #{beginDate} and a.begin_date 	&lt;= #{endDate}
-				and a.end_date >= #{endDate}
+				and (#{beginDate} between a.begin_date and a.end_date
+				 or #{endDate} between a.begin_date and a.end_date
+				)
 			</if>
-			(wpu.user_id = #{currentUser.id} ${sqlMap.dsf}) and
-			r.status = 5 and r.del_flag=0
+			 and (wpu.user_id = #{currentUser.id} ${sqlMap.dsf})
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">

+ 10 - 1
src/main/webapp/webpage/modules/projectplanweekly/projectPlanWeeklyList.jsp

@@ -181,7 +181,16 @@
 					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
 					<div class="commonQuery lw6">
 						<div class="layui-item query athird ">
-							<label class="layui-form-label">创建时间:</label>
+							<label class="layui-form-label double-line"><span class="require-item">*</span>任务完成状态:</label>
+							<div class="layui-input-block">
+								<select id="weeklyStatus" name="weeklyStatus" class="form-control simple-select required" lay-verify="">
+									<option value="0" <c:if test="${weeklyStatus eq '0' }">selected</c:if>>未完成</option>
+									<option value="1" <c:if test="${weeklyStatus eq '1' }">selected</c:if>>已完成</option>
+								</select>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">任务计划时间:</label>
 							<div class="layui-input-block">
 								<input id="beginDate" name="beginDate" placeholder="开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
 									   value="<fmt:formatDate value="${beginDate}" pattern="yyyy-MM-dd"/>"/>