浏览代码

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

ggooalice 2 年之前
父节点
当前提交
135fa614c2

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

@@ -334,8 +334,8 @@ public class ProjectController {
     }
 
     @RequestMapping("/getGanttData")
-    public HttpRespMsg getGanttData(@RequestParam(required = false, defaultValue = "0") Integer type, String startDate, String endDate, String userId, Integer projectId, HttpServletRequest request) {
-        return projectService.getGanttData(type, startDate, endDate, userId, projectId, request);
+    public HttpRespMsg getGanttData(@RequestParam(required = false, defaultValue = "0") Integer type, String startDate, String endDate, String userId, Integer projectId, String groupName, HttpServletRequest request) {
+        return projectService.getGanttData(type, startDate, endDate, userId, projectId, groupName, request);
     }
 
     /**

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

@@ -88,7 +88,7 @@ public interface ProjectService extends IService<Project> {
 
     HttpRespMsg exportCustomerProjectInAndOut(HttpServletRequest request);
 
-    HttpRespMsg getGanttData(Integer type, String startDate, String endDate, String userId, Integer projectId,HttpServletRequest request);
+    HttpRespMsg getGanttData(Integer type, String startDate, String endDate, String userId, Integer projectId, String groupName, HttpServletRequest request);
 
     HttpRespMsg getProjectStagesCost(Integer pageIndex, Integer pageSize, Integer projectId, HttpServletRequest request);
 

+ 13 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DingDingServiceImpl.java

@@ -125,6 +125,8 @@ public class DingDingServiceImpl implements DingDingService {
     private boolean isPrivateDeploy;//企业内部应用,私有化部署的情况
     @Value("${dingding.appId}")
     private long appId;//钉钉第三方应用的appId
+    @Value("${configEnv.isDev}")
+    private boolean isDev;//是否是本地开发环境
 
     @Override
     @Async
@@ -772,16 +774,23 @@ public class DingDingServiceImpl implements DingDingService {
                     .setDingdingUnionid(userJson.getString("unionid"))
                     .setColor(ColorUtil.randomColor());
 
-            TempDuser duser = new TempDuser();
-            duser.setDingdingUserid(user.getDingdingUserid());
-            duser.setName(user.getName());
-//            tempDuserMapper.insert(duser);
+
 
             if (departmentId != null) {
                 user.setDepartmentCascade(convertDepartmentIdToCascade(departmentId));
             }
             //检查用户是否已经存在
             synchronized (userLock) {
+                if (isDev) {
+                    long existsCount = tempDuserMapper.selectCount(new QueryWrapper<TempDuser>().eq("dingding_userid", dingdingUserid));
+                    if (existsCount == 0) {
+                        TempDuser duser = new TempDuser();
+                        duser.setDingdingUserid(user.getDingdingUserid());
+                        duser.setName(user.getName());
+                        tempDuserMapper.insert(duser);
+                    }
+                }
+
                 List<User> oldList = userMapper.selectList(new QueryWrapper<User>().eq("dingding_userid", dingdingUserid).eq("company_id", companyId));
                 if (oldList.size() == 0) {
                     System.out.println("新增钉钉用户==" + user.getName());

+ 13 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1442,7 +1442,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     }
 
     @Override
-    public HttpRespMsg getGanttData(Integer type, String startDate, String endDate, String targetUserId, Integer targetProjectId, HttpServletRequest request) {
+    public HttpRespMsg getGanttData(Integer type, String startDate, String endDate, String targetUserId, Integer targetProjectId, String groupName, HttpServletRequest request) {
         //根据人员权限来获取,
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
@@ -1628,6 +1628,18 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 //按照项目获取
                 String btLastItemId = null;
                 GanttDataItem btLastParentItem=null;
+                if (!StringUtils.isEmpty(groupName)) {
+                    List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
+                    List<Integer> collect = projectList.stream().map(Project::getId).collect(Collectors.toList());
+                    List<TaskGroup> taskGroups = taskGroupMapper.selectList(new QueryWrapper<TaskGroup>().eq("name", groupName).in("project_id", collect));
+                    List filterPids = taskGroups.stream().map(TaskGroup::getProjectId).collect(Collectors.toList());
+                    if (projectIds == null) {
+                        projectIds = filterPids;
+                        if (projectIds.size() == 0) {
+                            projectIds.add(-1);
+                        }
+                    }
+                }
                 ganttData = projectMapper.getTaskPlanByProject(projectIds, startDate ,endDate, user.getCompanyId());
                 QueryWrapper<BusinessTrip> btQueryWrapper =new QueryWrapper<>();
                 QueryWrapper<BustripProject> bpQueryWrapper =new QueryWrapper<>();

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

@@ -2622,6 +2622,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             if (timeType.getCustomDataActive() == 1) {
                 titles.add(timeType.getCustomDataName());
             }
+            //是否启用了自定义文本
+            if (timeType.getCustomTextActive() == 1) {
+                titles.add(timeType.getCustomTextName());
+            }
             if (timeType.getShowFillauditTime() == 1) {
                 titles.add("填写时间");
                 titles.add("审核人");
@@ -2811,6 +2815,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     row.createCell(index).setCellValue(map.get("customData") != null?map.get("customData").toString():"");
                     index++;
                 }
+                if (timeType.getCustomTextActive() == 1) {
+                    row.createCell(index).setCellValue(map.get("customText") != null?map.get("customText").toString():"");
+                    index++;
+                }
                 if (timeType.getShowFillauditTime() == 1) {
                     row.createCell(index).setCellValue(sdf.format((Date)map.get("time")));
                     index++;

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

@@ -284,6 +284,9 @@
                     if (valid) {
                         var _this = this;
                         this.logining = true;
+                        setTimeout(function () {
+                            this.logining = false;
+                        }, 15000);
                         this.http.post(this.port.manage.login, this.ruleForm , res => {
                             this.logining = false;
                             if (res.code == "ok") {

+ 7 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -139,8 +139,8 @@
                     <template slot-scope="scope">
                         <el-button size="mini" type="default" v-if="scope.row.roleName == '超级管理员' && user.id == scope.row.id" @click="transferRole(scope.row)">转让</el-button>
                         <el-button size="mini" type="default" v-if="scope.row.roleName != '超级管理员'" @click="resetPwd(scope.row)">重置</el-button>
-                        <el-button size="mini" type="primary" v-if="scope.row.roleName != '超级管理员'" @click="openInsertDialog(scope.$index)">编辑</el-button>
-                        <el-button size="mini" type="primary" v-if="scope.row.roleName == '超级管理员'" @click="openInsertDialog1(scope.$index)">编辑</el-button>
+                        <el-button size="mini" type="primary" v-if="scope.row.roleName != '超级管理员'" @click="openInsertDialog(scope.row)">编辑</el-button>
+                        <el-button size="mini" type="primary" v-if="scope.row.roleName == '超级管理员'" @click="openInsertDialog1(scope.row)">编辑</el-button>
                         <el-button size="mini" type="danger"  v-if="scope.row.roleName != '超级管理员'" @click="deleteUser(scope.row)">删除</el-button>
                         <el-button size="mini" type="default" v-if="scope.row.roleName != '超级管理员' && scope.row.isActive==1" @click="showDeactiveDialog(scope.row)">停用</el-button>
                         <el-button size="mini" type="success" v-if="scope.row.roleName != '超级管理员' && scope.row.isActive==0" @click="setActive(scope.row, 1)">启用</el-button>
@@ -1125,9 +1125,9 @@
             },
 
             // 新增、编辑人员
-            openInsertDialog(i) {
-                if (i != null) {
-                    var list = JSON.parse(JSON.stringify(this.list[i])) , arr = [] , array = [];
+            openInsertDialog(row) {
+                if (row != null) {
+                    var list = JSON.parse(JSON.stringify(row)) , arr = [] , array = [];
                     if(list.departmentCascade!='0' && list.departmentCascade!=null) {
                         if(list.departmentCascade.indexOf(",")>-1) {
                             arr = list.departmentCascade.split(",");
@@ -1365,8 +1365,8 @@
             },
 
             // 修改老板的成本
-            openInsertDialog1(i) {
-                var list1 = JSON.parse(JSON.stringify(this.list[i])) , arr1 = [] , array1 = [];
+            openInsertDialog1(row) {
+                var list1 = JSON.parse(JSON.stringify(row)) , arr1 = [] , array1 = [];
                 if(list1.departmentCascade!='0' && list1.departmentCascade!=null) {
                     if(list1.departmentCascade.indexOf(",")>-1) {
                         arr1 = list1.departmentCascade.split(",");