From 00fc4fe346f1b31763dac282572d64eb5f250544 Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Wed, 30 Sep 2020 17:29:49 +0800 Subject: [PATCH] 20200930_1.0 --- .../com/ccsens/mt/api/CompeteController.java | 14 +- .../ccsens/mt/api/CompeteScoreController.java | 51 + .../ccsens/mt/api/DepartmentController.java | 9 + .../com/ccsens/mt/api/ScoreController.java | 1 - .../com/ccsens/mt/api/VideoController.java | 4 +- .../com/ccsens/mt/bean/dto/CompeteDto.java | 5 +- .../java/com/ccsens/mt/bean/dto/VideoDto.java | 2 + .../java/com/ccsens/mt/bean/vo/CompeteVo.java | 13 +- .../java/com/ccsens/mt/bean/vo/VideoVo.java | 6 +- .../com/ccsens/mt/service/CompeteService.java | 2 +- .../ccsens/mt/service/DepartmentService.java | 222 ++- .../ccsens/mt/service/IDepartmentService.java | 7 + .../com/ccsens/mt/service/LevelUpService.java | 28 +- .../com/ccsens/mt/service/ScoreService.java | 87 +- .../com/ccsens/mt/service/VideoService.java | 8 + mt/src/main/resources/application.yml | 4 +- .../resources/mapper_dao/CompeteTeamDao.xml | 81 +- .../com/ccsens/tall/bean/dto/PluginDto.java | 19 + .../com/ccsens/tall/bean/dto/TaskDto.java | 11 + .../com/ccsens/tall/bean/dto/UserDto.java | 3 + .../java/com/ccsens/tall/bean/po/ProRole.java | 243 +-- .../ccsens/tall/bean/po/ProRoleExample.java | 1580 +++++++++-------- .../ccsens/tall/bean/po/ProTaskDetail.java | 11 + .../tall/bean/po/ProTaskDetailExample.java | 60 + .../com/ccsens/tall/bean/vo/ProjectVo.java | 2 + .../java/com/ccsens/tall/bean/vo/TaskVo.java | 46 + .../ccsens/tall/persist/dao/SysPluginDao.java | 3 + .../tall/persist/dao/TaskDetailDao.java | 13 + .../tall/persist/mapper/ProRoleMapper.java | 59 +- .../com/ccsens/tall/service/ExcelService.java | 33 +- .../tall/service/IProTaskDetailService.java | 9 + .../tall/service/ITaskPluginService.java | 6 + .../ccsens/tall/service/ProMemberService.java | 3 + .../tall/service/ProTaskDetailService.java | 125 +- .../tall/service/TaskPluginService.java | 67 + .../tall/service/TaskSubTimeService.java | 22 +- .../ccsens/tall/service/UserInfoService.java | 26 +- .../com/ccsens/tall/web/PluginController.java | 10 + .../ccsens/tall/web/ProjectController.java | 2 +- .../com/ccsens/tall/web/TaskController.java | 8 + tall/src/main/resources/application.yml | 4 +- .../main/resources/mapper_dao/ProRoleDao.xml | 6 +- .../resources/mapper_dao/SysPluginDao.xml | 14 + .../resources/mapper_dao/TaskDetailDao.xml | 62 +- .../resources/mapper_raw/ProRoleMapper.xml | 564 +++--- .../mapper_raw/ProTaskDetailMapper.xml | 29 +- .../main/java/com/ccsens/util/PoiUtil.java | 11 +- .../java/com/ccsens/util/WebConstant.java | 3 +- .../com/ccsens/util/cron/CronConstant.java | 8 +- .../test/java/com/ccsens/util/Base64Test.java | 24 +- .../test/java/com/ccsens/util/TestQrCord.java | 6 +- 51 files changed, 2297 insertions(+), 1339 deletions(-) create mode 100644 mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java diff --git a/mt/src/main/java/com/ccsens/mt/api/CompeteController.java b/mt/src/main/java/com/ccsens/mt/api/CompeteController.java index b26d25eb..1ac89d12 100644 --- a/mt/src/main/java/com/ccsens/mt/api/CompeteController.java +++ b/mt/src/main/java/com/ccsens/mt/api/CompeteController.java @@ -132,21 +132,13 @@ public class CompeteController { return JsonResponse.newInstance().ok(competeTeamProject); } - @MustLogin - @ApiOperation(value = "查询比赛项目上的参赛选手列表", notes = "") - @RequestMapping(value = "/get/players", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse queryPlayerList(@ApiParam @Validated @RequestBody QueryDto params) { - log.info("查询比赛项目上的参赛选手列表:{}",params); - CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params); - return JsonResponse.newInstance().ok(playerList); - } - // @MustLogin // @ApiOperation(value = "查询比赛项目上的参赛选手列表", notes = "") // @RequestMapping(value = "/get/players", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) -// public JsonResponse getPlayerList(@ApiParam @Validated @RequestBody QueryDto params) { -// log.info("扫码加入团队:{}",params); +// public JsonResponse queryPlayerList(@ApiParam @Validated @RequestBody QueryDto params) { +// log.info("查询比赛项目上的参赛选手列表:{}",params); // CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params); // return JsonResponse.newInstance().ok(playerList); // } + } diff --git a/mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java b/mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java new file mode 100644 index 00000000..a855fda7 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java @@ -0,0 +1,51 @@ +package com.ccsens.mt.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.service.ICompeteService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "线上体育竞技比赛", description = "") +@RestController +@RequestMapping("/compete") +public class CompeteScoreController { + @Resource + private ICompeteService competeService; + + @MustLogin + @ApiOperation(value = "查询比赛项目上的参赛选手列表", notes = "") + @RequestMapping(value = "/get/playerList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryPlayerList(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查询比赛项目上的参赛选手列表:{}",params); + CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params); + return JsonResponse.newInstance().ok(playerList); + } + +// @MustLogin +// @ApiOperation(value = "查看单个选手的信息和分数", notes = "") +// @RequestMapping(value = "/get/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse getPlayerInfo(@ApiParam @Validated @RequestBody QueryDto params) { +// log.info("查询比赛项目上的参赛选手列表:{}",params); +// CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params); +// return JsonResponse.newInstance().ok(playerList); +// } + + +} diff --git a/mt/src/main/java/com/ccsens/mt/api/DepartmentController.java b/mt/src/main/java/com/ccsens/mt/api/DepartmentController.java index c1a5c84f..31b16392 100644 --- a/mt/src/main/java/com/ccsens/mt/api/DepartmentController.java +++ b/mt/src/main/java/com/ccsens/mt/api/DepartmentController.java @@ -65,4 +65,13 @@ public class DepartmentController { CompeteVo.DepartmentInfo department = departmentService.getDepartment(params); return JsonResponse.newInstance().ok(department); } + + + @ApiOperation(value = "导出excel表格", notes = "") + @RequestMapping(value = "/export/excel", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse exportExcel(@ApiParam @Validated @RequestBody CompeteDto.CompeteType params) { + log.info("导出excel表格:{}",params); + String excelPath = departmentService.exportExcel(params); + return JsonResponse.newInstance().ok(excelPath); + } } diff --git a/mt/src/main/java/com/ccsens/mt/api/ScoreController.java b/mt/src/main/java/com/ccsens/mt/api/ScoreController.java index 0dae91df..54699a62 100644 --- a/mt/src/main/java/com/ccsens/mt/api/ScoreController.java +++ b/mt/src/main/java/com/ccsens/mt/api/ScoreController.java @@ -33,7 +33,6 @@ public class ScoreController { }) @RequestMapping(value = "/score", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse> getScoreLog(HttpServletRequest request, - @RequestParam Long roleId, @RequestParam(required = true) Long taskId) throws Exception { //获取userId Long userId = userService.getUserIdByToken(request); diff --git a/mt/src/main/java/com/ccsens/mt/api/VideoController.java b/mt/src/main/java/com/ccsens/mt/api/VideoController.java index f670643e..20c34187 100644 --- a/mt/src/main/java/com/ccsens/mt/api/VideoController.java +++ b/mt/src/main/java/com/ccsens/mt/api/VideoController.java @@ -44,10 +44,10 @@ public class VideoController { } @MustLogin - @ApiOperation(value = "上传的视频信息", notes = "") + @ApiOperation(value = "上传视频信息", notes = "") @ApiImplicitParams({ }) - @RequestMapping(value = "/get", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + @RequestMapping(value = "/upload", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse> uploadVideo(@RequestBody @ApiParam @Validated QueryDto params) { log.info("查看选手上传的视频信息:{}",params.toString()); List getVideoInfoList = videoService.uploadVideo(params); diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java index 2412af6c..78e8ee62 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java @@ -39,6 +39,8 @@ public class CompeteDto { @ApiModelProperty("比赛项目id(二级的)") private Long competeProjectId; } + + @Data @ApiModel public static class CompeteProjectPlayer{ @@ -162,9 +164,6 @@ public class CompeteDto { @Data @ApiModel("获取院系提交的报名信息") public static class GetDepartmentInfo{ -// @NotNull(message="请选择院系信息") -// @ApiModelProperty("院系id") -// private Long id; @NotNull @ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛") private int type; diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java index cd498b32..12c90dbc 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java @@ -36,5 +36,7 @@ public class VideoDto { private Long playerId; @ApiModelProperty("视频文件id") private Long videoFileId; + @ApiModelProperty("视频文件浏览路径") + private String videoFileUrl; } } diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java index 810cfac3..bb2f7ab1 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; import java.util.List; /** @@ -324,9 +325,13 @@ public class CompeteVo { private String companyName; @ApiModelProperty("是否通级 0否 1是") private byte certificate; + @ApiModelProperty("录播视频信息") + private List videoInfoList; + @ApiModelProperty("分数") + private BigDecimal score; } @Data - @ApiModel("比赛项目下的个人信息") + @ApiModel("比赛项目下团队信息") public static class TeamInfoByProject{ @ApiModelProperty("团队表Id") private Long teamId; @@ -340,5 +345,11 @@ public class CompeteVo { private int memberNums; @ApiModelProperty("团队内的成员") private List members; + @ApiModelProperty("录播视频信息") + private List videoInfoList; + @ApiModelProperty("分数") + private BigDecimal score; } + + } diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java index ff0ae772..2458dbb0 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java @@ -16,9 +16,11 @@ public class VideoVo { private Long videoId; @ApiModelProperty("文件id") private Long fileId; -// @ApiModelProperty("视频地址") -// private String videoUrl; + @ApiModelProperty("视频地址") + private String videoUrl; @ApiModelProperty("上传时间") private Long uploadTime; } + + } diff --git a/mt/src/main/java/com/ccsens/mt/service/CompeteService.java b/mt/src/main/java/com/ccsens/mt/service/CompeteService.java index 3737ecdc..08b360d2 100644 --- a/mt/src/main/java/com/ccsens/mt/service/CompeteService.java +++ b/mt/src/main/java/com/ccsens/mt/service/CompeteService.java @@ -292,7 +292,7 @@ public class CompeteService implements ICompeteService{ */ @Override public String getQrCodeByTeamId(QueryDto params) { - return competeTeamDao.getQrCodeByTeamId(params.getParam().getProjectPlayerId()); + return PropUtil.imgDomain + competeTeamDao.getQrCodeByTeamId(params.getParam().getProjectPlayerId()); } /** diff --git a/mt/src/main/java/com/ccsens/mt/service/DepartmentService.java b/mt/src/main/java/com/ccsens/mt/service/DepartmentService.java index 426aaa85..22d150bc 100644 --- a/mt/src/main/java/com/ccsens/mt/service/DepartmentService.java +++ b/mt/src/main/java/com/ccsens/mt/service/DepartmentService.java @@ -1,8 +1,10 @@ package com.ccsens.mt.service; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import com.ccsens.mt.bean.dto.CompeteDto; import com.ccsens.mt.bean.po.*; import com.ccsens.mt.bean.vo.CompeteVo; @@ -10,16 +12,20 @@ import com.ccsens.mt.persist.dao.CompetePlayerDao; import com.ccsens.mt.persist.dao.CompeteTeamDao; import com.ccsens.mt.persist.dao.CompeteTimeDao; import com.ccsens.mt.persist.mapper.*; -import com.ccsens.util.CodeEnum; -import com.ccsens.util.StringUtil; +import com.ccsens.util.*; import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; import java.util.ArrayList; import java.util.List; @@ -220,12 +226,12 @@ public class DepartmentService implements IDepartmentService{ project.getSecondProjects().forEach(secondProject -> { if (secondProject.getTeam() == 0) { //不是团队比赛 - secondProject.setManName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 0)); - secondProject.setWomanName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 1)); + secondProject.setManName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 1)); + secondProject.setWomanName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 0)); secondProject.setMixedName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 2)); } else { - secondProject.setManName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 0)); - secondProject.setWomanName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 1)); + secondProject.setManName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 1)); + secondProject.setWomanName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 0)); secondProject.setMixedName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 2)); } }); @@ -236,4 +242,208 @@ public class DepartmentService implements IDepartmentService{ } return departmentInfo; } + + /** + * 导出报名信息表 + */ + @Override + public String exportExcel(CompeteDto.CompeteType competeType) { +// CompeteDto.CompeteType competeType = params.getParam(); + Workbook wb = new XSSFWorkbook(); + String path = null; + //查找所有院系信息 + CompeteCompanyExample companyExample = new CompeteCompanyExample(); + companyExample.createCriteria().andTypeEqualTo((byte) competeType.getType()); + List companyList = competeCompanyMapper.selectByExample(companyExample); + log.info("查询所有院系:{}",companyList); + if(CollectionUtil.isNotEmpty(companyList)){ + for(CompeteCompany company : companyList) { + CompeteVo.DepartmentInfo departmentInfo = getDepartmentInfo(company.getId(), competeType.getType()); + log.info("查询院系的报名详细信息:{}", departmentInfo); + if (ObjectUtil.isNotNull(departmentInfo)) { + //生成写入的数据 + List> list = generatePoiUtilCell(departmentInfo); + //写入excel + try { + path = writeExcel(wb, departmentInfo.getName(), list); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + } + return path; + } + + private List> generatePoiUtilCell(CompeteVo.DepartmentInfo departmentInfo) { + List> list = new ArrayList<>(); + //标题 + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell(departmentInfo.getName(),3,1)); + list.add(title); + //表头 + List header = new ArrayList<>(); + header.add(new PoiUtil.PoiUtilCell("比赛项目")); + header.add(new PoiUtil.PoiUtilCell("分组")); + header.add(new PoiUtil.PoiUtilCell("参赛人员")); + list.add(header); + if(CollectionUtil.isNotEmpty(departmentInfo.getDepartmentProjects())){ + departmentInfo.getDepartmentProjects().forEach(departmentProject -> { + if(CollectionUtil.isNotEmpty(departmentProject.getSecondProjects())){ + for (int i = 0; i < departmentProject.getSecondProjects().size(); i++) { + int secondRows = 0; + CompeteVo.DepartmentSecondProject secondProject = departmentProject.getSecondProjects().get(i); + List project = new ArrayList<>(); + + project.add(new PoiUtil.PoiUtilCell(departmentProject.getParentProjectName()+":"+secondProject.getCompeteProjectName())); + list.add(project); + if(secondProject.getTeam() == 0){ + if(ObjectUtil.isNotNull(secondProject.getManName())) { + secondRows++; + project.add(new PoiUtil.PoiUtilCell("男子组")); + project.add(new PoiUtil.PoiUtilCell(secondProject.getManName())); + if(ObjectUtil.isNotNull(secondProject.getWomanName())) { + secondRows++; + List group = new ArrayList<>(); + group.add(new PoiUtil.PoiUtilCell()); + group.add(new PoiUtil.PoiUtilCell("女子组")); + group.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName())); + list.add(group); + } + if(ObjectUtil.isNotNull(secondProject.getMixedName())) { + secondRows++; + List group = new ArrayList<>(); + group.add(new PoiUtil.PoiUtilCell()); + group.add(new PoiUtil.PoiUtilCell("男女混合组")); + group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); + list.add(group); + } + }else if(ObjectUtil.isNotNull(secondProject.getWomanName())){ + secondRows++; + project.add(new PoiUtil.PoiUtilCell("女子组")); + project.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName())); + if(ObjectUtil.isNotNull(secondProject.getMixedName())) { + secondRows++; + List group = new ArrayList<>(); + group.add(new PoiUtil.PoiUtilCell()); + group.add(new PoiUtil.PoiUtilCell("男女混合组")); + group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); + list.add(group); + } + }else if(ObjectUtil.isNotNull(secondProject.getMixedName())){ + secondRows++; + project.add(new PoiUtil.PoiUtilCell("男女混合组")); + project.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); + } + }else { + secondRows++; + project.add(new PoiUtil.PoiUtilCell()); + String playerNames = secondProject.getManName() == null ? "" : secondProject.getManName(); + if(StrUtil.isNotEmpty(playerNames) && StrUtil.isNotEmpty(secondProject.getWomanName())){ + playerNames += "、" + secondProject.getWomanName(); + }else { + playerNames += secondProject.getWomanName() == null ? "" : secondProject.getWomanName(); + } + if(StrUtil.isNotEmpty(playerNames) && StrUtil.isNotEmpty(secondProject.getMixedName())){ + playerNames += "、" + secondProject.getMixedName(); + }else { + playerNames += secondProject.getMixedName() == null ? "" : secondProject.getMixedName(); + } + project.add(new PoiUtil.PoiUtilCell(playerNames)); + } + + +// if(ObjectUtil.isNotNull(secondProject.getManName())) { +// secondRows++; +// project.add(new PoiUtil.PoiUtilCell("男子组")); +// project.add(new PoiUtil.PoiUtilCell(secondProject.getManName())); +// if(ObjectUtil.isNotNull(secondProject.getWomanName())) { +// secondRows++; +// List group = new ArrayList<>(); +// group.add(new PoiUtil.PoiUtilCell()); +// group.add(new PoiUtil.PoiUtilCell("女子组")); +// group.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName())); +// list.add(group); +// } +// if(ObjectUtil.isNotNull(secondProject.getMixedName())) { +// secondRows++; +// List group = new ArrayList<>(); +// group.add(new PoiUtil.PoiUtilCell()); +// group.add(new PoiUtil.PoiUtilCell("男女混合组")); +// group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); +// list.add(group); +// } +// }else if(ObjectUtil.isNotNull(secondProject.getWomanName())){ +// secondRows++; +// project.add(new PoiUtil.PoiUtilCell("女子组")); +// project.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName())); +// if(ObjectUtil.isNotNull(secondProject.getMixedName())) { +// secondRows++; +// List group = new ArrayList<>(); +// group.add(new PoiUtil.PoiUtilCell()); +// group.add(new PoiUtil.PoiUtilCell("男女混合组")); +// group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); +// list.add(group); +// } +// }else if(ObjectUtil.isNotNull(secondProject.getMixedName())){ +// secondRows++; +// project.add(new PoiUtil.PoiUtilCell("男女混合组")); +// project.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); +// } + + PoiUtil.PoiUtilCell poiUtilCell = project.get(0); + poiUtilCell.setRowspan(secondRows); + } + } + }); + } + List blank = new ArrayList<>(); + blank.add(new PoiUtil.PoiUtilCell("",3,1)); + list.add(blank); + //领队裁判等信息 + if(CollectionUtil.isNotEmpty(departmentInfo.getDepartmentRoles())){ + List role1 = new ArrayList<>(); + List role2 = new ArrayList<>(); + List role3 = new ArrayList<>(); + departmentInfo.getDepartmentRoles().forEach(departmentRole -> { + if(departmentRole.getRole() == 0){ + role1.add(new PoiUtil.PoiUtilCell("领队",1,1,666,28)); + role1.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName())); + role1.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42)); + } + if(departmentRole.getRole() == 1){ + role2.add(new PoiUtil.PoiUtilCell("裁判",1,1,666,28)); + role2.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName())); + role2.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42)); + } + if(departmentRole.getRole() == 2){ + role3.add(new PoiUtil.PoiUtilCell("填表人",1,1,666,28)); + role3.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName())); + role3.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42)); + } + }); + list.add(role1); + list.add(role2); + list.add(role3); + } + + + return list; + } + + private String writeExcel(Workbook wb,String sheetName, List> list) throws Exception { + PoiUtil.exportWB(sheetName, list, wb); + //生成文件 + String fileName = "department/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = PropUtil.path + File.separator + fileName; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + boolean mkdirs = tmpFile.getParentFile().mkdirs(); + } + OutputStream stream = new FileOutputStream(tmpFile); + wb.write(stream); + stream.close(); + + return PropUtil.imgDomain + fileName; + } } diff --git a/mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java b/mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java index fbc6030f..f7f03151 100644 --- a/mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java +++ b/mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java @@ -38,4 +38,11 @@ public interface IDepartmentService { * @return 返回报名信息 */ CompeteVo.DepartmentInfo getDepartment(QueryDto params); + + /** + * 导出报名信息表 + * @param params + * @return + */ + String exportExcel(CompeteDto.CompeteType params); } diff --git a/mt/src/main/java/com/ccsens/mt/service/LevelUpService.java b/mt/src/main/java/com/ccsens/mt/service/LevelUpService.java index ee253691..b204f3a5 100644 --- a/mt/src/main/java/com/ccsens/mt/service/LevelUpService.java +++ b/mt/src/main/java/com/ccsens/mt/service/LevelUpService.java @@ -3,6 +3,7 @@ package com.ccsens.mt.service; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; import com.ccsens.mt.bean.dto.LevelDto; import com.ccsens.mt.bean.po.*; import com.ccsens.mt.bean.vo.LevelVo; @@ -73,20 +74,21 @@ public class LevelUpService implements ILevelUpService{ log.info("查找到的用户的选手信息:{}",levelUserList); levelUser = levelUserList.get(0); } - //添加晋级表 - LevelUpExample levelUpExample = new LevelUpExample(); - levelUpExample.createCriteria().andLevelUserIdEqualTo(levelUser.getId()).andCompeteCodeEqualTo(levelUpDto.getCompeteCode()); - if(levelUpDao.countByExample(levelUpExample) == 0) { - LevelUp levelUp = new LevelUp(); - BeanUtil.copyProperties(levelUpDto, levelUp); - levelUp.setId(snowflake.nextId()); - levelUp.setLevelUserId(levelUser.getId()); - levelUpDao.insertSelective(levelUp); - //存入redis - String key = Constant.Redis.COMPETE_LEVEL + levelUpDto.getCompeteTimeId() + "_" + levelUpDto.getCompeteCode(); - redisUtil.zsSet(key, levelUser, 0,3600 * 24 * 300); + if(ObjectUtil.isNotNull(levelUser)) { + //添加晋级表 + LevelUpExample levelUpExample = new LevelUpExample(); + levelUpExample.createCriteria().andLevelUserIdEqualTo(levelUser.getId()).andCompeteCodeEqualTo(levelUpDto.getCompeteCode()); + if (levelUpDao.countByExample(levelUpExample) == 0) { + LevelUp levelUp = new LevelUp(); + BeanUtil.copyProperties(levelUpDto, levelUp); + levelUp.setId(snowflake.nextId()); + levelUp.setLevelUserId(levelUser.getId()); + levelUpDao.insertSelective(levelUp); + //存入redis + String key = Constant.Redis.COMPETE_LEVEL + levelUpDto.getCompeteTimeId() + "_" + levelUpDto.getCompeteCode(); + redisUtil.zsSet(key, levelUser, 0, 3600 * 24 * 300); + } } - } /** diff --git a/mt/src/main/java/com/ccsens/mt/service/ScoreService.java b/mt/src/main/java/com/ccsens/mt/service/ScoreService.java index 66c6a059..343c8220 100644 --- a/mt/src/main/java/com/ccsens/mt/service/ScoreService.java +++ b/mt/src/main/java/com/ccsens/mt/service/ScoreService.java @@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.crypto.SecureUtil; import com.ccsens.cloudutil.bean.tall.vo.MemberVo; @@ -22,7 +23,6 @@ import com.ccsens.util.ExcelUtil; import com.ccsens.util.JsonResponse; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; -import lombok.Data; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -33,34 +33,37 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.io.*; import java.math.BigDecimal; import java.util.*; import static java.math.BigDecimal.ROUND_HALF_UP; +/** + * @author 逗 + */ @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ScoreService implements IScoreService { - @Autowired + @Resource private TallFeignClient tallFeignClient; - @Autowired + @Resource private MtScoreDao scoreDao; - @Autowired + @Resource private MtScoreLogDao scoreLogDao; - @Autowired + @Resource private MtJudgeDao judgeDao; - @Autowired + @Resource private IMessageService messageService; - @Autowired + @Resource private Snowflake snowflake; /** * 获取评分项 - * - * @param userId - * @param playerId - * @return + * @param userId 用户id + * @param playerId 被评分的任务或人 + * @return 返回评分信息 */ @Override public List getScoreLog(Long userId, Long playerId) { @@ -85,7 +88,7 @@ public class ScoreService implements IScoreService { scoreLogExample.createCriteria().andProjectIdEqualTo(taskInfo.getProjectId()); List scoreLogList = scoreLogDao.selectByExample(scoreLogExample); if (CollectionUtil.isNotEmpty(scoreLogList)) { - ScoreVo.ScoreInfo scoreInfo = null; + ScoreVo.ScoreInfo scoreInfo; for (MtScoreLog mtScoreLog : scoreLogList) { scoreInfo = new ScoreVo.ScoreInfo(); scoreInfo.setId(mtScoreLog.getId()); @@ -112,8 +115,8 @@ public class ScoreService implements IScoreService { /** * 提交评分 * - * @param userId - * @param submitScore + * @param userId 用户id + * @param submitScore 提交的评分信息 */ @Override public void submitScore(Long userId, ScoreDto.SubmitScore submitScore) { @@ -171,8 +174,8 @@ public class ScoreService implements IScoreService { /** * 提交单项评分 * - * @param userId - * @param submitOnlyOneScore + * @param userId 用户id + * @param submitOnlyOneScore 提交的单项评分信息 */ @Override public void submitOnlyOneScore(Long userId, ScoreDto.SubmitOnlyOneScore submitOnlyOneScore) { @@ -216,16 +219,16 @@ public class ScoreService implements IScoreService { /** * 查看评分 * - * @param userId - * @param roleId - * @param playerId - * @return + * @param userId 用户id + * @param roleId 角色id + * @param playerId 查看的任务或人 + * @return 返回评分信息 */ @Override public ScoreVo.AdminScore adminScore(Long userId, Long roleId, Long playerId) { ScoreVo.AdminScore adminScore = new ScoreVo.AdminScore(); List judgeScoreList = new ArrayList<>(); - ScoreVo._adminScoreList judgeScore = new ScoreVo._adminScoreList(); + ScoreVo._adminScoreList judgeScore; // Score scoreMax = scoreDao.maxScore(playerId);//最高分 // Score scoreMin = scoreDao.minScore(playerId);//最低分 TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(playerId); @@ -291,7 +294,7 @@ public class ScoreService implements IScoreService { } //查找每个任务的分数 List rankingScoreList = new ArrayList<>(); - ScoreVo.RankingScore rankingScore = null; + ScoreVo.RankingScore rankingScore; if (CollectionUtil.isNotEmpty(taskIdList)) { for (Long taskId : taskIdList) { rankingScore = new ScoreVo.RankingScore(); @@ -340,7 +343,7 @@ public class ScoreService implements IScoreService { */ private List findJudgeScore(Long projectId, Long taskId) { List judgeScoreList = new ArrayList<>(); - ScoreVo.JudgeScore judgeScore = null; + ScoreVo.JudgeScore judgeScore; //查找项目下所有评委 MtJudgeExample judgeExample = new MtJudgeExample(); judgeExample.createCriteria().andProjectIdEqualTo(projectId); @@ -368,7 +371,7 @@ public class ScoreService implements IScoreService { public void showScore(Long projectId, Long taskId) throws Exception { SyncMessageWithShowDto scoreShow = new SyncMessageWithShowDto(); SyncMessageWithShowDto.Data data = new SyncMessageWithShowDto.Data(); - SyncMessageWithShowDto.Data.Judge judge = null; + SyncMessageWithShowDto.Data.Judge judge; List judgeList = new ArrayList<>(); //项目 @@ -462,14 +465,12 @@ public class ScoreService implements IScoreService { /** * 导出签字表 * - * @param projectId - * @param taskId - * @return + * @param projectId 项目id + * @param taskId 任务id + * @return 返回签字表路径 */ @Override public String exportExcel(Long projectId, Long taskId) throws Exception { - //返回excel地址 - String excelPath = ""; //获取模板 ResourceLoader resourceLoader = new DefaultResourceLoader(); InputStream is = resourceLoader.getResource("classpath:template/judgeTemplate.xlsx").getInputStream(); @@ -504,19 +505,17 @@ public class ScoreService implements IScoreService { excel.write(stream); //关闭流 stream.close(); - String rePath = WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + path + ".xlsx"; - return rePath; + return WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + path + ".xlsx"; } /** * 写入excel * - * @param taskInfo - * @param judge - * @throws Exception + * @param taskInfo 任务和项目信息 + * @param judge 评委信息 */ - public void writeExcel(TaskVo.TaskInfoWithFeign taskInfo, MtJudge judge, XSSFSheet judgeSheet) throws Exception { - XSSFCell industry = judgeSheet.getRow(5).getCell(3); + public void writeExcel(TaskVo.TaskInfoWithFeign taskInfo, MtJudge judge, XSSFSheet judgeSheet){ +// XSSFCell industry = judgeSheet.getRow(5).getCell(3); //项目名 XSSFCell projectName = judgeSheet.getRow(5).getCell(5); projectName.setCellValue(taskInfo.getProjectName()); @@ -547,9 +546,8 @@ public class ScoreService implements IScoreService { /** * 导出排名表 - * @param projectId - * @return - * @throws Exception + * @param projectId 项目id + * @return 返回排名表信息 */ @Override public String rankingExcel(Long projectId) throws Exception { @@ -572,7 +570,7 @@ public class ScoreService implements IScoreService { } } //保存地址 - String filePath = SecureUtil.simpleUUID(); + String filePath = IdUtil.simpleUUID(); String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE; String extraPath = DateUtil.format(new Date(), "yyyyMMdd"); String ePath = dir + File.separator + extraPath + File.separator + filePath + ".xlsx"; @@ -593,8 +591,8 @@ public class ScoreService implements IScoreService { /** * 获取总评分表 - * @param projectId - * @return + * @param projectId 项目id + * @return 返回路径 */ @Override public String rankingAllExcel(Long projectId) throws Exception{ @@ -644,7 +642,7 @@ public class ScoreService implements IScoreService { } //保存地址 - String filePath = SecureUtil.simpleUUID(); + String filePath = IdUtil.simpleUUID(); String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE; String extraPath = DateUtil.format(new Date(), "yyyyMMdd"); String ePath = dir + File.separator + extraPath + File.separator + filePath + ".xlsx"; @@ -659,8 +657,7 @@ public class ScoreService implements IScoreService { excel.write(stream); //关闭流 stream.close(); - String path = WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + filePath + ".xlsx"; - return path; + return WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + filePath + ".xlsx"; } /*=====================================================*/ diff --git a/mt/src/main/java/com/ccsens/mt/service/VideoService.java b/mt/src/main/java/com/ccsens/mt/service/VideoService.java index 4ddc1aea..a7629550 100644 --- a/mt/src/main/java/com/ccsens/mt/service/VideoService.java +++ b/mt/src/main/java/com/ccsens/mt/service/VideoService.java @@ -9,6 +9,10 @@ import com.ccsens.mt.bean.po.CompeteVideoExample; import com.ccsens.mt.bean.vo.VideoVo; import com.ccsens.mt.persist.mapper.CompeteVideoMapper; import com.ccsens.util.bean.dto.QueryDto; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.ArrayList; @@ -17,6 +21,9 @@ import java.util.List; /** * @author 逗 */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class VideoService implements IVideoService{ @Resource private Snowflake snowflake; @@ -64,6 +71,7 @@ public class VideoService implements IVideoService{ competeVideo.setTeam(uploadVideo.getTeam()); competeVideo.setPlayerId(uploadVideo.getPlayerId()); competeVideo.setFileId(uploadVideo.getVideoFileId()); + competeVideo.setVideoUrl(uploadVideo.getVideoFileUrl()); competeVideo.setUploadUserId(params.getUserId()); competeVideo.setTime(System.currentTimeMillis()); competeVideoMapper.insertSelective(competeVideo); diff --git a/mt/src/main/resources/application.yml b/mt/src/main/resources/application.yml index 5c2cd5c4..5889ff7f 100644 --- a/mt/src/main/resources/application.yml +++ b/mt/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: dev - include: common, util-dev \ No newline at end of file + active: test + include: common, util-test \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml b/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml index 0257c97f..b920154e 100644 --- a/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml +++ b/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml @@ -16,18 +16,41 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - SELECT p.id as playerId, p.`name`, @@ -181,12 +222,30 @@ p.compete_group_id as groupId, (SELECT `group_name` FROM t_compete_group WHERE id = p.compete_group_id) as groupName, (SELECT `name` FROM t_compete_company WHERE id = p.company_id) as companyName, - pp.certificate + pp.certificate, + t.score, + v.id as videoId, + v.file_id as fileId, + v.video_url as videoUrl, + v.time as uploadTime FROM t_compete_project_player pp left join t_compete_player p on pp.player_id = p.id + LEFT JOIN t_compete_video v on v.player_id = pp.id and v.rec_status = 0 + LEFT JOIN + ( + SELECT + s.task_id as playerId, + sum(s.score) as score + FROM + t_mt_score_log l LEFT JOIN t_mt_score s on l.id = s.score_log_id + WHERE + l.project_id = #{competeProjectId} + and l.rec_status = 0 + and s.rec_status = 0 + ) t on t.playerId = pp.id WHERE - pp.project_id = 9 - and pp.compete_time_id = 1 + pp.project_id = #{competeProjectId} + and pp.compete_time_id = #{competeTimeId} and pp.rec_status = 0 and p.rec_status = 0 diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java index 8a82f9f9..64c24ff0 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java @@ -3,6 +3,7 @@ package com.ccsens.tall.bean.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.NonNull; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; @@ -75,4 +76,22 @@ public class PluginDto { private byte type; } + @Data + @ApiModel("修改插件配置") + public static class UpdatePluginConfig { + @NonNull + @ApiModelProperty("任务id") + private Long taskId; + @ApiModelProperty("任务插件id") + private Long taskPluginId; + @ApiModelProperty("页面接口路径") + private String webPath; + @ApiModelProperty("入参") + private String importParam; + @ApiModelProperty("放置位置 默认0 ,0任务名 1详情页 2任务下") + private Byte placeLocation; + @ApiModelProperty("程序位置 0:tall内部,1外部") + private Byte routineLocation; + } + } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java index b9bb2ced..2f99736e 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java @@ -174,6 +174,8 @@ public class TaskDto { private Long delayTime; @ApiModelProperty("优先级 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急 默认0") private Byte priority; + @ApiModelProperty("是否是里程碑 0否 1是") + private Byte milestone; @ApiModelProperty("交付物id和修改后的名字") private List deliverList; @ApiModelProperty("需要修改的插件Id") @@ -376,4 +378,13 @@ public class TaskDto { private Integer pageSize = 10; } + + @Data + @ApiModel + public static class QueryAllTaskByProjectId { + @ApiModelProperty("项目Id") + private Long projectId; + @ApiModelProperty("角色id") + private Long roleId; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java index 5edd99dc..6b4bd524 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java @@ -175,6 +175,9 @@ public class UserDto { @ApiModelProperty("账号") @NotEmpty(message = "新账号不能为空.") private String account; + @ApiModelProperty("密码,有账号登录信息则验证密码,没有则设为新密码") + @NotEmpty(message = "密码不能为空") + private String password; } @Data diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java index ca27873a..7440a524 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java @@ -1,117 +1,128 @@ -package com.ccsens.tall.bean.po; - -import java.io.Serializable; -import java.util.Date; - -public class ProRole implements Serializable { - private Long id; - - private Long projectId; - - private Long parentId; - - private String name; - - private String description; - - private Integer sequence; - - private Date createdAt; - - private Date updatedAt; - - private Byte recStatus; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public Long getParentId() { - return parentId; - } - - public void setParentId(Long parentId) { - this.parentId = parentId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Integer getSequence() { - return sequence; - } - - public void setSequence(Integer sequence) { - this.sequence = sequence; - } - - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public Byte getRecStatus() { - return recStatus; - } - - public void setRecStatus(Byte recStatus) { - this.recStatus = recStatus; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", projectId=").append(projectId); - sb.append(", parentId=").append(parentId); - sb.append(", name=").append(name); - sb.append(", description=").append(description); - sb.append(", sequence=").append(sequence); - sb.append(", createdAt=").append(createdAt); - sb.append(", updatedAt=").append(updatedAt); - sb.append(", recStatus=").append(recStatus); - sb.append("]"); - return sb.toString(); - } +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProRole implements Serializable { + private Long id; + + private Long projectId; + + private Long parentId; + + private String name; + + private String description; + + private Integer sequence; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private Long relevanceProjectId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public Long getRelevanceProjectId() { + return relevanceProjectId; + } + + public void setRelevanceProjectId(Long relevanceProjectId) { + this.relevanceProjectId = relevanceProjectId; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", parentId=").append(parentId); + sb.append(", name=").append(name); + sb.append(", description=").append(description); + sb.append(", sequence=").append(sequence); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", relevanceProjectId=").append(relevanceProjectId); + sb.append("]"); + return sb.toString(); + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java index 45a2e821..a29cbb00 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java @@ -1,761 +1,821 @@ -package com.ccsens.tall.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class ProRoleExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ProRoleExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andProjectIdIsNull() { - addCriterion("project_id is null"); - return (Criteria) this; - } - - public Criteria andProjectIdIsNotNull() { - addCriterion("project_id is not null"); - return (Criteria) this; - } - - public Criteria andProjectIdEqualTo(Long value) { - addCriterion("project_id =", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotEqualTo(Long value) { - addCriterion("project_id <>", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThan(Long value) { - addCriterion("project_id >", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { - addCriterion("project_id >=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThan(Long value) { - addCriterion("project_id <", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThanOrEqualTo(Long value) { - addCriterion("project_id <=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdIn(List values) { - addCriterion("project_id in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotIn(List values) { - addCriterion("project_id not in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdBetween(Long value1, Long value2) { - addCriterion("project_id between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotBetween(Long value1, Long value2) { - addCriterion("project_id not between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andParentIdIsNull() { - addCriterion("parent_id is null"); - return (Criteria) this; - } - - public Criteria andParentIdIsNotNull() { - addCriterion("parent_id is not null"); - return (Criteria) this; - } - - public Criteria andParentIdEqualTo(Long value) { - addCriterion("parent_id =", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotEqualTo(Long value) { - addCriterion("parent_id <>", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdGreaterThan(Long value) { - addCriterion("parent_id >", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdGreaterThanOrEqualTo(Long value) { - addCriterion("parent_id >=", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdLessThan(Long value) { - addCriterion("parent_id <", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdLessThanOrEqualTo(Long value) { - addCriterion("parent_id <=", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdIn(List values) { - addCriterion("parent_id in", values, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotIn(List values) { - addCriterion("parent_id not in", values, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdBetween(Long value1, Long value2) { - addCriterion("parent_id between", value1, value2, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotBetween(Long value1, Long value2) { - addCriterion("parent_id not between", value1, value2, "parentId"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andSequenceIsNull() { - addCriterion("sequence is null"); - return (Criteria) this; - } - - public Criteria andSequenceIsNotNull() { - addCriterion("sequence is not null"); - return (Criteria) this; - } - - public Criteria andSequenceEqualTo(Integer value) { - addCriterion("sequence =", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceNotEqualTo(Integer value) { - addCriterion("sequence <>", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceGreaterThan(Integer value) { - addCriterion("sequence >", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { - addCriterion("sequence >=", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceLessThan(Integer value) { - addCriterion("sequence <", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceLessThanOrEqualTo(Integer value) { - addCriterion("sequence <=", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceIn(List values) { - addCriterion("sequence in", values, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceNotIn(List values) { - addCriterion("sequence not in", values, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceBetween(Integer value1, Integer value2) { - addCriterion("sequence between", value1, value2, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceNotBetween(Integer value1, Integer value2) { - addCriterion("sequence not between", value1, value2, "sequence"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNull() { - addCriterion("created_at is null"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNotNull() { - addCriterion("created_at is not null"); - return (Criteria) this; - } - - public Criteria andCreatedAtEqualTo(Date value) { - addCriterion("created_at =", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotEqualTo(Date value) { - addCriterion("created_at <>", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThan(Date value) { - addCriterion("created_at >", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("created_at >=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThan(Date value) { - addCriterion("created_at <", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThanOrEqualTo(Date value) { - addCriterion("created_at <=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtIn(List values) { - addCriterion("created_at in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotIn(List values) { - addCriterion("created_at not in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtBetween(Date value1, Date value2) { - addCriterion("created_at between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotBetween(Date value1, Date value2) { - addCriterion("created_at not between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNull() { - addCriterion("updated_at is null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNotNull() { - addCriterion("updated_at is not null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtEqualTo(Date value) { - addCriterion("updated_at =", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotEqualTo(Date value) { - addCriterion("updated_at <>", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThan(Date value) { - addCriterion("updated_at >", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("updated_at >=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThan(Date value) { - addCriterion("updated_at <", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { - addCriterion("updated_at <=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIn(List values) { - addCriterion("updated_at in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotIn(List values) { - addCriterion("updated_at not in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtBetween(Date value1, Date value2) { - addCriterion("updated_at between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { - addCriterion("updated_at not between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNull() { - addCriterion("rec_status is null"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNotNull() { - addCriterion("rec_status is not null"); - return (Criteria) this; - } - - public Criteria andRecStatusEqualTo(Byte value) { - addCriterion("rec_status =", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotEqualTo(Byte value) { - addCriterion("rec_status <>", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThan(Byte value) { - addCriterion("rec_status >", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("rec_status >=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThan(Byte value) { - addCriterion("rec_status <", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThanOrEqualTo(Byte value) { - addCriterion("rec_status <=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusIn(List values) { - addCriterion("rec_status in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotIn(List values) { - addCriterion("rec_status not in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusBetween(Byte value1, Byte value2) { - addCriterion("rec_status between", value1, value2, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { - addCriterion("rec_status not between", value1, value2, "recStatus"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProRoleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProRoleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andSequenceIsNull() { + addCriterion("sequence is null"); + return (Criteria) this; + } + + public Criteria andSequenceIsNotNull() { + addCriterion("sequence is not null"); + return (Criteria) this; + } + + public Criteria andSequenceEqualTo(Integer value) { + addCriterion("sequence =", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotEqualTo(Integer value) { + addCriterion("sequence <>", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThan(Integer value) { + addCriterion("sequence >", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { + addCriterion("sequence >=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThan(Integer value) { + addCriterion("sequence <", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThanOrEqualTo(Integer value) { + addCriterion("sequence <=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceIn(List values) { + addCriterion("sequence in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotIn(List values) { + addCriterion("sequence not in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceBetween(Integer value1, Integer value2) { + addCriterion("sequence between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotBetween(Integer value1, Integer value2) { + addCriterion("sequence not between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIsNull() { + addCriterion("relevance_project_id is null"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIsNotNull() { + addCriterion("relevance_project_id is not null"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdEqualTo(Long value) { + addCriterion("relevance_project_id =", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotEqualTo(Long value) { + addCriterion("relevance_project_id <>", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdGreaterThan(Long value) { + addCriterion("relevance_project_id >", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("relevance_project_id >=", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdLessThan(Long value) { + addCriterion("relevance_project_id <", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdLessThanOrEqualTo(Long value) { + addCriterion("relevance_project_id <=", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIn(List values) { + addCriterion("relevance_project_id in", values, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotIn(List values) { + addCriterion("relevance_project_id not in", values, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdBetween(Long value1, Long value2) { + addCriterion("relevance_project_id between", value1, value2, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotBetween(Long value1, Long value2) { + addCriterion("relevance_project_id not between", value1, value2, "relevanceProjectId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java index d6e1bc07..e6be23b9 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java @@ -58,6 +58,8 @@ public class ProTaskDetail implements Serializable { private Byte priority; + private Byte milestone; + private static final long serialVersionUID = 1L; public Long getId() { @@ -276,6 +278,14 @@ public class ProTaskDetail implements Serializable { this.priority = priority; } + public Byte getMilestone() { + return milestone; + } + + public void setMilestone(Byte milestone) { + this.milestone = milestone; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -309,6 +319,7 @@ public class ProTaskDetail implements Serializable { sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); sb.append(", priority=").append(priority); + sb.append(", milestone=").append(milestone); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java index ddc69c30..203675e3 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java @@ -1774,6 +1774,66 @@ public class ProTaskDetailExample { addCriterion("priority not between", value1, value2, "priority"); return (Criteria) this; } + + public Criteria andMilestoneIsNull() { + addCriterion("milestone is null"); + return (Criteria) this; + } + + public Criteria andMilestoneIsNotNull() { + addCriterion("milestone is not null"); + return (Criteria) this; + } + + public Criteria andMilestoneEqualTo(Byte value) { + addCriterion("milestone =", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneNotEqualTo(Byte value) { + addCriterion("milestone <>", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneGreaterThan(Byte value) { + addCriterion("milestone >", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneGreaterThanOrEqualTo(Byte value) { + addCriterion("milestone >=", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneLessThan(Byte value) { + addCriterion("milestone <", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneLessThanOrEqualTo(Byte value) { + addCriterion("milestone <=", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneIn(List values) { + addCriterion("milestone in", values, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneNotIn(List values) { + addCriterion("milestone not in", values, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneBetween(Byte value1, Byte value2) { + addCriterion("milestone between", value1, value2, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneNotBetween(Byte value1, Byte value2) { + addCriterion("milestone not between", value1, value2, "milestone"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java index de12db5b..541d5258 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java @@ -166,6 +166,8 @@ public class ProjectVo { private boolean stakeholder; @ApiModelProperty("该角色是否显示") private Boolean isShow = true; + @ApiModelProperty("是否是项目虚拟的角色 0否 1是") + private byte projectRole = 0; @ApiModelProperty("成员信息") private List members; @JsonIgnore diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java index 6c6edc16..d6920221 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java @@ -148,6 +148,8 @@ public class TaskVo { private String importParam; @ApiModelProperty("优先级 默认0 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急") private Byte priority; + @ApiModelProperty("是否是里程碑 0否 1是") + private Byte milestone; @ApiModelProperty("提醒的信息") private List remindInfoList; public Long getDuration(){ @@ -221,6 +223,12 @@ public class TaskVo { private String description; @ApiModelProperty("显示分类") private String showType; + @ApiModelProperty("页面/接口路径") + private String webPath; + @ApiModelProperty("程序位置 0:tall内部,1外部") + private Byte routineLocation; + @ApiModelProperty("入参") + private String importParam; @JsonIgnore private Long roleId; } @@ -434,4 +442,42 @@ public class TaskVo { private String deliverPath; } } + + + @Data + @ApiModel("根据项目id查询所有任务信息") + public static class TaskListByProjectId{ + @ApiModelProperty("任务详细信息id") + private Long detailId; + @ApiModelProperty("名称") + private String name; + @ApiModelProperty("详细描述") + private String description; + @ApiModelProperty("所属项目id") + private Long projectId; + @ApiModelProperty("所属项目名称") + private String projectName; + @ApiModelProperty("负责人Id") + private Long executorRole; + @ApiModelProperty("负责人名称") + private String executorRoleName; + @ApiModelProperty("交付物id") + private Long deliverId; + @ApiModelProperty("交付物名称") + private String deliverName; + @ApiModelProperty("开始时间") + private Long beginTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("循环周期") + private String cycle; + @ApiModelProperty("奖惩") + private BigDecimal money; + @ApiModelProperty("优先级 默认0 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急") + private Byte priority; + @ApiModelProperty("是否是里程碑 0否 1是") + private Byte milestone; + @ApiModelProperty("二级任务") + private List secondTasks; + } } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginDao.java index 241f6571..e93d6942 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginDao.java @@ -1,5 +1,6 @@ package com.ccsens.tall.persist.dao; +import com.ccsens.tall.bean.po.ProPluginConfig; import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.bean.vo.WbsVo; @@ -20,4 +21,6 @@ public interface SysPluginDao extends SysPluginMapper{ void deleteByTaskId(@Param("taskId")Long taskId); List getPluginNameAndTaskName(@Param("projectId")Long projectId); + + ProPluginConfig getPluginConfigByTaskPluginId(@Param("taskPluginId")String taskPluginId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/TaskDetailDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/TaskDetailDao.java index 7e4cadf3..83019e70 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/TaskDetailDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/TaskDetailDao.java @@ -40,4 +40,17 @@ public interface TaskDetailDao extends ProTaskDetailMapper { List selectAllByProject(@Param("projectId")Long projectId); List getChecklistsByProjectId(@Param("projectId")Long projectId,@Param("roleId")Long roleId,@Param("allMemberId")Long allMemberId,@Param("startTime")Long startTime,@Param("endTime")Long endTime); + + /** + * 通过任务id查看任务信息(查看项目下所有任务时) + * @param detailTaskId + * @return + */ + TaskVo.TaskListByProjectId getTaskById(@Param("detailTaskId")Long detailTaskId); + /** + * 通过任务id查看任务信息(查看项目下所有任务时) + * @param parentTaskId + * @return + */ + List getTaskByParentId(@Param("parentTaskId")Long parentTaskId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleMapper.java index 1fe78d98..790d500b 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleMapper.java +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleMapper.java @@ -1,31 +1,30 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.ProRole; -import com.ccsens.tall.bean.po.ProRoleExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface ProRoleMapper { - long countByExample(ProRoleExample example); - - int deleteByExample(ProRoleExample example); - - int deleteByPrimaryKey(Long id); - - int insert(ProRole record); - - int insertSelective(ProRole record); - - List selectByExample(ProRoleExample example); - - ProRole selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") ProRole record, @Param("example") ProRoleExample example); - - int updateByExample(@Param("record") ProRole record, @Param("example") ProRoleExample example); - - int updateByPrimaryKeySelective(ProRole record); - - int updateByPrimaryKey(ProRole record); +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProRole; +import com.ccsens.tall.bean.po.ProRoleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProRoleMapper { + long countByExample(ProRoleExample example); + + int deleteByExample(ProRoleExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProRole record); + + int insertSelective(ProRole record); + + List selectByExample(ProRoleExample example); + + ProRole selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProRole record, @Param("example") ProRoleExample example); + + int updateByExample(@Param("record") ProRole record, @Param("example") ProRoleExample example); + + int updateByPrimaryKeySelective(ProRole record); + + int updateByPrimaryKey(ProRole record); } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java index 81e602ae..6d0b580d 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java @@ -17,9 +17,14 @@ import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionDefinition; +import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.support.DefaultTransactionDefinition; import javax.annotation.Resource; import java.io.FileInputStream; @@ -145,7 +150,6 @@ public class ExcelService implements IExcelService { readProject(wbsSheet, projectInfoStart, projectInfoEnd, currentUserId, sysProject); readMember(wbsSheet, memberSheet, memberStart, memberEnd, sysProject, proRoles, proMembers); readTask(xssfWorkbook, wbsSheet, taskStart, taskEnd, currentUserId, sysProject, taskDetails, proRoles, proMembers, hasGroupMap); - saveProTaskSubTime(taskDetails); //读取插件表 readPlugin(xssfWorkbook, taskDetails, proRoles, hasGroupMap); //读取插件配置表 @@ -156,6 +160,8 @@ public class ExcelService implements IExcelService { wbsSubSheetService.getRoBotSheet(sysProject.getId(),xssfWorkbook); //读取关联项目表 wbsSubSheetService.readRelevanceProject(sysProject.getId(),xssfWorkbook); + + saveProTaskSubTime(taskDetails); return sysProject; } @@ -283,6 +289,7 @@ public class ExcelService implements IExcelService { String proRoleCell = ExcelUtil.getCellValue(row.getCell(1)); String secondRoleCell = ExcelUtil.getCellValue(row.getCell(2)); String memberCell = ExcelUtil.getCellValue(row.getCell(3)); + String roleRelevanceProjectId = ExcelUtil.getCellValue(row.getCell(3)); //添加一级角色 if (StrUtil.isNotEmpty(proRoleCell)) { ProRole role = new ProRole(); @@ -311,6 +318,9 @@ public class ExcelService implements IExcelService { } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)) { role.setName(WebConstant.ROLE_NAME.Attention.value); role.setDescription(WebConstant.ROLE_NAME.Attention.phase); + }else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.ProjectVirtualRole.phase)) { + role.setName(WebConstant.ROLE_NAME.ProjectVirtualRole.value); + role.setDescription(WebConstant.ROLE_NAME.ProjectVirtualRole.phase); } else { throw new BaseException(CodeEnum.WBS_NOT_FIRST_ROLE.addMsg(wbsSheet.getSheetName() + i)); } @@ -339,6 +349,19 @@ public class ExcelService implements IExcelService { proRole.setParentId(firstRoleId); proRole.setProjectId(sysProject.getId()); proRole.setId(snowflake.nextId()); + //为虚拟项目角色添加关联的项目id + if (StrUtil.isEmpty(memberCell) && StrUtil.isNotEmpty(roleRelevanceProjectId)){ + //查找关联的项目 + try { + SysProject project = sysProjectDao.selectByPrimaryKey(Long.parseLong(roleRelevanceProjectId)); + if(ObjectUtil.isNull(project)){ + throw new BaseException(CodeEnum.NOT_PROJECT.addMsg(wbsSheet.getSheetName() + i)); + } + proRole.setRelevanceProjectId(project.getId()); + }catch (NumberFormatException e){ + throw new BaseException(CodeEnum.NOT_PROJECT.addMsg(wbsSheet.getSheetName() + i)); + } + } proRoleService.saveProRole(proRole); proRoles.add(proRole); secondRoleId = proRole.getId(); @@ -349,7 +372,7 @@ public class ExcelService implements IExcelService { if (ObjectUtil.isNull(secondRoleId)) { throw new BaseException("找不到二级角色[" + i + "]"); } - + //添加角色成员关联信息 if (StrUtil.isNotEmpty(memberCell)) { ProMemberRole memberRole = null; for (ProMember member : proMembers) { @@ -364,7 +387,11 @@ public class ExcelService implements IExcelService { if (ObjectUtil.isNull(memberRole)) { throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(wbsSheet.getSheetName() + i)); } + }else if (StrUtil.isNotEmpty(roleRelevanceProjectId)) { + + } + } //角色对谁不可见 String[] excludeRoleCells; @@ -994,11 +1021,13 @@ public class ExcelService implements IExcelService { return; } for (CronConstant.TaskDate taskDate : taskDateList) { + ProTaskSubTime proTaskSubTime = new ProTaskSubTime(); proTaskSubTime.setId(snowflake.nextId()); proTaskSubTime.setTaskDetailId(taskDetail.getId()); proTaskSubTime.setBeginTime(taskDate.getStartDate().getTime()); proTaskSubTime.setEndTime(taskDate.getEndDate().getTime()); + taskSubTimeService.saveProTaskSubTask(proTaskSubTime); } } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java b/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java index eed5714c..195c74cf 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java @@ -1,5 +1,6 @@ package com.ccsens.tall.service; +import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.TaskDto; import com.ccsens.tall.bean.po.ProSubTimeMember; import com.ccsens.tall.bean.po.ProTaskDetail; @@ -46,4 +47,12 @@ public interface IProTaskDetailService { * @throws Exception 异常 */ TaskVo.NormalTask updateTaskConfig(Long userId,TaskDto.UpdateTaskConfig updateTaskConfig) throws Exception; + + /** + * 通过项目id查找所有任务 + * @param currentUserId userId + * @param projectId 项目Id + * @return 返回所有任务 + */ + List queryAllTaskByProjectId(Long currentUserId, TaskDto.QueryAllTaskByProjectId projectId) throws Exception; } diff --git a/tall/src/main/java/com/ccsens/tall/service/ITaskPluginService.java b/tall/src/main/java/com/ccsens/tall/service/ITaskPluginService.java index 88148e97..6c0e9794 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ITaskPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ITaskPluginService.java @@ -61,4 +61,10 @@ public interface ITaskPluginService { * @return 返回wps里的文件的路径 */ List updateMinutesProject(Long currentUserId, PluginDto.UpdateMinutes updateMinutes, String token) throws Exception; + + /** + * 修改插件配置 + * @param updatePluginConfig 插件配置 + */ + void updatePluginConfig(PluginDto.UpdatePluginConfig updatePluginConfig); } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java b/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java index de06405f..27a97c57 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java @@ -72,6 +72,9 @@ public class ProMemberService implements IProMemberService { boolean flag = false; //如果该角色是全体成员返回true ProRole role = proRoleDao.selectByPrimaryKey(roleId); + if(ObjectUtil.isNull(role)){ + return false; + } if(role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)){ flag = true; } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java index 0dcbf31c..93d677fe 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java @@ -6,6 +6,7 @@ import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.ccsens.cloudutil.feign.MtFeignClient; +import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.TaskDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.MemberVo; @@ -106,7 +107,7 @@ public class ProTaskDetailService implements IProTaskDetailService { // obj = getTaskInfoByMvp(projectId, page, pageSize); // } else if (parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { - obj = getTaskInfoByProjectIdAndPM(currentUserId, projectId, taskInfoByRoleId.getRoleId(), + obj = getTaskInfoByProjectIdAndPm(currentUserId, projectId, taskInfoByRoleId.getRoleId(), taskInfoByRoleId.getStartTime(), taskInfoByRoleId.getEndTime(), taskInfoByRoleId.getProcess(), taskInfoByRoleId.getPage(), taskInfoByRoleId.getPageSize(),taskInfoByRoleId.getPriority(),taskInfoByRoleId.getImitation()); } else if (parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.Member.value)) { @@ -142,8 +143,8 @@ public class ProTaskDetailService implements IProTaskDetailService { /** * 查看任务 项目经理 */ - private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPM(Long currentUserId, Long projectId,Long roleId, Long startTime, Long endTime, - Integer process, Integer page, Integer pageSize,Integer priority,Integer imitation) throws Exception { + private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPm(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, + Integer process, Integer page, Integer pageSize, Integer priority, Integer imitation) throws Exception { TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); List globalTaskList = new ArrayList<>(); @@ -460,13 +461,19 @@ public class ProTaskDetailService implements IProTaskDetailService { plugin.setName(pluginNames[i]); plugin.setDescription(pluginDescription[i]); plugin.setShowType(pluginShowType[i]); + //查找插件的配置信息 + ProPluginConfig proPluginConfig = sysPluginDao.getPluginConfigByTaskPluginId(pluginIds[i]); + if(ObjectUtil.isNotNull(proPluginConfig)) { + plugin.setWebPath(proPluginConfig.getWebPath()); + plugin.setRoutineLocation(proPluginConfig.getRoutineLocation()); + plugin.setImportParam(proPluginConfig.getImportParam()); + } pluginVoList.add(plugin); } } normalTask.setPlugins(pluginVoList); } } - } /** @@ -566,7 +573,7 @@ public class ProTaskDetailService implements IProTaskDetailService { taskDetail.setProTaskConfig(getProTaskShow(taskDetail.getDetailId())); //添加项目信息 - normalTaskAddPlugin(currentUserId, subTime.getTaskDetailId(), taskDetail); + normalTaskAddPlugin(subTime.getTaskDetailId(), taskDetail); List groupTaskList = new ArrayList<>(); //提醒信息 @@ -597,7 +604,7 @@ public class ProTaskDetailService implements IProTaskDetailService { } //添加项目信息和插件信息 - normalTaskAddPlugin(currentUserId, groupTask.getDetailId(), groupTask); + normalTaskAddPlugin(groupTask.getDetailId(), groupTask); //修改返回时子任务的名字(“任务名+(xx和XX)”) if (detail.getAllMember() == 0) { groupTask.setName(updateSubTaskName(groupTask.getDetailId(), groupTask.getName())); @@ -615,7 +622,7 @@ public class ProTaskDetailService implements IProTaskDetailService { return taskDetail; } - private void normalTaskAddPlugin(Long userId, Long taskId, TaskVo.NormalTask normalTask) throws Exception { + private void normalTaskAddPlugin( Long taskId, TaskVo.NormalTask normalTask) { ProTaskDetail task = taskDetailDao.selectByPrimaryKey(taskId); //添加项目信息 SysProject project = sysProjectDao.selectByPrimaryKey(task.getProjectId()); @@ -627,17 +634,13 @@ public class ProTaskDetailService implements IProTaskDetailService { if (ObjectUtil.isNotNull(role)) { normalTask.setExecutorRoleName(role.getName()); } - //添加插件 -// List pluginVoList = pluginService.getPluginByTask(task.getId(), userId); -// normalTask.setPlugins(new ArrayList<>()); -// normalTask.getPlugins().addAll(pluginVoList); } /** * 修改返回时子任务的名字 格式:“任务名+(xx和XX)” */ private String updateSubTaskName(Long taskId, String taskName) { - String name = taskName + "("; + StringBuilder name = new StringBuilder(taskName + "("); ProTaskMemberExample taskMemberExample = new ProTaskMemberExample(); taskMemberExample.createCriteria().andTaskDetailIdEqualTo(taskId); List taskMemberList = taskMemberDao.selectByExample(taskMemberExample); @@ -645,15 +648,15 @@ public class ProTaskDetailService implements IProTaskDetailService { for (int i = 0; i < taskMemberList.size(); i++) { ProMember member = proMemberDao.selectByPrimaryKey(taskMemberList.get(i).getMemberId()); if (ObjectUtil.isNotNull(member)) { - name += member.getNickname(); + name.append(member.getNickname()); if (i != taskMemberList.size() - 1) { - name += "和"; + name.append("和"); } } } } - name = name + ")"; - return name; + name.append(")"); + return name.toString(); } @@ -719,13 +722,7 @@ public class ProTaskDetailService implements IProTaskDetailService { //关键词模糊搜索 if (StrUtil.isNotEmpty(key)) { if (CollectionUtil.isNotEmpty(normalTaskList)) { - Iterator it = normalTaskList.iterator(); - while (it.hasNext()) { - TaskVo.NormalTask normalTask = it.next(); - if (!normalTask.getName().contains(key)) { - it.remove(); - } - } + normalTaskList.removeIf(normalTask -> !normalTask.getName().contains(key)); } } @@ -1151,6 +1148,9 @@ public class ProTaskDetailService implements IProTaskDetailService { (taskDetail.getDelay() == WebConstant.TASK_DELAY.DelayManual.value)){ taskDetail.setDelayTime(updateTaskInfo.getDelayTime()); } + if(ObjectUtil.isNotNull(updateTaskInfo.getMilestone())){ + taskDetail.setMilestone(updateTaskInfo.getMilestone()); + } //时间 if(ObjectUtil.isNotNull(updateTaskInfo.getBeginTime()) || ObjectUtil.isNotNull(updateTaskInfo.getEndTime()) || @@ -1422,4 +1422,83 @@ public class ProTaskDetailService implements IProTaskDetailService { } return getTaskInfoByTaskId(userId,taskDetail.getProjectId(),updateTaskConfig.getTaskId(),null); } + + @Override + public List queryAllTaskByProjectId(Long currentUserId, TaskDto.QueryAllTaskByProjectId projectIdDto) throws Exception { + List taskList = new ArrayList<>(); +// TaskVo.TaskListByProjectId firstTask; + //1、查找一级任务 + SysProject project = sysProjectDao.selectByPrimaryKey(projectIdDto.getProjectId()); + if (ObjectUtil.isNull(project)) { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + + ProTaskDetailExample proTaskDetailExample = new ProTaskDetailExample(); + proTaskDetailExample.createCriteria().andProjectIdEqualTo(projectIdDto.getProjectId()).andLevelEqualTo((byte) 1); + List firstTaskDetailList = taskDetailDao.selectByExample(proTaskDetailExample); + if (CollectionUtil.isNotEmpty(firstTaskDetailList)) { + firstTaskDetailList.forEach(firstTaskDetail -> { + TaskVo.TaskListByProjectId firstTask = taskDetailDao.getTaskById(firstTaskDetail.getId()); + List secondTaskList = taskDetailDao.getTaskByParentId(firstTaskDetail.getId()); + firstTask.setSecondTasks(secondTaskList); + taskList.add(firstTask); + }); + } +// int sequence = 1; +// for (ProTaskDetail firstTaskDetail : firstTaskDetailList) { +// TaskVo.TaskListByProjectId firstTask = new TaskVo.TaskListByProjectId(); +// BeanUtil.copyProperties(firstTaskDetail, firstTask); +// normalTask.setDetailId(firstTaskDetail.getId()); +// normalTask.setId(taskDeliverService.isTaskOrSubTime(firstTaskDetail.getId())); +// normalTask.setSequence(sequence); +// // 查询任务对应的配置 +// ProPluginConfigExample configExample = new ProPluginConfigExample(); +// configExample.createCriteria().andTaskIdEqualTo(firstTaskDetail.getId()).andPlaceLocationEqualTo((byte)0); +// List proPluginConfigs = proPluginConfigMapper.selectByExample(configExample); +// if (CollectionUtil.isNotEmpty(proPluginConfigs)) { +// ProPluginConfig config = proPluginConfigs.get(0); +// normalTask.setImportParam(config.getImportParam()); +// normalTask.setRoutineLocation(config.getRoutineLocation()); +// normalTask.setWebPath(config.getWebPath()); +// } +// //一级任务配置 +// normalTask.setProTaskConfig(getProTaskShow(normalTask.getDetailId())); +// +// //一级任务完成状态 +// ProSubTimeMember firstSubTimeMember = getProcessByUserIdAndTask(currentUserId, normalTask.getId()); +// if (ObjectUtil.isNotNull(firstSubTimeMember)) { +// normalTask.setRealEndTime(firstSubTimeMember.getRealFinishTime()); +// normalTask.setProcess(firstSubTimeMember.getComplatedStatus()); +// } +// //查找一级任务下的二级任务 +// List secondNormalTaskList = taskDetailDao.selectNormalTaskListByPM(projectIdDto.getProjectId(), firstTaskDetail.getId(), project.getBeginTime(), project.getEndTime(),projectIdDto.getRoleId()); +// if (CollectionUtil.isNotEmpty(secondNormalTaskList)) { +// for (TaskVo.NormalTask task : secondNormalTaskList) { +// //处理插件 +// managePlugin(currentUserId,projectIdDto.getRoleId(),task,null); +// //二级任务完成状态 +// if(task.getProcess() != 2) { +// ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, task.getId()); +// if (ObjectUtil.isNotNull(subTimeMember)) { +// task.setRealEndTime(subTimeMember.getRealFinishTime()); +// task.setProcess(subTimeMember.getComplatedStatus()); +// }else if(task.getProcess() > 2){ +// task.setRealEndTime((long) 0); +// task.setProcess(0); +// } +// } +// //二级任务配置 +// task.setProTaskConfig(getProTaskShow(task.getDetailId())); +// //提醒信息 +// task.setRemindInfoList(proRemindDao.queryRemindByTask(normalTask.getId())); +// } +// } +// normalTask.setSecondTasks(secondNormalTaskList); +// normalTaskList.add(normalTask); +// sequence++; +// } +// } +// return normalTaskList; + return taskList; + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java b/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java index da808ef2..d02afdc8 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java @@ -19,6 +19,7 @@ import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.eclipse.jetty.util.log.Log; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -38,6 +39,8 @@ public class TaskPluginService implements ITaskPluginService{ @Resource private TaskPluginDao taskPluginDao; @Resource + private ProPluginConfigDao proPluginConfigDao; + @Resource private TaskDetailDao taskDetailDao; @Resource private TaskSubTimeDao taskSubTimeDao; @@ -728,4 +731,68 @@ public class TaskPluginService implements ITaskPluginService{ }); } } + + + /** + * 修改插件配置 + * @param updatePluginConfig 插件配置 + */ + @Override + public void updatePluginConfig(PluginDto.UpdatePluginConfig updatePluginConfig) { + //获取任务详情id + Long taskDetailId = updatePluginConfig.getTaskId(); + ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(updatePluginConfig.getTaskId()); + if(ObjectUtil.isNotNull(taskSubTime)){ + taskDetailId = taskSubTime.getTaskDetailId(); + } + //获取插件id + Long sysPluginId = 0L; + ProTaskPlugin taskPlugin = taskPluginDao.selectByPrimaryKey(updatePluginConfig.getTaskPluginId()); + if(ObjectUtil.isNotNull(taskPlugin)){ + sysPluginId = taskPlugin.getPluginId(); + } + //查找原来的插件配置 + ProPluginConfigExample proPluginConfigExample = new ProPluginConfigExample(); + proPluginConfigExample.createCriteria().andTaskIdEqualTo(taskDetailId).andPluginIdEqualTo(sysPluginId); + List proPluginConfigList = proPluginConfigDao.selectByExample(proPluginConfigExample); + if(CollectionUtil.isNotEmpty(proPluginConfigList)){ + ProPluginConfig pluginConfig = proPluginConfigList.get(0); + //有则修改 + if(ObjectUtil.isNotNull(pluginConfig)){ + if(StrUtil.isNotEmpty(updatePluginConfig.getWebPath())) { + pluginConfig.setWebPath(updatePluginConfig.getWebPath()); + } + if(StrUtil.isNotEmpty(updatePluginConfig.getImportParam())) { + pluginConfig.setImportParam(updatePluginConfig.getImportParam()); + } + if(ObjectUtil.isNotNull(updatePluginConfig.getPlaceLocation())) { + pluginConfig.setPlaceLocation(updatePluginConfig.getPlaceLocation()); + } + if(ObjectUtil.isNotNull(updatePluginConfig.getRoutineLocation())) { + pluginConfig.setRoutineLocation(updatePluginConfig.getRoutineLocation()); + } + proPluginConfigDao.updateByPrimaryKeySelective(pluginConfig); + } + } else { + //没有则添加 + ProPluginConfig proPluginConfig = new ProPluginConfig(); + proPluginConfig.setId(snowflake.nextId()); + proPluginConfig.setTaskId(taskDetailId); + proPluginConfig.setPluginId(sysPluginId); + if(StrUtil.isNotEmpty(updatePluginConfig.getWebPath())) { + proPluginConfig.setWebPath(updatePluginConfig.getWebPath()); + } + if(StrUtil.isNotEmpty(updatePluginConfig.getImportParam())) { + proPluginConfig.setImportParam(updatePluginConfig.getImportParam()); + } + if(ObjectUtil.isNotNull(updatePluginConfig.getPlaceLocation())) { + proPluginConfig.setPlaceLocation(updatePluginConfig.getPlaceLocation()); + } + if(ObjectUtil.isNotNull(updatePluginConfig.getRoutineLocation())) { + proPluginConfig.setRoutineLocation(updatePluginConfig.getRoutineLocation()); + } + proPluginConfigDao.insertSelective(proPluginConfig); + } + + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java b/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java index 13a42948..536d849a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java @@ -28,8 +28,12 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.AmqpTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionDefinition; +import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.support.DefaultTransactionDefinition; import javax.annotation.Resource; import java.util.*; @@ -75,10 +79,26 @@ public class TaskSubTimeService implements ITaskSubTimeService { private ProRemindDao proRemindDao; @Autowired private AmqpTemplate rabbitTemplate; + //定义事务对象 + @Resource + private PlatformTransactionManager transactionManager; @Override public void saveProTaskSubTask(ProTaskSubTime proTaskSubTime) { - taskSubTimeDao.insertSelective(proTaskSubTime); + //开启手动事务 + DefaultTransactionDefinition def = new DefaultTransactionDefinition(); + // 事务隔离级别,开启新事务 + def.setPropagationBehavior( TransactionDefinition.PROPAGATION_REQUIRES_NEW ); + //获取事务状态,并开启事务,相当于transation.begin(); + TransactionStatus status = transactionManager.getTransaction( def ); + try{ +// method();//执行方法 + taskSubTimeDao.insertSelective(proTaskSubTime); + transactionManager.commit( status ); //提交事务 + } catch(Exception e){ + transactionManager.rollback(status); + } + } /** diff --git a/tall/src/main/java/com/ccsens/tall/service/UserInfoService.java b/tall/src/main/java/com/ccsens/tall/service/UserInfoService.java index 424e42c3..d2e58728 100644 --- a/tall/src/main/java/com/ccsens/tall/service/UserInfoService.java +++ b/tall/src/main/java/com/ccsens/tall/service/UserInfoService.java @@ -27,6 +27,8 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import javax.servlet.http.Part; import java.io.File; +import java.security.NoSuchAlgorithmException; +import java.security.spec.InvalidKeySpecException; import java.util.Date; import java.util.List; @@ -76,9 +78,29 @@ public class UserInfoService implements IUserInfoService{ List authList = sysAuthDao.selectByExample(authAccountExample); if(CollectionUtil.isNotEmpty(authList)){ authList.forEach(sysAuth -> { - sysAuth.setIdentifier(changeAccount.getAccount()); - sysAuthDao.updateByPrimaryKeySelective(sysAuth); + //验证密码 + try { + if (!ShiroKit.authenticate(changeAccount.getPassword(), sysAuth.getCredential(), sysAuth.getSalt())) { + throw new BaseException(CodeEnum.PASSWORD_ERROR); + } + sysAuth.setIdentifier(changeAccount.getAccount()); + sysAuthDao.updateByPrimaryKeySelective(sysAuth); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } catch (InvalidKeySpecException e) { + e.printStackTrace(); + } }); + }else { + //不存在则添加账号 + SysAuth sysAuth = new SysAuth(); + sysAuth.setId(snowflake.nextId()); + sysAuth.setUserId(userId); + sysAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); + sysAuth.setIdentifier(changeAccount.getAccount()); + sysAuth.setSalt(ShiroKit.getRandomSalt(6)); + sysAuth.setCredential(ShiroKit.md5(changeAccount.getPassword(), sysAuth.getSalt())); + sysAuthDao.insertSelective(sysAuth); } //修改完删除redis redisUtil.del(accountKey); diff --git a/tall/src/main/java/com/ccsens/tall/web/PluginController.java b/tall/src/main/java/com/ccsens/tall/web/PluginController.java index fb0e6926..899c6b5c 100644 --- a/tall/src/main/java/com/ccsens/tall/web/PluginController.java +++ b/tall/src/main/java/com/ccsens/tall/web/PluginController.java @@ -181,4 +181,14 @@ public class PluginController { List wpsPath = taskPluginService.updateMinutesProject(currentUserId,updateMinutes,token); return JsonResponse.newInstance().ok(wpsPath); } + + + @ApiOperation(value = "修改插件配置信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/config", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updatePluginConfig(@ApiParam @Validated @RequestBody PluginDto.UpdatePluginConfig updatePluginConfig) throws Exception { + taskPluginService.updatePluginConfig(updatePluginConfig); + return JsonResponse.newInstance().ok(); + } } diff --git a/tall/src/main/java/com/ccsens/tall/web/ProjectController.java b/tall/src/main/java/com/ccsens/tall/web/ProjectController.java index af254f40..82076a10 100644 --- a/tall/src/main/java/com/ccsens/tall/web/ProjectController.java +++ b/tall/src/main/java/com/ccsens/tall/web/ProjectController.java @@ -146,7 +146,7 @@ public class ProjectController { @ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query"), @ApiImplicitParam(name = "priority", value = "优先级排序 0无 1倒叙(优先级高的在前) 2正序", required = true, paramType = "query") }) - @RequestMapping(value = "/{id}/tasks", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + @RequestMapping(value = "/{id}/tasks", method = {RequestMethod.POST}, produces = {"application/json;charset=UTF-8"}) public JsonResponse getTasksByRoleId(HttpServletRequest request, @PathVariable("id") Long projectId, @RequestBody TaskDto.QueryTaskInfoByRoleId taskInfoByRoleId) throws Exception{ diff --git a/tall/src/main/java/com/ccsens/tall/web/TaskController.java b/tall/src/main/java/com/ccsens/tall/web/TaskController.java index d947da9b..f6b90a93 100644 --- a/tall/src/main/java/com/ccsens/tall/web/TaskController.java +++ b/tall/src/main/java/com/ccsens/tall/web/TaskController.java @@ -255,6 +255,14 @@ public class TaskController { return JsonResponse.newInstance().ok(taskInfo); } + @ApiOperation(value = "查找项目下的所有任务",notes = "") + @RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryAllTaskByProjectId(HttpServletRequest request, + @Validated @RequestBody TaskDto.QueryAllTaskByProjectId projectIdDto) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List taskInfoList = taskDetailService.queryAllTaskByProjectId(currentUserId,projectIdDto); + return JsonResponse.newInstance().ok(taskInfoList); + } /** * 通过任务id查询项目id diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index c88e995d..b2acd365 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: test - include: util-test,common + active: dev + include: util-dev,common diff --git a/tall/src/main/resources/mapper_dao/ProRoleDao.xml b/tall/src/main/resources/mapper_dao/ProRoleDao.xml index 2514abbf..0bb1cfa6 100644 --- a/tall/src/main/resources/mapper_dao/ProRoleDao.xml +++ b/tall/src/main/resources/mapper_dao/ProRoleDao.xml @@ -13,6 +13,7 @@ + @@ -63,14 +64,15 @@ m.nickname as mName, m.phone as mPhone, m.user_id as mUserId, - m.stakeholder_id as stakeholderId + m.stakeholder_id as stakeholderId, + if((SELECT `name` FROM t_pro_role WHERE id = pr.parent_id) = 'ProjectVirtualRole',1,0) as projectRole from t_pro_role pr LEFT JOIN t_pro_member_role mr ON mr.role_id = pr.id LEFT JOIN t_pro_member m ON mr.member_id = m.id where pr.project_id = #{projectId} and - (SELECT name FROM t_pro_role r WHERE pr.parent_id = r.id) in ('PM','Member') + (SELECT name FROM t_pro_role r WHERE pr.parent_id = r.id) in ('PM','Member','ProjectVirtualRole') AND pr.name not IN ('全体成员','观众','MVP') AND diff --git a/tall/src/main/resources/mapper_dao/SysPluginDao.xml b/tall/src/main/resources/mapper_dao/SysPluginDao.xml index 404a50c7..7d933b2c 100644 --- a/tall/src/main/resources/mapper_dao/SysPluginDao.xml +++ b/tall/src/main/resources/mapper_dao/SysPluginDao.xml @@ -95,4 +95,18 @@ )t GROUP BY t.taskId,t.roleId + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml index d1eca4e1..f2a33c9c 100644 --- a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml +++ b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml @@ -21,6 +21,7 @@ + @@ -37,6 +38,7 @@ + @@ -91,7 +93,8 @@ sp.description as spDescription, sp.id as spid, sp.show_type as spShowType, - d.priority as priority + d.priority as priority, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -175,7 +178,8 @@ p.id as p_id, sp.description as spDescription, sp.id as spid, - sp.show_type as spShowType + sp.show_type as spShowType, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -246,7 +250,8 @@ p.id as p_id, sp.description as spDescription, sp.id as spid, - sp.show_type as spShowType + sp.show_type as spShowType, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -301,7 +306,8 @@ p.id as p_id, sp.description as spDescription, sp.id as spid, - sp.show_type as spShowType + sp.show_type as spShowType, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -383,7 +389,8 @@ p.id as p_id, sp.description as spDescription, sp.id as spid, - sp.show_type as spShowType + sp.show_type as spShowType, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -511,5 +518,50 @@ s.end_time > #{startTime} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProRoleMapper.xml b/tall/src/main/resources/mapper_raw/ProRoleMapper.xml index c1903e02..489aa8c5 100644 --- a/tall/src/main/resources/mapper_raw/ProRoleMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProRoleMapper.xml @@ -1,275 +1,291 @@ - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, project_id, parent_id, name, description, sequence, created_at, updated_at, rec_status - - - - - delete from t_pro_role - where id = #{id,jdbcType=BIGINT} - - - delete from t_pro_role - - - - - - insert into t_pro_role (id, project_id, parent_id, - name, description, sequence, - created_at, updated_at, rec_status - ) - values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, - #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{sequence,jdbcType=INTEGER}, - #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} - ) - - - insert into t_pro_role - - - id, - - - project_id, - - - parent_id, - - - name, - - - description, - - - sequence, - - - created_at, - - - updated_at, - - - rec_status, - - - - - #{id,jdbcType=BIGINT}, - - - #{projectId,jdbcType=BIGINT}, - - - #{parentId,jdbcType=BIGINT}, - - - #{name,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{sequence,jdbcType=INTEGER}, - - - #{createdAt,jdbcType=TIMESTAMP}, - - - #{updatedAt,jdbcType=TIMESTAMP}, - - - #{recStatus,jdbcType=TINYINT}, - - - - - - update t_pro_role - - - id = #{record.id,jdbcType=BIGINT}, - - - project_id = #{record.projectId,jdbcType=BIGINT}, - - - parent_id = #{record.parentId,jdbcType=BIGINT}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - sequence = #{record.sequence,jdbcType=INTEGER}, - - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - - - - - - - - update t_pro_role - set id = #{record.id,jdbcType=BIGINT}, - project_id = #{record.projectId,jdbcType=BIGINT}, - parent_id = #{record.parentId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - sequence = #{record.sequence,jdbcType=INTEGER}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} - - - - - - update t_pro_role - - - project_id = #{projectId,jdbcType=BIGINT}, - - - parent_id = #{parentId,jdbcType=BIGINT}, - - - name = #{name,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - sequence = #{sequence,jdbcType=INTEGER}, - - - created_at = #{createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{recStatus,jdbcType=TINYINT}, - - - where id = #{id,jdbcType=BIGINT} - - - update t_pro_role - set project_id = #{projectId,jdbcType=BIGINT}, - parent_id = #{parentId,jdbcType=BIGINT}, - name = #{name,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - sequence = #{sequence,jdbcType=INTEGER}, - created_at = #{createdAt,jdbcType=TIMESTAMP}, - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} - where id = #{id,jdbcType=BIGINT} - + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, parent_id, name, description, sequence, created_at, updated_at, rec_status, + relevance_project_id + + + + + delete from t_pro_role + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_role + + + + + + insert into t_pro_role (id, project_id, parent_id, + name, description, sequence, + created_at, updated_at, rec_status, + relevance_project_id) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{sequence,jdbcType=INTEGER}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, + #{relevanceProjectId,jdbcType=BIGINT}) + + + insert into t_pro_role + + + id, + + + project_id, + + + parent_id, + + + name, + + + description, + + + sequence, + + + created_at, + + + updated_at, + + + rec_status, + + + relevance_project_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{parentId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{sequence,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{relevanceProjectId,jdbcType=BIGINT}, + + + + + + update t_pro_role + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + sequence = #{record.sequence,jdbcType=INTEGER}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT}, + + + + + + + + update t_pro_role + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + sequence = #{record.sequence,jdbcType=INTEGER}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT} + + + + + + update t_pro_role + + + project_id = #{projectId,jdbcType=BIGINT}, + + + parent_id = #{parentId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + sequence = #{sequence,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_role + set project_id = #{projectId,jdbcType=BIGINT}, + parent_id = #{parentId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + sequence = #{sequence,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml b/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml index c3010fd1..c22d2b95 100644 --- a/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml @@ -29,6 +29,7 @@ + @@ -92,7 +93,7 @@ id, project_id, name, description, begin_time, end_time, cycle, parent_id, sub_task, sub_project_id, sub_project, executor_role, checker_role, money, delay, delay_time, loop_to, loop_times, virtual, level, has_group, finish_need_all, all_member, created_at, - updated_at, rec_status, priority + updated_at, rec_status, priority, milestone @@ -405,6 +412,9 @@ priority = #{record.priority,jdbcType=TINYINT}, + + milestone = #{record.milestone,jdbcType=TINYINT}, + @@ -438,7 +448,8 @@ created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, rec_status = #{record.recStatus,jdbcType=TINYINT}, - priority = #{record.priority,jdbcType=TINYINT} + priority = #{record.priority,jdbcType=TINYINT}, + milestone = #{record.milestone,jdbcType=TINYINT} @@ -524,6 +535,9 @@ priority = #{priority,jdbcType=TINYINT}, + + milestone = #{milestone,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -554,7 +568,8 @@ created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, rec_status = #{recStatus,jdbcType=TINYINT}, - priority = #{priority,jdbcType=TINYINT} + priority = #{priority,jdbcType=TINYINT}, + milestone = #{milestone,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/util/src/main/java/com/ccsens/util/PoiUtil.java b/util/src/main/java/com/ccsens/util/PoiUtil.java index 45b38a59..5eb53f6f 100644 --- a/util/src/main/java/com/ccsens/util/PoiUtil.java +++ b/util/src/main/java/com/ccsens/util/PoiUtil.java @@ -175,7 +175,8 @@ public class PoiUtil { if(StrUtil.isNotEmpty(cell.getFunction())) { newCell.setCellFormula(cell.getFunction()); } - style.setFillForegroundColor(IndexedColors.RED.getIndex()); + //设置自动换行 + style.setWrapText(true); newCell.setCellStyle(style); } } @@ -450,13 +451,7 @@ public class PoiUtil { } /** - * 插入图片 - */ - private static void insertImage(){ - - } - /** - * + * 插入图片 * @param row1:起始行 * @param row2:终止行 * @param col1:起始列 diff --git a/util/src/main/java/com/ccsens/util/WebConstant.java b/util/src/main/java/com/ccsens/util/WebConstant.java index de5dc1fb..0165fe9a 100644 --- a/util/src/main/java/com/ccsens/util/WebConstant.java +++ b/util/src/main/java/com/ccsens/util/WebConstant.java @@ -241,7 +241,8 @@ public class WebConstant { God("God","上帝"),ManageRepresent("ManageRepresent","管代"),Stakeholder("Stakeholder","干系人"), PM("PM","项目经理"),Member("Member","项目成员"),MVP("MVP","MVP") ,Attention("Attention","关注者"),Creator("Creator","创建者") - ,MoneyStakeholder("MoneyStakeholder","奖惩干系人"),AllMember("AllMember","全体成员"); + ,MoneyStakeholder("MoneyStakeholder","奖惩干系人"),AllMember("AllMember","全体成员") + ,ProjectVirtualRole("ProjectVirtualRole","角色项目"); public String value; public String phase; diff --git a/util/src/main/java/com/ccsens/util/cron/CronConstant.java b/util/src/main/java/com/ccsens/util/cron/CronConstant.java index ef36e9ad..6ef0be8f 100644 --- a/util/src/main/java/com/ccsens/util/cron/CronConstant.java +++ b/util/src/main/java/com/ccsens/util/cron/CronConstant.java @@ -54,11 +54,13 @@ public class CronConstant { // TaskCron week = getCronDay("每周7"); // System.out.println("周1:" + week); // System.out.println("周一:" + getDate(week,start, end)); -// - TaskCron workday = getCronDay("每周一-周五 18点"); +//// +// TaskCron workday = getCronDay("每周一-周五 18点"); +// System.out.println("工作日:" + workday); +// System.out.println("工作日:" + getDate(workday,start, end)); + TaskCron workday = getCronDay("每周一-周五 15点30分-15点45分"); System.out.println("工作日:" + workday); System.out.println("工作日:" + getDate(workday,start, end)); - // System.out.println(generateDates("每天9点,10点", start, end)); } diff --git a/util/src/test/java/com/ccsens/util/Base64Test.java b/util/src/test/java/com/ccsens/util/Base64Test.java index 4fb07f8b..50bf95b2 100644 --- a/util/src/test/java/com/ccsens/util/Base64Test.java +++ b/util/src/test/java/com/ccsens/util/Base64Test.java @@ -1,6 +1,8 @@ package com.ccsens.util; import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.junit.Test; @@ -33,7 +35,27 @@ public class Base64Test { @Test public void test02() throws Exception { - +// String a = "abcdefg"; +// byte[] bytes = a.getBytes(); +// byte[] bytes1 = new byte[bytes.length]; +// byte[] bytes2 = new byte[bytes.length]; +// for (int i = 0; i < bytes.length; i++) { +// bytes1[i] = (byte) (bytes[i]^ 0xff); +// } +// for (int i = 0; i < bytes1.length; i++) { +// bytes2[i] = (byte) (bytes1[i]^ 0xff); +// System.out.print(bytes2[i]+" "); +// } +// String c = new String(bytes1); +// String b = new String(bytes2); +// System.out.println(b); +// System.out.println(c); + try { + String a = "ax15"; + System.out.println(Long.parseLong(a)); + }catch (NumberFormatException e){ + throw new BaseException("ssss"); + } } diff --git a/util/src/test/java/com/ccsens/util/TestQrCord.java b/util/src/test/java/com/ccsens/util/TestQrCord.java index 266f7234..77db8709 100644 --- a/util/src/test/java/com/ccsens/util/TestQrCord.java +++ b/util/src/test/java/com/ccsens/util/TestQrCord.java @@ -28,9 +28,9 @@ public class TestQrCord { // String fileName = "zzz/" + DateUtil.today() + "/" + i+"组" + ".png"; // String text = "https://www.tall.wiki/pt-dev/respond?groupId="+i+"&groupName="+i+"组"; - String text = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7af1bf1e14facf82&redirect_uri=http://www.tall.wiki/pt-dev/vote&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; -// String text = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7af1bf1e14facf82&redirect_uri=http://test.tall.wiki/compete&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; - String fileName = "zzz/" + "远程比赛(生产).png"; +// String text = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7af1bf1e14facf82&redirect_uri=http://www.tall.wiki/pt-dev/vote&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; + String text = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7af1bf1e14facf82&redirect_uri=https://www.tall.wiki/compete-province&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; + String fileName = "zzz/" + "远程比赛-省赛(生产).png"; QRCodeWriter qrCodeWriter = new QRCodeWriter();