浏览代码

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

Lijy 2 年之前
父节点
当前提交
5ad6e99f13

+ 8 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ReportLog.java

@@ -1,19 +1,19 @@
 package com.management.platform.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.time.LocalDate;
-import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
-import java.io.Serializable;
-
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
 /**
  * <p>
  * 
@@ -42,6 +42,8 @@ public class ReportLog extends Model<ReportLog> {
      * 日报所属日期
      */
     @TableField("create_date")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
     private LocalDate createDate;
 
     /**

+ 19 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -3934,15 +3934,26 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         if(thirdPartyInterfaceList.size()==0){
             msg.setError("token错误");
         }
-        for (ThirdPartyInterface thirdPartyInterface : thirdPartyInterfaceList){
-            if(LocalDateTime.now().isAfter(thirdPartyInterface.getExpireTime())){
-                msg.setError("token过期失效");
-                return msg;
-            }
-            if(token.equals(thirdPartyInterface.getToken())){
-                List<HashMap<String, Object>> allReportByDate = reportMapper.getAllReportByDate(startDate,thirdPartyInterface.getComapnyId(), null, endDate, null, null, null);
-                msg.data=allReportByDate;
+        ThirdPartyInterface thirdPartyInterface = thirdPartyInterfaceList.get(0);
+        List<ReportLog> reportLogList = reportLogMapper.selectList(new QueryWrapper<ReportLog>().eq("company_id", thirdPartyInterface.getComapnyId()).orderByAsc("operate_date"));
+        if(LocalDateTime.now().isAfter(thirdPartyInterface.getExpireTime())){
+            msg.setError("token过期失效");
+            return msg;
+        }
+        if(token.equals(thirdPartyInterface.getToken())){
+            List<HashMap<String, Object>> allReportByDate = reportMapper.getAllReportByDate(startDate,thirdPartyInterface.getComapnyId(), null, endDate, null, null, null);
+            for (HashMap<String, Object> map : allReportByDate) {
+                List<ReportLog> item=new ArrayList<>();
+                Integer reportId = (Integer) map.get("id");
+                for (ReportLog reportLog : reportLogList) {
+                    List<String> list = Arrays.asList(reportLog.getReportIds().split(","));
+                    if(list.contains(String.valueOf(reportId))&&!reportLog.getMsg().contains("提交")){
+                         item.add(reportLog);
+                    }
+                }
+                map.put("checkLog",item);
             }
+            msg.data=allReportByDate;
         }
         return msg;
     }

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

@@ -56,12 +56,12 @@
 
     <!--根据日期获取全部报告信息-->
     <select id="getAllReportByDate" resultType="java.util.Map">
-        SELECT a.id, c.name,c.corpwx_userid as corpwxUserId, b.project_name AS project,b.category_name as categoryName, a.working_time AS duration, a.content, a.create_time AS time, a.create_date as createDate,
-        a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
-        a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        SELECT a.id, c.name,c.corpwx_userid as corpwxUserId, b.project_name AS project,b.category_name as categoryName, a.working_time AS duration, a.content, DATE_FORMAT(a.create_time,'%Y-%m-%d')   AS time,DATE_FORMAT(a.create_date,'%Y-%m-%d') as createDate,
+        a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType,DATE_FORMAT(a.start_time,'%Y-%m-%d')  as startTime,
+        DATE_FORMAT(a.end_time,'%Y-%m-%d')  as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
-        , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
-        ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as departmentName, a.overtime_hours as overtimeHours, a.custom_text as customText, a.project_audit_time as projectAuditTime,project_main.name as projectMainName
+        , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId, DATE_FORMAT( a.custom_data,'%Y-%m-%d') as customData
+        ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as departmentName, a.overtime_hours as overtimeHours, a.custom_text as customText,DATE_FORMAT( a.project_audit_time,'%Y-%m-%d')  as projectAuditTime,project_main.name as projectMainName
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
         LEFT JOIN user AS c ON a.creator_id=c.id

+ 5 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -103,17 +103,18 @@
                         <el-col :span="16">
                             <el-link @click="toggleGroup"><i v-if="selectedGroup != null" :class="groupWidth==0?'el-icon-d-arrow-right':'el-icon-d-arrow-left'" style="margin-top:10px;">{{selectedGroup.name}}</i></el-link>
                         </el-col>
-                        <el-col :span="4">
+                        <el-col :span="8" style="float:right;width:380px">
                             <el-select v-model="order" size="small" style="background:#fff;display:inline-block;" @change="orderChange">
                                 <el-option v-for="item in orderList" :key="item.id" :label="item.name" :value="item.id">
                                     <span>{{item.name}}</span>
                                 </el-option>
                             </el-select>
-                        </el-col>
-                        <el-col :span="4">
-                            <el-button icon="iconfont firerock-icondaochu" size="mini" @click="showExportDialog">导出</el-button>
+                            <el-button icon="iconfont firerock-icondaochu" style="margin-left:10px" size="mini" @click="showExportDialog">导出</el-button>
                             <el-button icon="iconfont firerock-icondaoru" size="mini" @click="importTaskDialog = true;importToStageId = stageList[0].id;">导入</el-button>
                         </el-col>
+                        <!-- <el-col :span="4">
+                            
+                        </el-col> -->
                         </el-row>
                         <!-- <div style="color:#999;margin-top:10px;">
                             <i v-if="selectedGroup != null" class="el-icon-arrow-left" style="margin-top:10px;">{{selectedGroup.name}}</i>

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -32,8 +32,8 @@
                     <van-field v-model="form.projectName" name="项目名称" label="项目名称" placeholder="请填写项目名称" :rules="[{ required: true, message: '请填写项目名称' }]"/>
                     <van-field readonly clickable name="userNames" v-model="form.userNames"  label="参与人" 
                     placeholder="请选择参与人" @click="clickPicker()" />
-                    <van-field readonly clickable  v-model="form.inchargerName"  label="负责人" 
-                    placeholder="请选择负责人" @click="showPickerIncharger = true" />
+                    <van-field readonly clickable  v-model="form.inchargerName"  label="项目经理" 
+                    placeholder="请选择项目经理" @click="showPickerIncharger = true" />
                     <!-- 研究中心 -->
                     <van-field v-if="user.timeType.customDegreeActive == 1" readonly clickable name="userNames" v-model="form.associateDegreeNames"  label="研究中心" 
                     placeholder="请选择" @click="clikls()"/>