Ver código fonte

任务增加研究中心字段

QuYueTing 6 dias atrás
pai
commit
f7ae240bc1

+ 0 - 1
fhKeeper/formulahousekeeper/management-platform-mld/src/main/java/com/management/platform/constant/Constant.java

@@ -60,7 +60,6 @@ public class Constant {
     public static final String[] LEAVE_CHECK= {"审核结果","审核人","请假时间","备注"};
     
     public static final int ZHE_ZHONG_COMPANY_ID=4811;
-    public static final int MLD_COMPANY_ID=876;
     //泓浒
     public static final int HONG_HU_COMPANY_ID=7536;
 }

+ 0 - 61
fhKeeper/formulahousekeeper/management-platform-mld/src/main/java/com/management/platform/controller/FinanceMonthlyWorktimeController.java

@@ -1,61 +0,0 @@
-package com.management.platform.controller;
-
-
-import com.management.platform.entity.FmwDetail;
-import com.management.platform.service.FinanceMonthlyWorktimeService;
-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;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author Seyason
- * @since 2025-04-16
- */
-@RestController
-@RequestMapping("/finance-monthly-worktime")
-public class FinanceMonthlyWorktimeController {
-
-    @Resource
-    private FinanceMonthlyWorktimeService financeMonthlyWorktimeService;
-
-    @RequestMapping("/send")
-    public HttpRespMsg send(@RequestParam("id")String id, @RequestParam("timesheetDate") String timesheetDate, HttpServletRequest request) {
-        return financeMonthlyWorktimeService.send(id,timesheetDate,request);
-    }
-
-    @RequestMapping("/getByMonth")
-    public HttpRespMsg getByMonth(Integer companyId, String ymonth, @RequestParam(required = false, defaultValue = "0" ) Integer reGenerate,HttpServletRequest request) {
-        try {
-            return financeMonthlyWorktimeService.getByMonth(companyId, ymonth,reGenerate, request);
-        } catch (Exception e) {
-            e.printStackTrace();
-            HttpRespMsg msg = new HttpRespMsg();
-            msg.setError(e.getMessage());
-            return msg;
-        }
-    }
-
-    @RequestMapping("/setTimesheetDate")
-    public HttpRespMsg setTimesheetDate(Integer id, String timesheetDate, HttpServletRequest request) {
-        return financeMonthlyWorktimeService.setTimesheetDate(id, timesheetDate,request);
-    }
-
-    @RequestMapping("/changeWorktime")
-    public HttpRespMsg changeWorktime(FmwDetail detail, HttpServletRequest request) {
-        return financeMonthlyWorktimeService.changeWorktime(detail,request);
-    }
-
-    @RequestMapping("/setStatusFinal")
-    public HttpRespMsg setStatusFinal(Integer id, HttpServletRequest request) {
-        return financeMonthlyWorktimeService.setStatusFinal(id,request);
-    }
-}
-

+ 41 - 245
fhKeeper/formulahousekeeper/management-platform-mld/src/main/java/com/management/platform/controller/TaskController.java

@@ -169,25 +169,6 @@ public class TaskController {
         return taskService.getFileRejectReason(taskId,request);
     }
 
-
-//    /***
-//     * 文件审核
-//     * @param taskId 任务id
-//     * @param projectId 项目id
-//     * @param auditStatus 审核状态 1通过 2驳回
-//     * @param reason 驳回理由
-//     * @param request
-//     * @return
-//     */
-//    @PostMapping("/auditFile")
-//    public HttpRespMsg auditFile(@RequestParam("taskId")Integer taskId
-//            ,@RequestParam("projectId")String projectId
-//            ,@RequestParam("auditStatus")Integer auditStatus
-//            ,@RequestParam(value = "reason",required = false)String reason
-//            ,HttpServletRequest request) {
-//        return taskService.auditFile(taskId,projectId,auditStatus,reason,request);
-//    }
-
     @RequestMapping("/save")
     @Transactional
     public HttpRespMsg save(Task task) throws Exception {
@@ -209,14 +190,14 @@ public class TaskController {
             task.setCreatorColor(user.getColor());
             task.setCompanyId(user.getCompanyId());
 
-            if (user.getCompanyId()==Constant.MLD_COMPANY_ID&&task.getIsTaskPlan()==0&&task.getCheckFirstId()==null){
+            if (task.getIsTaskPlan()==0&&task.getCheckFirstId()==null){
                 if (task.getProjectId()!=null){
                     Project project = projectMapper.selectById(task.getProjectId());
                     task.setCheckFirstId(project.getInchargerId());
                 }
             }
 
-            if (user.getCompanyId()==Constant.MLD_COMPANY_ID&&task.getIsTaskPlan()==1){
+            if (task.getIsTaskPlan()==1){
                 task.setTaskPlan(1);
                 task.setTaskStatus(3);
                 //状态是请假 直接变成任务
@@ -226,24 +207,6 @@ public class TaskController {
                     task.setTaskPlan(1);
                 }
             }
-//            TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
-//            Integer taskFileCharge = timeType.getTaskFileCharge();
-//            if(1 == taskFileCharge){
-//                //主管: 员工所在部门[department]的manager_id 阶段一
-//                //项目经理:project表的in_charge_id 阶段二
-//                Department department = departmentMapper.selectById(user.getDepartmentId());
-//                Project project = projectMapper.selectById(task.getProjectId());
-//                if(org.apache.commons.lang3.StringUtils.isBlank(department.getManagerId())){
-//                    msg.setError("员工所在部门无负责人,请重新设置");
-//                    return msg;
-//                }
-//                if(org.apache.commons.lang3.StringUtils.isBlank(project.getInchargerId())){
-//                    msg.setError("该项目未设置项目经理,请重新设置");
-//                    return msg;
-//                }
-//                task.setChargeOneId(department.getManagerId());
-//                task.setChargeTwoId(project.getInchargerId());
-//            }
         }
         if (!StringUtils.isEmpty(executorListStr)) {
             List<User> allUsers = userMapper.selectList(new QueryWrapper<User>().eq("company_id", user.getCompanyId()));
@@ -297,28 +260,6 @@ public class TaskController {
                     }
                 }
             }
-            //针对依斯呗的校验
-            if(user.getCompanyId()==3092){
-                Project project = projectService.getById(task.getProjectId());
-                //除了报价项目  售后报价项目和研发项目不管控  其它项目都管控
-                List<String> excludeCategoryNames = Arrays.asList(new String[]{"报价项目","售后报价项目","研发项目","运维项目","数字化服务项目"});
-                List<ProjectCategory> extList = projectCategoryMapper.selectList(new QueryWrapper<ProjectCategory>().eq("company_id", user.getCompanyId()).in("name", excludeCategoryNames));
-                List<Integer> extIds = extList.stream().map(ProjectCategory::getId).collect(Collectors.toList());
-                if(task.getGroupId()!=null&&(project.getCategory()!=null && !extIds.contains(project.getCategory()))){
-                    TaskGroup taskGroup = taskGroupService.getById(task.getGroupId());
-                    if(taskGroup.getManDay()==null){
-                        msg.setError("创建失败,请先分配任务分组的预估工时");
-                        return msg;
-                    }
-                    //计算当前分组下的所有任务的计划工时
-                    List<Task> taskList = taskMapper.selectList(new LambdaQueryWrapper<Task>().select(Task::getPlanHours).eq(Task::getGroupId, taskGroup.getId()).isNotNull(Task::getPlanHours).ne(task.getId()!=null,Task::getId,task.getId()));
-                    int sum = taskList.stream().mapToInt(Task::getPlanHours).sum();
-                    if((sum+(task.getPlanHours()==null?0:task.getPlanHours()))>(taskGroup.getManDay()*8)){
-                        msg.setError("任务分组的预估工时不足,请增加预估工时");
-                        return msg;
-                    }
-                }
-            }
             //检查执行人是否在当前分组的参与人当中
             List<GroupParticipator> groupParticipatorList = groupParticipatorMapper.selectList(new QueryWrapper<GroupParticipator>().eq("group_id", task.getGroupId()));
             List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().eq("project_id", task.getProjectId()));
@@ -380,15 +321,6 @@ public class TaskController {
                 needRecalculateProgress = true;
             }
         } else {
-//            task.setChargeOneId(null);
-//            task.setChargeStage(null);
-//            task.setChargeOneStatus(null);
-//            task.setChargeOneTime(null);
-//            task.setChargeTwoId(null);
-//            task.setChargeTwoStatus(null);
-//            task.setChargeTwoTime(null);
-//            task.setFinalChargeStatus(null);
-//            task.setFileRejectReason(null);
             //更新的情况,需要对比是否修改了任务标题,更新子任务的parentTname
             Task oldTask = taskService.getById(task.getId());
             if (!oldTask.getName().equals(task.getName())) {
@@ -479,15 +411,13 @@ public class TaskController {
                 needRecalculateProgress = true;
             }
             // 未驳回之前 第一审核人 修改工作计划
-            if (user.getCompanyId()==Constant.MLD_COMPANY_ID
-                    &&task.getIsTaskPlan()==1
+            if (task.getIsTaskPlan()==1
                     && org.apache.commons.lang3.StringUtils.isNotEmpty(task.getCheckFirstId())
                     &&task.getCheckFirstId().equals(userId)
                     &&task.getTaskStatus()==3){
                 isUpdate=1;
                 task.setTaskStatus(4);//待第二审核人审核
-            } else if (user.getCompanyId() == Constant.MLD_COMPANY_ID
-                    && task.getIsTaskPlan() == 1
+            } else if (task.getIsTaskPlan() == 1
                     && org.apache.commons.lang3.StringUtils.isNotEmpty(task.getCheckSecondId())
                     && task.getCheckSecondId().equals(userId)
                     &&task.getTaskStatus()==4) {
@@ -496,8 +426,7 @@ public class TaskController {
                 task.setIsTaskPlan(0);//不再是计划
             }
             // 驳回后,小组长对计划进行修改
-            if (user.getCompanyId()==Constant.MLD_COMPANY_ID
-                    &&task.getIsTaskPlan()==1
+            if (task.getIsTaskPlan()==1
                     &&(task.getTaskStatus()==5||task.getTaskStatus()==6)
                     &&(!userId.equals(task.getCheckFirstId())&&!userId.equals(task.getCheckSecondId()))
                     ){
@@ -505,8 +434,7 @@ public class TaskController {
                 task.setTaskStatus(3);//待第一审核人审核
             }
             // 撤回后,对计划进行修改
-            if (user.getCompanyId()==Constant.MLD_COMPANY_ID
-                    &&task.getIsTaskPlan()==1
+            if (task.getIsTaskPlan()==1
                     &&(task.getTaskStatus()==2)
             ){
                 if (user.getId().equals(task.getCheckFirstId())){
@@ -522,7 +450,7 @@ public class TaskController {
                 }
             }
         }
-        if (Constant.MLD_COMPANY_ID==user.getCompanyId()&&task.getIsTaskPlan()==1) {
+        if (task.getIsTaskPlan()==1) {
             if (task.getCheckSecondId() != null && !task.getExecutorList().isEmpty()) {
                 System.out.println("===>"+task.getExecutorList());
                 List<User> userManagers = userMapper.selectList(new QueryWrapper<User>()
@@ -539,7 +467,7 @@ public class TaskController {
         boolean saved = taskService.saveOrUpdate(task);
         //新增成功,给第一审核人发送信息提醒
         if (saved&&isInsert==1){
-            if (user.getCompanyId()==Constant.MLD_COMPANY_ID&&task.getIsTaskPlan()==1&& org.apache.commons.lang3.StringUtils.isNotEmpty(task.getCheckFirstId())){
+            if (task.getIsTaskPlan()==1&& org.apache.commons.lang3.StringUtils.isNotEmpty(task.getCheckFirstId())){
                 //给第一审核人发送信息提醒
                 msgRecepientList=new ArrayList<>();
                 log.info("添加工作计划,给第一审核人发送信息提醒");
@@ -644,7 +572,7 @@ public class TaskController {
                 informationService.save(new Information().setType(1).setContent(String.valueOf(task.getProjectId())).setUserId(msgRecepient));
             });
             List<User> recpUserList = userMapper.selectList(new QueryWrapper<User>().in("id", msgRecepientList));
-            if(user.getCompanyId()!=Constant.MLD_COMPANY_ID||task.getIsTaskPlan()!=1) {
+            if(task.getIsTaskPlan()!=1) {
                 if (recpUserList.size() > 0) {
                     if (recpUserList.get(0).getDingdingUserid() != null) {
                         //钉钉用户
@@ -1283,41 +1211,40 @@ public class TaskController {
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
-        if (Constant.MLD_COMPANY_ID==user.getCompanyId()){
-            int count= projectLeaderMapper.selectCountIsLeader(id,user.getId());
-            //是这个计划的小组长
-            if (count>0){
-                /**
-                 * 任务状态,0-进行中 1-已完成 2-已撤销 3-待第一审核人审核 4-待第二审核人审核 5-第一审核人驳回  6-第二审核人驳回
-                 */
-                //待第一审核人审核
-                if (task.getTaskStatus()==3&&task.getIsTaskPlan()==1){
-                    msg.setError("当前计划已处于一级审核状态,小组长不能删除");
-                    return msg;
-                }else if(task.getTaskStatus()==4&&task.getIsTaskPlan()==1){
-                    msg.setError("当前计划已处于二级审核状态,小组长不能删除");
-                    return msg;
-                }else if(task.getTaskStatus()==0&&task.getIsTaskPlan()==0){
-                    msg.setError("当前计划已审核通过,小组长不能删除");
-                    return msg;
-                }
+        //状态检查
+        int count= projectLeaderMapper.selectCountIsLeader(id,user.getId());
+        //是这个计划的小组长
+        if (count>0){
+            /**
+             * 任务状态,0-进行中 1-已完成 2-已撤销 3-待第一审核人审核 4-待第二审核人审核 5-第一审核人驳回  6-第二审核人驳回
+             */
+            //待第一审核人审核
+            if (task.getTaskStatus()==3&&task.getIsTaskPlan()==1){
+                msg.setError("当前计划已处于一级审核状态,小组长不能删除");
+                return msg;
+            }else if(task.getTaskStatus()==4&&task.getIsTaskPlan()==1){
+                msg.setError("当前计划已处于二级审核状态,小组长不能删除");
+                return msg;
+            }else if(task.getTaskStatus()==0&&task.getIsTaskPlan()==0){
+                msg.setError("当前计划已审核通过,小组长不能删除");
+                return msg;
             }
+        }
 
-            if (task.getCheckFirstId()!=null&&task.getCheckFirstId().equals(user.getId())){
-                if(task.getTaskStatus()==4&&task.getIsTaskPlan()==1){
-                    msg.setError("当前计划已处于二级审核状态,项目经理不能删除");
-                    return msg;
-                }else if(task.getTaskStatus()==0&&task.getIsTaskPlan()==0){
-                    msg.setError("当前计划已审核通过,项目经理不能删除");
-                    return msg;
-                }
+        if (task.getCheckFirstId()!=null&&task.getCheckFirstId().equals(user.getId())){
+            if(task.getTaskStatus()==4&&task.getIsTaskPlan()==1){
+                msg.setError("当前计划已处于二级审核状态,项目经理不能删除");
+                return msg;
+            }else if(task.getTaskStatus()==0&&task.getIsTaskPlan()==0){
+                msg.setError("当前计划已审核通过,项目经理不能删除");
+                return msg;
             }
+        }
 
-            if (task.getCheckSecondId()!=null&&task.getCheckSecondId().equals(user.getId())){
-                if(task.getTaskStatus()==3&&task.getIsTaskPlan()==1){
-                    msg.setError("当前计划已处于一级审核状态,区域经理不能删除");
-                    return msg;
-                }
+        if (task.getCheckSecondId()!=null&&task.getCheckSecondId().equals(user.getId())){
+            if(task.getTaskStatus()==3&&task.getIsTaskPlan()==1){
+                msg.setError("当前计划已处于一级审核状态,区域经理不能删除");
+                return msg;
             }
         }
 
@@ -1633,13 +1560,11 @@ public class TaskController {
                     if(null != startDate && null != endDate){
                         queryWrapper.ge("start_date",startDate).le("start_date",endDate);
                     }
-
                     break;
                 case 1:
                     if(null != startDate && null != endDate){
                         queryWrapper.ge("task.end_date",startDate).le("task.end_date",endDate);
                     }
-
                     break;
             }
         }
@@ -1652,13 +1577,6 @@ public class TaskController {
         if(!StringUtils.isEmpty(targetUserId)){
             queryWrapper.like("task.executor_id",targetUserId);
         }
-//        else if (viewId == 3) {
-//            //今天的任务
-//            queryWrapper.eq("end_date", LocalDate.now());
-//        } else if (viewId == 4) {
-//            //已超期的任务,未完成的任务
-//            queryWrapper.lt("end_date", LocalDate.now()).eq("task_status", 0);
-//        }
         List<Integer> branchDepartment=null;
         if(deptId!=null){
             List<Department> departmentList=departmentService.list(new QueryWrapper<Department>().eq("company_id",companyId));
@@ -1668,137 +1586,15 @@ public class TaskController {
         if(pageIndex!=null&&pageSize!=null){
             pageStart = (pageIndex - 1) * pageSize;
         }
-        if (companyId==Constant.MLD_COMPANY_ID){
-            //美莱德 任务计划状态是1
-            queryWrapper.ne("is_task_plan",1);
-        }
+        //美莱德 任务计划状态是1
+        queryWrapper.ne("is_task_plan",1);
         List<Task> list = taskMapper.getTaskWithProjectName(queryWrapper,pageStart, pageSize,companyId,branchDepartment);
         List<Integer> collect = list.stream().map(l -> l.getId()).distinct().collect(Collectors.toList());
         collect.add(-1);
         List<TaskExecutor> taskExecutorList = taskExecutorMapper.selectList(new QueryWrapper<TaskExecutor>().in("task_id", collect));
-        List<TaskFiles> taskFilesList = taskFilesMapper.selectList(new LambdaQueryWrapper<TaskFiles>().eq(TaskFiles::getNeedFileCharge,1).in(TaskFiles::getTaskId, collect));
         List<Integer> pids = list.stream().map(Task::getProjectId).collect(Collectors.toList());
         pids.add(-1);
         List<Project> projectList = projectService.list(new QueryWrapper<Project>().in("id", pids));
-        TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
-//        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",user.getCompanyId()));
-//        CompanyDingding dingding = companyDingdingService.getOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, user.getCompanyId()));
-        if(0 != timeType.getTaskFileCharge()){
-            //根据该任务下的文件所处的状态判断
-            for (Task task : list) {
-                /**
-                 * 1、是否存在驳回文件
-                 *      过滤出上传人为当前登录人或审核人为当前登录人的任务文件
-                 *      若存在驳回文件,则显示存在驳回文件
-                 * 2、审核通过
-                 *      过滤出上传人为当前登录人或审核人为当前登录人的任务文件
-                 *      若都审核通过,则显示审核通过
-                 * 3、待审核
-                 *      过滤出上传人为当前登录人或审核人为当前登录人的任务文件
-                 *      若都是待审核或部分审核通过状态,则显示审核中
-                 **/
-                List<TaskFiles> currentTaskFiles = taskFilesList.stream().filter(tmp -> tmp.getTaskId().equals(task.getId()))
-                        .filter(t->{
-                            if(userId.equals(t.getCreatorId())){
-                                return true;
-                            } else if (userId.equals(t.getChargeOneId())) {
-                                return true;
-                            } else if (userId.equals(t.getChargeTwoId())) {
-                                return true;
-                            }else {
-                                return false;
-                            }
-                        })
-                        .collect(Collectors.toList());
-                if(CollectionUtils.isNotEmpty(currentTaskFiles)){
-                    //是否存在驳回
-                    long rejectCount = currentTaskFiles.stream().filter(tmp -> {
-                                if (2 == tmp.getChargeOneStatus() || 2 == tmp.getChargeTwoStatus()) {
-                                    return true;
-                                } else {
-                                    return false;
-                                }
-                            }).count();
-                    //是否都是全部通过
-                    long allPassCount = currentTaskFiles.stream().filter(tmp -> 1 == tmp.getFinalChargeStatus()).count();
-                    if(rejectCount > 0 ){
-                        task.setFileChargeStatus(2);
-                        task.setFinalChargeStatusText("存在驳回文件");
-                    } else if (allPassCount == currentTaskFiles.size()) {
-                        task.setFileChargeStatus(3);
-                        task.setFinalChargeStatusText("审核通过");
-                    }else {
-                        task.setFileChargeStatus(1);
-                        task.setFinalChargeStatusText("审核中");
-                    }
-
-                }
-
-            }
-
-        }
-//            List<String> userIds = new ArrayList<>();
-//            List<String> chargeOneIds = list.stream().filter(t-> org.apache.commons.lang3.StringUtils.isNotBlank(t.getChargeOneId()))
-//                    .map(Task::getChargeOneId).collect(Collectors.toList());
-//            List<String> chargeTwoIds = list.stream().filter(t-> org.apache.commons.lang3.StringUtils.isNotBlank(t.getChargeTwoId()))
-//                    .map(Task::getChargeTwoId).collect(Collectors.toList());
-//            userIds.addAll(chargeOneIds);
-//            userIds.addAll(chargeTwoIds);
-//            Map<String, User> userIdMap = new HashMap<>();
-//            if(CollectionUtils.isNotEmpty(userIds)){
-//                userIds = userIds.stream().distinct().collect(Collectors.toList());
-//                List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>()
-//                                .select(User::getId,User::getName)
-//                        .in(User::getId, userIds)
-//                );
-//                userIdMap = users.stream().collect(Collectors.toMap(User::getId, t->t));
-//            }
-//            Map<Integer, List<TaskFiles>> taskFilesMap = new HashMap<>();
-//            if(CollectionUtils.isNotEmpty(taskFilesList)){
-//                taskFilesMap  = taskFilesList.stream().collect(Collectors.groupingBy(TaskFiles::getTaskId));
-//            }
-//            for (Task task : list) {
-//                List<TaskFiles> tmp = taskFilesMap.get(task.getId());
-//                if(CollectionUtils.isEmpty(tmp)){
-//                    continue;
-//                }
-//                if(org.apache.commons.lang3.StringUtils.isBlank(task.getChargeOneId()) || org.apache.commons.lang3.StringUtils.isBlank(task.getChargeTwoId())){
-//                    continue;
-//                }
-//                if(1 == task.getFinalChargeStatus()){
-//                    task.setFinalChargeStatusText("审核通过");
-//                    task.setFileChargeStatus(1);
-//                } else if (0 == task.getFinalChargeStatus()) {
-//                    String name = "";
-//                    String statusText = "";
-//                    String userWxId = "";
-//                    String fileChargeStatusText = "";
-//                    int finalStatus = 1==task.getChargeStage()?task.getChargeOneStatus():task.getChargeTwoStatus();
-//                    String tmpUserId = 1==task.getChargeStage()?task.getChargeOneId():task.getChargeTwoId();
-//                    User chargeUser = userIdMap.get(tmpUserId);
-//                    if(null != chargeUser){
-//                        if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-//                            userWxId = chargeUser.getCorpwxRealUserid();
-//                        }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
-//                            userWxId = chargeUser.getDingdingUserid();
-//                        }
-//                        name = chargeUser.getName();
-//                    }
-//                    switch (finalStatus)
-//                    {
-//                        case 0:  statusText = "待审核"; task.setFileChargeStatus(0);break;
-//                        case 1:  statusText = "通过";break;
-//                        case 2:  statusText = "驳回"; task.setFileChargeStatus(2);break;
-//                    }
-//                    if(org.apache.commons.lang3.StringUtils.isBlank(userWxId)){
-//                        fileChargeStatusText = statusText+"("+name+")";
-//                    }else{
-//                        fileChargeStatusText = statusText+"("+("$userName=" + userWxId + "$")+")";
-//                    }
-//                    task.setFinalChargeStatusText(fileChargeStatusText);
-//                }
-//            }
-//        }
         list.forEach(l->{
             List<TaskExecutor> executorList = taskExecutorList.stream().filter(tl -> tl.getTaskId().equals(l.getId())&&tl.getExecutorId()!=null).collect(Collectors.toList());
             l.setExecutorList(executorList);

+ 14 - 1
fhKeeper/formulahousekeeper/management-platform-mld/src/main/java/com/management/platform/entity/Task.java

@@ -21,7 +21,7 @@ import org.springframework.format.annotation.DateTimeFormat;
  * </p>
  *
  * @author Seyason
- * @since 2025-02-28
+ * @since 2025-05-12
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -334,6 +334,19 @@ public class Task extends Model<Task> {
     private Boolean attachFileRequired;
 
 
+    /**
+     * 研究中心
+     */
+    @TableField("center_id")
+    private Integer centerId;
+
+    /**
+     * 研究中心名称
+     */
+    @TableField("center_name")
+    private String centerName;
+
+
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 0 - 29
fhKeeper/formulahousekeeper/management-platform-mld/src/main/java/com/management/platform/service/FinanceMonthlyWorktimeService.java

@@ -1,29 +0,0 @@
-package com.management.platform.service;
-
-import com.management.platform.entity.FinanceMonthlyWorktime;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.management.platform.entity.FmwDetail;
-import com.management.platform.util.HttpRespMsg;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * <p>
- *  服务类
- * </p>
- *
- * @author Seyason
- * @since 2025-04-16
- */
-public interface FinanceMonthlyWorktimeService extends IService<FinanceMonthlyWorktime> {
-
-    HttpRespMsg send(String fmwId, String timesheetDate, HttpServletRequest request);
-
-    HttpRespMsg getByMonth(Integer companyId, String ymonth, Integer reGenerate, HttpServletRequest request) throws Exception;
-
-    HttpRespMsg setTimesheetDate(Integer id, String timesheetDate, HttpServletRequest request);
-
-    HttpRespMsg changeWorktime(FmwDetail detail, HttpServletRequest request);
-
-    HttpRespMsg setStatusFinal(Integer id, HttpServletRequest request);
-}

+ 0 - 375
fhKeeper/formulahousekeeper/management-platform-mld/src/main/java/com/management/platform/service/impl/FinanceMonthlyWorktimeServiceImpl.java

@@ -1,375 +0,0 @@
-package com.management.platform.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.management.platform.entity.*;
-import com.management.platform.entity.vo.TisTimeVO;
-import com.management.platform.mapper.*;
-import com.management.platform.service.FinanceMonthlyWorktimeService;
-import com.management.platform.service.FmwDetailService;
-import com.management.platform.task.DataCollectTask;
-import com.management.platform.util.HttpRespMsg;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.http.*;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
-import org.springframework.web.client.RestTemplate;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- *  服务实现类
- * </p>
- *
- * @author Seyason
- * @since 2025-04-16
- */
-@Service
-public class FinanceMonthlyWorktimeServiceImpl extends ServiceImpl<FinanceMonthlyWorktimeMapper, FinanceMonthlyWorktime> implements FinanceMonthlyWorktimeService {
-    public static final String TIME_TYPE_COMPOSE = "组装工时(车间)";
-    public static final String TIME_TYPE_REPAIR = "维修工时(车间)";
-    public static final String TIME_TYPE_DEBUG = "调试工时(车间)";
-    public static final String TIME_TYPE_WAIT = "等料工时(车间)";
-    static List<String> groupNameList = new ArrayList<>();
-    {
-        groupNameList.add(TIME_TYPE_COMPOSE);
-        groupNameList.add(TIME_TYPE_REPAIR);
-        groupNameList.add(TIME_TYPE_DEBUG);
-        groupNameList.add(TIME_TYPE_WAIT);
-    }
-
-    @Resource
-    private FinanceMonthlyWorktimeMapper financeMonthlyWorktimeMapper;
-
-    @Resource
-    private FmwDetailMapper fmwDetailMapper;
-
-    @Resource
-    private UserMapper userMapper;
-    @Resource
-    private ReportMapper reportMapper;
-    @Resource
-    private DepartmentMapper departmentMapper;
-    @Resource
-    private TaskGroupMapper taskGroupMapper;
-    @Autowired
-    private ProjectMapper projectMapper;
-    @Autowired
-    private FmwDetailService fmwDetailService;
-    @Resource
-    private ErpOrderInfoMapper erpOrderInfoMapper;
-
-    @Override
-    public HttpRespMsg send(String fmwId, String timesheetDate, HttpServletRequest request) {
-        HttpRespMsg httpRespMsg = new HttpRespMsg();
-        String userId = request.getHeader("Token");
-        User user = userMapper.selectById(userId);
-//        String dateStr = "currentDate";//TODO 填充日期
-        FinanceMonthlyWorktime financeMonthlyWorktime = financeMonthlyWorktimeMapper.selectById(fmwId);
-        if(null == financeMonthlyWorktime){
-            httpRespMsg.setError("未找到当前内容");
-            return httpRespMsg;
-        }
-        if(0 == financeMonthlyWorktime.getStatus()){
-            httpRespMsg.setError("未定稿,无法发送");
-            return httpRespMsg;
-        }
-        financeMonthlyWorktimeMapper.update(null,new LambdaUpdateWrapper<FinanceMonthlyWorktime>()
-                .eq(FinanceMonthlyWorktime::getId,fmwId)
-                .set(FinanceMonthlyWorktime::getTimesheetDate, LocalDate.parse(timesheetDate, DateTimeFormatter.ofPattern("yyyy-MM-dd")))
-        );
-
-
-        List<TisTimeVO> timeVOList = fmwDetailMapper.getTisTime(fmwId);
-
-        RestTemplate restTemplate = new RestTemplate();
-        String insertUrl = DataCollectTask.PREFIX_URL +"/dataCollect/insertCisData";
-        String checkUrl = DataCollectTask.PREFIX_URL +"/dataCollect/checkCisData";
-        if(!CollectionUtils.isEmpty(timeVOList)){
-            HttpHeaders headers = new HttpHeaders();
-            headers.setContentType(MediaType.APPLICATION_JSON);
-//            Map<String, Object> requestBody = new HashMap<>();
-//            requestBody.put("tisList", timeVOList);
-//            HttpEntity<Object> requestEntity = new HttpEntity<>(requestBody, headers);
-            HttpEntity<List<TisTimeVO>> requestEntity = new HttpEntity<>(timeVOList, headers);
-            ResponseEntity<List<TisTimeVO>> checkResponse = restTemplate.exchange(checkUrl, HttpMethod.POST, requestEntity
-                    ,new  ParameterizedTypeReference<List<TisTimeVO>>(){});
-            if(checkResponse.getStatusCode() == HttpStatus.OK){
-                List<TisTimeVO> resList = checkResponse.getBody();
-                List<TisTimeVO> tmpCheck = resList.stream().filter(t -> null != t.getCoId()).collect(Collectors.toList());
-                if(tmpCheck.size() != resList.size()){
-                    httpRespMsg.setError("财务尚未完成操作,无法获取cppid");
-                    return httpRespMsg;
-                }
-                resList.forEach(t->t.setDateStr(timesheetDate));
-                HttpHeaders insertHeaders = new HttpHeaders();
-                insertHeaders.setContentType(MediaType.APPLICATION_JSON);
-//                Map<String, Object> insertBody = new HashMap<>();
-//                insertBody.put("tisList", resList);
-//                HttpEntity<Object> insertEntity = new HttpEntity<>(insertBody, insertHeaders);
-                HttpEntity<List<TisTimeVO>> insertEntity = new HttpEntity<>(resList, headers);
-                ResponseEntity<String> tisResponse = restTemplate.exchange(insertUrl, HttpMethod.POST, insertEntity, String.class);
-                if (tisResponse.getStatusCode() == HttpStatus.OK) {
-                    System.out.println("插入成功");
-                    financeMonthlyWorktimeMapper.update(null,new LambdaUpdateWrapper<FinanceMonthlyWorktime>()
-                            .eq(FinanceMonthlyWorktime::getId,fmwId)
-                            .set(FinanceMonthlyWorktime::getIsSend, 1)
-                            .set(FinanceMonthlyWorktime::getLastSendTime, LocalDateTime.now())
-                    );
-                }else{
-                    System.out.println("插入失败");
-                }
-            }
-
-        }
-        financeMonthlyWorktime = financeMonthlyWorktimeMapper.selectById(fmwId);
-        httpRespMsg.setData(financeMonthlyWorktime);
-        return httpRespMsg;
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public HttpRespMsg getByMonth(Integer companyId, String ymonth, Integer reGenerate, HttpServletRequest request) throws Exception {
-        //获取该月份的数据,如果没有自动生成
-        HttpRespMsg httpRespMsg = new HttpRespMsg();
-        String token = request.getHeader("token");
-        User user = userMapper.selectById(token);
-        FinanceMonthlyWorktime financeMonthlyWorktime = financeMonthlyWorktimeMapper.selectOne(new LambdaQueryWrapper<FinanceMonthlyWorktime>().eq(FinanceMonthlyWorktime::getCompanyId, companyId).eq(FinanceMonthlyWorktime::getYmonth, ymonth));
-        Integer detailCount = 0;
-        if (financeMonthlyWorktime != null) {
-            if (reGenerate== 1) {
-                if (financeMonthlyWorktime.getStatus() == 1) {
-                    httpRespMsg.setError("已定稿,无法重置");
-                    return httpRespMsg;
-                }
-                //删除明细数据
-                fmwDetailMapper.delete(new LambdaQueryWrapper<FmwDetail>().eq(FmwDetail::getFmwId, financeMonthlyWorktime.getId()));
-            } else {
-                detailCount = fmwDetailMapper.selectCount(new QueryWrapper<FmwDetail>().eq("fmw_id", financeMonthlyWorktime.getId()));
-            }
-        }
-        if(null == financeMonthlyWorktime || detailCount == 0){
-            if (null == financeMonthlyWorktime) {
-                //生成数据
-                financeMonthlyWorktime = new FinanceMonthlyWorktime();
-                financeMonthlyWorktime.setCompanyId(companyId);
-                financeMonthlyWorktime.setYmonth(ymonth);
-                financeMonthlyWorktime.setStatus(0);
-                //数据日期就是当前日期
-                financeMonthlyWorktime.setTimesheetDate(LocalDate.now());
-                financeMonthlyWorktime.setUserId(user.getId());
-                financeMonthlyWorktimeMapper.insert(financeMonthlyWorktime);
-            } else {
-                //更新数据日期为当前日期
-                financeMonthlyWorktime.setTimesheetDate(LocalDate.now());
-                financeMonthlyWorktime.setUserId(user.getId());
-                financeMonthlyWorktimeMapper.updateById(financeMonthlyWorktime);
-            }
-            //生成明细数据
-            //获取当月的第一天和最后一天
-            LocalDate firstDayOfMonth = LocalDate.parse(ymonth + "-01", DateTimeFormatter.ofPattern("yyyy-MM-dd"));
-            LocalDate lastDayOfMonth = firstDayOfMonth.withDayOfMonth(firstDayOfMonth.lengthOfMonth());
-            //查询日报数据
-            List<Department> departmentList = departmentMapper.selectList(new LambdaQueryWrapper<Department>().eq(Department::getCompanyId, user.getCompanyId()));
-            List<Project> projectList = projectMapper.selectList(new LambdaQueryWrapper<Project>().eq(Project::getCompanyId, user.getCompanyId()));
-            List<Project> publicProjectList = projectList.stream().filter(p -> p.getIsPublic() == 1).collect(Collectors.toList());
-            List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().select(User::getId, User::getName, User::getDepartmentId).eq(User::getCompanyId, user.getCompanyId()));
-
-            List<Report> reportList = reportMapper.getReportProjectGroupDetailList(user.getCompanyId(), firstDayOfMonth, lastDayOfMonth, groupNameList);
-            List<Report> assistList = reportMapper.getReportProjectAssistTime(user.getCompanyId(), firstDayOfMonth, lastDayOfMonth, groupNameList);
-
-            System.out.println("reportSize==="+reportList.size());
-            List<FmwDetail> insertDataList = new ArrayList<>();
-            for (Report report : reportList) {
-                //在insertDataList中按照projectId, extraField4,extraField5进行匹配查找,有的话取出来,没有的话插入
-                Optional<FmwDetail> optional = insertDataList.stream().filter(f -> f.getProjectId().equals(report.getProjectId()) && f.getExtraField4().equals(report.getExtraField4()) && f.getExtraField5().equals(report.getExtraField5())).findFirst();
-                if (optional.isPresent()) {
-                    FmwDetail fmwDetail = optional.get();
-                    setFmwTime(fmwDetail, report);
-                } else {
-                    FmwDetail fmwDetail = new FmwDetail();
-                    fmwDetail.setComposeTime(0.0);
-                    fmwDetail.setRepairTime(0.0);
-                    fmwDetail.setDebugTime(0.0);
-                    fmwDetail.setWaitingTime(0.0);
-                    fmwDetail.setAssistTime(0.0);
-
-                    fmwDetail.setFmwId(financeMonthlyWorktime.getId());
-                    fmwDetail.setProjectId(report.getProjectId());
-                    projectList.stream().filter(p->p.getId().equals(report.getProjectId())).findFirst().ifPresent(project -> {
-                        fmwDetail.setProjectCode(project.getProjectCode());
-                    });
-                    fmwDetail.setExtraField4(report.getExtraField4());
-                    fmwDetail.setExtraField5(report.getExtraField5());
-                    fmwDetail.setDeptId(report.getDeptId());
-                    departmentList.stream().filter(d->d.getDepartmentId().equals(report.getDeptId())).findFirst().ifPresent(d->{
-                        fmwDetail.setDeptCode(d.getDeptCode());
-                        fmwDetail.setDeptName(d.getDepartmentName());
-                    });
-                    setFmwTime(fmwDetail, report);
-                    //从assistList中获取协作工时
-                    Optional<Report> assistItemOp = assistList.stream().filter(f -> f.getProjectId().equals(report.getProjectId()) && f.getExtraField4().equals(report.getExtraField4()) && f.getExtraField5().equals(report.getExtraField5())).findFirst();
-                    if (assistItemOp.isPresent()) {
-                        fmwDetail.setAssistTime(assistItemOp.get().getWorkingTime());
-                    }
-                    insertDataList.add(fmwDetail);
-                }
-            }
-            System.out.println("插入数据大小=="+insertDataList.size());
-
-            // 处理公共项目工时分摊
-            List<Integer> publicProjectIds = publicProjectList.stream()
-                    .map(Project::getId)
-                    .collect(Collectors.toList());
-
-            if (!publicProjectIds.isEmpty()) {
-                // 查询公共项目工时
-                //TODO: 需确认,员工填报公共项目工时的时候,会选择到工单吗?
-                List<Report> publicReportList = reportMapper.selectList(
-                        new LambdaQueryWrapper<Report>().select(Report::getCreatorId, Report::getDeptId, Report::getWorkingTime).eq(Report::getState, 1)
-                                .in(Report::getProjectId, publicProjectIds).between(Report::getCreateDate, firstDayOfMonth, lastDayOfMonth));
-                //按照人员所在的部门进行分组,汇总,如果公共项目没有工单,此步骤可以省略
-                publicReportList.forEach(report -> {
-                    User reportOwner = userList.stream().filter(u -> u.getId().equals(report.getCreatorId())).findFirst().orElse(null);
-                    if (reportOwner != null) {
-                        report.setDeptId(reportOwner.getDepartmentId());
-                    }
-                });
-                //分组,合计部门公共工时
-                Map<Integer, Double> map = publicReportList.stream().collect(Collectors.groupingBy(Report::getDeptId, Collectors.summingDouble(Report::getWorkingTime)));
-                //将map按照List形式重新组合
-                publicReportList = map.entrySet().stream()
-                        .map(e -> {
-                            Report report = new Report();
-                            report.setDeptId(e.getKey());
-                            report.setWorkingTime(e.getValue());
-                            return report;
-                        })
-                        .collect(Collectors.toList());
-                if (!publicReportList.isEmpty()) {
-                    //处理每个部门的公共项目工时分摊
-                    for (Report publicReportDeptItem : publicReportList) {
-                        Integer deptId = publicReportDeptItem.getDeptId();
-                        List<FmwDetail> deptAllReportList = insertDataList.stream().filter(r -> r.getDeptId().equals(deptId)).collect(Collectors.toList());
-                        double totalDeptTime = deptAllReportList.stream().reduce(0.0, (a, b) -> a + b.getComposeTime() + b.getRepairTime() + b.getDebugTime() + b.getWaitingTime(), Double::sum);
-                        System.out.println("处理公共工时分摊,总工时=="+totalDeptTime);
-                        if (totalDeptTime > 0) {
-                            //计算总工时: 用维修组装工时,调试工时和等料工时相加
-                            insertDataList.forEach(fmwDetail -> {
-                                //计算每一个项目的部门内部工时占比,按比例分摊公共工时
-                                if (fmwDetail.getDeptId().equals(deptId)) {
-                                    double curProjectTime = fmwDetail.getComposeTime() + fmwDetail.getRepairTime() + fmwDetail.getDebugTime() + fmwDetail.getWaitingTime();
-                                    double assignTime = curProjectTime / totalDeptTime * publicReportDeptItem.getWorkingTime();
-                                    //理论上不会出现fmwDetail.getPublicTime()有值的情况,但是为了保险起见做个叠加计算吧
-                                    fmwDetail.setPublicTime(fmwDetail.getPublicTime() == null ? assignTime : fmwDetail.getPublicTime() + assignTime);
-                                }
-                            });
-                        } else {
-                            //该部门没有部门内部工时,按照填报部门找协作工时
-                            // 查找该部门的员工都协作了哪些部门
-                            List<User> deptUserList = userList.stream().filter(u -> u.getDepartmentId().equals(deptId)).collect(Collectors.toList());
-                            List<String> deptUserIds = deptUserList.stream().map(User::getId).collect(Collectors.toList());
-                            List<Report> assistDeptListByUser = reportMapper.selectList(new QueryWrapper<Report>().select("dept_id, sum(working_time) working_time").eq("is_assist", 1)
-                                    .in("creator_id", deptUserIds).between("create_date", firstDayOfMonth, lastDayOfMonth).groupBy("dept_id"));
-                            //按协作的工时占比来分配
-                            if (!assistDeptListByUser.isEmpty()) {
-                                double totalAssistTime = assistDeptListByUser.stream().mapToDouble(Report::getWorkingTime).sum();
-                                if (totalAssistTime > 0) {
-                                    for (Report assistDeptItem : assistDeptListByUser) {
-                                        //处理部门公共工时的分摊,先按协作的其他部门的占比,分到其他部门
-                                        double curAssistTime = assistDeptItem.getWorkingTime();
-                                        double assignToDeptTime = curAssistTime / totalAssistTime * publicReportDeptItem.getWorkingTime();
-                                        //按目标部门的部门内部工时占比进行二次分配
-                                        Integer assignToDeptId = assistDeptItem.getDeptId();
-                                        List<FmwDetail> targetDeptReportList = insertDataList.stream().filter(r -> r.getDeptId().equals(assignToDeptId)).collect(Collectors.toList());
-                                        double totalTargetDeptTime = targetDeptReportList.stream().reduce(0.0, (a, b) -> a + b.getComposeTime() + b.getRepairTime() + b.getDebugTime() + b.getWaitingTime(), Double::sum);
-                                        if (totalTargetDeptTime > 0) {
-                                            //计算总工时: 用维修组装工时,调试工时和等料工时相加
-                                            insertDataList.forEach(fmwDetail -> {
-                                                //计算每一个项目的部门内部工时占比,按比例分摊公共工时
-                                                if (fmwDetail.getDeptId().equals(assignToDeptId)) {
-                                                    double curProjectTime = fmwDetail.getComposeTime() + fmwDetail.getRepairTime() + fmwDetail.getDebugTime() + fmwDetail.getWaitingTime();
-                                                    double assignTime = curProjectTime / totalTargetDeptTime * assignToDeptTime;
-                                                    //可能之前已经有其他部门的分摊过来了,需要叠加
-                                                    fmwDetail.setPublicTime(fmwDetail.getPublicTime() == null ? assignTime : fmwDetail.getPublicTime() +assignTime);
-                                                }
-                                            });
-                                        } else {
-                                            Department dept = departmentMapper.selectById(assignToDeptId);
-                                            throw new Exception("存在目标部门没有内部工时,导致公共工时无法分摊:部门=="+dept.getDepartmentName()+",deptId=="+assignToDeptId);
-                                        }
-                                    }
-                                }
-                            } else {
-                                //本部门也没有协作其他部门产生工单工时
-                                Department dept = departmentMapper.selectById(deptId);
-                                throw new Exception("公共工时无法分配,因为本部门没有协作其他部门产生工单工时,部门=="+dept.getDepartmentName()+",deptId=="+deptId);
-                            }
-                        }
-                    }
-                }
-            }
-
-            if (insertDataList.size() > 0) {
-                fmwDetailService.saveBatch(insertDataList);
-            }
-        }
-        //查询数据
-        List<FmwDetail> details = fmwDetailMapper.selectList(new QueryWrapper<FmwDetail>().eq("fmw_id", financeMonthlyWorktime.getId()));
-        financeMonthlyWorktime.setDetailList(details);
-        httpRespMsg.data = financeMonthlyWorktime;
-        return httpRespMsg;
-    }
-
-    private void setFmwTime(FmwDetail fmwDetail, Report report) {
-        switch (report.getGroupName()) {
-            case TIME_TYPE_COMPOSE:
-                fmwDetail.setComposeTime(report.getWorkingTime());
-                break;
-            case TIME_TYPE_REPAIR:
-                fmwDetail.setRepairTime(report.getWorkingTime());
-                break;
-            case TIME_TYPE_DEBUG:
-                fmwDetail.setDebugTime(report.getWorkingTime());
-                break;
-            case TIME_TYPE_WAIT:
-                fmwDetail.setWaitingTime(report.getWorkingTime());
-                break;
-        }
-    }
-
-    @Override
-    public HttpRespMsg setTimesheetDate(Integer id, String timesheetDate, HttpServletRequest request) {
-        FinanceMonthlyWorktime financeMonthlyWorktime = new FinanceMonthlyWorktime();
-        financeMonthlyWorktime.setId(id);
-        financeMonthlyWorktime.setTimesheetDate(LocalDate.parse(timesheetDate, DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-        financeMonthlyWorktimeMapper.updateById(financeMonthlyWorktime);
-        return new HttpRespMsg();
-    }
-
-    @Override
-    public HttpRespMsg changeWorktime(FmwDetail detail, HttpServletRequest request) {
-        fmwDetailService.updateById(detail);
-        return new HttpRespMsg();
-    }
-
-    @Override
-    public HttpRespMsg setStatusFinal(Integer id, HttpServletRequest request) {
-        FinanceMonthlyWorktime financeMonthlyWorktime = new FinanceMonthlyWorktime();
-        financeMonthlyWorktime.setId(id);
-        financeMonthlyWorktime.setStatus(1);
-        financeMonthlyWorktimeMapper.updateById(financeMonthlyWorktime);
-        return new HttpRespMsg();
-    }
-}

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

@@ -92,7 +92,7 @@ public class CodeGenerator {
 
         // 数据源配置
         DataSourceConfig dsc = new DataSourceConfig();
-        dsc.setUrl("jdbc:mysql://1.94.62.58:17089/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
+        dsc.setUrl("jdbc:mysql://1.94.62.58:17089/man_mld?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
 //        dsc.setSchemaName("public");
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");

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

@@ -1,5 +1,5 @@
 server:
-  port: 10010
+  port: 10070
   tomcat:
     uri-encoding: utf-8
     max-http-form-post-size: -1
@@ -15,12 +15,9 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://1.94.62.58:17089/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
+    url: jdbc:mysql://1.94.62.58:17089/man_mld?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: P011430@Huoshi*
-#    url: jdbc:mysql://47.100.37.243:7644/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
-#    username: root
-#    password: Ziyu20141026!@@
     hikari:
       maximum-pool-size: 60
       minimum-idle: 10

+ 8 - 12
fhKeeper/formulahousekeeper/management-platform-mld/src/main/resources/mapper/TaskMapper.xml

@@ -33,11 +33,14 @@
         <result column="ahead_tid" property="aheadTid" />
         <result column="sap_task_code" property="sapTaskCode" />
         <result column="plan_cost" property="planCost" />
+        <result column="attach_file_required" property="attachFileRequired" />
         <result column="task_plan_type" property="taskPlanType" />
+        <result column="task_plan" property="taskPlan" />
         <result column="is_task_plan" property="isTaskPlan" />
         <result column="check_first_id" property="checkFirstId" />
         <result column="check_second_id" property="checkSecondId" />
-        <result column="attach_file_required" property="attachFileRequired" />
+        <result column="center_id" property="centerId" />
+        <result column="center_name" property="centerName" />
     </resultMap>
 
     <resultMap id="timeResultMap" type="com.management.platform.entity.TimeTask" >
@@ -104,19 +107,12 @@
         <result column="stages_name" property="stagesName" />
         <result column="department_name" property="departmentName" />
         <result column="attach_file_required" property="attachFileRequired" />
-        <!--        <result column="charge_one_id" property="chargeOneId" />-->
-        <!--        <result column="charge_one_status" property="chargeOneStatus" />-->
-        <!--        <result column="charge_one_time" property="chargeOneTime" />-->
-        <!--        <result column="charge_two_id" property="chargeTwoId" />-->
-        <!--        <result column="charge_two_status" property="chargeTwoStatus" />-->
-        <!--        <result column="charge_two_time" property="chargeTwoTime" />-->
-        <!--        <result column="charge_stage" property="chargeStage" />-->
-        <!--        <result column="final_charge_status" property="finalChargeStatus" />-->
-        <!--        <result column="file_reject_reason" property="fileRejectReason"></result>-->
+        <result column="center_id" property="centerId" />
+        <result column="center_name" property="centerName" />
     </resultMap>
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, name, task_desc, creater_id, creater_name, creator_color, executor_id, executor_name, executor_color, task_level, task_status, create_date, end_date, project_id, stages_id, company_id, indate, parent_tid, group_id, seq, plan_hours, task_type, parent_tname, finish_date, start_date, meeting_id, ahead_tid, sap_task_code, plan_cost
+        id, name, task_desc, creater_id, creater_name, creator_color, executor_id, executor_name, executor_color, task_level, task_status, create_date, end_date, project_id, stages_id, company_id, indate, parent_tid, group_id, seq, plan_hours, task_type, parent_tname, finish_date, start_date, meeting_id, ahead_tid, sap_task_code, plan_cost, attach_file_required, task_plan_type, task_plan, is_task_plan, check_first_id, check_second_id, center_id, center_name
     </sql>
     <select id="simpleList" resultMap="BaseResultMap">
         select id, name, creater_id, creater_name, creator_color, executor_id, executor_name, executor_color, task_level, task_status, create_date, end_date, project_id, stages_id, company_id, indate, parent_tid, group_id, seq, plan_hours, task_type, parent_tname, finish_date, start_date
@@ -800,6 +796,6 @@
                 </foreach>
             </if>
         </where>
-             ) tmp1
+        ) tmp1
     </select>
 </mapper>