Browse Source

获取待审核列表增加人员筛选,时间段筛选

seyason 3 years ago
parent
commit
16b24ff16f

+ 5 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -646,10 +646,14 @@ public class ReportController {
                                       Integer departmentId,
                                       Integer projectId,
                                       String date,
+                                      String startDate,
+                                      String endDate,
+                                      String userId,
                                       HttpServletRequest request) {
         return reportService.getListByState(state, departmentId,
                 projectId,
-                date,request);
+                date, startDate, endDate, userId,
+                request);
     }
 
     /**

+ 6 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ReportMapper.java

@@ -40,7 +40,12 @@ public interface ReportMapper extends BaseMapper<Report> {
                                                  @Param("departmentId") Integer departmentId,
                                                  @Param("projectId") Integer projectId,
                                                  @Param("inchargerId") String inchargerId,
-                                                 @Param("isEngeering") Integer isEngeering);
+                                                 @Param("isEngeering") Integer isEngeering,
+                                                 @Param("startDate") String startDate,
+                                                 @Param("endDate") String endDate,
+                                                 @Param("targetUserId") String targetUserId
+                                                 );
+
     //获取本人负责的专业的相关的日报
     List<Map<String, Object>> getProfessionInchargeReportByDate(@Param("date") String date,
                                                                 @Param("id") String id,

+ 5 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ReportService.java

@@ -33,7 +33,11 @@ public interface ReportService extends IService<Report> {
 
     HttpRespMsg getListByState(Integer state, Integer departmentId,
                                Integer projectId,
-                               String date,HttpServletRequest request);
+                               String date,
+                               String startDate,
+                               String endDate,
+                               String userId,
+                               HttpServletRequest request);
 
     HttpRespMsg approveReport(String reportIds, Integer isDepartment, HttpServletRequest request);
 

+ 5 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -687,7 +687,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     @Override
     public HttpRespMsg getListByState(Integer state, Integer departmentId,
                                       Integer projectId,
-                                      String date,HttpServletRequest request) {
+                                      String date,
+                                      String startDate,
+                                      String endDate,
+                                      String userId,HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -698,7 +701,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             if (curUser.getRole() != 1 && curUser.getRole() != 2) {//非超级管理员和系统管理员
                 leaderId = curUser.getId();
             }
-            List<Map<String, Object>> auditReportList = reportMapper.getAuditReportList(date, companyId, departmentId, projectId, leaderId, isEngeering);
+            List<Map<String, Object>> auditReportList = reportMapper.getAuditReportList(date, companyId, departmentId, projectId, leaderId, isEngeering, startDate, endDate, userId);
             //抽取姓名,进行分组
             List<Map<String, Object>> nameList = new ArrayList<Map<String, Object>>();
             Map<String, Object> lastName = null;

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -167,6 +167,12 @@
         <if test="date != null and date != ''">
             AND a.create_date=#{date}
         </if>
+        <if test="targetUserId != null">
+            AND a.creator_id=#{targetUserId}
+        </if>
+        <if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
+            AND a.create_date between #{startDate} and #{endDate}
+        </if>
         <if test="departmentId != null">
             AND user.department_id=#{departmentId}
         </if>

+ 13 - 15
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -61,36 +61,34 @@
                 <div :style="'height:'+tableHeight+'px;width:0.5px;background:#eee;margin-right:10px;margin-left:10px;'" ></div>
                 <div class="allDaily" style="float:left;flex-grow:1">
                     <!--系统管理员和部门负责人 -->
-                    <div class="report_title" v-if="user.role == 1 || user.role == 2 || user.manageDeptId > 0">
-                        <span>工作日报 | {{depData != null ?depData.label:""}}</span>
+                    <div class="report_title" >
+                        
+                        <span>工作日报 </span>
+                        <span v-if="user.role==1||user.role==2||user.role==6||user.manageDeptId != 0">| {{depData != null ?depData.label:""}}
                         <span v-if="targetUid == null">
                          - 已填写
                         <el-link :underline="false" @click="showMembList(1)"><span style="margin-left:5px;margin-right:5px;color:green;">{{reportList.length}}</span></el-link>人,
-                    未填写<el-link :underline="false" @click="showMembList(0)"><span style="margin-left:5px;margin-right:5px;color:red;">{{(depData == null?data[0].membCount:(depData.isUser == 1?1:depData.membCount))-reportList.length}}</span></el-link>人
+                        未填写<el-link :underline="false" @click="showMembList(0)"><span style="margin-left:5px;margin-right:5px;color:red;">{{(depData == null?data[0].membCount:(depData.isUser == 1?1:depData.membCount))-reportList.length}}</span></el-link>人
+                        </span>
                         </span>
                         <span style="float:right;">
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,0)">填写日报</el-link>
-                            <el-link v-if="reportTimeType.type == 2 || reportTimeType.type == 1 ||  reportTimeType.type == 3" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">按周填报</el-link>
+                            <el-link v-if="reportTimeType.type != 0" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">按周填报</el-link>
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,0)">代填日报</el-link>
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">批量填报</el-link>
-                            <el-link type="primary" v-if="user.role==1||user.role==2||user.manageDeptId != 0" style="margin-right:10px;" :underline="false" @click="imports()">工时导入</el-link>
-                            
-                            <!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,1)">批量代填</el-link> -->
-                            <el-link type="primary" style="margin-right:10px;" :underline="false" @click="showExportDialog">导出日报</el-link>
-                            <!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="batchApprove" >批量审核</el-link> -->
+                            <el-link type="primary" v-if="user.role==1||user.role==2||user.role==6||user.manageDeptId != 0" style="margin-right:10px;" :underline="false" @click="imports()">工时导入</el-link>
+                            <el-link type="primary" v-if="user.role==1||user.role==2||user.role==6||user.manageDeptId != 0" style="margin-right:10px;" :underline="false" @click="showExportDialog">导出日报</el-link>
                         </span>
                     </div>
                     <!--普通员工,含项目经理 -->
-                    <div class="report_title" v-if="(user.role==0||user.role==3||user.role==5) && user.manageDeptId == 0"><span>日报列表</span>
+                    <!-- <div class="report_title" v-if="(user.role==0||user.role==3||user.role==5) && user.manageDeptId == 0"><span>日报列表</span>
                     <span style="float:right;" v-if="(user.role==0||user.role==3||user.role==5) && user.manageDeptId == 0">
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,0)">填写日报</el-link>
-                            <el-link v-if="reportTimeType.type == 2 || reportTimeType.type == 1 ||  reportTimeType.type == 3" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">按周填报</el-link>
+                            <el-link v-if="reportTimeType.type != 0" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">按周填报</el-link>
                             <el-link type="primary" v-if="user.leader" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,0)">代填日报</el-link>
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">批量填报</el-link>
-                            <!-- <el-link type="primary" v-if="user.leader" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,1)">批量代填</el-link> -->
-                            <!-- <el-link type="primary" v-if="user.leader" style="margin-right:10px;" :underline="false" @click="batchApprove">批量审核</el-link> -->
-                    </span>
-                    </div>
+                    </span> -->
+                    <!-- </div> -->
                     <div :style="'height:'+(tableHeight-50)+'px;overflow:scroll;padding-top:10px;'">
                         <div class="one_daily" v-for="(item1,index1) in reportList" :key="index1">
                             <i class="fa fa-circle"></i>{{item1.name}}