Bläddra i källkod

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

Min 1 år sedan
förälder
incheckning
8330b0c7c9

+ 11 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CompanyController.java

@@ -53,6 +53,17 @@ public class CompanyController {
     @Resource
     private ExpenseMainTypeService expenseMainTypeService;
 
+    @RequestMapping("/testTimeout")
+    public HttpRespMsg testTimeout(){
+        HttpRespMsg msg = new HttpRespMsg();
+        try {
+            Thread.sleep(90*1000);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+        return msg;
+    }
+
     @RequestMapping("/getStaffCountMax")
     public HttpRespMsg getStaffCountMax(Integer companyId){
         HttpRespMsg msg = new HttpRespMsg();

+ 15 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java

@@ -1105,6 +1105,9 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
         if (!StringUtils.isEmpty(sheet.getCode())) {
             queryWrapper.eq("code", sheet.getCode());
         }
+        if (sheet.getSendState()!=null) {
+            queryWrapper.eq("send_state", sheet.getSendState());
+        }
         //增加状态
         if (sheet.getStatus() != null) {
             queryWrapper.eq("status", sheet.getStatus());
@@ -1134,6 +1137,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
         titleList.add("总费用");
         titleList.add("备注");
         titleList.add("状态");
+        titleList.add("发放状态");
         titleList.add("项目名称");
         titleList.add("费用日期");
         titleList.add("发票种类");
@@ -1192,6 +1196,17 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
                     default:
                         item.add("");
                 }
+                switch (record.getSendState()){
+                    case 0:
+                        item.add("未发放");
+                        break;
+                    case 1:
+                        item.add("已发放");
+                        break;
+                    default:
+                        item.add("");
+                }
+
                 Optional<Project> optional = projectList.stream().filter(p -> expenseItem.getProjectId() != null && p.getId().equals(expenseItem.getProjectId())).findFirst();
                 if(optional.isPresent()){
                     item.add(optional.get().getProjectName());

+ 41 - 13
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -5111,6 +5111,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 //titles.add("关联任务");
                 titles.add(MessageUtils.message("excel.assTask"));
             }
+            //依斯倍,导出带服务
+            List<SapProjectService> serviceList = null;
+            if (companyId == 3092) {
+                titles.add("服务");
+                serviceList = sapProjectServiceMapper.selectList(new QueryWrapper<SapProjectService>().eq("company_id", companyId));
+            }
 //            titles.add("工作日期");
 //            titles.add("工作时长(小时)");
             titles.add(MessageUtils.message("entry.workDate"));
@@ -5383,6 +5389,21 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 if (company.getPackageProject() == 1) {
                     item.add((String) map.get("taskName"));
                 }
+                //依斯倍,导出带服务
+                if (companyId == 3092) {
+                    Integer sapServiceId = (Integer) map.get("sapServiceId");
+                    if (sapServiceId != null) {
+                        Optional<SapProjectService> first = serviceList.stream().filter(d->d.getId().equals(sapServiceId)).findFirst();
+                        if (first.isPresent()) {
+                            SapProjectService divItem = first.get();
+                            item.add(divItem.getServiceName());
+                        } else {
+                            item.add("");
+                        }
+                    } else {
+                        item.add("");
+                    }
+                }
                 item.add(new SimpleDateFormat("yyyy-MM-dd")
                         .format((java.sql.Date) map.get("createDate")));
                 item.add(map.get("duration").toString());
@@ -5450,6 +5471,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             audit.setOperatorId(splitItems[0]);
                             audit.setOperateDate(operateDate);
                             audit.setMsg(splitItems[2]);
+                            String auditMsg = audit.getMsg();
 
                             if (company.getIsInternational() == 1) {
                                 operateDate = operateDate.plusSeconds(offsetSeconds);
@@ -5459,22 +5481,27 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             if(needCorpWxTranslate){
                                 Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(audit.getOperatorId())).findFirst();
                                 if(first.isPresent()){
-                                    if(audit.getMsg().contains("提交了")){
-                                        int i = audit.getMsg().indexOf("提");
-                                        String substring = audit.getMsg().substring(0, i);
-                                        msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
-                                    }else if(audit.getMsg().contains("审核通过了")){
-                                        int i = audit.getMsg().indexOf("审");
-                                        String substring = audit.getMsg().substring(0, i);
-                                        msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
-                                    }else if(audit.getMsg().contains("驳回了")) {
-                                        int i = audit.getMsg().indexOf("驳");
-                                        String substring = audit.getMsg().substring(0, i);
-                                        msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
+                                    String corpwxUserId = first.get().getCorpwxUserid();
+                                    if (auditMsg.contains(corpwxUserId)) {
+                                        if(auditMsg.contains("提交了")){
+                                            int i = auditMsg.indexOf("提");
+                                            String substring = auditMsg.substring(0, i);
+                                            msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"\\$");
+                                        }else if(auditMsg.contains("审核通过了")){
+                                            int i = auditMsg.indexOf("审");
+                                            String substring = auditMsg.substring(0, i);
+                                            msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"\\$");
+                                        }else if(auditMsg.contains("驳回了")) {
+                                            int i = auditMsg.indexOf("驳");
+                                            String substring = auditMsg.substring(0, i);
+                                            msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"\\$");
+                                        }
+                                    } else {
+                                        msg = time+" " + auditMsg;
                                     }
                                 }
                             }else {
-                                msg = time+" " + audit.getMsg();
+                                msg = time+" " + auditMsg;
                             }
                             if (!isFirst) {
                                 sb.append("->");
@@ -5486,6 +5513,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     }
                     item.add(sb.toString());
                 }
+                item.add((String) map.get("content"));
                 if(stateKey==1){
                     Integer state = (Integer) map.get("state");
                     switch (state){

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

@@ -124,7 +124,7 @@
         ,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
         , 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,u.corpwx_userid as projectAuditorCorpwxUserId, a.project_auditor_id as projectAuditorId, department.department_name as departmentName,dp2.department_name as buDepartmentName,department.department_id as departmentId, a.overtime_hours as overtimeHours, a.custom_text as customText,a.project_audit_time  as projectAuditTime,project_main.name as projectMainName,
-        GROUP_CONCAT(rlog.operator_id,'@', rlog.operate_date,'@', rlog.msg SEPARATOR '❤') AS logMsg,a.extra_field1 as extraField1,a.extra_field2 as extraField2,a.extra_field3 as extraField3,b.status as projectStatus,DATE_FORMAT(b.finish_date,'%Y-%m-%d') as finishDate,ps.project_category_sub as projectCategorySub
+        GROUP_CONCAT(rlog.operator_id,'@', rlog.operate_date,'@', rlog.msg SEPARATOR '❤') AS logMsg,a.extra_field1 as extraField1,a.extra_field2 as extraField2,a.extra_field3 as extraField3,a.batch_id as batchId,a.sap_service_id as sapServiceId,b.status as projectStatus,DATE_FORMAT(b.finish_date,'%Y-%m-%d') as finishDate,ps.project_category_sub as projectCategorySub
         ,u2.name as projectManagerName,u2.corpwx_userid as projectManagerCorpwxUserId
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
@@ -276,7 +276,7 @@
         departmentName,dp2.department_name as buDepartmentName,department.department_id as departmentId, a.overtime_hours as overtimeHours, a.custom_text as customText, a.project_audit_time as
         projectAuditTime,project_main.name as projectMainName,b.status as projectStatus,DATE_FORMAT(b.finish_date,'%Y-%m-%d') as finishDate,ps.project_category_sub as projectCategorySub,
         GROUP_CONCAT(rlog.operator_id,'@', rlog.operate_date,'@', rlog.msg SEPARATOR '❤') AS logMsg,a.extra_field1 as extraField1,a.extra_field2 as extraField2,a.extra_field3 as extraField3
-        ,u2.name as projectManagerName,u2.corpwx_userid as projectManagerCorpwxUserId
+        , a.batch_id as batchId,a.sap_service_id as sapServiceId,u2.name as projectManagerName,u2.corpwx_userid as projectManagerCorpwxUserId
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
         LEFT JOIN project_separate AS ps on b.id=ps.id

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TaskMapper.xml

@@ -170,6 +170,7 @@
     <select id="getProjectTask" resultType="java.util.Map">
         SELECT task.id,tg.id as groupId, task.`name`,task.executor_name,task.executor_id,DATE_FORMAT(task.`end_date`, '%Y-%m-%d') as end_date, task.`plan_hours`,
         (SELECT IFNULL(SUM(working_time),0) FROM report WHERE report.`task_id` = task.id AND report.`state` = 1) AS real_hours,
+        (SELECT IFNULL(SUM(cost),0) FROM report WHERE report.`task_id` = task.id AND report.`state` = 1) AS real_cost,
         task.`task_status`, task.`task_type`,
         project.`project_code`, project.`project_name`,tg.name as groupName
         FROM task

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -269,6 +269,11 @@
                         <font :style="'color:'+(scope.row.real_hours > scope.row.plan_hours?'red':'')">{{scope.row.real_hours == null? 0:scope.row.real_hours.toFixed(1)}}</font>
                     </template>
                 </el-table-column>
+                <el-table-column prop="real_cost" label="实际成本"  width="150" v-if="user.companyId == 3092 || user.companyId==7 || user.companyId==10">
+                   <template slot-scope="scope">
+                        {{scope.row.real_cost == null? 0:scope.row.real_cost.toFixed(2)}}
+                    </template>
+                </el-table-column>
                 <el-table-column prop="task_status" :label="$t('state.states')" width="80" >
                     <template slot-scope="scope">
                         {{taskStatusTxt[scope.row.task_status]}}

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -2389,6 +2389,7 @@ export default {
         stat = this.date[0]
         end = this.date[1]
       }
+
       this.http.post('/expense-sheet/exportList', {
         code: this.code,
         startDate: stat,
@@ -2396,6 +2397,7 @@ export default {
         ownerId: this.ownerId,
         type: this.type,
         projectId: this.selectProject ? this.selectProject : null,
+        sendState: this.sendState
       },
         res => {
           if (res.code == "ok") {