Browse Source

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

# Conflicts:
#	fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue
seyason 3 năm trước cách đây
mục cha
commit
3fc30dccef
47 tập tin đã thay đổi với 686 bổ sung144 xóa
  1. 2 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/aop/AopLogConfiguration.java
  2. 4 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/config/RefererInterceptor.java
  3. 15 13
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuditWorkflowSettingController.java
  4. 21 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceCalculateController.java
  5. 23 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceTblcuscolController.java
  6. 12 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  7. 16 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  8. 23 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/BusinessTrip.java
  9. 83 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/FinanceCalculate.java
  10. 89 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/FinanceFixedcolname.java
  11. 7 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/FinanceTblcuscol.java
  12. 10 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Report.java
  13. 4 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/BusinessTripMapper.java
  14. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/FinanceCalculateMapper.java
  15. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/FinanceCalculateService.java
  16. 17 12
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/BusinessTripServiceImpl.java
  17. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java
  18. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceCalculateServiceImpl.java
  19. 22 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceFixedcolnameServiceImpl.java
  20. 25 12
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java
  21. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  22. 21 2
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/BusinessTripMapper.xml
  23. 3 4
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/DepartmentMapper.xml
  24. 23 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/FinanceCalculateMapper.xml
  25. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/FinanceTblcuscolMapper.xml
  26. 4 4
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml
  27. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml
  28. 2 2
      fhKeeper/formulahousekeeper/octopus/config/index.js
  29. 0 2
      fhKeeper/formulahousekeeper/octopus/src/port.js
  30. 2 2
      fhKeeper/formulahousekeeper/octopus/src/views/Login.vue
  31. 1 1
      fhKeeper/formulahousekeeper/ops-platform/pom.xml
  32. 3 4
      fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/service/impl/CompanyServiceImpl.java
  33. 6 0
      fhKeeper/formulahousekeeper/timesheet/index.html
  34. 5 5
      fhKeeper/formulahousekeeper/timesheet/package-lock.json
  35. 1 1
      fhKeeper/formulahousekeeper/timesheet/package.json
  36. 4 0
      fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue
  37. 0 1
      fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue
  38. 3 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/detailDep.vue
  39. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue
  40. 51 32
      fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue
  41. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/quanx/quanx.vue
  42. 2 2
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  43. 0 2
      fhKeeper/formulahousekeeper/timesheet_h5/public/index.html
  44. 16 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/router/index.js
  45. 4 4
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue
  46. 2 4
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue
  47. 100 25
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/aop/AopLogConfiguration.java

@@ -3,6 +3,7 @@ package com.management.platform.aop;
 import lombok.extern.slf4j.Slf4j;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.*;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.stereotype.Component;
 import org.springframework.web.context.request.RequestContextHolder;
@@ -20,6 +21,7 @@ import java.util.Arrays;
 @Aspect
 @Configuration
 public class AopLogConfiguration {
+
     //切入点表达式
     @Pointcut("execution(public * com.management.*.controller.*.*(..))")
     public void logPointcut(){

+ 4 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/config/RefererInterceptor.java

@@ -23,9 +23,12 @@ public class RefererInterceptor extends HandlerInterceptorAdapter {
 
     @Value(value = "${excludeUrls}")
     private String excludeUrls;
+    @Value("${configEnv.isDev}")
+    public boolean isDev;
 
     @Override
     public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception {
+        if (isDev) return true;
         String referer = req.getHeader("referer");
         String host = req.getServerName();
         //对外开放的回调url排除在外
@@ -46,6 +49,7 @@ public class RefererInterceptor extends HandlerInterceptorAdapter {
         }
         // 只验证POST请求
         if ("POST".equals(req.getMethod())) {
+            //本地开发环境不验证
             if (referer == null) {
                 System.out.println("===referer为Null, 返回404,拦截==");
                 // 状态置为404

+ 15 - 13
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuditWorkflowSettingController.java

@@ -12,6 +12,7 @@ import com.management.platform.mapper.*;
 import com.management.platform.util.HttpRespMsg;
 import org.springframework.web.bind.annotation.RequestMapping;
 
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
@@ -43,10 +44,10 @@ public class AuditWorkflowSettingController {
 
 
     @RequestMapping("/add")
-    public HttpRespMsg add(String json, Integer deptId) {
+    public HttpRespMsg add(String json, Integer deptId, @RequestParam Integer type) {
         String token = request.getHeader("TOKEN");
         Integer companyId = userMapper.selectById(token).getCompanyId();
-        auditWorkflowSettingMapper.delete(new QueryWrapper<AuditWorkflowSetting>().eq("dept_id", deptId));
+        auditWorkflowSettingMapper.delete(new QueryWrapper<AuditWorkflowSetting>().eq("dept_id", deptId).eq("type", type));
         JSONArray array = JSONArray.parseArray(json);
 
         if (array.size() == 1 && array.getJSONObject(0).getInteger("auditorType") == 0) {
@@ -72,6 +73,7 @@ public class AuditWorkflowSettingController {
                 JSONObject obj = array.getJSONObject(i);
                 AuditWorkflowSetting auditWorkflowTimeSetting = JSONObject.toJavaObject(obj, AuditWorkflowSetting.class);
                 auditWorkflowTimeSetting.setCompanyId(companyId);
+                auditWorkflowTimeSetting.setType(type);
                 auditWorkflowTimeSetting.setSeq(i+1);
                 if (i == array.size() -1) {
                     auditWorkflowTimeSetting.setIsFinal(1);
@@ -86,27 +88,27 @@ public class AuditWorkflowSettingController {
     }
 
     @RequestMapping("/checkNodeInUse")
-    public HttpRespMsg checkNodeInUse(String auditDeptId, Integer deptId) {
+    public HttpRespMsg checkNodeInUse(String auditDeptId, Integer deptId, Integer type) {
         String token = request.getHeader("TOKEN");
         Integer companyId = userMapper.selectById(token).getCompanyId();
         HttpRespMsg msg = new HttpRespMsg();
-        List<AuditWorkflowSetting> targetNode = auditWorkflowSettingMapper.selectList(new QueryWrapper<AuditWorkflowSetting>().eq("dept_id", deptId).eq("audit_dept_id", auditDeptId));
-        if (targetNode.size() > 0) {
-            //要删除的部门节点是存在的,需要检测是否有待审核的走到这个流程点了
-            long num = reportMapper.selectCount(new QueryWrapper<Report>().eq("state", 0).eq("is_dept_audit", 1).eq("audit_deptid", auditDeptId));
-            if (num > 0) {
-                msg.setError("当前部门存在待审核报告,无法操作!");
-            }
-        }
+        List<AuditWorkflowSetting> targetNode = auditWorkflowSettingMapper.selectList(new QueryWrapper<AuditWorkflowSetting>().eq("dept_id", deptId).eq("audit_dept_id", auditDeptId).eq("type", type));
+//        if (targetNode.size() > 0) {
+//            //要删除的部门节点是存在的,需要检测是否有待审核的走到这个流程点了
+//            long num = reportMapper.selectCount(new QueryWrapper<Report>().eq("state", 0).eq("is_dept_audit", 1).eq("audit_deptid", auditDeptId));
+//            if (num > 0) {
+//                msg.setError("当前部门存在待审核报告,无法操作!");
+//            }
+//        }
 
         return msg;
     }
 
     @RequestMapping("/get")
-    public HttpRespMsg get(Integer deptId) {
+    public HttpRespMsg get(Integer deptId, @RequestParam Integer type) {
         String token = request.getHeader("TOKEN");
         Integer companyId = userMapper.selectById(token).getCompanyId();
-        List<AuditWorkflowSetting> auditWorkflowTimeSettings = auditWorkflowSettingMapper.selectList(new QueryWrapper<AuditWorkflowSetting>().eq("dept_id", deptId).orderByAsc("seq"));
+        List<AuditWorkflowSetting> auditWorkflowTimeSettings = auditWorkflowSettingMapper.selectList(new QueryWrapper<AuditWorkflowSetting>().eq("dept_id", deptId).eq("type", type).orderByAsc("seq"));
         HttpRespMsg msg = new HttpRespMsg();
         if (auditWorkflowTimeSettings.size() == 0) {
             int seq = 1;

+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceCalculateController.java

@@ -0,0 +1,21 @@
+package com.management.platform.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-04-13
+ */
+@RestController
+@RequestMapping("/finance-calculate")
+public class FinanceCalculateController {
+
+}
+

+ 23 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceTblcuscolController.java

@@ -3,11 +3,14 @@ package com.management.platform.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.management.platform.entity.Finance;
+import com.management.platform.entity.FinanceCalculate;
 import com.management.platform.entity.FinanceFixedcolname;
 import com.management.platform.entity.FinanceTblcuscol;
+import com.management.platform.mapper.FinanceCalculateMapper;
 import com.management.platform.mapper.FinanceFixedcolnameMapper;
 import com.management.platform.mapper.FinanceTblcuscolMapper;
 import com.management.platform.mapper.UserMapper;
+import com.management.platform.service.FinanceCalculateService;
 import com.management.platform.service.FinanceFixedcolnameService;
 import com.management.platform.util.HttpRespMsg;
 import org.springframework.util.StringUtils;
@@ -40,6 +43,10 @@ public class FinanceTblcuscolController {
     private UserMapper userMapper;
     @Resource
     private FinanceFixedcolnameService financeFixedcolnameService;
+    @Resource
+    private FinanceCalculateMapper financeCalculateMapper;
+    @Resource
+    private FinanceCalculateService financeCalculateService;
 
 //    @RequestMapping("/get")
 //    public HttpRespMsg get(Integer companyId) {
@@ -56,12 +63,15 @@ public class FinanceTblcuscolController {
         FinanceFixedcolname item = financeFixedcolnameService.getFixed(companyId);
         if (list.size() > 0) {
             item.setField1(list.get(0).getFieldName());
+            item.setField1Calculate(list.get(0).getNeedCalculate());
         }
         if (list.size() > 1) {
             item.setField2(list.get(1).getFieldName());
+            item.setField2Calculate(list.get(1).getNeedCalculate());
         }
         if (list.size() > 2) {
             item.setField3(list.get(2).getFieldName());
+            item.setField3Calculate(list.get(2).getNeedCalculate());
         }
         msg.data = item;
 
@@ -84,13 +94,17 @@ public class FinanceTblcuscolController {
             FinanceTblcuscol col = new FinanceTblcuscol();
             col.setCompanyId(companyId);
             col.setFieldName(item.getField1());
+            col.setNeedCalculate(item.getField1Calculate());
             financeTblcuscolMapper.insert(col);
         }
+        financeCalculateMapper.delete(new QueryWrapper<FinanceCalculate>().eq("company_id", companyId));
+
 
         if (!StringUtils.isEmpty(item.getField2())) {
             FinanceTblcuscol col = new FinanceTblcuscol();
             col.setCompanyId(companyId);
             col.setFieldName(item.getField2());
+            col.setNeedCalculate(item.getField2Calculate());
             financeTblcuscolMapper.insert(col);
         }
 
@@ -98,6 +112,7 @@ public class FinanceTblcuscolController {
             FinanceTblcuscol col = new FinanceTblcuscol();
             col.setCompanyId(companyId);
             col.setFieldName(item.getField3());
+            col.setNeedCalculate(item.getField3Calculate());
             financeTblcuscolMapper.insert(col);
         }
 
@@ -108,6 +123,14 @@ public class FinanceTblcuscolController {
             financeFixedcolnameService.saveOrUpdate(item);
         }
 
+        FinanceCalculate calculate = item.toCalculateObj();
+        //存储自定义的固定字段
+        if (calculate.getMonthCostCalculate() != null || calculate.getBonusCalculate() != null || calculate.getAllowanceCalculate() != null || calculate.getInsuranceInjuryCalculate() != null
+                || calculate.getInsuranceLosejobCalculate() != null || calculate.getInsuranceMedicalCalculate() != null || calculate.getInsuranceOldCalculate() != null || calculate.getHouseFundCalculate() != null) {
+            calculate.setCompanyId(companyId);
+            financeCalculateService.saveOrUpdate(calculate);
+        }
+
         return new HttpRespMsg();
     }
 

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

@@ -412,6 +412,11 @@ public class ReportController {
 //                    LocalDate localStartDate = LocalDate.parse(startDate, ddtf);
 //                    LocalDate localEndDate = LocalDate.parse(endDate, ddtf);
                     List<LocalDate> workDaysListInRange = WorkDayCalculateUtils.getWorkDaysListInRange(startDate, endDate);
+                    if (workDaysListInRange.size() == 0) {
+                        HttpRespMsg msg = new HttpRespMsg();
+                        msg.setError("工作日天数为0,无法提交。(批量填报会自动跳过节假日,请尝试填写日报或者重新选择日期范围)");
+                        return msg;
+                    }
                     //获取当前填报人所在部门的自定义审核流程
                     for (LocalDate localStartDate : workDaysListInRange) {
                         if (targetUserList == null) {
@@ -431,6 +436,7 @@ public class ReportController {
                             report.setStage(stage[i]);
                             report.setCreateDate(localStartDate);
                             report.setCreatorId(token);
+                            report.setDeptId(user.getDepartmentId());
                             report.setProjectAuditState(0);
                             report.setProjectAuditorId(projectAuditorId[i]);
                             if (auditWorkflowList.size() == 0) {
@@ -463,6 +469,7 @@ public class ReportController {
 
                             //项目专业的进展
                             fillReportProgress(report, professionProgress[i]);
+                            System.out.println("======添加Report==========");
                             reportList.add(report);
                         } else {
                             //批量代填报的
@@ -483,7 +490,8 @@ public class ReportController {
                                         .setPicAdd(pics!=null?pics[i]:null)
                                         .setCreateDate(localStartDate)
                                         .setCreatorId(subsUser.getId())
-                                        .setProjectAuditorId(projectAuditorId[i]);;
+                                        .setDeptId(subsUser.getDepartmentId())
+                                        .setProjectAuditorId(projectAuditorId[i]);
                                 report.setProjectAuditState(0);
                                 if (auditWorkflowList.size() == 0) {
                                     //没有自定义审核流,默认的直接是项目负责人审核
@@ -536,6 +544,7 @@ public class ReportController {
                         report.setPicAdd(pics!=null && pics.length>0?pics[i]:null);
                         report.setCreateDate(LocalDate.parse(createDate[i], DateTimeFormatter.ofPattern("yyyy-MM-dd")));
                         report.setCreatorId(token);
+                        report.setDeptId(user.getDepartmentId());
                         report.setProjectAuditState(0);
                         report.setProjectAuditorId(projectAuditorId[i]);
                         if (auditWorkflowList.size() == 0) {
@@ -593,6 +602,7 @@ public class ReportController {
                                     .setPicAdd(pics!=null?pics[i]:null)
                                     .setCreateDate(LocalDate.parse(createDate[i], DateTimeFormatter.ofPattern("yyyy-MM-dd")))
                                     .setCreatorId(subsUser.getId())
+                                    .setDeptId(subsUser.getDepartmentId())
                                     .setProjectAuditorId(projectAuditorId[i])
                                     .setFillUserid(token);
                             report.setProjectAuditState(1);
@@ -660,6 +670,7 @@ public class ReportController {
             httpRespMsg.setError("验证失败");
             return httpRespMsg;
         }
+        System.out.println("reportList===size===="+reportList.size());
         //校验工作时长
         for (Report report : reportList) {
             if (report.getWorkingTime() == null || report.getWorkingTime() <= 0.0) {

+ 16 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -123,17 +123,28 @@ public class TaskController {
         }
         boolean isNew = false;
         List<String> msgRecepientList = new ArrayList<>();
+        List<Task> needReOrderList = new ArrayList<>();
         //新建的任务需要计算排序
         if (task.getId() == null) {
             isNew = true;
             QueryWrapper<Task> queryWrapper = new QueryWrapper<Task>();
-            queryWrapper.eq("stages_id", task.getStagesId()).orderByDesc("seq").last("limit 1");
+            queryWrapper.eq("stages_id", task.getStagesId()).eq("task_status", 0).orderByDesc("seq").last("limit 1");
             List<Task> taskList = taskService.list(queryWrapper);
             if (taskList.size() == 0) {
                 task.setSeq(1);
             } else {
                 task.setSeq(taskList.get(0).getSeq() + 1);
             }
+            //比当前创建的这条task的seq大于或者等于的,都要往后排一位
+            queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("stages_id", task.getStagesId()).ge("seq", task.getSeq());
+            List<Task> oldTaskList = taskMapper.selectList(queryWrapper);
+            for (Task t : oldTaskList) {
+                Task newT = new Task();
+                newT.setId(t.getId());
+                newT.setSeq(t.getSeq() + 1);
+                needReOrderList.add(newT);
+            }
             if (task.getExecutorId() != null) {
                 msgRecepientList = task.getExecutorList().stream().filter(exe->exe.getExecutorId() != null).map(TaskExecutor::getExecutorId).collect(Collectors.toList());
             }
@@ -165,6 +176,10 @@ public class TaskController {
             //保存任务执行人
             task.getExecutorList().forEach(exe->exe.setTaskId(task.getId()));
             taskExecutorService.saveBatch(task.getExecutorList());
+            //重新调整其他任务的手动排序
+            if (needReOrderList.size() > 0) {
+                taskService.updateBatchById(needReOrderList);
+            }
         }
 
 

+ 23 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/BusinessTrip.java

@@ -20,7 +20,7 @@ import org.springframework.format.annotation.DateTimeFormat;
  * </p>
  *
  * @author Seyason
- * @since 2022-04-08
+ * @since 2022-04-12
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -126,6 +126,28 @@ public class BusinessTrip extends Model<BusinessTrip> {
     @JsonFormat(pattern = "yyyy-MM-dd")
     private LocalDateTime indate;
 
+    @TableField(exist = false)
+    private String departmentName;
+    /**
+     * 项目id
+     */
+    @TableField("project_id")
+    private Integer projectId;
+
+    /**
+     * 自定义维度id
+     */
+    @TableField("degree_id")
+    private Integer degreeId;
+
+    /**
+     * 自定义维度内容
+     */
+    @TableField("degree_name")
+    private String degreeName;
+
+    @TableField(exist = false)
+    private String projectName;
 
     @Override
     protected Serializable pkVal() {

+ 83 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/FinanceCalculate.java

@@ -0,0 +1,83 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-04-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class FinanceCalculate extends Model<FinanceCalculate> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId("company_id")
+    private Integer companyId;
+
+    /**
+     * 工资字段, 1-参与计算,0-不参与计算
+     */
+    @TableField("month_cost_calculate")
+    private Integer monthCostCalculate;
+
+    /**
+     * 奖金字段, 1-参与计算,0-不参与计算
+     */
+    @TableField("bonus_calculate")
+    private Integer bonusCalculate;
+
+    /**
+     * 津贴字段, 1-参与计算,0-不参与计算
+     */
+    @TableField("allowance_calculate")
+    private Integer allowanceCalculate;
+
+    /**
+     * 养老保险字段, 1-参与计算,0-不参与计算
+     */
+    @TableField("insurance_old_calculate")
+    private Integer insuranceOldCalculate;
+
+    /**
+     * 医疗保险字段, 1-参与计算,0-不参与计算
+     */
+    @TableField("insurance_medical_calculate")
+    private Integer insuranceMedicalCalculate;
+
+    /**
+     * 失业保险字段, 1-参与计算,0-不参与计算
+     */
+    @TableField("insurance_losejob_calculate")
+    private Integer insuranceLosejobCalculate;
+
+    /**
+     * 工伤保险字段, 1-参与计算,0-不参与计算
+     */
+    @TableField("insurance_injury_calculate")
+    private Integer insuranceInjuryCalculate;
+
+    /**
+     * 住房公积金字段, 1-参与计算,0-不参与计算
+     */
+    @TableField("house_fund_calculate")
+    private Integer houseFundCalculate;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.companyId;
+    }
+
+}

+ 89 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/FinanceFixedcolname.java

@@ -83,9 +83,98 @@ public class FinanceFixedcolname extends Model<FinanceFixedcolname> {
     @TableField(exist = false)
     private String field3;
 
+    /**
+     * 自定义字段1 是否计入合计成本,1-参与,0-不参与
+     */
+    @TableField(exist = false)
+    private Integer field1Calculate;
+    /**
+     * 自定义字段2 是否计入合计成本,1-参与,0-不参与
+     */
+    @TableField(exist = false)
+    private Integer field2Calculate;
+    /**
+     * 自定义字段3 是否计入合计成本,1-参与,0-不参与
+     */
+    @TableField(exist = false)
+    private Integer field3Calculate;
+
+    /**
+     * 工资字段, 1-参与计算,0-不参与计算
+     */
+    @TableField(exist = false)
+    private Integer monthCostCalculate;
+
+    /**
+     * 奖金字段, 1-参与计算,0-不参与计算
+     */
+    @TableField(exist = false)
+    private Integer bonusCalculate;
+
+    /**
+     * 津贴字段, 1-参与计算,0-不参与计算
+     */
+    @TableField(exist = false)
+    private Integer allowanceCalculate;
+
+    /**
+     * 养老保险字段, 1-参与计算,0-不参与计算
+     */
+    @TableField(exist = false)
+    private Integer insuranceOldCalculate;
+
+    /**
+     * 医疗保险字段, 1-参与计算,0-不参与计算
+     */
+    @TableField(exist = false)
+    private Integer insuranceMedicalCalculate;
+
+    /**
+     * 失业保险字段, 1-参与计算,0-不参与计算
+     */
+    @TableField(exist = false)
+    private Integer insuranceLosejobCalculate;
+
+    /**
+     * 工伤保险字段, 1-参与计算,0-不参与计算
+     */
+    @TableField(exist = false)
+    private Integer insuranceInjuryCalculate;
+
+    /**
+     * 住房公积金字段, 1-参与计算,0-不参与计算
+     */
+    @TableField(exist = false)
+    private Integer houseFundCalculate;
+
     @Override
     protected Serializable pkVal() {
         return this.companyId;
     }
 
+    public FinanceFixedcolname copyFromCalculate(FinanceCalculate calculate) {
+        this.monthCostCalculate = calculate.getMonthCostCalculate();
+        this.bonusCalculate = calculate.getBonusCalculate();
+        this.allowanceCalculate = calculate.getAllowanceCalculate();
+        this.insuranceOldCalculate = calculate.getInsuranceOldCalculate();
+        this.insuranceMedicalCalculate = calculate.getInsuranceMedicalCalculate();
+        this.insuranceLosejobCalculate = calculate.getInsuranceLosejobCalculate();
+        this.insuranceInjuryCalculate = calculate.getInsuranceInjuryCalculate();
+        this.houseFundCalculate = calculate.getHouseFundCalculate();
+        return this;
+    }
+
+    public FinanceCalculate toCalculateObj() {
+        FinanceCalculate calculate = new FinanceCalculate();
+        calculate.setCompanyId(companyId);
+        calculate.setAllowanceCalculate(1);
+        calculate.setBonusCalculate(bonusCalculate);
+        calculate.setHouseFundCalculate(houseFundCalculate);
+        calculate.setInsuranceInjuryCalculate(insuranceInjuryCalculate);
+        calculate.setInsuranceMedicalCalculate(insuranceMedicalCalculate);
+        calculate.setInsuranceLosejobCalculate(insuranceLosejobCalculate);
+        calculate.setInsuranceOldCalculate(insuranceOldCalculate);
+        calculate.setMonthCostCalculate(monthCostCalculate);
+        return calculate;
+    }
 }

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/FinanceTblcuscol.java

@@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2021-12-17
+ * @since 2022-04-13
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -36,6 +36,12 @@ public class FinanceTblcuscol extends Model<FinanceTblcuscol> {
     @TableField("field_name")
     private String fieldName;
 
+    /**
+     * 1-参与计算,0-不参与计算
+     */
+    @TableField("need_calculate")
+    private Integer needCalculate;
+
 
     @Override
     protected Serializable pkVal() {

+ 10 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Report.java

@@ -24,12 +24,13 @@ import org.springframework.format.annotation.DateTimeFormat;
  * </p>
  *
  * @author Seyason
- * @since 2022-03-13
+ * @since 2022-04-09
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 public class Report extends Model<Report> {
+
     private static final long serialVersionUID=1L;
 
     /**
@@ -283,6 +284,14 @@ public class Report extends Model<Report> {
     @TableField(exist = false)
     private String projectAuditorName;
 
+
+    /**
+     * 工时日报所属部门id
+     */
+    @TableField("dept_id")
+    private Integer deptId;
+
+
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 4 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/BusinessTripMapper.java

@@ -3,6 +3,9 @@ package com.management.platform.mapper;
 import com.management.platform.entity.BusinessTrip;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * <p>
  *  Mapper 接口
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface BusinessTripMapper extends BaseMapper<BusinessTrip> {
 
+    public List<BusinessTrip> summaryData(String keyword, String startDate, String endDate, Integer companyId);
 }

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/FinanceCalculateMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.FinanceCalculate;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-04-13
+ */
+public interface FinanceCalculateMapper extends BaseMapper<FinanceCalculate> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/FinanceCalculateService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.FinanceCalculate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-04-13
+ */
+public interface FinanceCalculateService extends IService<FinanceCalculate> {
+
+}

+ 17 - 12
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/BusinessTripServiceImpl.java

@@ -3,14 +3,8 @@ package com.management.platform.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.management.platform.entity.BusinessTrip;
-import com.management.platform.entity.LeaveSheet;
-import com.management.platform.entity.TimeType;
-import com.management.platform.entity.User;
-import com.management.platform.mapper.BusinessTripMapper;
-import com.management.platform.mapper.LeaveSheetMapper;
-import com.management.platform.mapper.TimeTypeMapper;
-import com.management.platform.mapper.UserMapper;
+import com.management.platform.entity.*;
+import com.management.platform.mapper.*;
 import com.management.platform.service.BusinessTripService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.management.platform.util.HttpRespMsg;
@@ -22,6 +16,7 @@ import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 
 /**
  * <p>
@@ -41,6 +36,8 @@ public class BusinessTripServiceImpl extends ServiceImpl<BusinessTripMapper, Bus
     private TimeTypeMapper timeTypeMapper;
     @Resource
     private HttpServletRequest request;
+    @Resource
+    private ProjectMapper projectMapper;
 
     @Override
     public HttpRespMsg add(BusinessTrip sheet) {
@@ -63,7 +60,7 @@ public class BusinessTripServiceImpl extends ServiceImpl<BusinessTripMapper, Bus
 
             int count = businessTripMapper.selectCount(queryWrapper);
             if (count > 0) {
-                msg.setError("该时间段已有出差申请,不能重复请假");
+                msg.setError("该时间段已有出差申请,不能重复提交");
             }
             businessTripMapper.insert(sheet);
         } else {
@@ -96,12 +93,20 @@ public class BusinessTripServiceImpl extends ServiceImpl<BusinessTripMapper, Bus
             queryWrapper.eq("way", sheet.getWay());
         }
         if (sheet.getStartDate() != null && sheet.getEndDate() != null) {
-            queryWrapper.and(wrapper->
-                    wrapper.between("start_date", sheet.getStartDate(), sheet.getEndDate()).or().between("end_date", sheet.getStartDate(), sheet.getEndDate()));
+            queryWrapper.le("start_date", sheet.getEndDate()).gt("end_date", sheet.getStartDate());
         }
         IPage<BusinessTrip> listIPager = businessTripMapper.selectPage(new Page<>(pageIndex, pageSize),
                 queryWrapper);
         List<BusinessTrip> records = listIPager.getRecords();
+        //赋值项目名称
+        List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", sheet.getCompanyId()));
+        records.forEach(r->{
+            Optional<Project> first = projectList.stream().filter(p->p.getId().equals(r.getProjectId())).findFirst();
+            if (first.isPresent()) {
+                r.setProjectName(first.get().getProjectName());
+            }
+        });
+
         Long total = listIPager.getTotal();
         Map<String, Object> map = new HashMap<>();
         map.put("records", records);
@@ -133,7 +138,7 @@ public class BusinessTripServiceImpl extends ServiceImpl<BusinessTripMapper, Bus
     public HttpRespMsg summaryData(String keyword, String startDate, String endDate, String userId) {
         Integer companyId = userMapper.selectById(userId).getCompanyId();
         HttpRespMsg msg = new HttpRespMsg();
-//        msg.data = businessTripMapper.summaryData(keyword, startDate, endDate, companyId);
+        msg.data = businessTripMapper.summaryData(keyword, startDate, endDate, companyId);
         return msg;
     }
 }

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java

@@ -278,6 +278,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             List<DepartmentMasterVO> list = new ArrayList<>();
             BigDecimal totalCostMoney = new BigDecimal(0);
             List<Department> allDeptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
+
             for (Department department : masterList) {
                 DepartmentMasterVO departmentMasterVO = new DepartmentMasterVO();
                 BeanUtils.copyProperties(department, departmentMasterVO);

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceCalculateServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.FinanceCalculate;
+import com.management.platform.mapper.FinanceCalculateMapper;
+import com.management.platform.service.FinanceCalculateService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-04-13
+ */
+@Service
+public class FinanceCalculateServiceImpl extends ServiceImpl<FinanceCalculateMapper, FinanceCalculate> implements FinanceCalculateService {
+
+}

+ 22 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceFixedcolnameServiceImpl.java

@@ -1,11 +1,15 @@
 package com.management.platform.service.impl;
 
+import com.management.platform.entity.FinanceCalculate;
 import com.management.platform.entity.FinanceFixedcolname;
+import com.management.platform.mapper.FinanceCalculateMapper;
 import com.management.platform.mapper.FinanceFixedcolnameMapper;
 import com.management.platform.service.FinanceFixedcolnameService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+
 /**
  * <p>
  *  服务实现类
@@ -16,6 +20,8 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class FinanceFixedcolnameServiceImpl extends ServiceImpl<FinanceFixedcolnameMapper, FinanceFixedcolname> implements FinanceFixedcolnameService {
+    @Resource
+    private FinanceCalculateMapper financeCalculateMapper;
 
     public FinanceFixedcolname getFixed(Integer companyId) {
         FinanceFixedcolname item = getById(companyId);
@@ -33,6 +39,22 @@ public class FinanceFixedcolnameServiceImpl extends ServiceImpl<FinanceFixedcoln
             item.setCompanyId(companyId);
             save(item);
         }
+        //检查是否可计入总计的属性
+        FinanceCalculate calculate = financeCalculateMapper.selectById(companyId);
+        if (calculate == null) {
+            calculate = new FinanceCalculate();
+            calculate.setAllowanceCalculate(1);
+            calculate.setBonusCalculate(1);
+            calculate.setHouseFundCalculate(1);
+            calculate.setInsuranceInjuryCalculate(1);
+            calculate.setInsuranceMedicalCalculate(1);
+            calculate.setInsuranceLosejobCalculate(1);
+            calculate.setInsuranceOldCalculate(1);
+            calculate.setMonthCostCalculate(1);
+            calculate.setCompanyId(companyId);
+            financeCalculateMapper.insert(calculate);
+        }
+        item.copyFromCalculate(calculate);
         return item;
     }
 }

+ 25 - 12
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java

@@ -155,8 +155,21 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                 userTimeList = reportMapper.getUserWorkingTimeByRange(companyId, startStr, endStr);
             }
 
+            //设置财务核算薪资模板配置
             List<FinanceTblcuscol> cusColList = financeTblcuscolMapper.selectList(new QueryWrapper<FinanceTblcuscol>().eq("company_id", companyId));
-
+            FinanceFixedcolname financeConfig = financeFixedcolnameService.getFixed(companyId);
+            if (cusColList.size() > 0) {
+                financeConfig.setField1(cusColList.get(0).getFieldName());
+                financeConfig.setField1Calculate(cusColList.get(0).getNeedCalculate());
+            }
+            if (cusColList.size() > 1) {
+                financeConfig.setField2(cusColList.get(1).getFieldName());
+                financeConfig.setField2Calculate(cusColList.get(1).getNeedCalculate());
+            }
+            if (cusColList.size() > 2) {
+                financeConfig.setField3(cusColList.get(2).getFieldName());
+                financeConfig.setField3Calculate(cusColList.get(2).getNeedCalculate());
+            }
             //由于第一行需要指明列对应的标题
             for (int rowIndex = 0; rowIndex <= sheet.getLastRowNum(); rowIndex++) {
                 Row row = sheet.getRow(rowIndex);
@@ -204,7 +217,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                         String item = salaryCell.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setMonthCost(value);
-                        total = total.add(value);
+                        if (financeConfig.getMonthCostCalculate()==1) total = total.add(value);
                     }
 
                     //按姓名做匹配
@@ -218,49 +231,49 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                         String bonusString = bonusCell.getStringCellValue();
                         BigDecimal bonus = bonusString != null ? new BigDecimal(bonusString.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setBonus(bonus);
-                        total = total.add(bonus);
+                        if (financeConfig.getBonusCalculate()==1) total = total.add(bonus);
                     }
                     if (allowanceCell != null) {
                         allowanceCell.setCellType(CellType.STRING);
                         String item = allowanceCell.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setAllowance(value);
-                        total = total.add(value);
+                        if (financeConfig.getAllowanceCalculate()==1) total = total.add(value);
                     }
                     if (inJobCell != null) {
                         inJobCell.setCellType(CellType.STRING);
                         String item = inJobCell.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceLosejob(value);
-                        total = total.add(value);
+                        if (financeConfig.getInsuranceLosejobCalculate()==1) total = total.add(value);
                     }
                     if (inMedicalCell != null) {
                         inMedicalCell.setCellType(CellType.STRING);
                         String item = inMedicalCell.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceMedical(value);
-                        total = total.add(value);
+                        if (financeConfig.getInsuranceMedicalCalculate()==1) total = total.add(value);
                     }
                     if (inOldCell != null) {
                         inOldCell.setCellType(CellType.STRING);
                         String item = inOldCell.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceOld(value);
-                        total = total.add(value);
+                        if (financeConfig.getInsuranceOldCalculate()==1) total = total.add(value);
                     }
                     if (injuryCell != null) {
                         injuryCell.setCellType(CellType.STRING);
                         String item = injuryCell.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceInjury(value);
-                        total = total.add(value);
+                        if (financeConfig.getInsuranceInjuryCalculate()==1) total = total.add(value);
                     }
                     if (houseFundCell != null) {
                         houseFundCell.setCellType(CellType.STRING);
                         String item = houseFundCell.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setHouseFund(value);
-                        total = total.add(value);
+                        if (financeConfig.getHouseFundCalculate()==1) total = total.add(value);
                     }
 
                     if (field1 != null) {
@@ -268,21 +281,21 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                         String item = field1.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField1(value);
-                        total = total.add(value);
+                        if (financeConfig.getField1Calculate() != null && financeConfig.getField1Calculate()==1) total = total.add(value);
                     }
                     if (field2 != null) {
                         field2.setCellType(CellType.STRING);
                         String item = field2.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField2(value);
-                        total = total.add(value);
+                        if (financeConfig.getField2Calculate() != null && financeConfig.getField2Calculate()==1) total = total.add(value);
                     }
                     if (field3 != null) {
                         field3.setCellType(CellType.STRING);
                         String item = field3.getStringCellValue();
                         BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField3(value);
-                        total = total.add(value);
+                        if (financeConfig.getField3Calculate() != null && financeConfig.getField3Calculate()==1) total = total.add(value);
                     }
                     finance.setTotalCost(total);
 

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -2225,6 +2225,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                                 Report report = new Report();
                                 report.setCompanyId(companyId);
                                 report.setCreatorId(reportCreator.getId());
+                                report.setDeptId(reportCreator.getDepartmentId());
                                 report.setProjectId(project.getId());
                                 //子项目
                                 if (!StringUtils.isEmpty(subPName)) {

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

@@ -20,11 +20,30 @@
         <result column="status" property="status" />
         <result column="deny_reason" property="denyReason" />
         <result column="indate" property="indate" />
+        <result column="project_id" property="projectId" />
+        <result column="degree_id" property="degreeId" />
+        <result column="degree_name" property="degreeName" />
+    </resultMap>
+    <resultMap id="BaseResultMap1" type="com.management.platform.entity.BusinessTrip">
+        <result column="owner_id" property="ownerId" />
+        <result column="owner_name" property="ownerName" />
+        <result column="day_count" property="dayCount" />
+        <result column="department_name" property="departmentName" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, company_id, owner_id, owner_name, reason, start_date, end_date, way, city_from, city_to, go_back, day_count, remark, status, deny_reason, indate
+        id, company_id, owner_id, owner_name, reason, start_date, end_date, way, city_from, city_to, go_back, day_count, remark, status, deny_reason, indate, project_id, degree_id, degree_name
     </sql>
-
+    <select id="summaryData"  resultMap="BaseResultMap1">
+        select owner_id, owner_name, sum(day_count) as day_count, department.department_name as department_name from business_trip
+        left join user on user.id = business_trip.owner_id
+        left join department on department.department_id = user.department_id
+        where (start_date &lt;= #{endDate} and end_date &gt;= #{startDate} )
+        <if test="keyword != null and keyword != ''">
+            and owner_name like '%${keyword}%'
+        </if>
+        and business_trip.company_id = #{companyId}
+        group by owner_id
+    </select>
 </mapper>

+ 3 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/DepartmentMapper.xml

@@ -21,10 +21,9 @@
     <!--根据部门获取成本-->
     <select id="getCostByDepartment" resultType="java.util.Map">
         SELECT SUM(b.working_time) AS time, SUM(b.cost) AS money
-        FROM user AS a
-        LEFT JOIN report AS b ON a.id = b.creator_id
+        FROM report AS b
         WHERE b.state = 1
-        AND a.department_id IN
+        AND b.dept_id IN
         <foreach collection="departmentIds" item="departmentId" index="index" open="(" close=")" separator=",">
             #{departmentId}
         </foreach>
@@ -42,7 +41,7 @@
         LEFT JOIN project AS c ON b.project_id = c.id
         WHERE b.state = 1
         <if test="departmentIds != null">
-            AND a.department_id IN
+            AND b.dept_id IN
             <foreach collection="departmentIds" item="departmentId" index="index" open="(" close=")" separator=",">
                 #{departmentId}
             </foreach>

+ 23 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/FinanceCalculateMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.management.platform.mapper.FinanceCalculateMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.FinanceCalculate">
+        <id column="company_id" property="companyId" />
+        <result column="month_cost_calculate" property="monthCostCalculate" />
+        <result column="bonus_calculate" property="bonusCalculate" />
+        <result column="allowance_calculate" property="allowanceCalculate" />
+        <result column="insurance_old_calculate" property="insuranceOldCalculate" />
+        <result column="insurance_medical_calculate" property="insuranceMedicalCalculate" />
+        <result column="insurance_losejob_calculate" property="insuranceLosejobCalculate" />
+        <result column="insurance_injury_calculate" property="insuranceInjuryCalculate" />
+        <result column="house_fund_calculate" property="houseFundCalculate" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        company_id, month_cost_calculate, bonus_calculate, allowance_calculate, insurance_old_calculate, insurance_medical_calculate, insurance_losejob_calculate, insurance_injury_calculate, house_fund_calculate
+    </sql>
+
+</mapper>

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

@@ -7,11 +7,12 @@
         <id column="id" property="id" />
         <result column="company_id" property="companyId" />
         <result column="field_name" property="fieldName" />
+        <result column="need_calculate" property="needCalculate" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, company_id, field_name
+        id, company_id, field_name, need_calculate
     </sql>
 
 </mapper>

+ 4 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

@@ -165,10 +165,10 @@
 
     <!--获取某个项目每个人分别需要的工时-->
     <select id="getProjectCost" resultType="java.util.Map">
-        SELECT b.id as creatorId, b.name,department.department_name as departmentName, SUM(a.working_time) AS cost, SUM(a.cost) AS costMoney
+        SELECT b.id as creatorId, b.name,a.dept_id as deptId, IFNULL(department.department_name, '未分配') as departmentName, SUM(a.working_time) AS cost, SUM(a.cost) AS costMoney
         FROM report AS a
         JOIN user AS b ON a.creator_id = b.id
-        left join department on department.department_id = b.department_id
+        left join department on department.department_id = a.dept_id
         WHERE a.project_id = #{projectId}
         AND a.state = 1
         <if test="startDate != null and endDate != null">
@@ -177,8 +177,8 @@
         <if test="userId != null">
             AND a.creator_id = #{userId}
         </if>
-        GROUP BY b.id
-        ORDER BY b.id ASC
+        GROUP BY b.id, a.dept_id
+        ORDER BY b.id ASC, a.dept_id ASC
     </select>
 
 

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

@@ -39,11 +39,12 @@
         <result column="group_id" property="groupId" />
         <result column="custom_data" property="customData" />
         <result column="project_auditor_id" property="projectAuditorId" />
+        <result column="dept_id" property="deptId" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, creator_id, project_id, create_date, working_time, content, state, create_time, time_type, cost, start_time, end_time, report_time_type, sub_project_id, task_id, is_overtime, progress, department_audit_state, stage, pic_str, multi_worktime, reject_reason, reject_username, reject_userid, degree_id, company_id, fill_userid, audit_deptid, is_dept_audit, audit_dept_managerid, is_final_audit, project_audit_state, group_id, custom_data, project_auditor_id
+        id, creator_id, project_id, create_date, working_time, content, state, create_time, time_type, cost, start_time, end_time, report_time_type, sub_project_id, task_id, is_overtime, progress, department_audit_state, stage, pic_str, multi_worktime, reject_reason, reject_username, reject_userid, degree_id, company_id, fill_userid, audit_deptid, is_dept_audit, audit_dept_managerid, is_final_audit, project_audit_state, group_id, custom_data, project_auditor_id, dept_id
     </sql>
 
     <!--根据日期获取全部报告信息-->
@@ -521,5 +522,4 @@
         </foreach>
         )
     </select>
-
 </mapper>

+ 2 - 2
fhKeeper/formulahousekeeper/octopus/config/index.js

@@ -1,8 +1,8 @@
 var path = require('path')
 
 //  var ip = '127.0.0.1'
-var ip = '192.168.2.13'
-// var ip = '47.100.37.243' 
+// var ip = '192.168.2.13'
+var ip = '47.100.37.243' 
 
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 // for (var i in ifaces) {

+ 0 - 2
fhKeeper/formulahousekeeper/octopus/src/port.js

@@ -14,8 +14,6 @@ export default {
         insert: '/user/insertUser',                             // 单独新增用户
         import: '/user/importUser',                             // 批量导入用户
         permission: '/user/switchPermission',                   // 切换权限
-
-        msgList: '/information/list',                           // 消息列表
         check: '/information/check',                            // 点击消息
     },
 

+ 2 - 2
fhKeeper/formulahousekeeper/octopus/src/views/Login.vue

@@ -16,7 +16,7 @@
                     <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">登录</el-button>
                 </el-form-item>
                 <div class="toRegister">
-                    <el-link type="primary" class="btn" style="float:left;" :underline="false">联系客服
+                    <!-- <el-link type="primary" class="btn" style="float:left;" :underline="false">联系客服
                         <div class="service">
                             <p style="color: #333">扫码加客服微信</p>
                             <img src="../assets/image/code.jpg">
@@ -25,7 +25,7 @@
                     </el-link>
                     <el-link type="primary" style="margin-right:5px;" @click="dialogVisible=true" :underline="false">
                         使用说明
-                    </el-link>
+                    </el-link> -->
                     <!-- <el-link type="primary" v-if="!isCorpWX" @click="jumpTo" :underline="false">企业注册</el-link> -->
                 </div>
             </el-form>

+ 1 - 1
fhKeeper/formulahousekeeper/ops-platform/pom.xml

@@ -11,7 +11,7 @@
 
     <groupId>com.hssx.parent</groupId>
     <artifactId>ops-platform</artifactId>
-    <version>1.0-SNAPSHOT</version>
+    <version>1.0</version>
 
     <dependencies>
         <dependency>

+ 3 - 4
fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/service/impl/CompanyServiceImpl.java

@@ -38,8 +38,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
     @Override
     public HttpRespMsg addMembCount(Integer companyId, int addCount) {
         HttpRespMsg msg = new HttpRespMsg();
-        String token = request.getHeader("TOKEN");
-        User user = userMapper.selectById(token);
         if (addCount == 0) {
             msg.setError("人数不能为0");
         }
@@ -47,7 +45,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         company.setStaffCountMax(company.getStaffCountMax() + addCount);
         companyMapper.updateById(company);
         String str = "为["+company.getCompanyName()+"]"+(addCount>0?"增加":"减少")+"了"
-                +addCount+"人数,调整后为"+company.getStaffCountMax()+"人。";
+                +Math.abs(addCount)+"人数,调整后为"+company.getStaffCountMax()+"人。";
         saveLog(str);
         return msg;
     }
@@ -69,7 +67,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         company.setId(companyId);
         company.setSetMeal(1);
         companyMapper.updateById(company);
-        saveLog("设置["+company.getCompanyName()+"]为已签约");
+        String name = companyMapper.selectById(companyId).getCompanyName();
+        saveLog("设置["+name+"]为已签约");
         return msg;
     }
 

+ 6 - 0
fhKeeper/formulahousekeeper/timesheet/index.html

@@ -61,6 +61,12 @@
                 line-height: 35px;
             }
         </style>
+        <meta name="wpk-bid" content="dta_2_71020"> <script>var isDingtalk = navigator && /DingTalk/.test(navigator.userAgent);var isProductEnv = window &&window.location &&window.location.host 
+            && window.location.host.indexOf('//127.0.0.1')===-1
+            && window.location.host.indexOf('//localhost')===-1
+            && window.location.host.indexOf('//192.168.')===-1
+            // 如果有其它测试域名,请一起排掉,减少测试环境对生产环境监控的干扰
+        if (isProductEnv) {    !(function(c,i,e,b){var h=i.createElement("script");var f=i.getElementsByTagName("script")[0];h.type="text/javascript";h.crossorigin=true;h.onload=function(){c[b]||(c[b]=new c.wpkReporter({bid:"dta_2_71020"}));c[b].installAll()};f.parentNode.insertBefore(h,f);h.src=e})(window,document,"https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js","__wpk"); }</script>
     </head>
     <body>
         <div id="app"></div>

+ 5 - 5
fhKeeper/formulahousekeeper/timesheet/package-lock.json

@@ -5201,7 +5201,7 @@
     },
     "normalize-wheel": {
       "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+      "resolved": "https://registry.nlark.com/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
       "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
     },
     "npmlog": {
@@ -5218,7 +5218,7 @@
     },
     "nprogress": {
       "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz",
+      "resolved": "https://registry.npm.taobao.org/nprogress/download/nprogress-0.2.0.tgz",
       "integrity": "sha1-y480xTIT2JVyP8urkH6UIq28r7E="
     },
     "nth-check": {
@@ -8111,9 +8111,9 @@
       "dev": true
     },
     "v-distpicker": {
-      "version": "1.2.12",
-      "resolved": "https://registry.npmjs.org/v-distpicker/-/v-distpicker-1.2.12.tgz",
-      "integrity": "sha512-hREPQ1gg0nDwySofg0WAnmVnbtJHeelSqSQU/hyPwokjBNr2tFVOu++JXNZMVhG9Gt4IitgfdiNz+UYnB3H6bw==",
+      "version": "1.2.13",
+      "resolved": "https://registry.npmmirror.com/v-distpicker/-/v-distpicker-1.2.13.tgz",
+      "integrity": "sha512-dQN7cR7BhHPrmZ0dBngFm69Fgc3u22uOwJDM4vc4n3mdGDI6PvKa/0lCjPkDrU8G1pv9TO+Fb68wmX2ItyI1mQ==",
       "requires": {
         "vue": "^2.6.10"
       }

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/package.json

@@ -21,7 +21,7 @@
     "jquery": "^3.4.1",
     "nprogress": "^0.2.0",
     "tinymce": "^5.7.1",
-    "v-distpicker": "^1.2.12",
+    "v-distpicker": "^1.2.13",
     "v-viewer": "^1.6.4",
     "vue": "^2.6.10",
     "vue-clipboard2": "^0.3.0",

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -174,6 +174,7 @@
                                         localStorage.userInfo = JSON.stringify(res.data);
                                         console.log('登录成功');
                                         this.user = res.data;
+                                        this.permissionsList(res.data)
                                         window.location.href = '/#/index';
                                     }
                                 }
@@ -198,6 +199,7 @@
                                 var user = res.data;
                                 localStorage.user = JSON.stringify(res.data);
                                 sessionStorage.setItem('user', JSON.stringify(res.data));
+                                this.permissionsList(res.data)
                                 // if (user.role == 3) {
                                 //     //公司高层
                                 //     this.$router.push({ path: '/cost' });
@@ -215,6 +217,7 @@
                                     message: res.msg,
                                     type: 'error'
                                 });
+                                
                             }
                         }, error => {
                             this.$message({
@@ -229,6 +232,7 @@
                                 var user = res.data;
                                 localStorage.user = JSON.stringify(res.data);
                                 sessionStorage.setItem('user', JSON.stringify(res.data));
+                                this.permissionsList(res.data)
                                 // if (user.role == 3) {
                                 //     //公司高层
                                 //     this.$router.push({ path: '/cost' });

+ 0 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -1069,7 +1069,6 @@ export default {
         this.displayTable = true;
         this.apk2 = 5
         this.apk = true
-        this.statistical()
       } else {
         this.NcurDeptId = []
         this.displayTable = true;

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/detailDep.vue

@@ -14,6 +14,9 @@
                         :options="option" :props="{ checkStrictly: true }" :show-all-levels="false"></el-cascader>
                     <!-- </div> -->
                 </el-form-item>
+                <el-form-item >
+                    <span style="color:#666;">时间段:{{startDate}}<span style="padding-left:5px;padding-right:5px;">至</span>{{endDate}}</span>
+                </el-form-item>
                 <el-form-item style="float:right;">
                     <span style="font-size:18px;">部门成本:<span style="color:#20a0ff;">{{cost.toFixed(2)}}元</span></span>
                 </el-form-item>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -2127,7 +2127,7 @@ a {
     border-color: transparent;
 }
 .ganttdialog .el-dialog__body{
-    height: 880px;
+    height: 550px;
 }
 .toolbar_formitem_n1{
     margin-right: 0 !important;

+ 51 - 32
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -120,7 +120,7 @@
                                     draggable=".taskCard">
                                         
                                         <!--头部显示阶段名称,操作 -->
-                                        <div slot="header" style="margin:10px 0px;cursor:move;" role="task">
+                                        <div slot="header" style="margin:10px 0px;cursor:move;width:300px" role="task">
                                             <span class="stage">{{stage.stagesName}}</span><span style="margin-left:10px;color:#303133;font-size:12px;">{{stage.taskList.length}}</span>
                                             <!-- <i class="el-icon-more" style="float:right;"></i> -->
                                             <el-dropdown trigger="click" style="float:right;cursor:pointer;">
@@ -137,37 +137,40 @@
                                                     </el-dropdown-menu>
                                             </el-dropdown>
                                         </div>
-                                        <div v-for="element in stage.taskList" :id="element.id" :key="element.id" class="taskCard" ref="tasks" @click="editTask(element)" :style="element.taskStatus==0?'':'background:#eFeFeF;'">
-                                            <!--任务卡片内容显示 -->
-                                            <div>
-                                                <div v-if="element.taskLevel == 2" class="taskImg hong"><img src="../../assets/image/hong.png" alt=""></div>
-                                                <div v-if="element.taskLevel == 1" class="taskImg huang"><img src="../../assets/image/huang.png" alt=""></div>
-                                                <div v-if="element.taskLevel == 0" class="taskImg hui"><img src="../../assets/image/hui.png" alt=""></div>
-                                                <el-checkbox :disabled="element.taskStatus==2 || element.subTaskList.length > element.subTaskFinishNum" :checked="element.taskStatus==1?true:false" size="large" class="cb"  
-                                                @change="finishTask(element)"
-                                                @click.stop.native=""
-                                                ></el-checkbox>
-                                                <el-tooltip class="item" effect="dark" :content="element.name" placement="top">
-                                                <label class="task_name" :style="'background:'+(element.taskStatus==0?'#ffffff;':'#eFeFeF;')"><span>{{element.name}}</span></label>
-                                                </el-tooltip>
-                                                <i :class="taskTypeIcon[element.taskType]" :style="'float:right;color:'+taskTypeColor[element.taskType]+';margin-right:8px;margin-top:8px;'" ></i>
+
+                                        <div class="taskListin" :style="'max-height:' + taskListinH + 'px;'">
+                                            <div v-for="element in stage.taskList" :id="element.id" :key="element.id" class="taskCard" ref="tasks" @click="editTask(element)" :style="element.taskStatus==0?'':'background:#eFeFeF;'">
+                                                <!--任务卡片内容显示 -->
+                                                <div>
+                                                    <div v-if="element.taskLevel == 2" class="taskImg hong"><img src="../../assets/image/hong.png" alt=""></div>
+                                                    <div v-if="element.taskLevel == 1" class="taskImg huang"><img src="../../assets/image/huang.png" alt=""></div>
+                                                    <div v-if="element.taskLevel == 0" class="taskImg hui"><img src="../../assets/image/hui.png" alt=""></div>
+                                                    <el-checkbox :disabled="element.taskStatus==2 || element.subTaskList.length > element.subTaskFinishNum" :checked="element.taskStatus==1?true:false" size="large" class="cb"  
+                                                    @change="finishTask(element)"
+                                                    @click.stop.native=""
+                                                    ></el-checkbox>
+                                                    <el-tooltip class="item" effect="dark" :content="element.name" placement="top">
+                                                    <label class="task_name" :style="'background:'+(element.taskStatus==0?'#ffffff;':'#eFeFeF;')"><span>{{element.name}}</span></label>
+                                                    </el-tooltip>
+                                                    <i :class="taskTypeIcon[element.taskType]" :style="'float:right;color:'+taskTypeColor[element.taskType]+';margin-right:8px;margin-top:8px;'" ></i>
+                                                    </div>
+                                                <div style="margin: 10px 0px;color:#666;" @click="timess(element.endDate)">
+                                                    <span v-if="element.endDate >= times || element.taskStatus == 1"><i v-if="element.endDate != null" class="el-icon-date">&nbsp;&nbsp;{{element.endDate}}</i></span>
+                                                    <span v-else><em v-if="element.endDate != null" style="display: inline-block;padding:3px 5px"><i v-if="element.endDate != null" class="el-icon-date"><span  class="element_span"> &nbsp;&nbsp;{{element.endDate}} 截止</span></i></em></span>
+                                                    <span v-if="element.executorName">
+                                                    <span v-for="(exeItem, exeIndex) in element.executorName.split(',')" :key="exeIndex" :style="'background:'+element.executorColor.split(',')[exeIndex]" class="user_name_icon">{{exeItem.length>2?exeItem.substring(exeItem.length-2, exeItem.length):exeItem}}</span>
+                                                    </span>
+                                                    <el-button v-if="!element.executorName" type="primary" @click.stop.native="addAsMyTask(element)" size="mini" style="float:right;width:38px;padding:5px;position: absolute;z-index: 5;right: 5px;">认领</el-button>
+                                                </div>
+                                                <!--子任务 -->
+                                                <div v-if="element.subTaskList.length > 0">
+                                                    <el-tooltip class="item" effect="dark" content="查看子任务" placement="top">
+                                                    <el-link class="sub_task_num" @click.stop.native="showSubTaskList(element)"><i class="iconfont firerock-icontree" ></i><span style="margin-left:5px;">{{element.subTaskFinishNum}}/{{element.subTaskList.length}}</span></el-link>
+                                                    </el-tooltip>
                                                 </div>
-                                            <div style="margin: 10px 0px;color:#666;" @click="timess(element.endDate)">
-                                                <span v-if="element.endDate >= times || element.taskStatus == 1"><i v-if="element.endDate != null" class="el-icon-date">&nbsp;&nbsp;{{element.endDate}}</i></span>
-                                                <span v-else><em v-if="element.endDate != null" style="display: inline-block;padding:3px 5px"><i v-if="element.endDate != null" class="el-icon-date"><span  class="element_span"> &nbsp;&nbsp;{{element.endDate}} 截止</span></i></em></span>
-                                                <span v-if="element.executorName">
-                                                <span v-for="(exeItem, exeIndex) in element.executorName.split(',')" :key="exeIndex" :style="'background:'+element.executorColor.split(',')[exeIndex]" class="user_name_icon">{{exeItem.length>2?exeItem.substring(exeItem.length-2, exeItem.length):exeItem}}</span>
-                                                </span>
-                                                <el-button v-if="!element.executorName" type="primary" @click.stop.native="addAsMyTask(element)" size="mini" style="float:right;width:38px;padding:5px;position: absolute;z-index: 5;right: 5px;">认领</el-button>
-                                            </div>
-                                            <!--子任务 -->
-                                            <div v-if="element.subTaskList.length > 0">
-                                                <el-tooltip class="item" effect="dark" content="查看子任务" placement="top">
-                                                <el-link class="sub_task_num" @click.stop.native="showSubTaskList(element)"><i class="iconfont firerock-icontree" ></i><span style="margin-left:5px;">{{element.subTaskFinishNum}}/{{element.subTaskList.length}}</span></el-link>
-                                                </el-tooltip>
                                             </div>
                                         </div>
-                                        <el-button slot="footer" role="people" @click="addTask(stage)" style="width:100%;" size="small" icon="el-icon-plus"></el-button>
+                                        <el-button slot="footer" role="people" @click="addTask(stage)" style="width:300px;" size="small" icon="el-icon-plus"></el-button>
                                     </draggable>
                                 </v-flex>
                             <!-- </transition-group > -->
@@ -658,7 +661,7 @@
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="exportTask" style="width:100%;" >导出</el-button>
+                <el-button type="primary" @click="exportTask" style="width:100%;" :loading="loadingExport">导出</el-button>
             </div>
         </el-dialog>
 
@@ -677,7 +680,7 @@
             </el-form>
             <div slot="footer" class="dialog-footer">
                 <el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
-                        <el-button type="primary" :underline="false" style="width:100%;">上传文件</el-button>
+                        <el-button type="primary" :underline="false" style="width:100%;" :loading="loadingExport">上传文件</el-button>
                 </el-upload>
             </div>
         </el-dialog>
@@ -717,6 +720,7 @@
         
         data() {
             return {
+                loadingExport : false,
                 saveTemplateLoading: false,
                 joinMembList:[],
                 setInchargerDialog: false,
@@ -748,6 +752,7 @@
                 //优先级
                 taskLevelColor:['#262626','#E6A23C','#F56C6C'],
                 stageListHeight:0,
+                taskListinH:0,
                 groupWidth:260,
                 drag: false,
                 stageDrag: false,
@@ -938,9 +943,11 @@
             // 批量导入人员
             importTask(item) {
                 //首先判断文件类型
+                this.loadingExport = true
                 let str = item.file.name.split(".");
                 let format = str[str.length - 1];
                 if (format != "xls" && format != "xlsx") {
+                    this.loadingExport = false
                     this.$message({
                         message: "请选择.xls或.xlsx文件",
                         type: "error"
@@ -956,6 +963,7 @@
                     res => {
                         this.$refs.upload.clearFiles();
                         this.listLoading = false;
+                        this.loadingExport = false
                         if (res.code == "ok") {
                             this.$message({
                                 message: "导入成功",
@@ -974,6 +982,7 @@
                     error => {
                         this.$refs.upload.clearFiles();
                         this.listLoading = false;
+                        this.loadingExport = false
                         this.$message({
                             message: error,
                             type: "error"
@@ -1061,8 +1070,10 @@
             },
             exportTask() {
                 let _this = this;
+                this.loadingExport = true
                 this.http.post('/task/exportTask', {projectId: this.curProjectId, taskType: this.exportTaskType},
                 res => {
+                    this.loadingExport = false
                     if (res.code == "ok") {
                         location.href = res.data;
                     } else {
@@ -2177,10 +2188,12 @@
             let height = window.innerHeight;
             this.tableHeight = height - 135;
             this.stageListHeight = this.tableHeight - 45;
+            this.taskListinH = this.stageListHeight - 75;
             const that = this;
             window.onresize = function temp() {
                 that.tableHeight = window.innerHeight - 135;
                 that.stageListHeight = that.tableHeight - 45;
+                that.taskListinH = that.stageListHeight - 75;
             };
         },
         mounted() {
@@ -2208,10 +2221,15 @@
     margin:10px;
     display:inline-block;
     vertical-align:top;
+    width: 331px;
 }
 .taskList {
     padding:7px;
-    width:300px;
+    width:331px;
+}
+.taskListin{
+    width: 317px;
+    overflow: auto;
 }
 
 .taskList .stage {
@@ -2234,6 +2252,7 @@ overflow: auto;
     position: relative;
     border-radius: 3px;
     overflow: hidden;
+    width: 288px;
 }
 
 .taskImg {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/quanx/quanx.vue

@@ -49,7 +49,7 @@
             ></el-pagination>
         </el-col> -->
         <!-- 分配权限弹窗 -->
-        <el-dialog :title="'分配权限 - '+roleName" :visible.sync="dialogVisible" width="600" :before-close="handleClose">
+        <el-dialog :title="'分配权限 - '+roleName" :visible.sync="dialogVisible" width="764px" :before-close="handleClose">
             <div class="quanxians">
                 <!-- <el-input placeholder="输入关键字进行过滤" v-model="filterText"></el-input> -->
                 <!-- <el-tree :data="data" show-checkbox node-key="id" :filter-node-method="filterNode" ref="tree" :default-expanded-keys="[2, 3]" :default-checked-keys="[5]" :props="defaultProps"> </el-tree> -->

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

@@ -19,8 +19,8 @@
                          <el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini"  @click="showWorkTime"></el-button>
                     </div> -->
                         <span v-for="(item,index) in allDate" :id="'day'+index" :class="index==choseDay?'chooseDate date_item':'date_item'" 
-                        @click="choseDate(index, item)" :key="index" style="padding:0 6px;">
-                        <div :style="'display:inline-block;'+(item.state == null?'padding:0px 6px;':'')" >
+                        @click="choseDate(index, item)" :key="index" style="padding:0 6px;display: inline-block;width: 46px;text-align: center;">
+                        <div :style="'display:inline-block;text-align: center;'+(item.state == null?'':'')" >
                             <div style="text-align:center;position:relative;"><span>{{item.showDate}}</span>
                             <br>
                             <span style="font-size:10px;text-align:center;color:#999;">{{item.weekDay}}</span>

+ 0 - 2
fhKeeper/formulahousekeeper/timesheet_h5/public/index.html

@@ -13,8 +13,6 @@
     <!-- <script src="../src/assets/axios.min.js"></script> -->
     <!-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
     <script src="./axios.min.js"></script> 
-
-    <meta name="wpk-bid" content="dta_2_71020"> <script>    !(function(c,i,e,b){var h=i.createElement("script");var f=i.getElementsByTagName("script")[0];h.type="text/javascript";h.crossorigin=true;h.onload=function(){c[b]||(c[b]=new c.wpkReporter({bid:"dta_2_71020"}));c[b].installAll()};f.parentNode.insertBefore(h,f);h.src=e})(window,document,"https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js","__wpk");</script>
     <meta name="wpk-bid" content="dta_2_71020"> <script>    !(function(c,i,e,b){var h=i.createElement("script");var f=i.getElementsByTagName("script")[0];h.type="text/javascript";h.crossorigin=true;h.onload=function(){c[b]||(c[b]=new c.wpkReporter({bid:"dta_2_71020"}));c[b].installAll()};f.parentNode.insertBefore(h,f);h.src=e})(window,document,"https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js","__wpk");</script>
     <script>
         function IsPC() { 

+ 16 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/router/index.js

@@ -165,6 +165,22 @@ const router = new Router({
   ]
 });
 
+// 解决编程式路由往同一地址跳转时会报错的情况
+const originalPush = Router.prototype.push;
+const originalReplace = Router.prototype.replace;
+
+Router.prototype.push = function push(location, onResolve, onReject) {
+  if (onResolve || onReject)
+    return originalPush.call(this, location, onResolve, onReject);
+  return originalPush.call(this, location).catch(err => err);
+};
+
+Router.prototype.replace = function push(location, onResolve, onReject) {
+  if (onResolve || onReject)
+    return originalReplace.call(this, location, onResolve, onReject);
+  return originalReplace.call(this, location).catch(err => err);
+};
+
 router.beforeEach((to, from, next) => {
     let { title, needLogin } = to.meta;
     let { isLogin } = store.state;

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue

@@ -44,7 +44,7 @@
                 this.$axios.post("/user/loginAdmin", this.form)
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success('登录成功');
                         let user = res.data;
                         this.$store.commit("updateLogin", true);
@@ -54,10 +54,10 @@
                         //强制刷新,避免index页面中的mounted不执行
                         window.location.reload();
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail(res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
             
             jumpTo() {
@@ -78,7 +78,7 @@
                                 } else {
                                     this.$toast.fail(res.msg);
                                 }
-                            }).catch(err=> {toast.clear();});
+                            }).catch(err=> {this.$toast.clear();});
             },
             bindIfNessary() {
                 let href = window.location.href;

+ 2 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue

@@ -56,16 +56,14 @@
                 this.$router.push("/login");
             },
             bindWeiXin(){
-                var ua = navigator.userAgent.toLowerCase();
                 //企业微信
-                if (ua.indexOf("wxwork") > 0 && this.userInfo.corpwxUserid != null) {
+                if (this.isCorpWX && this.userInfo.corpwxUserid != null) {
                     return;
                 }
                 //微信
-                if (ua.indexOf("micromessenger") > 0 && this.userInfo.wxOpenid != null) {
+                else if (this.isWX && this.userInfo.wxOpenid != null) {
                     return;
                 }
-
                 var appId = "wx749c84daac654e1e";//工时管家公众号
                 if (this.isCorpWX) {
                     appId = "ww4e237fd6abb635af"; //企业微信第三方的SUIT ID

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

@@ -3,7 +3,7 @@
         <van-nav-bar title="项目管理" left-text="返回" @click-left="back" :right-text="projectAdd?'新增项目':''" @click-right="openDialog(-1)" fixed left-arrow/>
         
         <div class="login_form">
-            <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
+            <!-- <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
                 <van-list v-model="loading" :finished="finished" finished-text="没有更多了" :error.sync="error" error-text="请求失败,点击重新加载" @load="getProject">
                     <van-swipe-cell v-for="(item,index) in list" :key="index">
                         <van-cell :border="false" :title="item.projectName" :value="item.projectCode"/>
@@ -13,6 +13,17 @@
                         </template>
                     </van-swipe-cell> 
                 </van-list>
+            </van-pull-refresh> -->
+            <van-pull-refresh v-model="isDownLoading" @refresh="onDownRefresh">
+                <van-list v-model="isUpLoading" :finished="upFinished" :immediate-check="false" :offset="10" finished-text="我是有底线的" @load="onLoadList">
+                    <van-swipe-cell v-for="(item,index) in list" :key="index">
+                        <van-cell :border="false" :title="item.projectName" :value="item.projectCode"/>
+                        <template slot="right" v-if="projectManagement || item.creatorId == user.id">
+                            <van-button square type="info" text="编辑" @click="openDialog(index)"/>
+                            <van-button square type="danger" text="删除" @click="delPro(index)"/>
+                        </template>
+                    </van-swipe-cell> 
+                </van-list>
             </van-pull-refresh>
 
             <van-dialog v-model="show" :title="title" show-cancel-button :beforeClose="chargeBtn">
@@ -79,6 +90,13 @@
                 ause: [],
                 projectAdd: false, // 新增项目
                 projectManagement: false, // 管理项目
+                 isDownLoading: false, // 下拉刷新
+                isUpLoading: false, // 上拉加载
+                upFinished: false, // 上拉加载完毕
+                offset: 100, // 滚动条与底部距离小于 offset 时触发load事件
+                pageSize: 25, // 每页条数
+                pageIndex: 1, // 页码
+                dpp: false,
             };
         },
         created() {
@@ -103,7 +121,7 @@
                     } else {
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {});
+                }).catch(err=> {toast.clear();});
             },
             choseIncharger(value, index) {
                 this.showPickerIncharger = false;
@@ -196,40 +214,96 @@
                     } else {
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {});
+                }).catch(err=> {toast.clear();});
             },
 
             // 获取项目
             getProject() {
-                if (this.refreshing) {
-                    this.list = [];
-                    this.refreshing = false;
-                }
-                if(this.total == this.list.length && this.list.length != 0) {
-                    this.loading = false;
-                    this.finished = true;
-                    return false;
-                }
+                // if (this.refreshing) {
+                //     this.list = [];
+                //     this.refreshing = false;
+                // }
+                // if(this.total == this.list.length && this.list.length != 0) {
+                //     this.loading = false;
+                //     this.finished = true;
+                //     return false;
+                // }
+                // this.$axios.post("/project/getProjectPage", {
+                //     pageIndex: this.page,
+                //     pageSize: this.size,
+                // })
+                // .then(res => {
+                //     if(res.code == "ok") {
+                //         this.loading = false;
+                //         if (this.list.length == 0) {
+                //             this.finished = true;
+                //         }
+                //         this.list = [];
+                //         for(var i in res.data.records) {
+                //             this.list.push(res.data.records[i])
+                //         }
+                //         this.total = res.data.total;
+                //         this.page++;
+                //     } else {
+                //         this.$toast.fail('获取失败:'+res.msg);
+                //     }
+                // }).catch(err=> {toast.clear();});
+
                 this.$axios.post("/project/getProjectPage", {
-                    pageIndex: this.page,
-                    pageSize: this.size,
+                    pageIndex: this.pageIndex,
+                    pageSize: this.pageSize,
                 })
                 .then(res => {
                     if(res.code == "ok") {
-                        this.loading = false;
-                        if (this.list.length == 0) {
-                            this.finished = true;
-                        }
-                        this.list = [];
-                        for(var i in res.data.records) {
-                            this.list.push(res.data.records[i])
+                        this.isDownLoading = false
+                        this.isUpLoading = false
+                        this.total = res.data.total
+                        var datas = res.data.records
+                        if(res.data.records.length <= 0) {
+                            this.total = 0,
+                            this.list = []
+                            this.$toast('已全部加载完成');
+                            return
+                        } else {
+                            console.log(this.dpp)
+                            if(this.dpp) this.list = []
+                            if(this.list.length == 0) {
+                                this.list = datas
+                            } else {
+                                for(var i in datas) {
+                                    this.list.push(datas[i])
+                                }
+                            }
                         }
-                        this.total = res.data.total;
-                        this.page++;
                     } else {
-                        this.$toast.fail('获取失败:'+res.msg);
+                        this.$toast.fail('获取失败');
+                        this.isDownLoading = false
+                        this.isUpLoading = false
                     }
-                }).catch(err=> {});
+                }).catch(err=> {
+                    toast.clear();
+                    this.isDownLoading = false
+                    this.isUpLoading = false
+                });
+            },
+            onDownRefresh() {
+                console.log(123)
+                this.dpp = true
+                this.pageIndex = 1
+                this.upFinished = false // 不写这句会导致你上拉到底过后在下拉刷新将不能触发下拉加载事件
+                this.getProject()
+            },
+            onLoadList() {
+                console.log('出发没')
+                if(this.total <= this.list.length) {
+                    this.$toast('已全部加载完成');
+                    this.upFinished = false
+                    this.isUpLoading = false
+                    return
+                }
+                this.pageIndex = +this.pageIndex + 1
+                this.dpp = false
+                this.getProject()
             },
 
             onRefresh() {
@@ -389,6 +463,7 @@
         mounted() {
             this.getUsers();
             this.yanjiuzx()
+            this.getProject()
             // this.canEdit = (this.user.role==1||this.user.role==2||this.user.role==5);
             var list = this.user.functionList
             for(var i in list) {