Kaynağa Gözat

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

Lijy 2 yıl önce
ebeveyn
işleme
34a8534da5
34 değiştirilmiş dosya ile 19493 ekleme ve 57 silme
  1. 50 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/config/WebMvcConfig.java
  2. 21 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/LocaleInformationController.java
  3. 12 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  4. 5 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  5. 25 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskGroupController.java
  6. 4 7
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java
  7. 8 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Company.java
  8. 41 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/LocaleInformation.java
  9. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/LocaleInformationMapper.java
  10. 8 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ReportMapper.java
  11. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/LocaleInformationService.java
  12. 2 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ReportService.java
  13. 8 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java
  14. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/LocaleInformationServiceImpl.java
  15. 122 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  16. 7 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  17. 26 8
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java
  18. 106 15
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/ExcelUtil.java
  19. 24 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/MessageUtils.java
  20. 146 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/SpringUtils.java
  21. 27 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/TimeZoneUtil.java
  22. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/WorkDayCalculateUtils.java
  23. 5 3
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml
  24. 7 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages.properties
  25. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_en_US.properties
  26. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_zh_CN.properties
  27. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CompanyMapper.xml
  28. 17 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/LocaleInformationMapper.xml
  29. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml
  30. 33 10
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml
  31. 8529 0
      fhKeeper/formulahousekeeper/management-platform/workTime.2022-09-13.log
  32. 10200 0
      fhKeeper/formulahousekeeper/management-platform/workTime.log
  33. BIN
      fhKeeper/formulahousekeeper/management-platform/项目导入模板.xlsx
  34. 2 1
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

+ 50 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/config/WebMvcConfig.java

@@ -0,0 +1,50 @@
+package com.management.platform.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.LocaleResolver;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.i18n.CookieLocaleResolver;
+import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
+
+import java.util.Locale;
+
+@Configuration
+public class WebMvcConfig implements WebMvcConfigurer {
+
+    /**
+     * 国际化配置
+     */
+    @Bean
+    public LocaleResolver localeResolver(){
+//		SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
+//		sessionLocaleResolver.setDefaultLocale(Locale.SIMPLIFIED_CHINESE);
+//		return sessionLocaleResolver;
+        //使用CookieLocaleResolver,也可使用SessionLocaleResolver,区别在于一个使用Cookie存储Locale信息,一个使用Session
+        CookieLocaleResolver localeResolver = new CookieLocaleResolver();
+        localeResolver.setCookieName("localeCookie");
+        //设置默认区域
+        localeResolver.setDefaultLocale(Locale.SIMPLIFIED_CHINESE);
+        localeResolver.setCookieMaxAge(3600);//设置cookie有效期.
+        return localeResolver;
+    }
+
+    /**
+     *
+     * 添加Locale 拦截器,从请求参数lang中获取参数值,这样我们可以通过lang RequestParam来切换Locale信息
+     */
+    @Bean
+    public LocaleChangeInterceptor localeChangeInterceptor(){
+        LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
+        localeChangeInterceptor.setParamName("lang");
+        return localeChangeInterceptor;
+    }
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        //添加locale拦截器
+        registry.addInterceptor(localeChangeInterceptor());
+    }
+
+}
+

+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/LocaleInformationController.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-09-15
+ */
+@RestController
+@RequestMapping("/locale-information")
+public class LocaleInformationController {
+
+}
+

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

@@ -1036,6 +1036,14 @@ public class ReportController {
                 e.printStackTrace();
             }
         }
+        //锁定工作时长的情况下, 如果当前是非工作日,要自动变成加班时长
+        if (comTimeType.getLockWorktime() == 1) {
+            if (!WorkDayCalculateUtils.isWorkDay(report.getCreateDate())) {
+                report.setIsOvertime(1);
+                report.setOvertimeHours(report.getWorkingTime());
+            }
+        }
+
         //如果设置了加班有工资并且当前存在加班的勾选,需要计算一下
         if (report.getIsOvertime() != null && report.getIsOvertime() == 1 && comTimeType.getPayOvertime()) {
             BigDecimal overtimeCost = hourCost.multiply(new BigDecimal(report.getOvertimeHours())).multiply(new BigDecimal(comTimeType.getOvertimeRatio()));
@@ -1319,5 +1327,9 @@ public class ReportController {
         return msg;
     }
 
+    @GetMapping("/getProcessErrorData")
+    public HttpRespMsg getProcessErrorData() {
+        return reportService.getProcessErrorData();
+    }
 }
 

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

@@ -301,9 +301,13 @@ public class TaskController {
         if (task.getTaskStatus() == 0) {
             task.setTaskStatus(1);
             isFinishTask = true;
-            task.setFinishDate(LocalDate.now());
             //计算排序,需要移动到最后
             Task old = taskService.getById(task.getId());
+            if (old.getFinishDate() == null) {
+                //仅对没有完成日期的任务设置完成日期
+                task.setFinishDate(LocalDate.now());
+            }
+
             if (task.getParentTid() == null) {
                 QueryWrapper<Task> queryWrapper = new QueryWrapper<>();
                 queryWrapper.eq("stages_id", old.getStagesId()).isNull("parent_tid").orderByDesc("seq").last("limit 1");

+ 25 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskGroupController.java

@@ -14,6 +14,7 @@ import com.management.platform.service.TaskService;
 import com.management.platform.util.HttpRespMsg;
 import org.springframework.util.StringUtils;
 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;
@@ -60,6 +61,28 @@ public class TaskGroupController {
     @RequestMapping("/save")
     public HttpRespMsg save(TaskGroup item) {
         HttpRespMsg msg = new HttpRespMsg();
+        String token = request.getHeader("TOKEN");
+        User user = userMapper.selectById(token);
+        //全公司唯一的分组编码
+        if (!StringUtils.isEmpty(item.getTaskGroupCode())) {
+            boolean hasSameGroupCode = false;
+            List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().select("id").eq("company_id", user.getCompanyId()));
+            List<Integer> collect = projectList.stream().map(Project::getId).collect(Collectors.toList());
+            if (item.getId() == null) {
+                item.setNew(true);
+                int cnt = taskGroupService.count(new QueryWrapper<TaskGroup>().eq("task_group_code", item.getTaskGroupCode()).in("project_id", collect));
+                hasSameGroupCode = cnt>0;
+            } else {
+                int cnt = taskGroupService.count(new QueryWrapper<TaskGroup>()
+                        .in("project_id", collect).eq("task_group_code", item.getTaskGroupCode())
+                        .ne("id", item.getId()));
+                hasSameGroupCode = cnt>0;
+            }
+            if (hasSameGroupCode) {
+                msg.setError("分组存在重名");
+                return msg;
+            }
+        }
         boolean hasSameName = false;
         if (item.getId() == null) {
             item.setNew(true);
@@ -126,7 +149,7 @@ public class TaskGroupController {
      * @return
      */
     @RequestMapping("/listMyJoinGroup")
-    public HttpRespMsg listMyJoinGroup(TaskGroup item) {
+    public HttpRespMsg listMyJoinGroup(TaskGroup item, @RequestParam(required = false, defaultValue = "0") Integer isSubstitude) {
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         Integer projectId = item.getProjectId();
@@ -134,7 +157,7 @@ public class TaskGroupController {
         QueryWrapper<TaskGroup> queryWrapper = new QueryWrapper<TaskGroup>();
         queryWrapper.eq("project_id", projectId);
         TimeType timeType = timeTypeMapper.selectById(project.getCompanyId());
-        if (timeType.getReportAuditType() == 0) {
+        if (timeType.getReportAuditType() == 0 || isSubstitude == 1) {
             msg.data = taskGroupService.list(queryWrapper);
         } else {
             List<GroupParticipator> groupParticipatorList = groupParticipatorMapper.selectList(new QueryWrapper<GroupParticipator>().eq("user_id", token));

+ 4 - 7
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -370,7 +370,7 @@ public class WeiXinCorpController {
                     String corpId = jsonObject.getString("AuthCorpId");
                     String corpWxUserId = jsonObject.getString("UserID");
                     WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
-                    if (!StringUtils.isEmpty(wxCorpInfo.getContactSecret())) {
+                    if (!StringUtils.isEmpty(wxCorpInfo.getContactSecret()) && !StringUtils.isEmpty(wxCorpInfo.getContactSecret())) {
                         Integer companyId = wxCorpInfo.getCompanyId();
                         SysRole defaultRole = sysRoleMapper.selectOne(new QueryWrapper<SysRole>().eq("company_id", companyId).eq("is_default", 1));
                         //通过通讯录secret获取到员工姓名
@@ -416,7 +416,7 @@ public class WeiXinCorpController {
                     WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
                     Integer companyId = wxCorpInfo.getCompanyId();
                     //只有授权通讯录同步的,才有机会更新部门或者上级
-                    if (!StringUtils.isEmpty(wxCorpInfo.getContactSecret())) {
+                    if (!StringUtils.isEmpty(wxCorpInfo.getContactSecret()) && !StringUtils.isEmpty(wxCorpInfo.getContactSecret())) {
                         String remoteCorpConcactAccessToken = getRemoteCorpConcactAccessToken(wxCorpInfo);
                         String curCorpAccessToken = getCorpAccessToken(wxCorpInfo);
                         Integer curUserWXDeptid = 0;
@@ -476,7 +476,7 @@ public class WeiXinCorpController {
                     Integer deptId = jsonObject.getInt("Id");
                     Integer parentDeptId = jsonObject.getInt("ParentId");
                     WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
-                    if (wxCorpInfo != null && !StringUtils.isEmpty(wxCorpInfo.getContactSecret())) {
+                    if (wxCorpInfo != null && !StringUtils.isEmpty(wxCorpInfo.getContactSecret()) && !StringUtils.isEmpty(wxCorpInfo.getContactSecret())) {
                         String remoteCorpConcactAccessToken = getRemoteCorpConcactAccessToken(wxCorpInfo);
                         Integer companyId = wxCorpInfo.getCompanyId();
                         Department department = new Department();
@@ -501,7 +501,7 @@ public class WeiXinCorpController {
                     Integer deptId = jsonObject.getInt("Id");
                     Integer parentDeptId = jsonObject.getInt("ParentId");
                     WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
-                    if (wxCorpInfo != null && !StringUtils.isEmpty(wxCorpInfo.getContactSecret())) {
+                    if (wxCorpInfo != null && !StringUtils.isEmpty(wxCorpInfo.getContactSecret()) && !StringUtils.isEmpty(wxCorpInfo.getContactSecret())) {
                         if (parentDeptId != null) {
                             //发生父部门的结构变化了
                             Department department = departmentMapper.selectOne(new QueryWrapper<Department>().eq("company_id", wxCorpInfo.getCompanyId()).eq("corpwx_deptid", deptId));
@@ -531,13 +531,10 @@ public class WeiXinCorpController {
                                 System.err.println("同步获取部门详情报错:"+resultObj.toString());
                             }
                         }
-
                     }
-
                 }
             }
         } catch (Exception e) {
-            // TODO
             // 解密失败,失败原因请查看异常
             e.printStackTrace();
         }

+ 8 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Company.java

@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2022-07-07
+ * @since 2022-09-15
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -50,7 +50,7 @@ public class Company extends Model<Company> {
     private LocalDateTime expirationDate;
 
     /**
-     * 选择的套餐(单位:/年)
+     * 是否签约
      */
     @TableField("set_meal")
     private Integer setMeal;
@@ -115,13 +115,18 @@ public class Company extends Model<Company> {
     @TableField("package_finance")
     private Integer packageFinance;
 
-
     /**
      * 供应商模块
      */
     @TableField("package_provider")
     private Integer packageProvider;
 
+    /**
+     * 是否是国际化版本
+     */
+    @TableField("is_international")
+    private Integer isInternational;
+
 
     @Override
     protected Serializable pkVal() {

+ 41 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/LocaleInformation.java

@@ -0,0 +1,41 @@
+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-09-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class LocaleInformation extends Model<LocaleInformation> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId("company_id")
+    private Integer companyId;
+
+    @TableField("language")
+    private String language;
+
+    @TableField("timezone")
+    private String timezone;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.companyId;
+    }
+
+}

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

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

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

@@ -137,5 +137,12 @@ public interface ReportMapper extends BaseMapper<Report> {
             "AND EXISTS(SELECT 1 FROM report r WHERE report.`creator_id` = r.creator_id AND report.`create_date` = r.create_date AND report.id <> r.id AND r.state = 0)\n" +
             "AND report.audit_dept_managerid IS NULL AND report.`company_id` = #{companyId}\n")
     List<Map<String, Object>> getErrorData(Integer companyId);
-
+    //获取审批流程中卡住的数据,项目审核过了,但是没有进入到部门审核,也没最终审核
+    @Select("SELECT report.id, user.name, create_date, creator_id, state, report.create_time, project_audit_time,u.name AS auditorName FROM report\n" +
+            "LEFT JOIN `user` ON user.id = report.`creator_id` \n" +
+            "LEFT JOIN `user` u ON u.id = report.`project_auditor_id`\n" +
+            "WHERE state = 0 AND project_audit_state = 1 AND is_dept_audit=0 AND is_final_audit=0 \n" +
+            "AND NOT EXISTS(SELECT 1 FROM report r WHERE r.id <> report.id AND r.`creator_id` = report.`creator_id` AND r.`create_date` = report.`create_date` AND r.project_audit_state = 0)\n" +
+            "AND EXISTS (SELECT 1 FROM report r WHERE r.id <> report.id AND r.`creator_id` = report.`creator_id` AND r.`create_date` = report.`create_date`)\n")
+    List<Map<String, Object>> getProcessErrorData();
 }

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

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

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ReportService.java

@@ -90,4 +90,6 @@ public interface ReportService extends IService<Report> {
     HttpRespMsg getWeeklyCardTime(String dateStr, HttpServletRequest request);
 
     HttpRespMsg getWeeklyWorkTime(String dateStr, HttpServletRequest request);
+
+    HttpRespMsg getProcessErrorData();
 }

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

@@ -578,6 +578,14 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
                         List<Integer> otherCollect = departmentOtherManagerList.stream().distinct().map(dom -> dom.getDepartmentId()).collect(Collectors.toList());
                         collect.addAll(otherCollect);
                         deptIds.addAll(collect);
+                        //获取子部门
+                        List<Department> allDeptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
+                        List<Integer> allSubDepts = new ArrayList<>();
+                        for (Integer deptId : deptIds) {
+                            List<Integer> ids = getBranchDepartment(deptId, allDeptList);
+                            allSubDepts.addAll(ids);
+                        }
+                        deptIds.addAll(allSubDepts);
                     }
                 }
             }

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

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.LocaleInformation;
+import com.management.platform.mapper.LocaleInformationMapper;
+import com.management.platform.service.LocaleInformationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-09-15
+ */
+@Service
+public class LocaleInformationServiceImpl extends ServiceImpl<LocaleInformationMapper, LocaleInformation> implements LocaleInformationService {
+
+}

+ 122 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -2750,11 +2750,130 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             allList.add(sumRow);
             //生成excel文件导出
             String fileName = "加班统计报表_"+System.currentTimeMillis();
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+
+            //按照项目统计
+            List<List<String>> groupByProjectList = new ArrayList<>();
+            headList = new ArrayList<String>();
+            headList.add("序号");
+            headList.add("项目编号");
+            headList.add("项目名称");;
+            headList.add("工作时长(h)");
+            headList.add("加班工时(h)");
+            if (hasViewSalary) {
+                headList.add("加班成本(元)");
+            }
+            groupByProjectList.add(headList);
+            List<Map<String, Object>> byProjectList = new ArrayList<>();
+            for (Map<String, Object> map : list) {
+                Integer curProId = (Integer) map.get("projectId");
+                Optional<Map<String, Object>> find = byProjectList.stream().filter(pro -> pro.get("projectId").equals(curProId)).findFirst();
+                if (find.isPresent()) {
+                    //项目已存储,叠加工时数据
+                    Map oldItem = find.get();
+                    double workingTime = ((Double)map.get("workingTime"));
+                    double overtimeHours = ((Double)map.get("overtimeHours"));
+                    BigDecimal cost = (BigDecimal)map.get("cost");
+                    oldItem.put("workingTime", (Double)oldItem.get("workingTime") + workingTime);
+                    oldItem.put("overtimeHours", (Double)oldItem.get("overtimeHours") + overtimeHours);
+                    oldItem.put("cost", ((BigDecimal)oldItem.get("cost")).add(cost));
+                } else {
+                    Map<String, Object> itemMap = new HashMap<>();
+                    itemMap.putAll(map);
+                    byProjectList.add(itemMap);
+                }
+            }
+            seq = 1;
+            for (Map<String, Object> map : byProjectList) {
+                List<String> rowData = new ArrayList<String>();
+                rowData.add(""+seq);
+                rowData.add((String)map.get("projectCode"));
+                rowData.add((String)map.get("projectName"));
+                rowData.add(((Double)map.get("workingTime")).toString());
+                rowData.add(((Double)map.get("overtimeHours")).toString());
+                if (hasViewSalary) {
+                    rowData.add(((BigDecimal)map.get("cost")).toString());
+                }
+                groupByProjectList.add(rowData);
+                seq++;
+            }
+            //合计
+            List<String> sumRowProject = new ArrayList<String>();
+            sumRowProject.add("合计");
+            sumRowProject.add("");
+            sumRowProject.add("");
+            sumRowProject.add(""+df.format(totalWorkTime));
+            sumRowProject.add(""+df.format(totalCostTime));
+            if (hasViewSalary) {
+                sumRowProject.add(total);
+            }
+            groupByProjectList.add(sumRowProject);
+            //按照人员统计
+            List<List<String>> groupByMembList = new ArrayList<>();
+            headList = new ArrayList<String>();
+            headList.add("序号");
+            headList.add("姓名");
+            headList.add("工作时长(h)");
+            headList.add("加班工时(h)");
+            if (hasViewSalary) {
+                headList.add("加班成本(元)");
+            }
+            groupByMembList.add(headList);
+            List<Map<String, Object>> byMembList = new ArrayList<>();
+            for (Map<String, Object> map : list) {
+                String curUserId = (String) map.get("userId");
+                Optional<Map<String, Object>> find = byMembList.stream().filter(memb -> memb.get("userId").equals(curUserId)).findFirst();
+                if (find.isPresent()) {
+                    //人员已存储,叠加工时数据
+                    Map oldItem = find.get();
+                    double workingTime = ((Double)map.get("workingTime"));
+                    double overtimeHours = ((Double)map.get("overtimeHours"));
+                    BigDecimal cost = (BigDecimal)map.get("cost");
+                    oldItem.put("workingTime", (Double)oldItem.get("workingTime") + workingTime);
+                    oldItem.put("overtimeHours", (Double)oldItem.get("overtimeHours") + overtimeHours);
+                    oldItem.put("cost", ((BigDecimal)oldItem.get("cost")).add(cost));
+                } else {
+                    Map<String, Object> itemMap = new HashMap<>();
+                    itemMap.putAll(map);
+                    byMembList.add(map);
+                }
+            }
+            seq = 1;
+            for (Map<String, Object> map : byMembList) {
+                List<String> rowData = new ArrayList<String>();
+                rowData.add(""+seq);
+                rowData.add((String)map.get("username"));
+                rowData.add(((Double)map.get("workingTime")).toString());
+                rowData.add(((Double)map.get("overtimeHours")).toString());
+                if (hasViewSalary) {
+                    rowData.add(((BigDecimal)map.get("cost")).toString());
+                }
+                groupByMembList.add(rowData);
+                seq++;
+            }
+            //合计
+            List<String> sumRowMemb = new ArrayList<String>();
+            sumRowMemb.add("合计");
+            sumRowMemb.add("");
+            sumRowMemb.add(""+df.format(totalWorkTime));
+            sumRowMemb.add(""+df.format(totalCostTime));
+            if (hasViewSalary) {
+                sumRowMemb.add(total);
+            }
+            groupByMembList.add(sumRowMemb);
+            List[] totalList = new ArrayList[3];
+            totalList[0] = allList;
+            totalList[1] = groupByProjectList;
+            totalList[2] = groupByMembList;
+            String[] sheetNames = new String[3];
+            sheetNames[0] = "加班情况明细表";
+            sheetNames[1] = "按项目统计";
+            sheetNames[2] = "按人员统计";
+            String resp = ExcelUtil.exportMultiSheetGeneralExcelByTitleAndList(fileName , totalList, path, sheetNames);
 
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
-            httpRespMsg.setError("验证失败");
+            httpRespMsg.setError("验证失败"+e.getMessage());
+            e.printStackTrace();
             return httpRespMsg;
         }
         return httpRespMsg;
@@ -2993,7 +3112,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     if (participationList.size() > 0) {
                         //批量保存
                         List<Participation> finalOldPartList = oldPartList;
-                        List<Participation> addPartList = participationList.stream().filter(newP-> finalOldPartList.stream().anyMatch(oldP->oldP.getUserId().equals(newP.getUserId()))).collect(Collectors.toList());
+                        List<Participation> addPartList = participationList.stream().filter(newP-> !finalOldPartList.stream().anyMatch(oldP->oldP.getUserId().equals(newP.getUserId()))).collect(Collectors.toList());
                         if (addPartList.size() > 0) {
                             participationService.saveBatch(addPartList);
                         }

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

@@ -4190,6 +4190,13 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         return msg;
     }
 
+    @Override
+    public HttpRespMsg getProcessErrorData() {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg.data = reportMapper.getProcessErrorData();
+        return msg;
+    }
+
     private void selfUpdateToNextWorkFlow(Integer companyId, User auditTargetUser, List<Integer> targetRids, List<Department> allDepts) {
         List<AuditWorkflowTimeSetting> settings = auditWorkflowTimeSettingMapper.selectList(
                 new QueryWrapper<AuditWorkflowTimeSetting>().eq("company_id", companyId)

+ 26 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -137,6 +137,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     private ExpenseTypeService expenseTypeService;
     @Resource
     private DepartmentOtherManagerMapper departmentOtherManagerMapper;
+    @Resource
+    private LocaleInformationMapper localeInformationMapper;
     //登录网页端
     @Override
     public HttpRespMsg loginAdmin(String username, String password) {
@@ -145,12 +147,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("phone", username));
         if (userList.size() == 0) {
             //未检索到账号时
-            httpRespMsg.setError("账号未注册");
+            String noUser = MessageUtils.message("user.notExists");
+            System.out.println(noUser);
+            httpRespMsg.setError(noUser);
         } else if (userList.size() > 1) {
             //检索到两个及以上账号时
-            httpRespMsg.setError("账号重名");
+            httpRespMsg.setError(MessageUtils.message("user.duplicate"));
         } else if (userList.get(0).getIsActive() == 0) {
-            httpRespMsg.setError("该账户已停用,无法登陆。请联系管理员");
+            httpRespMsg.setError(MessageUtils.message("user.inactive"));
         } else if (MD5Util.getPassword(password).equals(userList.get(0).getPassword())) {
             //查看该公司非会员公司,只能允许试用三天,超时不可登录
             Company company = companyMapper.selectOne(new QueryWrapper<Company>().eq("id", userList.get(0).getCompanyId()));
@@ -159,12 +163,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 if (0 == company.getSetMeal()) {
                     //未办理会员
                     if (company.getExpirationDate().isBefore(LocalDateTime.now())) {
-                        httpRespMsg.setError("账号试用已到期,请联系客服。");
+                        httpRespMsg.setError(MessageUtils.message("user.accountExpired"));
                         return httpRespMsg;
                     }
                 } else {
                     if (company.getExpirationDate().isBefore(LocalDateTime.now())) {
-                        httpRespMsg.setError("账号会员已到期,请联系客服。");
+                        httpRespMsg.setError(MessageUtils.message("user.accountExpired"));
                         return httpRespMsg;
                     }
                 }
@@ -174,7 +178,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
             userVO.setCompany(company);
             BeanUtils.copyProperties(userList.get(0), userVO);
             if (userVO.getRoleId() == null || userVO.getRoleId() == 0) {
-                httpRespMsg.setError("请先联系管理员为您分配角色");
+                httpRespMsg.setError(MessageUtils.message("user.noRole"));
                 return httpRespMsg;
             }
             //还要多返回一个公司名字
@@ -198,7 +202,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 
             httpRespMsg.data = userVO;
         } else {
-            httpRespMsg.setError("密码错误");
+            httpRespMsg.setError(MessageUtils.message("user.pwdError"));
         }
         return httpRespMsg;
     }
@@ -367,7 +371,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user = userMapper.selectById(id);
         if (user == null) {
-            httpRespMsg.setError("未查询到用户信息");
+            httpRespMsg.setError(MessageUtils.message("user.notExists"));
         } else {
             Department dp = departmentMapper.selectById(user.getDepartmentId());
             if (dp != null) {
@@ -450,6 +454,20 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                     u.put("plateMap",map);
                 }
             }
+            if (companyMapper.selectById(companyId).getIsInternational() == 1) {
+                //国际化版本
+                LocaleInformation locale = localeInformationMapper.selectById(companyId);
+                TimeZone curZone = TimeZone.getTimeZone(locale.getTimezone());
+                int offsetSeconds = (curZone.getRawOffset() - TimeZone.getTimeZone("GMT+8").getRawOffset())/1000;
+                //时区转换,默认数据库存的是GMT+8
+                DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm", Locale.CHINA);
+                for (Map user : list) {
+                    String createTime = (String)user.get("createTime");
+                    LocalDateTime time = LocalDateTime.parse(createTime, dtf);
+                    time = time.plusSeconds(offsetSeconds);
+                    user.put("createTime", dtf.format(time));
+                }
+            }
             resultMap.put("records", list);
             resultMap.put("total", total);
             httpRespMsg.data = resultMap;

+ 106 - 15
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/ExcelUtil.java

@@ -154,13 +154,6 @@ public class ExcelUtil {
         String result="系统提示:Excel文件导出成功!";
         String fileName= title+".xls";
         try {
-//            response.reset();
-//            response.setHeader("Content-disposition",
-//                "attachment;filename="+ URLEncoder.encode(fileName, "UTF-8"));
-//            //设置文件头编码格式
-//            response.setContentType("APPLICATION/OCTET-STREAM;charset=UTF-8");//设置类型
-//            response.setHeader("Cache-Control","no-cache");//设置头
-//            response.setDateHeader("Expires", 0);//设置日期头
             // 创建工作簿
             HSSFWorkbook workBook = new HSSFWorkbook();
             // 创建工作类
@@ -280,15 +273,8 @@ public class ExcelUtil {
                     start++;
                 }
             }
-            //用于非传统ajax;
-//            String headStr = "attachment; filename=\"" + fileName + "\"";
-//            response.setContentType("APPLICATION/OCTET-STREAM");//返回格式为流
-//            response.setHeader("Content-Disposition", headStr);
-//            //普通下载不需要以上三行,注掉即可
-//            OutputStream os = response.getOutputStream();//在线下载
             File dir = null;
             dir = new File(downloadPath);
-            // D://cloud/upload 文件上传后所存储的位置,部署到服务器上时配置服务器地址即可
             if (!dir.exists()) {
                 dir.mkdirs();
             }
@@ -301,7 +287,112 @@ public class ExcelUtil {
             e.printStackTrace();
         }
         return "/upload/"+fileName;
-//        return "";
+    }
+
+    public static String exportMultiSheetGeneralExcelByTitleAndList(String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) {
+        String result="系统提示:Excel文件导出成功!";
+        String fileName= title+".xls";
+        try {
+            // 创建工作簿
+            HSSFWorkbook workBook = new HSSFWorkbook();
+            // 创建工作类
+            for (int sheetIndex=0;sheetIndex<multiSheetList.length; sheetIndex++) {
+                HSSFSheet sheetOne = workBook.createSheet();
+                workBook.setSheetName(sheetIndex,sheetsName[sheetIndex]);
+                sheetOne.setDefaultColumnWidth(16);
+
+                //设置字体样式
+                HSSFFont headFont = workBook.createFont();
+                headFont.setBold(true);
+                headFont.setFontHeightInPoints((short) 10);
+                headFont.setFontName("黑体");
+
+                HSSFFont titleFont = workBook.createFont();
+                titleFont.setBold(true);
+                titleFont.setFontHeightInPoints((short) 10);
+                titleFont.setFontName("黑体");
+
+                HSSFFont font = workBook.createFont();
+                font.setFontHeightInPoints((short) 10);
+                font.setFontName("宋体");
+
+                //设置单元格样式
+                CellStyle headStyle = workBook.createCellStyle();
+                headStyle.setFont(headFont);
+                headStyle.setAlignment(HorizontalAlignment.CENTER);
+                headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
+                headStyle.setWrapText(true);
+                headStyle.setBorderBottom(BorderStyle.THIN); //下边框
+                headStyle.setBorderLeft(BorderStyle.THIN);//左边框
+                headStyle.setBorderTop(BorderStyle.THIN);//上边框
+                headStyle.setBorderRight(BorderStyle.THIN);//右边框
+
+                String color = "c0c0c0";    //此处得到的color为16进制的字符串
+                //转为RGB码
+                int r = Integer.parseInt((color.substring(0,2)),16);   //转为16进制
+                int g = Integer.parseInt((color.substring(2,4)),16);
+                int b = Integer.parseInt((color.substring(4,6)),16);
+
+                //自定义cell颜色
+                HSSFPalette palette = workBook.getCustomPalette();
+                //这里的9是索引
+                palette.setColorAtIndex((short)9, (byte) r, (byte) g, (byte) b);
+
+                CellStyle titleStyle = workBook.createCellStyle();
+                titleStyle.setFont(titleFont);
+                titleStyle.setAlignment(HorizontalAlignment.CENTER);
+                titleStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
+                titleStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);  //填充单元格
+                titleStyle.setFillForegroundColor((short)9);    //填色
+                titleStyle.setWrapText(true);
+                titleStyle.setBorderBottom(BorderStyle.THIN); //下边框
+                titleStyle.setBorderLeft(BorderStyle.THIN);//左边框
+                titleStyle.setBorderTop(BorderStyle.THIN);//上边框
+                titleStyle.setBorderRight(BorderStyle.THIN);//右边框
+
+                CellStyle cellStyle = workBook.createCellStyle();
+                cellStyle.setFont(font);
+                cellStyle.setAlignment(HorizontalAlignment.CENTER);
+                cellStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
+                cellStyle.setWrapText(true);
+                cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
+                cellStyle.setBorderLeft(BorderStyle.THIN);//左边框
+                cellStyle.setBorderTop(BorderStyle.THIN);//上边框
+                cellStyle.setBorderRight(BorderStyle.THIN);//右边框
+
+                if(multiSheetList[sheetIndex].size() > 0) {
+                    int start = 0;
+                    for(List<String> rowList : multiSheetList[sheetIndex]) {
+                        HSSFRow row = sheetOne.createRow(start);
+                        row.setHeightInPoints(24);
+                        for(int i = 0; i < rowList.size(); i++) {
+                            HSSFCell cell = row.createCell(i);
+                            if(start == 0) {
+                                cell.setCellStyle(titleStyle);
+                            }else {
+                                cell.setCellStyle(cellStyle);
+                            }
+                            cell.setCellValue(rowList.get(i));
+                        }
+                        start++;
+                    }
+                }
+            }
+
+
+            File dir = new File(downloadPath);
+            if (!dir.exists()) {
+                dir.mkdirs();
+            }
+            FileOutputStream os = new FileOutputStream(downloadPath+fileName);//保存到本地
+            workBook.write(os);
+            os.flush();
+            os.close();
+        }catch(Exception e) {
+            System.out.println(result);
+            e.printStackTrace();
+        }
+        return "/upload/"+fileName;
     }
 
     public static boolean isRowEmpty(Row row){

+ 24 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/MessageUtils.java

@@ -0,0 +1,24 @@
+package com.management.platform.util;
+
+
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
+
+/**
+ * 获取i18n资源文件
+ *
+ */
+public class MessageUtils {
+
+    /**
+     * 根据消息键和参数 获取消息 委托给spring messageSource
+     * @param code 消息键
+     * @param args 参数
+     * @return 获取国际化翻译值
+     */
+    public static String message(String code, Object... args) {
+        MessageSource messageSource = SpringUtils.getBean(MessageSource.class);
+        return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
+    }
+
+}

+ 146 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/SpringUtils.java

@@ -0,0 +1,146 @@
+package com.management.platform.util;
+
+import io.micrometer.core.instrument.util.StringUtils;
+import org.springframework.aop.framework.AopContext;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+/**
+ * spring工具类 方便在非spring管理环境中获取bean
+ *
+ * @author xq0136
+ */
+@Component
+public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationContextAware
+{
+    /** Spring应用上下文环境 */
+    private static ConfigurableListableBeanFactory beanFactory;
+
+    private static ApplicationContext applicationContext;
+
+    @Override
+    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
+    {
+        SpringUtils.beanFactory = beanFactory;
+    }
+
+    @Override
+    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
+    {
+        SpringUtils.applicationContext = applicationContext;
+    }
+
+    /**
+     * 获取对象
+     *
+     * @param name
+     * @return Object 一个以所给名字注册的bean的实例
+     * @throws BeansException
+     *
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T getBean(String name) throws BeansException
+    {
+        return (T) beanFactory.getBean(name);
+    }
+
+    /**
+     * 获取类型为requiredType的对象
+     *
+     * @param clz
+     * @return
+     * @throws BeansException
+     *
+     */
+    public static <T> T getBean(Class<T> clz) throws BeansException
+    {
+        T result = (T) beanFactory.getBean(clz);
+        return result;
+    }
+
+    /**
+     * 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true
+     *
+     * @param name
+     * @return boolean
+     */
+    public static boolean containsBean(String name)
+    {
+        return beanFactory.containsBean(name);
+    }
+
+    /**
+     * 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException)
+     *
+     * @param name
+     * @return boolean
+     * @throws NoSuchBeanDefinitionException
+     *
+     */
+    public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.isSingleton(name);
+    }
+
+    /**
+     * @param name
+     * @return Class 注册对象的类型
+     * @throws NoSuchBeanDefinitionException
+     *
+     */
+    public static Class<?> getType(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.getType(name);
+    }
+
+    /**
+     * 如果给定的bean名字在bean定义中有别名,则返回这些别名
+     *
+     * @param name
+     * @return
+     * @throws NoSuchBeanDefinitionException
+     *
+     */
+    public static String[] getAliases(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.getAliases(name);
+    }
+
+    /**
+     * 获取aop代理对象
+     *
+     * @param invoker
+     * @return
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T getAopProxy(T invoker)
+    {
+        return (T) AopContext.currentProxy();
+    }
+
+    /**
+     * 获取当前的环境配置,无配置返回null
+     *
+     * @return 当前的环境配置
+     */
+    public static String[] getActiveProfiles()
+    {
+        return applicationContext.getEnvironment().getActiveProfiles();
+    }
+
+    /**
+     * 获取当前的环境配置,当有多个环境配置时,只获取第一个
+     *
+     * @return 当前的环境配置
+     */
+    public static String getActiveProfile()
+    {
+        final String[] activeProfiles = getActiveProfiles();
+        return (activeProfiles != null && activeProfiles.length > 0) ? activeProfiles[0] : null;
+    }
+}

+ 27 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/TimeZoneUtil.java

@@ -0,0 +1,27 @@
+package com.management.platform.util;
+
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.TimeZone;
+
+public class TimeZoneUtil {
+
+    public static void main(String[] args) {
+        System.out.println(Arrays.toString(TimeZone.getAvailableIDs()));
+        System.out.println(TimeZone.getDefault());
+        System.out.println(TimeZone.getTimeZone("GMT+08:00"));
+
+        TimeZone timeZone = TimeZone.getTimeZone("Europe/London");
+        System.out.println(1.0*timeZone.getRawOffset()/3600/1000);
+        double timeValue = 1.0*timeZone.getRawOffset()/3600/1000;
+        String hourValue = (timeValue>0?"+":"")+(int)timeValue;
+        int minInt = Math.abs((int)((timeValue - (int)timeValue)*60));
+        String minValue = (minInt<10?"0":"")+minInt;
+        System.out.println("GMT"+hourValue + ":"+ minValue);
+        System.out.println(timeZone.getDisplayName()); // 中国标准时间
+        System.out.println(timeZone.getDisplayName(Locale.ENGLISH)); // China Standard Time
+    }
+}

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/WorkDayCalculateUtils.java

@@ -69,7 +69,7 @@ public class WorkDayCalculateUtils {
                 "2022-04-04","2022-04-05",//清明节
                 "2022-05-02","2022-05-03","2022-05-04",//劳动节
                 "2022-06-03",//端午节
-                "2022-09-20","2022-09-21",//中秋节
+                "2022-09-12",//中秋节
                 "2022-10-01", "2022-10-02","2022-10-03","2022-10-04","2022-10-05","2022-10-06","2022-10-07",//国庆节
         });
         YEAR_DEFINE.put("2022", map2022);

+ 5 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -15,7 +15,7 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://47.101.180.183:3306/man_bk?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
+    url: jdbc:mysql://47.101.180.183:3306/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: HuoshiDB@2022
     hikari:
@@ -47,7 +47,9 @@ spring:
     default-property-inclusion: ALWAYS
     time-zone: GMT+8
     date-format: yyyy-MM-dd HH:mm:ss
-
+  messages:
+    basename: i18n.messages #配置国际化资源文件路径
+    encoding: UTF-8
 ##########日志配置
 logging:
   level:
@@ -129,7 +131,7 @@ referer:
     - mldworktime.ttkuaiban.com
     - gs.farben.com.cn
     - 47.101.180.183
-excludeUrls: /wxcorp/*,/wxcorp/*/*,/dingding/*,/error,/testClient,/corpWXAuth,/wx-corp-info/*,/clean/*,/innerRoles/*,/report/getReportListByToken
+excludeUrls: /wxcorp/*,/wxcorp/*/*,/dingding/*,/error,/testClient,/corpWXAuth,/wx-corp-info/*,/clean/*,/innerRoles/*,/report/getReportListByToken,/report/getProcessErrorData
 
 #企业微信相关参数
 suitId: ww4e237fd6abb635af

+ 7 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages.properties

@@ -0,0 +1,7 @@
+# 用户相关信息
+user.notExists=用户不存在
+user.duplicate=账号重名
+user.inactive=该账户已停用,无法登陆。请联系管理员
+user.accountExpired=账号试用已到期,请联系客服。
+user.noRole=请先联系管理员为您分配角色
+user.pwdError=密码错误

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_en_US.properties

@@ -0,0 +1 @@
+user.notExists=user does not exist

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_zh_CN.properties

@@ -0,0 +1 @@
+user.notExists=用户不存在

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

@@ -20,11 +20,12 @@
         <result column="package_simple" property="packageSimple" />
         <result column="package_finance" property="packageFinance" />
         <result column="package_provider" property="packageProvider" />
+        <result column="is_international" property="isInternational" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, company_name, staff_count_max, expiration_date, set_meal, package_worktime, package_project, package_contract, package_oa, package_etimecard, package_expense, package_customer, package_engineering, package_simple, package_finance, package_provider
+        id, company_name, staff_count_max, expiration_date, set_meal, package_worktime, package_project, package_contract, package_oa, package_etimecard, package_expense, package_customer, package_engineering, package_simple, package_finance, package_provider, is_international
     </sql>
 
 </mapper>

+ 17 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/LocaleInformationMapper.xml

@@ -0,0 +1,17 @@
+<?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.LocaleInformationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.LocaleInformation">
+        <id column="company_id" property="companyId" />
+        <result column="language" property="language" />
+        <result column="timezone" property="timezone" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        company_id, language, timezone
+    </sql>
+
+</mapper>

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

@@ -644,7 +644,7 @@
     <select id="getOvertimeDetail" resultType="java.util.Map">
         SELECT date_format(report.`create_date`, '%Y-%m-%d') AS createDate,
         report.`creator_id` AS userId, user.`name` AS username, report.`working_time` AS workingTime,
-        IFNULL(report.`overtime_hours`, 0) AS overtimeHours,
+        IFNULL(report.`overtime_hours`, 0) AS overtimeHours,project.id as projectId,
         project.project_name as projectName,project.project_code as projectCode,
         IFNULL(report.overtime_cost, 0) AS cost,
         IFNULL(report_extra_degree.name,'') as degreeName, department.department_name as departmentName FROM report LEFT JOIN user ON user.id = report.`creator_id`

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

@@ -73,9 +73,16 @@
         left join user u on u.id = a.project_auditor_id
         left join department on department.department_id = c.department_id
         left join project_main on b.project_main_id=project_main.id
-        WHERE (a.state = 1
-        <if test="stateKey!=null and stateKey==1">
-            or a.state =0
+        WHERE (<if test="stateKey == null or stateKey == 0">
+        a.state = 1
+    </if>
+        <if test="stateKey!=null">
+            <if test="stateKey==1">
+                a.state = 1 or a.state=0
+            </if>
+            <if test="stateKey==2">
+                a.state=0
+            </if>
         </if>)
         <if test="startDate != null and startDate != ''">
             AND a.create_date between #{startDate} and #{endDate}
@@ -148,9 +155,16 @@
         left join department on department.department_id = c.department_id
         left join project_main on project_main.id=b.project_main_id
         WHERE
-        (a.state = 1
-        <if test="stateKey!=null and stateKey==1">
-            or a.state=0
+        (<if test="stateKey == null or stateKey == 0">
+        a.state = 1
+    </if>
+        <if test="stateKey!=null">
+            <if test="stateKey==1">
+                a.state = 1 or a.state=0
+            </if>
+            <if test="stateKey==2">
+                a.state=0
+            </if>
         </if>)
         <if test="startDate != null and startDate != ''">
             AND a.create_date between #{startDate} and #{endDate}
@@ -187,10 +201,19 @@
         left join user u on u.id = a.project_auditor_id
         left join department on department.department_id = c.department_id
         left join project_main on project_main.id=b.project_main_id
-        WHERE (a.state = 1
-        <if test="stateKey!=null and stateKey==1">
-            or a.state=0
-        </if>)
+        WHERE (
+        <if test="stateKey == null or stateKey == 0">
+        a.state = 1
+        </if>
+        <if test="stateKey!=null">
+            <if test="stateKey==1">
+                a.state = 1 or a.state=0
+            </if>
+            <if test="stateKey==2">
+                a.state=0
+            </if>
+        </if>
+        )
         <if test="startDate != null and startDate != ''">
             AND a.create_date between #{startDate} and #{endDate}
         </if>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 8529 - 0
fhKeeper/formulahousekeeper/management-platform/workTime.2022-09-13.log


Dosya farkı çok büyük olduğundan ihmal edildi
+ 10200 - 0
fhKeeper/formulahousekeeper/management-platform/workTime.log


BIN
fhKeeper/formulahousekeeper/management-platform/项目导入模板.xlsx


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

@@ -1831,7 +1831,8 @@
             getTaskGroups(domain, index) {
                 domain.groupId=null;
                 this.http.post('/task-group/listMyJoinGroup',{ 
-                    projectId: domain.projectId
+                    projectId: domain.projectId,
+                    isSubstitude: this.isBatch == 2 ? 1 : 0
                 },
                 res => {
                     if (res.code == "ok") {