diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java b/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java index 105e2908..5ea780e6 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java @@ -1,6 +1,9 @@ package com.ccsens.cloudutil.aspect; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.ccsens.cloudutil.bean.tall.dto.LogDto; +import com.ccsens.cloudutil.bean.tall.vo.UserVo; import com.ccsens.cloudutil.feign.TallFeignClient; import com.ccsens.util.UploadFileUtil_Servlet3; import com.ccsens.util.WebConstant; @@ -49,7 +52,9 @@ public class LogAspect { } - @Pointcut("execution(* com.ccsens.tall.web..*(..)) || execution(* com.ccsens.ht.api..*(..))") + @Pointcut("execution(* com.ccsens.tall.web..*(..)) || execution(* com.ccsens.ht.api..*(..))" + + " || execution(* com.ccsens.mt.api..*(..)) || execution(* com.ccsens.game.api..*(..))" + + " || execution(* com.ccsens.health.api..*(..)) || execution(* com.ccsens.pims.api..*(..))") public void logAdvice(){ } @@ -72,6 +77,13 @@ public class LogAspect { throw throwable; } if (logDto != null) { + if("/users/signin".equals(logDto.getUrl()) && result != null){ + JSONObject json = JSONObject.parseObject(JSON.toJSONString(result)); + if(json.getIntValue("code") == 200 && json.get("data") != null){ + long userId = json.getJSONObject("data").getLongValue("id"); + logDto.setUserId(userId); + } + } String message = result == null ? null : result.toString().length() > 1000 ? result.toString().substring(0, 1000) : result.toString(); logDto.setResult(message); tallFeignClient.log(logDto); @@ -96,9 +108,9 @@ public class LogAspect { log.info("保存日志,不进行记录"); return null; } - LogDto dto = new LogDto(); dto.setUrl(url); + dto.setFacility(request.getHeader("fingerprint")); //参数 Object[] args = pjp.getArgs(); StringBuilder param = new StringBuilder(); @@ -112,6 +124,7 @@ public class LogAspect { String userId = claims == null ? null : ((Claims) claims).getSubject(); if (userId != null) { param.append("userId:").append(userId).append("--"); + dto.setUserId(Long.parseLong(userId)); } } else if (args[i] instanceof Part) { diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/LogDto.java b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/LogDto.java index c0089813..b6bef73f 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/LogDto.java +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/LogDto.java @@ -24,4 +24,8 @@ public class LogDto { private String methodDesc; @ApiModelProperty("接口返回值(或异常)") private String result; + @ApiModelProperty("设备信息") + private String facility; + @ApiModelProperty("设备信息") + private Long userId; } diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java index 7656dfc4..c5346406 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java @@ -24,6 +24,8 @@ public class WpsDto { private String fileName; @ApiModelProperty("文件路径,默认在WebConstant.UPLOAD_PATH_BASE下") private String filePath; + @ApiModelProperty("文件实际存储路径") + private String realFilePath; @ApiModelProperty("文件大小") private Long fileSize; @ApiModelProperty("操作类型 值:WebConstant Wps USER_OPERATION... ") diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java b/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java index bfed3df8..66711006 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java @@ -160,7 +160,7 @@ public interface TallFeignClient { JsonResponse saveWpsFile(WpsDto.Business business); /** - * 保存WPS业务和文件记录 + * 查询WPS业务和文件记录 */ @RequestMapping("/wps/visitUrls") List queryVisitUrls(WpsDto.VisitWpsUrl visitWpsUrl); diff --git a/cloudutil/src/main/resources/application-util-prod.yml b/cloudutil/src/main/resources/application-util-prod.yml index cbde0a48..189c4bef 100644 --- a/cloudutil/src/main/resources/application-util-prod.yml +++ b/cloudutil/src/main/resources/application-util-prod.yml @@ -20,8 +20,10 @@ eureka: service-url: # 指定eureka server通信地址,注意/eureka/小尾巴不能少 #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ + # defaultZone: http://admin:admin@81.70.54.64:7010/eureka/ defaultZone: http://admin:admin@192.144.182.42:7010/eureka/ + instance: # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server prefer-ip-address: true diff --git a/cloudutil/src/main/resources/application-util-test.yml b/cloudutil/src/main/resources/application-util-test.yml index 929fc03c..5c829176 100644 --- a/cloudutil/src/main/resources/application-util-test.yml +++ b/cloudutil/src/main/resources/application-util-test.yml @@ -1,61 +1,123 @@ -#服务端点暴露 -management: - endpoints: - web: - exposure: - # 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' - include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream -# # 不暴露哪些端点 -# exclude: env,beans,configprops - endpoint: - health: - # 是否展示健康检查详情 - show-details: always - health: - redis: - enabled: false -#eureka注册 -eureka: - client: - service-url: - # 指定eureka server通信地址,注意/eureka/小尾巴不能少 - #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ - defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ -# defaultZone: http://admin:admin@test.tall.wiki:7010/eureka/ - instance: - # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server - prefer-ip-address: true - metadata-map: - management: - context-path: ${server.servlet.context-path:}/actuator - home-page-url-path: ${server.servlet.context-path:}/ - status-page-url-path: ${server.servlet.context-path:}/actuator/info - health-check-url-path: ${server.servlet.context-path:}/actuator/health -feign: - client: - config: - default: - connectTime: 5000 - readTimeout: 5000 - # NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 - # BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 - # HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 - # FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 - loggerLevel: basic - hystrix: - enabled: true -# sleuth -logging: - level: - root: info - org.springframework.cloud.sleuth: DEBUG -spring: -# zipkin: -# base-url: http://49.233.89.188:9411 -# sleuth: -# sampler: -# # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。 -# probability: 1.0 - cloud: - inetutils: +#<<<<<<< HEAD +##服务端点暴露 +#management: +# endpoints: +# web: +# exposure: +# # 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' +# include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream +## # 不暴露哪些端点 +## exclude: env,beans,configprops +# endpoint: +# health: +# # 是否展示健康检查详情 +# show-details: always +# health: +# redis: +# enabled: false +##eureka注册 +#eureka: +# client: +# service-url: +# # 指定eureka server通信地址,注意/eureka/小尾巴不能少 +# #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ +## defaultZone: http://admin:admin@49.233.89.188:7010/eureka/ +# defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ +# instance: +# # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server +# prefer-ip-address: true +# metadata-map: +# management: +# context-path: ${server.servlet.context-path:}/actuator +# home-page-url-path: ${server.servlet.context-path:}/ +# status-page-url-path: ${server.servlet.context-path:}/actuator/info +# health-check-url-path: ${server.servlet.context-path:}/actuator/health +#feign: +# client: +# config: +# default: +# connectTime: 5000 +# readTimeout: 5000 +# # NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 +# # BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 +# # HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 +# # FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 +# loggerLevel: basic +# hystrix: +# enabled: true +## sleuth +#logging: +# level: +# root: info +# org.springframework.cloud.sleuth: DEBUG +#spring: +## zipkin: +## base-url: http://49.233.89.188:9411 +## sleuth: +## sampler: +## # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。 +## probability: 1.0 +# cloud: +# inetutils: +#======= +#服务端点暴露 +management: + endpoints: + web: + exposure: + # 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' + include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream +# # 不暴露哪些端点 +# exclude: env,beans,configprops + endpoint: + health: + # 是否展示健康检查详情 + show-details: always + health: + redis: + enabled: false +#eureka注册 +eureka: + client: + service-url: + # 指定eureka server通信地址,注意/eureka/小尾巴不能少 + #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ + defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ +# defaultZone: http://admin:admin@test.tall.wiki:7010/eureka/ + instance: + # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server + prefer-ip-address: true + metadata-map: + management: + context-path: ${server.servlet.context-path:}/actuator + home-page-url-path: ${server.servlet.context-path:}/ + status-page-url-path: ${server.servlet.context-path:}/actuator/info + health-check-url-path: ${server.servlet.context-path:}/actuator/health +feign: + client: + config: + default: + connectTime: 5000 + readTimeout: 5000 + # NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 + # BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 + # HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 + # FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 + loggerLevel: basic + hystrix: + enabled: true +# sleuth +logging: + level: + root: info + org.springframework.cloud.sleuth: DEBUG +spring: +# zipkin: +# base-url: http://49.233.89.188:9411 +# sleuth: +# sampler: +# # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。 +# probability: 1.0 + cloud: + inetutils: ignored-interfaces: ['VMware.*'] \ No newline at end of file diff --git a/ct/src/main/resources/druid-test.yml b/ct/src/main/resources/druid-test.yml index 1bbd01f0..b027a78c 100644 --- a/ct/src/main/resources/druid-test.yml +++ b/ct/src/main/resources/druid-test.yml @@ -28,7 +28,10 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 +<<<<<<< HEAD +======= # url: jdbc:mysql://127.0.0.1/ct?useUnicode=true&characterEncoding=UTF-8 +>>>>>>> pt url: jdbc:mysql://test.tall.wiki/ct?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL diff --git a/game/src/main/java/com/ccsens/game/config/SpringConfig.java b/game/src/main/java/com/ccsens/game/config/SpringConfig.java index 77036f1c..6a41894d 100644 --- a/game/src/main/java/com/ccsens/game/config/SpringConfig.java +++ b/game/src/main/java/com/ccsens/game/config/SpringConfig.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -18,6 +17,7 @@ import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.web.servlet.config.annotation.*; +import javax.annotation.Resource; import javax.sql.DataSource; import java.nio.charset.Charset; import java.util.ArrayList; @@ -26,7 +26,7 @@ import java.util.List; @Configuration //public class SpringConfig extends WebMvcConfigurationSupport { public class SpringConfig implements WebMvcConfigurer { - @Autowired + @Resource private DruidProps druidPropsUtil; @Value("${spring.snowflake.workerId}") private String workerId; diff --git a/game/src/main/java/com/ccsens/game/service/ScreenService.java b/game/src/main/java/com/ccsens/game/service/ScreenService.java index 46140ccf..62ae1cc9 100644 --- a/game/src/main/java/com/ccsens/game/service/ScreenService.java +++ b/game/src/main/java/com/ccsens/game/service/ScreenService.java @@ -131,18 +131,21 @@ public class ScreenService implements IScreenService { gameRecord.setUrl(gameUrl + gameType.getScreenUrl() + "?id=" + gameRecord.getId()); // gameRecord.setQrCodeUrl(gameUrl + gameRecord.getId() + File.separator + gameType.getClientUrl()); - if("1".equalsIgnoreCase(PropUtil.openWx)){ +// if("1".equalsIgnoreCase(PropUtil.openWx)){ //生成二维码 String fileName = "/gameQrCode/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png"; String path = WebConstant.UPLOAD_PATH_BASE + fileName; - WxXcxUtil.getWxCode(WebConstant.QRCODE_GAME, "id=" + gameRecord.getId() + "&type=" + gameType.getCode(), null, path, gameType.getCode()); +// WxXcxUtil.getWxCode(WebConstant.QRCODE_GAME, "id=" + gameRecord.getId() + "&type=" + gameType.getCode(), null, path, gameType.getCode()); + WxXcxUtil.getWxCodeC(WebConstant.QRCODE_GAME+"?id=" + gameRecord.getId() + "&type=" + gameType.getCode(), path, gameType.getCode()); + gameRecord.setQrCodeUrl(PropUtil.qrCode + fileName); log.info("调用微信生成二维码"); - } else { - log.info("测试环境,不调用生成二维码"); - //给一个默认测试的 - gameRecord.setQrCodeUrl(PropUtil.qrCode + "/gameQrCode/2020-08-19/1597822577181.png"); - } + +// } else { +// log.info("测试环境,不调用生成二维码"); +// //给一个默认测试的 +// gameRecord.setQrCodeUrl(PropUtil.qrCode + "/gameQrCode/2020-08-19/1597822577181.png"); +// } //查找此任务下的游戏配置表 byte businessType = 8; @@ -204,9 +207,15 @@ public class ScreenService implements IScreenService { } } chromeMessageDto.setReceivers(messageUserList); +//<<<<<<< HEAD +// log.info("给所有成员发送开始游戏的消息:{}",chromeMessageDto.toString()); +// messageService.sendGameMessageWithGetUrl(chromeMessageDto); +// +//======= messageService.sendGameMessageWithGetUrl(chromeMessageDto,userIdSet); log.info("给所有成员发送消息:{}",chromeMessageDto); log.info("返回游戏信息:{}",urlVo); + return urlVo; } @@ -1447,6 +1456,7 @@ public class ScreenService implements IScreenService { business.setUserId(params.getUserId()); business.setFileName(name); business.setFilePath(fileName); + business.setRealFilePath(path); business.setFileSize(tmpFile.length()); business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_WRITE); diff --git a/game/src/main/resources/application-test.yml b/game/src/main/resources/application-test.yml index 4cbac764..93232b12 100644 --- a/game/src/main/resources/application-test.yml +++ b/game/src/main/resources/application-test.yml @@ -8,13 +8,17 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: +<<<<<<< HEAD + host: 81.70.54.64 +======= host: 127.0.0.1 +>>>>>>> pt password: 111111 port: 5672 username: admin redis: database: 0 - host: 127.0.0.1 + host: 192.168.0.99 jedis: pool: max-active: 200 @@ -28,10 +32,14 @@ swagger: enable: true eureka: instance: +<<<<<<< HEAD + ip-address: 192.168.0.99 +======= ip-address: 192.168.0.99 gatewayUrl: https://test.tall.wiki/gateway/ notGatewayUrl: https://test.tall.wiki/ file: qrCode: https://test.tall.wiki/gateway/tall/v1.0/uploads/ - openWX: 0 \ No newline at end of file + openWX: 0 +>>>>>>> pt diff --git a/game/src/main/resources/druid-test.yml b/game/src/main/resources/druid-test.yml index 72e5a813..1d5e981e 100644 --- a/game/src/main/resources/druid-test.yml +++ b/game/src/main/resources/druid-test.yml @@ -27,6 +27,10 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 +<<<<<<< HEAD +# url: jdbc:mysql://test.tall.wiki/game?useUnicode=true&characterEncoding=UTF-8 +======= +>>>>>>> pt url: jdbc:mysql://49.233.89.188:3306/game?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL diff --git a/health/src/main/java/com/ccsens/health/api/DebugController.java b/health/src/main/java/com/ccsens/health/api/DebugController.java index ea8242e9..620732f6 100644 --- a/health/src/main/java/com/ccsens/health/api/DebugController.java +++ b/health/src/main/java/com/ccsens/health/api/DebugController.java @@ -21,8 +21,7 @@ public class DebugController { }) @RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) public JsonResponse debug(HttpServletRequest request) throws Exception { - - return JsonResponse.newInstance().ok("测试"); + return JsonResponse.newInstance().ok("测试0\\\\\\\0"); } @ApiOperation(value = "/测试二维码",notes = "") diff --git a/ht/src/main/java/com/ccsens/ht/api/DoctorController.java b/ht/src/main/java/com/ccsens/ht/api/DoctorController.java index eb4f5c4b..708b0fd6 100644 --- a/ht/src/main/java/com/ccsens/ht/api/DoctorController.java +++ b/ht/src/main/java/com/ccsens/ht/api/DoctorController.java @@ -4,6 +4,7 @@ package com.ccsens.ht.api; import com.ccsens.cloudutil.annotation.MustLogin; import com.ccsens.ht.annotation.DoctorAudit; import com.ccsens.ht.bean.dto.DoctorDto; +import com.ccsens.ht.bean.vo.PatientReportVo; import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.ht.bean.vo.DoctorVo; import com.ccsens.ht.service.IDoctorService; @@ -94,5 +95,22 @@ public class DoctorController { return JsonResponse.newInstance().ok(dtos); } + @MustLogin + @DoctorAudit + @ApiOperation(value = "分享编辑病友信息",notes = "分享编辑病友信息") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "分享编辑病友信息", required = true) + }) + @RequestMapping(value="/patientFillShare", method = RequestMethod.POST) + public JsonResponse patientFillShare(@RequestBody @ApiParam @Valid QueryDto params) throws Exception { + log.info("查询其他信息请求参数:{}", params); + Long userId = params.getUserId(); + String path = doctorService.getShareUrl(userId); + PatientReportVo.Export export = new PatientReportVo.Export(); + export.setPath(path); + log.info("{}分享路径:{}", userId, export); + return JsonResponse.newInstance().ok(export); + } + } diff --git a/ht/src/main/java/com/ccsens/ht/api/PatientController.java b/ht/src/main/java/com/ccsens/ht/api/PatientController.java index c8a45e76..1ee2b3fd 100644 --- a/ht/src/main/java/com/ccsens/ht/api/PatientController.java +++ b/ht/src/main/java/com/ccsens/ht/api/PatientController.java @@ -112,7 +112,7 @@ public class PatientController { patient.setIdcard(null); } //设置记录值 - patient.setRecorder(patient.getId() == null ? Constant.Ht.NUMBER_DEFAULT : params.getUserId()); +// patient.setRecorder(patient.getId() == null ? Constant.Ht.NUMBER_DEFAULT : params.getUserId()); long id = patientService.editPatient(patient.copy(), params.getUserId()); log.info("病友编辑结果:{}", id); if (id <= 0) { @@ -160,4 +160,5 @@ public class PatientController { json.put("id", id); return JsonResponse.newInstance().ok(CodeEnum.SUCCESS, json); } + } diff --git a/ht/src/main/java/com/ccsens/ht/api/PatientReportController.java b/ht/src/main/java/com/ccsens/ht/api/PatientReportController.java index 6d9ed511..72dcaefb 100644 --- a/ht/src/main/java/com/ccsens/ht/api/PatientReportController.java +++ b/ht/src/main/java/com/ccsens/ht/api/PatientReportController.java @@ -35,6 +35,34 @@ public class PatientReportController { @Autowired private IPatientReportService patientReportService; + @MustLogin + @DoctorAudit + @ApiOperation(value = "忽略未完成的报告单",notes = "忽略未完成的报告单") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "报告单信息", required = true) + }) + @RequestMapping(value="/ignoreComplete", method = RequestMethod.POST) + public JsonResponse ignoreComplete(@RequestBody @ApiParam @Valid QueryDto dto){ + log.info("忽略未完成的报告单:{}", dto); + patientReportService.ignoreComplete(dto.getParam(), dto.getUserId()); + log.info("忽略未完成的报告单已完成"); + return JsonResponse.newInstance().ok(); + } + + @MustLogin + @DoctorAudit + @ApiOperation(value = "检查是否有未完成的报告单",notes = "检查是否有未完成的报告单") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "报告单信息", required = true) + }) + @RequestMapping(value="/checkComplete", method = RequestMethod.POST) + public JsonResponse checkComplete(@RequestBody @ApiParam @Valid QueryDto dto){ + log.info("检查是否有未完成的报告单:{}", dto); + PatientReportVo.Complete complete = patientReportService.checkComplete(dto.getUserId()); + log.info("检查是否有未完成的报告单返回:{}", complete); + return JsonResponse.newInstance().ok(complete); + } + @MustLogin @DoctorAudit @ApiOperation(value = "生成报告单",notes = "生成报告单") diff --git a/ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java b/ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java index 6d241b62..4f0fc819 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java +++ b/ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java @@ -19,6 +19,14 @@ import javax.validation.constraints.Pattern; */ public class PatientReportDto { + @Data + @ApiModel("忽略未完成的报告单") + public static class Ignore{ + @ApiModelProperty("病人报告单ID") + @NotNull(message = "病人报告单ID不能为空") + private Long id; + } + @ApiModel("PatientReportDtoGenerate") @Data public static class Generate{ diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtDoctor.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtDoctor.java index c058792a..7fd62e80 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/po/HtDoctor.java +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtDoctor.java @@ -24,6 +24,8 @@ public class HtDoctor implements Serializable { private String remark; + private String sharePatientEdit; + private Date createTime; private Date updateTime; @@ -112,6 +114,14 @@ public class HtDoctor implements Serializable { this.remark = remark == null ? null : remark.trim(); } + public String getSharePatientEdit() { + return sharePatientEdit; + } + + public void setSharePatientEdit(String sharePatientEdit) { + this.sharePatientEdit = sharePatientEdit == null ? null : sharePatientEdit.trim(); + } + public Date getCreateTime() { return createTime; } @@ -152,6 +162,7 @@ public class HtDoctor implements Serializable { sb.append(", auditorId=").append(auditorId); sb.append(", auditState=").append(auditState); sb.append(", remark=").append(remark); + sb.append(", sharePatientEdit=").append(sharePatientEdit); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", isDel=").append(isDel); diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtDoctorExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtDoctorExample.java index 5d8e1909..fe582899 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/po/HtDoctorExample.java +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtDoctorExample.java @@ -725,6 +725,76 @@ public class HtDoctorExample { return (Criteria) this; } + public Criteria andSharePatientEditIsNull() { + addCriterion("share_patient_edit is null"); + return (Criteria) this; + } + + public Criteria andSharePatientEditIsNotNull() { + addCriterion("share_patient_edit is not null"); + return (Criteria) this; + } + + public Criteria andSharePatientEditEqualTo(String value) { + addCriterion("share_patient_edit =", value, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditNotEqualTo(String value) { + addCriterion("share_patient_edit <>", value, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditGreaterThan(String value) { + addCriterion("share_patient_edit >", value, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditGreaterThanOrEqualTo(String value) { + addCriterion("share_patient_edit >=", value, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditLessThan(String value) { + addCriterion("share_patient_edit <", value, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditLessThanOrEqualTo(String value) { + addCriterion("share_patient_edit <=", value, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditLike(String value) { + addCriterion("share_patient_edit like", value, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditNotLike(String value) { + addCriterion("share_patient_edit not like", value, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditIn(List values) { + addCriterion("share_patient_edit in", values, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditNotIn(List values) { + addCriterion("share_patient_edit not in", values, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditBetween(String value1, String value2) { + addCriterion("share_patient_edit between", value1, value2, "sharePatientEdit"); + return (Criteria) this; + } + + public Criteria andSharePatientEditNotBetween(String value1, String value2) { + addCriterion("share_patient_edit not between", value1, value2, "sharePatientEdit"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReport.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReport.java index 5424f0fc..908cc542 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReport.java +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReport.java @@ -50,6 +50,8 @@ public class HtPatientReport implements Serializable { private String hospital; + private Byte completeStatus; + private static final long serialVersionUID = 1L; public Long getId() { @@ -236,6 +238,14 @@ public class HtPatientReport implements Serializable { this.hospital = hospital == null ? null : hospital.trim(); } + public Byte getCompleteStatus() { + return completeStatus; + } + + public void setCompleteStatus(Byte completeStatus) { + this.completeStatus = completeStatus; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -265,6 +275,7 @@ public class HtPatientReport implements Serializable { sb.append(", isDel=").append(isDel); sb.append(", showStatus=").append(showStatus); sb.append(", hospital=").append(hospital); + sb.append(", completeStatus=").append(completeStatus); sb.append("]"); return sb.toString(); } diff --git a/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportExample.java b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportExample.java index 9254abb1..ef59a979 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportExample.java +++ b/ht/src/main/java/com/ccsens/ht/bean/po/HtPatientReportExample.java @@ -1604,6 +1604,66 @@ public class HtPatientReportExample { addCriterion("hospital not between", value1, value2, "hospital"); return (Criteria) this; } + + public Criteria andCompleteStatusIsNull() { + addCriterion("complete_status is null"); + return (Criteria) this; + } + + public Criteria andCompleteStatusIsNotNull() { + addCriterion("complete_status is not null"); + return (Criteria) this; + } + + public Criteria andCompleteStatusEqualTo(Byte value) { + addCriterion("complete_status =", value, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusNotEqualTo(Byte value) { + addCriterion("complete_status <>", value, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusGreaterThan(Byte value) { + addCriterion("complete_status >", value, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("complete_status >=", value, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusLessThan(Byte value) { + addCriterion("complete_status <", value, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusLessThanOrEqualTo(Byte value) { + addCriterion("complete_status <=", value, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusIn(List values) { + addCriterion("complete_status in", values, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusNotIn(List values) { + addCriterion("complete_status not in", values, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusBetween(Byte value1, Byte value2) { + addCriterion("complete_status between", value1, value2, "completeStatus"); + return (Criteria) this; + } + + public Criteria andCompleteStatusNotBetween(Byte value1, Byte value2) { + addCriterion("complete_status not between", value1, value2, "completeStatus"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java b/ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java index 99fb8ab7..2d1fddb7 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java +++ b/ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java @@ -3,6 +3,7 @@ package com.ccsens.ht.bean.vo; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; +import com.ccsens.ht.uitl.Constant; import com.ccsens.util.PdfUtil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -18,11 +19,35 @@ import java.util.*; */ public class PatientReportVo { + @Data + @ApiModel("报告单遗留未完成") + public static class Complete { + @ApiModelProperty("是否有未完成的项目 1:有 0:无") + private byte hasUnfinished ; + @ApiModelProperty("报告单ID") + private Long id; + @ApiModelProperty("报告单名字") + private String name; + @ApiModelProperty("病人ID") + private Long patientId; + @ApiModelProperty("病人名字") + private String patientName; + @ApiModelProperty("病人身份证号") + private String patientIdCard; + @ApiModelProperty("评测开始时间") + private Date createTime; + @ApiModelProperty("描述") + private String description; + + } + @Data @ApiModel("PatientReportVoGenerate") public static class Generate{ @ApiModelProperty("病人报告单ID") private Long id; + @ApiModelProperty("报告单名称") + private String name; } @Data @@ -108,6 +133,7 @@ public class PatientReportVo { List rows = new ArrayList<>(); + //第一栏 rows.add( fillRow( @@ -118,7 +144,7 @@ public class PatientReportVo { //第二栏 rows.add( fillRow( - "文化程度(年或月):" + this.educationalStatusUnit, + "文化程度:" + this.educationalStatusUnit + "年", "编号:" + this.serialNumber, "职业:" + careerMap.get(this.career)) ); @@ -151,7 +177,12 @@ public class PatientReportVo { for (String param: params) { PdfUtil.Cell cell = new PdfUtil.Cell(); cell.setContent(param); - cell.setBorder(0); +// cell.setBorder(0); + cell.setCenter(false); + cell.setBorderLeft(0); + cell.setBorderRight(0); + cell.setBorderTop(0); + cell.setBorderBottom(0); row.addCell(cell); } @@ -198,117 +229,153 @@ public class PatientReportVo { PdfUtil.Cell cell2 = new PdfUtil.Cell(); cell2.setContent(this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : "")); cell2.setColSpan(colNum - headNum); + cell2.setBorderRight(1); row.addCell(cell1); row.addCell(cell2); rows.add(row); } else { - String mmse = "MMSE"; - String npi = "NPI"; + String mmse = Constant.Ht.Report.MMSE; + String npi = Constant.Ht.Report.NPI; if (mmse.equalsIgnoreCase(this.code) || npi.equalsIgnoreCase(this.code)) { - PdfUtil.Row row1 = new PdfUtil.Row(); - PdfUtil.Cell cell = new PdfUtil.Cell(); - cell.setContent(this.code + (StrUtil.isBlank(this.remark) ? "" : "("+this.remark+")")); - cell.setRowSpan(2); - cell.setColSpan(npi.equalsIgnoreCase(this.code) ? headNum : 1); - row1.addCell(cell); - //被合并cell - PdfUtil.Row row2 = new PdfUtil.Row(); -// fillBlankCell(row2); - //子测评项 - this.subReport.forEach(reportScore -> { - String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); - fillRow(row1,row2, reportScore.getName(), score, npi.equalsIgnoreCase(this.code) ? new int[]{3,3} : null); - }); - // 总分 - if (mmse.equalsIgnoreCase(this.code)) { - fillRow(row1,row2, "总分", this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : "")); - } - rows.add(row1); - rows.add(row2); + fillMmseOrNpi(headNum, rows, mmse, npi); } else { - //moca - int firstIndex = 5; - PdfUtil.Row row1 = new PdfUtil.Row(); - PdfUtil.Cell cell = new PdfUtil.Cell(); - cell.setContent(this.name + (StrUtil.isBlank(this.remark) ? "" : "("+this.remark+")")); - cell.setRowSpan(5); - row1.addCell(cell); - PdfUtil.Row row2 = new PdfUtil.Row(); -// fillBlankCell(row2); - for (int i = 0; i < firstIndex; i++) { - ReportScore reportScore = this.subReport.get(i); - String jy = "JY"; - if (jy.equalsIgnoreCase(reportScore.getCode())) { - fillRow(row1, row2, reportScore.getName(), " ", i == 0 ? new int[]{2,2}: null); - } else { - String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); - fillRow(row1, row2, reportScore.getName(), score, i == 0 ? new int[]{2,2}: null); - } - } - PdfUtil.Cell scoreNameCell = new PdfUtil.Cell(); - scoreNameCell.setContent("总分"); - row1.addCell(scoreNameCell); - PdfUtil.Cell scoreCell = new PdfUtil.Cell(); - scoreCell.setContent(this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : "")); - scoreCell.setRowSpan(4); - row2.addCell(scoreCell); -// fillBlankCell(row1, row2); - rows.add(row1); - rows.add(row2); - //下一行 - PdfUtil.Row row3 = new PdfUtil.Row(); - PdfUtil.Row row4 = new PdfUtil.Row(); - PdfUtil.Row row5 = new PdfUtil.Row(); -// fillBlankCell(row3, row4, row5); - //延迟回忆特殊处理 - String ychy = "YCHY"; - for (int i = firstIndex; i < this.subReport.size(); i++) { - ReportScore reportScore = this.subReport.get(i); - //设置名字 - PdfUtil.Cell scoreTitleCell = new PdfUtil.Cell(); - scoreTitleCell.setContent(reportScore.getName()); - scoreTitleCell.setColSpan(ychy.equalsIgnoreCase(reportScore.getCode()) ? 2 : 1); - row3.addCell(scoreTitleCell); - //设置子类 - if (ychy.equalsIgnoreCase(reportScore.getCode())) { - for (int j = 0; j < reportScore.subReport.size(); j++) { - ReportScore subScore = reportScore.getSubReport().get(j); - PdfUtil.Cell subCell = new PdfUtil.Cell(); - subCell.setContent(subScore.name + (subScore.getScore() == null ? " " : subScore.getScore()) + subScore.getRemark()); - if (j == 0 ) { - row4.addCell(subCell); - } else { - row5.addCell(subCell); - } - } - } - PdfUtil.Cell scoreScoreCell = new PdfUtil.Cell(); - String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); - scoreScoreCell.setContent(score); - scoreScoreCell.setRowSpan(2); - row4.addCell(scoreScoreCell); -// fillBlankCell(row5); - - } -// fillBlankCell(row3); -// fillBlankCell(row3, row4, row5); - rows.add(row3); - rows.add(row4); - rows.add(row5); + fillMoca(rows); } } + if (StrUtil.isBlank(this.description)) { + return rows; + } PdfUtil.Row descRow = new PdfUtil.Row(); PdfUtil.Cell cell = new PdfUtil.Cell(); cell.setColSpan(colNum); cell.setContent(this.description); + cell.setCenter(false); + cell.setBorderRight(1); descRow.addCell(cell); rows.add(descRow); + // MOCA中,视直觉单独展示 + fillSzj(colNum, headNum, rows); + return rows; } + private void fillMmseOrNpi(int headNum, List rows, String mmse, String npi) { + PdfUtil.Row row1 = new PdfUtil.Row(); + PdfUtil.Cell cell = new PdfUtil.Cell(); + cell.setContent(this.code + (StrUtil.isBlank(this.remark) ? "" : "("+this.remark+")")); + cell.setRowSpan(2); + cell.setColSpan(npi.equalsIgnoreCase(this.code) ? headNum : 1); + cell.setBorderTop(mmse.equalsIgnoreCase(this.code) ? 1 : 0); + row1.addCell(cell); + //被合并cell + PdfUtil.Row row2 = new PdfUtil.Row(); +// fillBlankCell(row2); + //子测评项 + this.subReport.forEach(reportScore -> { + String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); + boolean isLast = npi.equalsIgnoreCase(this.code) && this.subReport.indexOf(reportScore) == this.subReport.size() - 1; + fillRow(row1,row2, reportScore.getName(), score, mmse.equalsIgnoreCase(this.code), isLast, npi.equalsIgnoreCase(this.code) ? new int[]{3,3} : null); + }); + // 总分 + if (mmse.equalsIgnoreCase(this.code)) { + fillRow(row1,row2, "总分", this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : ""), mmse.equalsIgnoreCase(this.code), true); + } + rows.add(row1); + rows.add(row2); + } + + private void fillMoca(List rows) { + //moca + int firstIndex = 5; + PdfUtil.Row row1 = new PdfUtil.Row(); + PdfUtil.Cell cell = new PdfUtil.Cell(); + cell.setContent(this.name + (StrUtil.isBlank(this.remark) ? "" : "("+this.remark+")")); + cell.setRowSpan(5); + row1.addCell(cell); + PdfUtil.Row row2 = new PdfUtil.Row(); + for (int i = 0; i < firstIndex; i++) { + ReportScore reportScore = this.subReport.get(i); + String jy = "JY"; + if (jy.equalsIgnoreCase(reportScore.getCode())) { + fillRow(row1, row2, reportScore.getName(), " ", false, false, i == 0 ? new int[]{2,2}: null); + } else { + String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); + fillRow(row1, row2, reportScore.getName(), score, false, false, i == 0 ? new int[]{2,2}: null); + } + } + PdfUtil.Cell scoreNameCell = new PdfUtil.Cell(); + scoreNameCell.setContent("总分"); + scoreNameCell.setBorderRight(1); + row1.addCell(scoreNameCell); + PdfUtil.Cell scoreCell = new PdfUtil.Cell(); + scoreCell.setContent(this.score == null ? "" : this.score + (this.totalScore > 0 ? "/" + this.totalScore : "")); + scoreCell.setRowSpan(4); + scoreCell.setBorderRight(1); + row2.addCell(scoreCell); + rows.add(row1); + rows.add(row2); + //下一行 + PdfUtil.Row row3 = new PdfUtil.Row(); + PdfUtil.Row row4 = new PdfUtil.Row(); + PdfUtil.Row row5 = new PdfUtil.Row(); + //延迟回忆特殊处理 + String ychy = "YCHY"; + int size = this.subReport.size() - 1; + for (int i = firstIndex; i < size; i++) { + ReportScore reportScore = this.subReport.get(i); + //设置名字 + PdfUtil.Cell scoreTitleCell = new PdfUtil.Cell(); + scoreTitleCell.setContent(reportScore.getName()); + scoreTitleCell.setColSpan(ychy.equalsIgnoreCase(reportScore.getCode()) ? 3 : 1); + row3.addCell(scoreTitleCell); + //设置子类 + if (ychy.equalsIgnoreCase(reportScore.getCode())) { + for (int j = 0; j < reportScore.subReport.size(); j++) { + ReportScore subScore = reportScore.getSubReport().get(j); + PdfUtil.Cell subCell = new PdfUtil.Cell(); + subCell.setContent(subScore.name + (subScore.getScore() == null ? " " : subScore.getScore()) + subScore.getRemark()); + if (j == 0 ) { + row4.addCell(subCell); + } else { + row5.addCell(subCell); + } + } + } + PdfUtil.Cell scoreScoreCell = new PdfUtil.Cell(); + String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); + scoreScoreCell.setContent(score); + scoreScoreCell.setRowSpan(2); + scoreScoreCell.setColSpan(ychy.equalsIgnoreCase(reportScore.getCode()) ? 2 : 1); + row4.addCell(scoreScoreCell); + + } + rows.add(row3); + rows.add(row4); + rows.add(row5); + } + + private void fillSzj(int colNum, int headNum, List rows) { + if (Constant.Ht.Report.MOCA.equalsIgnoreCase(this.code) && CollectionUtil.isNotEmpty(this.subReport)) { + ReportScore szj = this.subReport.get(this.subReport.size() - 1); + if (Constant.Ht.Report.MOCA_SJZ.equalsIgnoreCase(szj.code)) { + PdfUtil.Row sjzRow = new PdfUtil.Row(); + PdfUtil.Cell titleCell = new PdfUtil.Cell(); + titleCell.setColSpan(headNum); + titleCell.setContent(szj.name); + sjzRow.addCell(titleCell); + PdfUtil.Cell sjzScoreCell = new PdfUtil.Cell(); + sjzScoreCell.setColSpan(colNum - headNum); + sjzScoreCell.setContent((szj.getScore() == null ? " " : szj.getScore()) + "/" + szj.getTotalScore()); + sjzScoreCell.setBorderRight(1); + sjzRow.addCell(sjzScoreCell); + rows.add(sjzRow); + } + } + } + /** * 添加一个空格 * @param rows @@ -320,10 +387,12 @@ public class PatientReportVo { } } - private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, int... colspan){ + private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, boolean isTop, boolean isRight, int... colspan){ //名称 PdfUtil.Cell cell1 = new PdfUtil.Cell(); cell1.setContent(name); + cell1.setBorderTop(isTop? 1 : 0); + cell1.setBorderRight(isRight? 1 : 0); cell1.setColSpan(colspan == null || colspan.length == 0 ? 1 : colspan[0]); row1.addCell(cell1); @@ -331,6 +400,7 @@ public class PatientReportVo { PdfUtil.Cell cell2 = new PdfUtil.Cell(); cell2.setContent(score); cell2.setColSpan(colspan == null || colspan.length <= 1 ? 1 : colspan[1]); + cell2.setBorderRight(isRight? 1 : 0); row2.addCell(cell2); } } diff --git a/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java b/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java index 6415b86c..0e3272ae 100644 --- a/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java +++ b/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java @@ -37,4 +37,17 @@ public interface HtPatientReportDao extends HtPatientReportMapper { */ List> queryNPIScore(@Param("id") Long id); + /** + * 检查未完成的报告单 + * @param userId + * @return + */ + PatientReportVo.Complete checkComplete(@Param("userId") Long userId); + + /** + * 忽略报告单 + * @param id + * @param userId + */ + void ignoreComplete(@Param("id") Long id, @Param("userId") Long userId); } diff --git a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java index 391c6980..7d672ca7 100644 --- a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java +++ b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java @@ -1,6 +1,8 @@ package com.ccsens.ht.service; +import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import com.ccsens.cloudutil.bean.tall.dto.MemberRoleDto; import com.ccsens.cloudutil.feign.TallFeignClient; @@ -13,15 +15,18 @@ import com.ccsens.ht.persist.dao.HtTitleDao; import com.ccsens.ht.persist.mapper.HtDoctorMapper; import com.ccsens.ht.uitl.Constant; import com.ccsens.util.*; +import com.ccsens.util.exception.BaseException; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -39,16 +44,18 @@ public class DoctorService implements IDoctorService { @Autowired private Snowflake snowflake; - @Autowired + @Resource private HtDoctorMapper htDoctorMapper; - @Autowired + @Resource private HtPositionDao htPositionDao; - @Autowired + @Resource private HtTitleDao htTitleDao; - @Autowired + @Resource private HtDoctorAuditDao htDoctorAuditDao; @Autowired private TallFeignClient tallFeignClient; + @Value("${ht.project.patientUrl}") + private String patientUrl; @@ -272,6 +279,31 @@ public class DoctorService implements IDoctorService { return htDoctorMapper.selectByExample(doctorExample); } + @Override + public String getShareUrl(Long userId) throws Exception { + + HtDoctorExample example = new HtDoctorExample(); + example.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS); + List htDoctors = htDoctorMapper.selectByExample(example); + if (CollectionUtil.isEmpty(htDoctors)) { + log.info("没有找到{}对应的医生信息", userId); + throw new BaseException(CodeEnum.PARAM_ERROR); + } + HtDoctor doctor = htDoctors.get(0); + if (StrUtil.isNotBlank(doctor.getSharePatientEdit())) { + return doctor.getSharePatientEdit(); + } + log.info("生成分享评测对象信息录入页面"); + String shareUrl = patientUrl + "?userId=" + userId; + String codePath = QrCodeUtil.urlToQRCode(shareUrl, PropUtil.path); + String codeUrl = PropUtil.imgDomain + "/" + codePath; + log.info("生成的二维码路径:{}", codeUrl); + doctor.setSharePatientEdit(codeUrl); + log.info("修改医生分享评测对象信息录入页面路径"); + return codeUrl; + + } + @Override public DoctorVo.Query queryDoctorStatus(Long userId) { DoctorVo.Query query = htDoctorAuditDao.queryDoctorStatus(userId); diff --git a/ht/src/main/java/com/ccsens/ht/service/IDoctorService.java b/ht/src/main/java/com/ccsens/ht/service/IDoctorService.java index f979a8e9..6faaf09c 100644 --- a/ht/src/main/java/com/ccsens/ht/service/IDoctorService.java +++ b/ht/src/main/java/com/ccsens/ht/service/IDoctorService.java @@ -58,4 +58,11 @@ public interface IDoctorService { /**查询医生审核状态*/ DoctorVo.Query queryDoctorStatus(Long userId); + + /** + * 医生分享病人编辑路径 + * @param userId + * @return + */ + String getShareUrl(Long userId) throws Exception; } diff --git a/ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java b/ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java index 1f8fa78a..45ec9d11 100644 --- a/ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java +++ b/ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java @@ -74,4 +74,19 @@ public interface IPatientReportService { * @return */ String generateQRCode(PatientReportDto.QueryDetail queryDetail, Long userId) throws IOException; + + /** + * 检查有无未完成的报告 + * @param userId + * @return + */ + PatientReportVo.Complete checkComplete(Long userId); + + /** + * 忽略未完成的报告单 + * @param ignore + * @param userId + * @return + */ + void ignoreComplete(PatientReportDto.Ignore ignore, Long userId); } diff --git a/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java b/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java index 0093f4c5..d4d6005c 100644 --- a/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java +++ b/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java @@ -78,9 +78,7 @@ public class PatientReportService implements IPatientReportService { return JsonResponse.newInstance().ok(CodeEnum.PARAM_ERROR); } - HtPatientReportExample example = new HtPatientReportExample(); - example.createCriteria().andPatientIdEqualTo(htPatient.getId()); - long times = htPatientReportDao.countByExample(example); + HtPatientReport htPatientReport = new HtPatientReport(); htPatientReport.setId(snowflake.nextId()); htPatientReport.setDoctorId(doctors.get(0).getId()); @@ -89,7 +87,6 @@ public class PatientReportService implements IPatientReportService { htPatientReport.setPatientAge(StrUtil.isEmpty(htPatient.getIdcard()) ? null : (byte)IdcardUtil.getAgeByIdCard(htPatient.getIdcard())); htPatientReport.setEvaluationCode(Constant.Ht.Report.PARENT_CODE); htPatientReport.setName(Constant.Ht.Report.PARENT_NAME + DateUtil.today()); - htPatientReport.setSerialNumber(htPatient.getId() + "_" + (times + 1)); htPatientReport.setReportTime(System.currentTimeMillis()); // 查询医院信息 String hospital = htPositionDao.queryHospital(doctors.get(0).getPositionId()); @@ -147,6 +144,7 @@ public class PatientReportService implements IPatientReportService { HtPatientReport copy = patientReport.copy(); copy.setUrl(Constant.Ht.STRING_DEFAULT); copy.setQrCodeUrl(Constant.Ht.STRING_DEFAULT); + copy.setCompleteStatus(Constant.Ht.Report.COMPLETE_OK); htPatientReportDao.updateByPrimaryKeySelective(copy); log.info("成功编辑报告单信息"); HtPatientReportRecord record = new HtPatientReportRecord(); @@ -254,6 +252,9 @@ public class PatientReportService implements IPatientReportService { }); scores.forEach(score -> { + if (Constant.Ht.Report.MOCA_SJZ.equalsIgnoreCase(score.getCode())) { + return; + } sumScore(score); }); @@ -383,28 +384,47 @@ public class PatientReportService implements IPatientReportService { content.addAll(reportScore.toRow()); }); PdfUtil.Row row = new PdfUtil.Row(); - addCell(row,"初步印象",2,2); - addCell(row, detail.getPatient().getInitialImpression(), 6, 2); + PdfUtil.Cell initWordCell = addCell(row, "初步印象", 2, 2); + initWordCell.setHeight(PdfUtil.Cell.defaultHeight * 2); + PdfUtil.Cell initImplCell = addCell(row, detail.getPatient().getInitialImpression(), 6, 2); + initImplCell.setHeight(PdfUtil.Cell.defaultHeight * 2); + initImplCell.setBorderRight(1); content.add(row); PdfUtil.Row row2 = new PdfUtil.Row(); - addCell(row2,"测评员:",4,1, 0); - addCell(row2,"报告日期:",4,1, 0); + PdfUtil.Cell doctorCell = addCell(row2, "测评员:", 4, 1, 0); + doctorCell.setBorderBottom(null); + doctorCell.setBorderLeft(null); + PdfUtil.Cell dateCell = addCell(row2, "报告日期:", 4, 1, 0); + dateCell.setBorderBottom(null); + dateCell.setBorderLeft(null); content.add(row2); - String path = PropUtil.imgDomain + "/" + PdfUtil.credatePdf(PropUtil.path, detail.getPatient().getHospital()+Constant.Ht.Report.PARENT_NAME, detail.getPatient().toPdfRow(), content); + String path = PropUtil.imgDomain + "/" + PdfUtil.credatePdf(PropUtil.path, detail.getPatient().getHospital(), Constant.Ht.Report.PARENT_NAME, detail.getPatient().toPdfRow(), content, new PdfUtil.Margin()); report.setUrl(path); htPatientReportDao.updateByPrimaryKeySelective(report); log.info("生成文件路径:{}", path); return path; } - private void addCell(PdfUtil.Row row, String content, int colSpan, int rowSpan, int... border) { + private PdfUtil.Cell addCell(PdfUtil.Row row, String content, int colSpan, int rowSpan, int... border) { PdfUtil.Cell cell1 = new PdfUtil.Cell(); cell1.setContent(content); cell1.setColSpan(colSpan); cell1.setRowSpan(rowSpan); cell1.setBorder(border == null || border.length == 0 ? 1 : border[0]); row.addCell(cell1); + return cell1; + } + + @Override + public void ignoreComplete(PatientReportDto.Ignore ignore, Long userId) { + htPatientReportDao.ignoreComplete(ignore.getId(), userId); + } + + @Override + public PatientReportVo.Complete checkComplete(Long userId) { + PatientReportVo.Complete complete = htPatientReportDao.checkComplete(userId); + return complete; } @Override diff --git a/ht/src/main/java/com/ccsens/ht/service/PatientService.java b/ht/src/main/java/com/ccsens/ht/service/PatientService.java index 7287ba37..1dd36425 100644 --- a/ht/src/main/java/com/ccsens/ht/service/PatientService.java +++ b/ht/src/main/java/com/ccsens/ht/service/PatientService.java @@ -179,11 +179,11 @@ public class PatientService implements IPatientService { throw new BaseException(CodeEnum.RECORDER_NOT); } patient.setId(oldPatient.getId()); - htPatientMapper.updateByPrimaryKeySelective(patient); + htPatientMapper.updateByPrimaryKey(patient); } else { patient.setId(snowflake.nextId()); patient.setRecorder(userId); - htPatientMapper.insertSelective(patient); + htPatientMapper.insert(patient); } return patient.getId(); } diff --git a/ht/src/main/java/com/ccsens/ht/service/QuestionService.java b/ht/src/main/java/com/ccsens/ht/service/QuestionService.java index dbce28fd..820bbfa5 100644 --- a/ht/src/main/java/com/ccsens/ht/service/QuestionService.java +++ b/ht/src/main/java/com/ccsens/ht/service/QuestionService.java @@ -216,9 +216,12 @@ public class QuestionService implements IQuestionService { delScore.setIsDel(Constant.Ht.IS_DEL); htPatientScoreDao.updateByExampleSelective(delScore, delExample); //保存现在的答案 - if (CollectionUtil.isNotEmpty(scores)) { - htPatientScoreDao.insertBatch(scores); + if (CollectionUtil.isEmpty(scores)) { + // 选项为空,默认0分 + HtPatientScore zeroScore = getHtPatientScore(score, parentCode, report, 0); + scores.add(zeroScore); } + htPatientScoreDao.insertBatch(scores); // 保存答案 saveAnswerRecord(score, question); @@ -227,6 +230,21 @@ public class QuestionService implements IQuestionService { return CodeEnum.SUCCESS; } + private HtPatientScore getHtPatientScore(QuestionDto.Score score, String parentCode, HtPatientReport report, int i) { + HtPatientScore zeroScore = new HtPatientScore(); + zeroScore.setId(snowflake.nextId()); + zeroScore.setPatientReportId(score.getPatientReportId()); + zeroScore.setPatientId(report.getPatientId()); + zeroScore.setQuestionId(score.getQuestionId()); + zeroScore.setQuestionParentCode(parentCode); + zeroScore.setOptionId((long) Constant.Ht.NUMBER_DEFAULT); + zeroScore.setOptionName(Constant.Ht.STRING_DEFAULT); + zeroScore.setScore(i); + zeroScore.setType(Constant.Ht.Score.SCORE); + zeroScore.setAnswer(Constant.Ht.STRING_DEFAULT); + return zeroScore; + } + /** * 修改报告单显示状态 * @param report @@ -290,17 +308,7 @@ public class QuestionService implements IQuestionService { patientScore.set(next.getIntValue(Constant.Ht.Rule.SMALL_SCORE)); } } - HtPatientScore singleScore = new HtPatientScore(); - singleScore.setId(snowflake.nextId()); - singleScore.setPatientReportId(score.getPatientReportId()); - singleScore.setPatientId(report.getPatientId()); - singleScore.setQuestionId(score.getQuestionId()); - singleScore.setQuestionParentCode(parentCode); - singleScore.setOptionId((long)Constant.Ht.NUMBER_DEFAULT); - singleScore.setOptionName(Constant.Ht.STRING_DEFAULT); - singleScore.setScore(patientScore.get()); - singleScore.setType(Constant.Ht.Score.SCORE); - singleScore.setAnswer(Constant.Ht.STRING_DEFAULT); + HtPatientScore singleScore = getHtPatientScore(score, parentCode, report, patientScore.get()); scores.add(singleScore); } diff --git a/ht/src/main/java/com/ccsens/ht/uitl/Constant.java b/ht/src/main/java/com/ccsens/ht/uitl/Constant.java index 0df8ce23..2d6e8267 100644 --- a/ht/src/main/java/com/ccsens/ht/uitl/Constant.java +++ b/ht/src/main/java/com/ccsens/ht/uitl/Constant.java @@ -109,6 +109,16 @@ public class Constant { public final static Byte TYPE_EVALUATION = 2; public final static String IGNORE_SCORE = "[个]"; public final static String MOCA_SJZ = "SZJ"; + public final static String MOCA = "MoCA"; + public final static String MMSE = "MMSE"; + public final static String NPI = "NPI"; + /**报告单未完成*/ + public final static Byte COMPLETE_NO = 0; + /**报告单已完成*/ + public final static Byte COMPLETE_OK = 1; + /**忽略报告单*/ + public final static Byte COMPLETE_IGNORE = 2; + /**在历史报告单中显示*/ public final static byte SHOW_HISTORY = 1; public final static Map TYPE = new HashMap<>(); diff --git a/ht/src/main/resources/application-dev.yml b/ht/src/main/resources/application-dev.yml index b81b45bc..d43d9469 100644 --- a/ht/src/main/resources/application-dev.yml +++ b/ht/src/main/resources/application-dev.yml @@ -34,4 +34,6 @@ file: imgDomain: http://localhost:7040/uploads ht: project: - name: 认知功能评测云平台系统 \ No newline at end of file + patientUrl: https://www.baidu.com/ + name: 认知功能评测云平台系统 + diff --git a/ht/src/main/resources/application-prod.yml b/ht/src/main/resources/application-prod.yml index 167784c9..c2a54f79 100644 --- a/ht/src/main/resources/application-prod.yml +++ b/ht/src/main/resources/application-prod.yml @@ -21,7 +21,11 @@ spring: max-idle: 10 max-wait: -1ms min-idle: 0 +<<<<<<< HEAD + password: '' +======= password: 'areowqr!@43ef' +>>>>>>> pt port: 6379 timeout: 1000ms @@ -34,7 +38,12 @@ file: imgDomain: https://www.tall.wiki/gateway/ht/uploads ht: project: + patientUrl: https://www.tall.wiki/ht-dev/htPatientRegister name: 认知功能评测云平台系统 eureka: instance: - ip-address: 71.80.54.64 \ No newline at end of file +<<<<<<< HEAD + ip-address: 81.70.54.64 +======= + ip-address: 71.80.54.64 +>>>>>>> pt diff --git a/ht/src/main/resources/application-test.yml b/ht/src/main/resources/application-test.yml index c6847e52..b97c2755 100644 --- a/ht/src/main/resources/application-test.yml +++ b/ht/src/main/resources/application-test.yml @@ -35,6 +35,7 @@ file: imgDomain: https://test.tall.wiki/gateway/ht/uploads ht: project: + patientUrl: https://test.tall.wiki/ht-dev/htPatientRegister name: 认知功能评测云平台系统 eureka: instance: diff --git a/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml b/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml index 4c29308e..ae52767f 100644 --- a/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml +++ b/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml @@ -56,12 +56,28 @@ GROUP BY t1.code order by t1.type,t1.sort - select option_name as optionName, sum(score) as score from t_ht_patient_score where patient_report_id = #{id, jdbcType=BIGINT} and question_parent_code = 'NPI' and option_name in ('carer','result') and is_del = 0 group by option_name; + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_raw/HtDoctorMapper.xml b/ht/src/main/resources/mapper_raw/HtDoctorMapper.xml index 7fc9ec4b..a794870e 100644 --- a/ht/src/main/resources/mapper_raw/HtDoctorMapper.xml +++ b/ht/src/main/resources/mapper_raw/HtDoctorMapper.xml @@ -12,6 +12,7 @@ + @@ -76,7 +77,7 @@ id, user_id, position_id, title_id, name, sex, age, auditor_id, audit_state, remark, - create_time, update_time, is_del + share_patient_edit, create_time, update_time, is_del select @@ -127,7 +129,8 @@ report_time, check_time, evaluation_code, url, qr_code_url, remark, create_time, update_time, is_del, - show_status, hospital) + show_status, hospital, complete_status + ) values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{patientId,jdbcType=BIGINT}, #{patientIdcard,jdbcType=VARCHAR}, #{patientAge,jdbcType=TINYINT}, #{doctorId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR}, #{initialImpression,jdbcType=VARCHAR}, #{clinicalDiagnosis,jdbcType=VARCHAR}, @@ -135,7 +138,8 @@ #{reportTime,jdbcType=BIGINT}, #{checkTime,jdbcType=BIGINT}, #{evaluationCode,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{qrCodeUrl,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}, - #{showStatus,jdbcType=TINYINT}, #{hospital,jdbcType=VARCHAR}) + #{showStatus,jdbcType=TINYINT}, #{hospital,jdbcType=VARCHAR}, #{completeStatus,jdbcType=TINYINT} + ) insert into t_ht_patient_report @@ -209,6 +213,9 @@ hospital, + + complete_status, + @@ -280,6 +287,9 @@ #{hospital,jdbcType=VARCHAR}, + + #{completeStatus,jdbcType=TINYINT}, + + SELECT + cc.id as companyId, + cc.`name` as companyName, + (SELECT count(id) FROM t_compete_coach WHERE cc.id = company_id and identity = 1 and rec_status = 0) as coachNum, + (SELECT count(id) FROM t_compete_coach WHERE cc.id = company_id and identity = 0 and rec_status = 0) as guideNum, + (SELECT count(id) FROM t_compete_player WHERE cc.id = company_id and rec_status = 0) as playerNum + FROM + t_compete_company cc + WHERE + cc.compete_time_id = #{competeTimeId} + and cc.user_id = #{userId} + and cc.rec_status = 0 + limit 1 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/CompeteEnrollDao.xml b/mt/src/main/resources/mapper_dao/CompeteEnrollDao.xml new file mode 100644 index 00000000..fe66d7eb --- /dev/null +++ b/mt/src/main/resources/mapper_dao/CompeteEnrollDao.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml b/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml index a943bcff..24d3a093 100644 --- a/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml +++ b/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml @@ -2,6 +2,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 4cfd3cf0..43f85a30 100644 --- a/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml +++ b/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml @@ -15,6 +15,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/CompeteTimeDao.xml b/mt/src/main/resources/mapper_dao/CompeteTimeDao.xml index a5a581a4..3bbe88b0 100644 --- a/mt/src/main/resources/mapper_dao/CompeteTimeDao.xml +++ b/mt/src/main/resources/mapper_dao/CompeteTimeDao.xml @@ -41,14 +41,14 @@ @@ -103,4 +103,21 @@ level = 1 + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/LevelUpDao.xml b/mt/src/main/resources/mapper_dao/LevelUpDao.xml index 6d69d7b4..c7b82fd3 100644 --- a/mt/src/main/resources/mapper_dao/LevelUpDao.xml +++ b/mt/src/main/resources/mapper_dao/LevelUpDao.xml @@ -2,8 +2,29 @@ - + SELECT id FROM `t_level_up` + WHERE level_user_id = #{levelUserId} + and compete_code = #{competeCode} + and rec_status = 0 + LIMIT 1 + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteCoachMapper.xml b/mt/src/main/resources/mapper_raw/CompeteCoachMapper.xml new file mode 100644 index 00000000..bdd6fd11 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteCoachMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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, identity, name, gender, phone, id_card, id_photo, coach_certificate, company_id, + created_at, updated_at, rec_status + + + + + delete from t_compete_coach + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_coach + + + + + + insert into t_compete_coach (id, identity, name, + gender, phone, id_card, + id_photo, coach_certificate, company_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{identity,jdbcType=TINYINT}, #{name,jdbcType=VARCHAR}, + #{gender,jdbcType=TINYINT}, #{phone,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, + #{idPhoto,jdbcType=BIGINT}, #{coachCertificate,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_compete_coach + + + id, + + + identity, + + + name, + + + gender, + + + phone, + + + id_card, + + + id_photo, + + + coach_certificate, + + + company_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{identity,jdbcType=TINYINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{gender,jdbcType=TINYINT}, + + + #{phone,jdbcType=VARCHAR}, + + + #{idCard,jdbcType=VARCHAR}, + + + #{idPhoto,jdbcType=BIGINT}, + + + #{coachCertificate,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_coach + + + id = #{record.id,jdbcType=BIGINT}, + + + identity = #{record.identity,jdbcType=TINYINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + gender = #{record.gender,jdbcType=TINYINT}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + id_card = #{record.idCard,jdbcType=VARCHAR}, + + + id_photo = #{record.idPhoto,jdbcType=BIGINT}, + + + coach_certificate = #{record.coachCertificate,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_coach + set id = #{record.id,jdbcType=BIGINT}, + identity = #{record.identity,jdbcType=TINYINT}, + name = #{record.name,jdbcType=VARCHAR}, + gender = #{record.gender,jdbcType=TINYINT}, + phone = #{record.phone,jdbcType=VARCHAR}, + id_card = #{record.idCard,jdbcType=VARCHAR}, + id_photo = #{record.idPhoto,jdbcType=BIGINT}, + coach_certificate = #{record.coachCertificate,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_coach + + + identity = #{identity,jdbcType=TINYINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + gender = #{gender,jdbcType=TINYINT}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + id_card = #{idCard,jdbcType=VARCHAR}, + + + id_photo = #{idPhoto,jdbcType=BIGINT}, + + + coach_certificate = #{coachCertificate,jdbcType=BIGINT}, + + + company_id = #{companyId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_coach + set identity = #{identity,jdbcType=TINYINT}, + name = #{name,jdbcType=VARCHAR}, + gender = #{gender,jdbcType=TINYINT}, + phone = #{phone,jdbcType=VARCHAR}, + id_card = #{idCard,jdbcType=VARCHAR}, + id_photo = #{idPhoto,jdbcType=BIGINT}, + coach_certificate = #{coachCertificate,jdbcType=BIGINT}, + company_id = #{companyId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteCompanyMapper.xml b/mt/src/main/resources/mapper_raw/CompeteCompanyMapper.xml index 3dfa84ff..3d1c7e21 100644 --- a/mt/src/main/resources/mapper_raw/CompeteCompanyMapper.xml +++ b/mt/src/main/resources/mapper_raw/CompeteCompanyMapper.xml @@ -5,6 +5,14 @@ + + + + + + + + @@ -68,7 +76,8 @@ - id, name, type, created_at, updated_at, rec_status + id, name, type, compete_time_id, contacts_name, contacts_phone, user_id, join_num, + leader_num, coach_num, authorization, created_at, updated_at, rec_status + select + + distinct + + + from t_compete_company_role + + + + + order by ${orderByClause} + + + + + delete from t_compete_company_role + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_company_role + + + + + + insert into t_compete_company_role (id, player_id, compete_company_id, + type, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{competeCompanyId,jdbcType=BIGINT}, + #{type,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_company_role + + + id, + + + player_id, + + + compete_company_id, + + + type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{competeCompanyId,jdbcType=BIGINT}, + + + #{type,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_company_role + + + id = #{record.id,jdbcType=BIGINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + compete_company_id = #{record.competeCompanyId,jdbcType=BIGINT}, + + + type = #{record.type,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_company_role + set id = #{record.id,jdbcType=BIGINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + compete_company_id = #{record.competeCompanyId,jdbcType=BIGINT}, + type = #{record.type,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_company_role + + + player_id = #{playerId,jdbcType=BIGINT}, + + + compete_company_id = #{competeCompanyId,jdbcType=BIGINT}, + + + type = #{type,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_company_role + set player_id = #{playerId,jdbcType=BIGINT}, + compete_company_id = #{competeCompanyId,jdbcType=BIGINT}, + type = #{type,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteGroupMapper.xml b/mt/src/main/resources/mapper_raw/CompeteGroupMapper.xml index b2e907c5..6be0336f 100644 --- a/mt/src/main/resources/mapper_raw/CompeteGroupMapper.xml +++ b/mt/src/main/resources/mapper_raw/CompeteGroupMapper.xml @@ -12,6 +12,10 @@ + + + + @@ -73,7 +77,7 @@ id, group_name, description, start_age, end_age, sequence, type, created_at, updated_at, - rec_status + rec_status, sex, max_age, min_age, group_remark @@ -221,6 +251,18 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + sex = #{record.sex,jdbcType=TINYINT}, + + + max_age = #{record.maxAge,jdbcType=TINYINT}, + + + min_age = #{record.minAge,jdbcType=TINYINT}, + + + group_remark = #{record.groupRemark,jdbcType=TINYINT}, + @@ -237,7 +279,11 @@ type = #{record.type,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + sex = #{record.sex,jdbcType=TINYINT}, + max_age = #{record.maxAge,jdbcType=TINYINT}, + min_age = #{record.minAge,jdbcType=TINYINT}, + group_remark = #{record.groupRemark,jdbcType=TINYINT} @@ -272,6 +318,18 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + sex = #{sex,jdbcType=TINYINT}, + + + max_age = #{maxAge,jdbcType=TINYINT}, + + + min_age = #{minAge,jdbcType=TINYINT}, + + + group_remark = #{groupRemark,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -285,7 +343,11 @@ type = #{type,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + sex = #{sex,jdbcType=TINYINT}, + max_age = #{maxAge,jdbcType=TINYINT}, + min_age = #{minAge,jdbcType=TINYINT}, + group_remark = #{groupRemark,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompetePlayerFamilyMapper.xml b/mt/src/main/resources/mapper_raw/CompetePlayerFamilyMapper.xml new file mode 100644 index 00000000..1e18a9e6 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompetePlayerFamilyMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + 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, player_id, children_id, description, created_at, updated_at, rec_status + + + + + delete from t_compete_player_family + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_player_family + + + + + + insert into t_compete_player_family (id, player_id, children_id, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{childrenId,jdbcType=BIGINT}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_player_family + + + id, + + + player_id, + + + children_id, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{childrenId,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_player_family + + + id = #{record.id,jdbcType=BIGINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + children_id = #{record.childrenId,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_player_family + set id = #{record.id,jdbcType=BIGINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + children_id = #{record.childrenId,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_player_family + + + player_id = #{playerId,jdbcType=BIGINT}, + + + children_id = #{childrenId,jdbcType=BIGINT}, + + + description = #{description,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_player_family + set player_id = #{playerId,jdbcType=BIGINT}, + children_id = #{childrenId,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml b/mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml index 52d11ab2..bbcc90d4 100644 --- a/mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml +++ b/mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml @@ -17,6 +17,14 @@ + + + + + + + + @@ -78,7 +86,9 @@ id, user_id, name, id_card, phone, gender, id_card_front, id_card_back, prove_img, - compete_group_id, company_id, authorization, created_at, updated_at, rec_status + compete_group_id, company_id, authorization, created_at, updated_at, rec_status, + compete_time_id, id_card_front_file, id_card_back_file, id_photo_file, student_record_file, + health_record_file, insurance_record_file, group_remark @@ -275,6 +337,30 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + + + id_card_front_file = #{record.idCardFrontFile,jdbcType=BIGINT}, + + + id_card_back_file = #{record.idCardBackFile,jdbcType=BIGINT}, + + + id_photo_file = #{record.idPhotoFile,jdbcType=BIGINT}, + + + student_record_file = #{record.studentRecordFile,jdbcType=BIGINT}, + + + health_record_file = #{record.healthRecordFile,jdbcType=BIGINT}, + + + insurance_record_file = #{record.insuranceRecordFile,jdbcType=BIGINT}, + + + group_remark = #{record.groupRemark,jdbcType=TINYINT}, + @@ -296,7 +382,15 @@ authorization = #{record.authorization,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + id_card_front_file = #{record.idCardFrontFile,jdbcType=BIGINT}, + id_card_back_file = #{record.idCardBackFile,jdbcType=BIGINT}, + id_photo_file = #{record.idPhotoFile,jdbcType=BIGINT}, + student_record_file = #{record.studentRecordFile,jdbcType=BIGINT}, + health_record_file = #{record.healthRecordFile,jdbcType=BIGINT}, + insurance_record_file = #{record.insuranceRecordFile,jdbcType=BIGINT}, + group_remark = #{record.groupRemark,jdbcType=TINYINT} @@ -346,6 +440,30 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + + + id_card_front_file = #{idCardFrontFile,jdbcType=BIGINT}, + + + id_card_back_file = #{idCardBackFile,jdbcType=BIGINT}, + + + id_photo_file = #{idPhotoFile,jdbcType=BIGINT}, + + + student_record_file = #{studentRecordFile,jdbcType=BIGINT}, + + + health_record_file = #{healthRecordFile,jdbcType=BIGINT}, + + + insurance_record_file = #{insuranceRecordFile,jdbcType=BIGINT}, + + + group_remark = #{groupRemark,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -364,7 +482,15 @@ authorization = #{authorization,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + id_card_front_file = #{idCardFrontFile,jdbcType=BIGINT}, + id_card_back_file = #{idCardBackFile,jdbcType=BIGINT}, + id_photo_file = #{idPhotoFile,jdbcType=BIGINT}, + student_record_file = #{studentRecordFile,jdbcType=BIGINT}, + health_record_file = #{healthRecordFile,jdbcType=BIGINT}, + insurance_record_file = #{insuranceRecordFile,jdbcType=BIGINT}, + group_remark = #{groupRemark,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteProjectConfigMapper.xml b/mt/src/main/resources/mapper_raw/CompeteProjectConfigMapper.xml new file mode 100644 index 00000000..83c3bf11 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteProjectConfigMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + 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, site_num, start_time, end_time, created_at, updated_at, rec_status, + project_duration + + + + + delete from t_compete_project_config + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_project_config + + + + + + insert into t_compete_project_config (id, project_id, site_num, + start_time, end_time, created_at, + updated_at, rec_status, project_duration + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{siteNum,jdbcType=INTEGER}, + #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{projectDuration,jdbcType=BIGINT} + ) + + + insert into t_compete_project_config + + + id, + + + project_id, + + + site_num, + + + start_time, + + + end_time, + + + created_at, + + + updated_at, + + + rec_status, + + + project_duration, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{siteNum,jdbcType=INTEGER}, + + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{projectDuration,jdbcType=BIGINT}, + + + + + + update t_compete_project_config + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + site_num = #{record.siteNum,jdbcType=INTEGER}, + + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + project_duration = #{record.projectDuration,jdbcType=BIGINT}, + + + + + + + + update t_compete_project_config + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + site_num = #{record.siteNum,jdbcType=INTEGER}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + project_duration = #{record.projectDuration,jdbcType=BIGINT} + + + + + + update t_compete_project_config + + + project_id = #{projectId,jdbcType=BIGINT}, + + + site_num = #{siteNum,jdbcType=INTEGER}, + + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + project_duration = #{projectDuration,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_project_config + set project_id = #{projectId,jdbcType=BIGINT}, + site_num = #{siteNum,jdbcType=INTEGER}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + project_duration = #{projectDuration,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteProjectGroupMapper.xml b/mt/src/main/resources/mapper_raw/CompeteProjectGroupMapper.xml new file mode 100644 index 00000000..2f6aa71d --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteProjectGroupMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + 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, group_id, description, created_at, updated_at, rec_status + + + + + delete from t_compete_project_group + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_project_group + + + + + + insert into t_compete_project_group (id, project_id, group_id, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{groupId,jdbcType=BIGINT}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_project_group + + + id, + + + project_id, + + + group_id, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{groupId,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_project_group + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + group_id = #{record.groupId,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_project_group + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + group_id = #{record.groupId,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_project_group + + + project_id = #{projectId,jdbcType=BIGINT}, + + + group_id = #{groupId,jdbcType=BIGINT}, + + + description = #{description,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_project_group + set project_id = #{projectId,jdbcType=BIGINT}, + group_id = #{groupId,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteProjectMapper.xml b/mt/src/main/resources/mapper_raw/CompeteProjectMapper.xml index 8fdb82da..7788b515 100644 --- a/mt/src/main/resources/mapper_raw/CompeteProjectMapper.xml +++ b/mt/src/main/resources/mapper_raw/CompeteProjectMapper.xml @@ -15,6 +15,7 @@ + @@ -76,7 +77,7 @@ id, name, parent_id, level, team, join_rule, certificate, member_min, member_max, - type, created_at, updated_at, rec_status + type, created_at, updated_at, rec_status, compete_time_id @@ -253,6 +260,9 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + @@ -272,7 +282,8 @@ type = #{record.type,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT} @@ -316,6 +327,9 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + where id = #{id,jdbcType=BIGINT} @@ -332,7 +346,8 @@ type = #{type,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + compete_time_id = #{competeTimeId,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml b/mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml index 07cea7e1..d921ea78 100644 --- a/mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml +++ b/mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml @@ -11,6 +11,8 @@ + + @@ -72,7 +74,7 @@ id, player_id, project_id, compete_time_id, gender_group, certificate, created_at, - updated_at, rec_status + updated_at, rec_status, compete_group_id, success @@ -211,6 +225,12 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, + + + success = #{record.success,jdbcType=TINYINT}, + @@ -226,7 +246,9 @@ certificate = #{record.certificate,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, + success = #{record.success,jdbcType=TINYINT} @@ -258,6 +280,12 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + compete_group_id = #{competeGroupId,jdbcType=BIGINT}, + + + success = #{success,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -270,7 +298,9 @@ certificate = #{certificate,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + compete_group_id = #{competeGroupId,jdbcType=BIGINT}, + success = #{success,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteTeamMapper.xml b/mt/src/main/resources/mapper_raw/CompeteTeamMapper.xml index cdd11c38..35da60a1 100644 --- a/mt/src/main/resources/mapper_raw/CompeteTeamMapper.xml +++ b/mt/src/main/resources/mapper_raw/CompeteTeamMapper.xml @@ -12,6 +12,10 @@ + + + + @@ -73,7 +77,7 @@ id, creator, project_id, compete_time_id, gender_group, certificate, qr_code, created_at, - updated_at, rec_status + updated_at, rec_status, compete_group_id, success, company_id, group_remark @@ -221,6 +251,18 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, + + + success = #{record.success,jdbcType=TINYINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + group_remark = #{record.groupRemark,jdbcType=TINYINT}, + @@ -237,7 +279,11 @@ qr_code = #{record.qrCode,jdbcType=VARCHAR}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, + success = #{record.success,jdbcType=TINYINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + group_remark = #{record.groupRemark,jdbcType=TINYINT} @@ -272,6 +318,18 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + compete_group_id = #{competeGroupId,jdbcType=BIGINT}, + + + success = #{success,jdbcType=TINYINT}, + + + company_id = #{companyId,jdbcType=BIGINT}, + + + group_remark = #{groupRemark,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -285,7 +343,11 @@ qr_code = #{qrCode,jdbcType=VARCHAR}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + compete_group_id = #{competeGroupId,jdbcType=BIGINT}, + success = #{success,jdbcType=TINYINT}, + company_id = #{companyId,jdbcType=BIGINT}, + group_remark = #{groupRemark,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteVideoMapper.xml b/mt/src/main/resources/mapper_raw/CompeteVideoMapper.xml new file mode 100644 index 00000000..541d081e --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteVideoMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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, compete_time_id, compete_code, team, player_id, file_id, video_url, time, upload_user_id, + created_at, updated_at, rec_status + + + + + delete from t_compete_video + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_video + + + + + + insert into t_compete_video (id, compete_time_id, compete_code, + team, player_id, file_id, + video_url, time, upload_user_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{competeCode,jdbcType=VARCHAR}, + #{team,jdbcType=TINYINT}, #{playerId,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT}, + #{videoUrl,jdbcType=VARCHAR}, #{time,jdbcType=BIGINT}, #{uploadUserId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_compete_video + + + id, + + + compete_time_id, + + + compete_code, + + + team, + + + player_id, + + + file_id, + + + video_url, + + + time, + + + upload_user_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{competeTimeId,jdbcType=BIGINT}, + + + #{competeCode,jdbcType=VARCHAR}, + + + #{team,jdbcType=TINYINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{fileId,jdbcType=BIGINT}, + + + #{videoUrl,jdbcType=VARCHAR}, + + + #{time,jdbcType=BIGINT}, + + + #{uploadUserId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_video + + + id = #{record.id,jdbcType=BIGINT}, + + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + + + compete_code = #{record.competeCode,jdbcType=VARCHAR}, + + + team = #{record.team,jdbcType=TINYINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + file_id = #{record.fileId,jdbcType=BIGINT}, + + + video_url = #{record.videoUrl,jdbcType=VARCHAR}, + + + time = #{record.time,jdbcType=BIGINT}, + + + upload_user_id = #{record.uploadUserId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_video + set id = #{record.id,jdbcType=BIGINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + compete_code = #{record.competeCode,jdbcType=VARCHAR}, + team = #{record.team,jdbcType=TINYINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + file_id = #{record.fileId,jdbcType=BIGINT}, + video_url = #{record.videoUrl,jdbcType=VARCHAR}, + time = #{record.time,jdbcType=BIGINT}, + upload_user_id = #{record.uploadUserId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_video + + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + + + compete_code = #{competeCode,jdbcType=VARCHAR}, + + + team = #{team,jdbcType=TINYINT}, + + + player_id = #{playerId,jdbcType=BIGINT}, + + + file_id = #{fileId,jdbcType=BIGINT}, + + + video_url = #{videoUrl,jdbcType=VARCHAR}, + + + time = #{time,jdbcType=BIGINT}, + + + upload_user_id = #{uploadUserId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_video + set compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + compete_code = #{competeCode,jdbcType=VARCHAR}, + team = #{team,jdbcType=TINYINT}, + player_id = #{playerId,jdbcType=BIGINT}, + file_id = #{fileId,jdbcType=BIGINT}, + video_url = #{videoUrl,jdbcType=VARCHAR}, + time = #{time,jdbcType=BIGINT}, + upload_user_id = #{uploadUserId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/template/competeCount.xlsx b/mt/src/main/resources/template/competeCount.xlsx new file mode 100644 index 00000000..932d956e Binary files /dev/null and b/mt/src/main/resources/template/competeCount.xlsx differ diff --git a/pom.xml b/pom.xml index d1934888..c938369f 100644 --- a/pom.xml +++ b/pom.xml @@ -9,12 +9,13 @@ cloudutil util tall - ht + game mt + - + com.ccsens @@ -66,12 +67,12 @@ spring-boot-starter-jetty - + org.springframework.boot spring-boot-configuration-processor diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/DeliverDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/DeliverDto.java index 390cb955..4c1e5281 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/DeliverDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/DeliverDto.java @@ -6,6 +6,8 @@ import lombok.Data; import lombok.Getter; import lombok.Setter; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; import java.util.List; public class DeliverDto { @@ -20,6 +22,10 @@ public class DeliverDto { private Boolean checkStatus; @ApiModelProperty("检查人备注") private String text; + @Max(10) + @Min(0) + @ApiModelProperty("评分") + private int score = 10; } @ApiModel diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java index c448d2f1..b380e25c 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java @@ -25,6 +25,8 @@ public class LabelDto { private String description; @ApiModelProperty("优先级") private int level; + @ApiModelProperty("标签类型 0项目标签 1任务标签") + private byte type = 0; } @Data @ApiModel("删除标签") @@ -50,6 +52,8 @@ public class LabelDto { private String description; @ApiModelProperty("优先级") private int level; + @ApiModelProperty("标签类型 0项目标签 1任务标签") + private Byte type; } @Data @@ -61,4 +65,14 @@ public class LabelDto { @ApiModelProperty("标签id") private List labelList; } + + @Data + @ApiModel("给项目添加标签") + public static class TaskLabel{ + @NotNull + @ApiModelProperty("项目id") + private Long taskId; + @ApiModelProperty("标签id") + private List labelList; + } } 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..36fcb675 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,14 +3,32 @@ 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; import javax.validation.constraints.Size; import java.util.List; +/** + * @author 逗 + */ @Data public class PluginDto { + @Data + @ApiModel("添加插件") + public static class SaveSysPlugin { + @NotEmpty + @ApiModelProperty("插件名(英文的code)") + private String name; + @NotEmpty + @ApiModelProperty("插件描述") + private String description; + @ApiModelProperty("插件展示位置 默认2:0不显示,1任务头上右侧图标,2任务详情显示按钮,3任务展开面板显示(特殊形式)") + private byte showType = 2; + } + + @Data @ApiModel("添加评论") public static class AddCommentPlugin { @@ -75,4 +93,25 @@ 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; + + public UpdatePluginConfig() { + } + } + } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java index b131a546..e13f9595 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java @@ -9,6 +9,7 @@ import lombok.Getter; import lombok.Setter; import javax.validation.constraints.NotNull; +import java.util.List; public class ProjectDto { @Data @@ -72,6 +73,12 @@ public class ProjectDto { private Long beginTime; @ApiModelProperty("项目结束时间") private Long endTime; + @ApiModelProperty("父项目id") + private Long parentId; + @ApiModelProperty("是否首页展示 0否 1是") + private Byte homePageShow; + @ApiModelProperty("是否显示特殊样式(如:高亮) 0否 1是") + private Byte highlight; } @Data @@ -110,4 +117,41 @@ public class ProjectDto { } } } + + @Data + @ApiModel("用户选择变身成为某个角色") + public static class ImitationRole{ + @NotNull + @ApiModelProperty("项目的id") + private Long projectId; + @NotNull + @ApiModelProperty("角色的id") + private Long roleId; + @NotNull + @ApiModelProperty("变身的秘钥") + private String code; + } + + @Data + @ApiModel("创建新项目") + public static class CreateProject{ + @ApiModelProperty("名字") + private String name; + @ApiModelProperty("详情") + private String description; + @ApiModelProperty("地址") + private String address; + @ApiModelProperty("开始时间") + private Long beginTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("父项目id") + private Long parentId; + @ApiModelProperty("是否首页展示 0否 1是") + private Byte homePageShow; + @ApiModelProperty("是否显示特殊样式(如:高亮) 0否 1是") + private Byte highlight = 0; + @ApiModelProperty("标签id") + private List labelList; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/RoleDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/RoleDto.java index 9aff12cc..173ca66a 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/RoleDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/RoleDto.java @@ -6,6 +6,7 @@ import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; +import java.util.List; @Data public class RoleDto { @@ -29,6 +30,8 @@ public class RoleDto { private Long roleId; @ApiModelProperty("角色名") private String roleName; + @ApiModelProperty("关联项目id(只有角色项目可以修改)") + private Long relevanceProjectId; } @Data @@ -40,4 +43,35 @@ public class RoleDto { @ApiModelProperty("成员Id") private Long memberId; } + + @Data + @ApiModel("给角色添加成员") + public static class DeleteRole{ + @NotNull(message = "角色Id不能为空") + @ApiModelProperty("角色id") + private Long roleId; + } + + + @Data + @ApiModel("点击项目角色查询一级任务及里程碑") + public static class ProjectId{ + @NotNull(message = "项目Id") + @ApiModelProperty("项目Id") + private Long projectId; + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + } + + @Data + @ApiModel("修改用户可见的角色的展示") + public static class UpdateRoleShow{ + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("角色id") + private List roleIdList; + } + } 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 f988ae38..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 @@ -2,6 +2,7 @@ package com.ccsens.tall.bean.dto; import cn.hutool.core.util.ObjectUtil; import com.ccsens.util.exception.BaseException; +import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -45,7 +46,7 @@ public class TaskDto { } @Data - @ApiModel("设置任务提醒") + @ApiModel("添加时设置任务提醒") public static class TaskRemindByAdd{ @ApiModelProperty("提醒时机 0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间") private Byte remindTiming; @@ -138,18 +139,18 @@ public class TaskDto { private Long prevId; //移动之后的前一个节点 } - @Data - public static class InsertTask { - @NotNull(message = "projectId is required.") - private Long projectId; - @NotNull(message = "roleId is required.") - private Long roleId; - private Long prevId; //移动之后的前一个节点 - private __TaskDto taskId; //插入的节点 - } +// @Data +// public static class InsertTask { +// @NotNull(message = "projectId is required.") +// private Long projectId; +// @NotNull(message = "roleId is required.") +// private Long roleId; +// private Long prevId; //移动之后的前一个节点 +// private __TaskDto taskId; //插入的节点 +// } @Data - @ApiModel + @ApiModel("修改任务详细信息") public static class UpdateTaskInfo{ @ApiModelProperty("任务id") private Long id; @@ -173,10 +174,25 @@ 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") + private List plugins; @ApiModelProperty("任务提醒信息") - private List taskRemindList; + private List taskRemindList; + } + @Data + @ApiModel("修改任务时修改交付物名称") + public static class UpdateTaskDeliverName { + @ApiModelProperty("交付物id") + private Long deliverId; + @ApiModelProperty("交付物名字") + private String deliverName; } + @ApiModel @Data public static class ChangeBeginTime { @@ -195,16 +211,16 @@ public class TaskDto { } - public static class __TaskDto{ - private String name; - private String description; - private Long duration; - private Long prevId; - private Boolean isVirtual; - private String title; - private String speaker; - private String text; - } +// public static class __TaskDto{ +// private String name; +// private String description; +// private Long duration; +// private Long prevId; +// private Boolean isVirtual; +// private String title; +// private String speaker; +// private String text; +// } @ApiModel @Data @@ -251,9 +267,8 @@ public class TaskDto { } @Data - @ApiModel("设置任务提醒") + @ApiModel("给任务添加提醒") public static class TaskRemind{ - @NotNull @ApiModelProperty("任务日期id(subTimeId)") private Long taskId; @ApiModelProperty("提醒时机 0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间") @@ -289,7 +304,7 @@ public class TaskDto { private Long remindId; } @Data - @ApiModel("设置任务提醒") + @ApiModel("修改时设置任务提醒") public static class UpdateTaskRemind{ @NotNull @ApiModelProperty("提醒信息的id") @@ -340,4 +355,36 @@ public class TaskDto { @ApiModelProperty("角色id") private List roleList; } + + + @Data + @ApiModel("根据角色查找任务") + public static class QueryTaskInfoByRoleId{ + @ApiModelProperty("角色Id") + private Long roleId; + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("完成状态 0全部,1完成,2未完成") + private Integer process = 0; + @ApiModelProperty("优先级排序 0无 1倒叙(优先级高的在前) 2正序") + private Integer priority = 0; + @ApiModelProperty("是否是变身模式 0否 1是") + private Integer imitation = 0; + @ApiModelProperty("页数 -1表示不分页") + private Integer page = 1; + @ApiModelProperty("每页数量") + 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..cfb5fab5 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 @@ -111,7 +111,7 @@ public class UserDto { @NotEmpty(message = "密码不能为空") @Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") private String password; - @ApiModelProperty("来源 0:默认注册,1:HT病人注册") + @ApiModelProperty("来源 0:默认注册,1:跳绳") private byte source = WebConstant.Regist.SOURCE; } @@ -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/dto/WeekMeetingDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/WeekMeetingDto.java new file mode 100644 index 00000000..ef85460e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/WeekMeetingDto.java @@ -0,0 +1,64 @@ +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.NotNull; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class WeekMeetingDto { + + @Data + @ApiModel("项目的id") + public static class WeekMeetingId{ + @ApiModelProperty("项目的id") + private Long projectId; + } + + @Data + @ApiModel("查找个人本周任务") + public static class WeekTaskByMemberAndProject{ + @NonNull + @ApiModelProperty("成员id") + private Long memberId; + @ApiModelProperty("“个人汇报”任务的id") + private Long taskId; + @ApiModelProperty("周会项目的id") + private Long projectId; + + public WeekTaskByMemberAndProject() { + } + } + + @Data + @ApiModel("项目的id") + public static class WeekMeetingMinutes{ + @ApiModelProperty("项目的id") + private Long projectId; + @ApiModelProperty("个人汇报任务的id") + private long taskId; + @ApiModelProperty("域名") + private String domainName; + } + + @Data + @ApiModel("获取插件关联的信息") + public static class PluginParameter{ + @NotNull(message = "插件信息不正确") + @ApiModelProperty("插件id") + private Long pluginId; + @ApiModelProperty("任务id") + private Long subTaskId; + @ApiModelProperty("成员id") + private Long memberId; + @ApiModelProperty("项目id") + private Long projectId; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java index a5f84046..e034e7ee 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java @@ -168,14 +168,16 @@ public class WpsDto { @ApiModelProperty("wps文件ID") private Long wpsFileId; @ApiModelProperty("业务类型 0: 项目ID 1:交付物ID 2会议记录 3产品依据表" + - ",4产品收入表,5成本表,6损益表,7现金流表,8数钱游戏配置,9赛跑游戏配置,10拔河游戏配置") + ",4产品收入表,5成本表,6损益表,7现金流表,8数钱游戏配置,9赛跑游戏配置,10拔河游戏配置,11跳绳项目") private Byte businessType; @ApiModelProperty("用户ID") private Long userId; @ApiModelProperty("文件名") private String fileName; - @ApiModelProperty("文件路径,默认在WebConstant.UPLOAD_PATH_BASE下") + @ApiModelProperty("文件路径") private String filePath; + @ApiModelProperty("文件实际存储路径") + private String realFilePath; @ApiModelProperty("文件大小") private Long fileSize; @ApiModelProperty("操作类型 值:WebConstant Wps USER_OPERATION... ") diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginParameter.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginParameter.java new file mode 100644 index 00000000..0b8360b4 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginParameter.java @@ -0,0 +1,117 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProPluginParameter implements Serializable { + private Long id; + + private Long subTaskId; + + private Long memberId; + + private Long projectId; + + private Long pluginId; + + private String parameter; + + 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 getSubTaskId() { + return subTaskId; + } + + public void setSubTaskId(Long subTaskId) { + this.subTaskId = subTaskId; + } + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getPluginId() { + return pluginId; + } + + public void setPluginId(Long pluginId) { + this.pluginId = pluginId; + } + + public String getParameter() { + return parameter; + } + + public void setParameter(String parameter) { + this.parameter = parameter == null ? null : parameter.trim(); + } + + 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(", subTaskId=").append(subTaskId); + sb.append(", memberId=").append(memberId); + sb.append(", projectId=").append(projectId); + sb.append(", pluginId=").append(pluginId); + sb.append(", parameter=").append(parameter); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginParameterExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginParameterExample.java new file mode 100644 index 00000000..09997517 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginParameterExample.java @@ -0,0 +1,751 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProPluginParameterExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProPluginParameterExample() { + 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 andSubTaskIdIsNull() { + addCriterion("sub_task_id is null"); + return (Criteria) this; + } + + public Criteria andSubTaskIdIsNotNull() { + addCriterion("sub_task_id is not null"); + return (Criteria) this; + } + + public Criteria andSubTaskIdEqualTo(Long value) { + addCriterion("sub_task_id =", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdNotEqualTo(Long value) { + addCriterion("sub_task_id <>", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdGreaterThan(Long value) { + addCriterion("sub_task_id >", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdGreaterThanOrEqualTo(Long value) { + addCriterion("sub_task_id >=", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdLessThan(Long value) { + addCriterion("sub_task_id <", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdLessThanOrEqualTo(Long value) { + addCriterion("sub_task_id <=", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdIn(List values) { + addCriterion("sub_task_id in", values, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdNotIn(List values) { + addCriterion("sub_task_id not in", values, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdBetween(Long value1, Long value2) { + addCriterion("sub_task_id between", value1, value2, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdNotBetween(Long value1, Long value2) { + addCriterion("sub_task_id not between", value1, value2, "subTaskId"); + return (Criteria) this; + } + + public Criteria andMemberIdIsNull() { + addCriterion("member_id is null"); + return (Criteria) this; + } + + public Criteria andMemberIdIsNotNull() { + addCriterion("member_id is not null"); + return (Criteria) this; + } + + public Criteria andMemberIdEqualTo(Long value) { + addCriterion("member_id =", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotEqualTo(Long value) { + addCriterion("member_id <>", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThan(Long value) { + addCriterion("member_id >", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThanOrEqualTo(Long value) { + addCriterion("member_id >=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThan(Long value) { + addCriterion("member_id <", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThanOrEqualTo(Long value) { + addCriterion("member_id <=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdIn(List values) { + addCriterion("member_id in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotIn(List values) { + addCriterion("member_id not in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdBetween(Long value1, Long value2) { + addCriterion("member_id between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotBetween(Long value1, Long value2) { + addCriterion("member_id not between", value1, value2, "memberId"); + 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 andPluginIdIsNull() { + addCriterion("plugin_id is null"); + return (Criteria) this; + } + + public Criteria andPluginIdIsNotNull() { + addCriterion("plugin_id is not null"); + return (Criteria) this; + } + + public Criteria andPluginIdEqualTo(Long value) { + addCriterion("plugin_id =", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotEqualTo(Long value) { + addCriterion("plugin_id <>", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdGreaterThan(Long value) { + addCriterion("plugin_id >", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdGreaterThanOrEqualTo(Long value) { + addCriterion("plugin_id >=", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLessThan(Long value) { + addCriterion("plugin_id <", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLessThanOrEqualTo(Long value) { + addCriterion("plugin_id <=", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdIn(List values) { + addCriterion("plugin_id in", values, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotIn(List values) { + addCriterion("plugin_id not in", values, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdBetween(Long value1, Long value2) { + addCriterion("plugin_id between", value1, value2, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotBetween(Long value1, Long value2) { + addCriterion("plugin_id not between", value1, value2, "pluginId"); + return (Criteria) this; + } + + public Criteria andParameterIsNull() { + addCriterion("parameter is null"); + return (Criteria) this; + } + + public Criteria andParameterIsNotNull() { + addCriterion("parameter is not null"); + return (Criteria) this; + } + + public Criteria andParameterEqualTo(String value) { + addCriterion("parameter =", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterNotEqualTo(String value) { + addCriterion("parameter <>", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterGreaterThan(String value) { + addCriterion("parameter >", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterGreaterThanOrEqualTo(String value) { + addCriterion("parameter >=", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterLessThan(String value) { + addCriterion("parameter <", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterLessThanOrEqualTo(String value) { + addCriterion("parameter <=", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterLike(String value) { + addCriterion("parameter like", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterNotLike(String value) { + addCriterion("parameter not like", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterIn(List values) { + addCriterion("parameter in", values, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterNotIn(List values) { + addCriterion("parameter not in", values, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterBetween(String value1, String value2) { + addCriterion("parameter between", value1, value2, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterNotBetween(String value1, String value2) { + addCriterion("parameter not between", value1, value2, "parameter"); + 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); + } + } +} \ No newline at end of file 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/ProShow.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java index b9a8320d..1aed7e5f 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java @@ -16,12 +16,6 @@ public class ProShow implements Serializable { private Byte createTask; - private Date createdAt; - - private Date updatedAt; - - private Byte recStatus; - private String timeShow; private Byte duration; @@ -34,6 +28,16 @@ public class ProShow implements Serializable { private Byte pimsNavType; + private Byte shareChange; + + private String shareChangeCode; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + private static final long serialVersionUID = 1L; public Long getId() { @@ -84,30 +88,6 @@ public class ProShow implements Serializable { this.createTask = createTask; } - 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 String getTimeShow() { return timeShow; } @@ -156,6 +136,46 @@ public class ProShow implements Serializable { this.pimsNavType = pimsNavType; } + public Byte getShareChange() { + return shareChange; + } + + public void setShareChange(Byte shareChange) { + this.shareChange = shareChange; + } + + public String getShareChangeCode() { + return shareChangeCode; + } + + public void setShareChangeCode(String shareChangeCode) { + this.shareChangeCode = shareChangeCode == null ? null : shareChangeCode.trim(); + } + + 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(); @@ -168,15 +188,17 @@ public class ProShow implements Serializable { sb.append(", filter=").append(filter); sb.append(", isShowMvp=").append(isShowMvp); sb.append(", createTask=").append(createTask); - sb.append(", createdAt=").append(createdAt); - sb.append(", updatedAt=").append(updatedAt); - sb.append(", recStatus=").append(recStatus); sb.append(", timeShow=").append(timeShow); sb.append(", duration=").append(duration); sb.append(", showShortcuts=").append(showShortcuts); sb.append(", selectTaskType=").append(selectTaskType); sb.append(", detailPath=").append(detailPath); sb.append(", pimsNavType=").append(pimsNavType); + sb.append(", shareChange=").append(shareChange); + sb.append(", shareChangeCode=").append(shareChangeCode); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java index b62ac0e0..6295c28d 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java @@ -465,186 +465,6 @@ public class ProShowExample { 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 andTimeShowIsNull() { addCriterion("time_show is null"); return (Criteria) this; @@ -1024,6 +844,316 @@ public class ProShowExample { addCriterion("pims_nav_type not between", value1, value2, "pimsNavType"); return (Criteria) this; } + + public Criteria andShareChangeIsNull() { + addCriterion("share_change is null"); + return (Criteria) this; + } + + public Criteria andShareChangeIsNotNull() { + addCriterion("share_change is not null"); + return (Criteria) this; + } + + public Criteria andShareChangeEqualTo(Byte value) { + addCriterion("share_change =", value, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeNotEqualTo(Byte value) { + addCriterion("share_change <>", value, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeGreaterThan(Byte value) { + addCriterion("share_change >", value, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeGreaterThanOrEqualTo(Byte value) { + addCriterion("share_change >=", value, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeLessThan(Byte value) { + addCriterion("share_change <", value, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeLessThanOrEqualTo(Byte value) { + addCriterion("share_change <=", value, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeIn(List values) { + addCriterion("share_change in", values, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeNotIn(List values) { + addCriterion("share_change not in", values, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeBetween(Byte value1, Byte value2) { + addCriterion("share_change between", value1, value2, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeNotBetween(Byte value1, Byte value2) { + addCriterion("share_change not between", value1, value2, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeIsNull() { + addCriterion("share_change_code is null"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeIsNotNull() { + addCriterion("share_change_code is not null"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeEqualTo(String value) { + addCriterion("share_change_code =", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeNotEqualTo(String value) { + addCriterion("share_change_code <>", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeGreaterThan(String value) { + addCriterion("share_change_code >", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeGreaterThanOrEqualTo(String value) { + addCriterion("share_change_code >=", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeLessThan(String value) { + addCriterion("share_change_code <", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeLessThanOrEqualTo(String value) { + addCriterion("share_change_code <=", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeLike(String value) { + addCriterion("share_change_code like", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeNotLike(String value) { + addCriterion("share_change_code not like", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeIn(List values) { + addCriterion("share_change_code in", values, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeNotIn(List values) { + addCriterion("share_change_code not in", values, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeBetween(String value1, String value2) { + addCriterion("share_change_code between", value1, value2, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeNotBetween(String value1, String value2) { + addCriterion("share_change_code not between", value1, value2, "shareChangeCode"); + 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 { diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogChecker.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogChecker.java index fe347039..73fdd4e2 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogChecker.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogChecker.java @@ -1,106 +1,117 @@ -package com.ccsens.tall.bean.po; - -import java.io.Serializable; -import java.util.Date; - -public class ProTaskDeliverPostLogChecker implements Serializable { - private Long id; - - private Long deliverPostLogId; - - private Long checkerId; - - private String remark; - - private Integer checkStatus; - - 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 getDeliverPostLogId() { - return deliverPostLogId; - } - - public void setDeliverPostLogId(Long deliverPostLogId) { - this.deliverPostLogId = deliverPostLogId; - } - - public Long getCheckerId() { - return checkerId; - } - - public void setCheckerId(Long checkerId) { - this.checkerId = checkerId; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark == null ? null : remark.trim(); - } - - public Integer getCheckStatus() { - return checkStatus; - } - - public void setCheckStatus(Integer checkStatus) { - this.checkStatus = checkStatus; - } - - 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(", deliverPostLogId=").append(deliverPostLogId); - sb.append(", checkerId=").append(checkerId); - sb.append(", remark=").append(remark); - sb.append(", checkStatus=").append(checkStatus); - 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 ProTaskDeliverPostLogChecker implements Serializable { + private Long id; + + private Long deliverPostLogId; + + private Long checkerId; + + private String remark; + + private Integer checkStatus; + + private Integer score; + + 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 getDeliverPostLogId() { + return deliverPostLogId; + } + + public void setDeliverPostLogId(Long deliverPostLogId) { + this.deliverPostLogId = deliverPostLogId; + } + + public Long getCheckerId() { + return checkerId; + } + + public void setCheckerId(Long checkerId) { + this.checkerId = checkerId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Integer getCheckStatus() { + return checkStatus; + } + + public void setCheckStatus(Integer checkStatus) { + this.checkStatus = checkStatus; + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + 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(", deliverPostLogId=").append(deliverPostLogId); + sb.append(", checkerId=").append(checkerId); + sb.append(", remark=").append(remark); + sb.append(", checkStatus=").append(checkStatus); + sb.append(", score=").append(score); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogCheckerExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogCheckerExample.java index 07f26c34..5bf14536 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogCheckerExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogCheckerExample.java @@ -1,691 +1,751 @@ -package com.ccsens.tall.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class ProTaskDeliverPostLogCheckerExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ProTaskDeliverPostLogCheckerExample() { - 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 andDeliverPostLogIdIsNull() { - addCriterion("deliver_post_log_id is null"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdIsNotNull() { - addCriterion("deliver_post_log_id is not null"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdEqualTo(Long value) { - addCriterion("deliver_post_log_id =", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdNotEqualTo(Long value) { - addCriterion("deliver_post_log_id <>", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdGreaterThan(Long value) { - addCriterion("deliver_post_log_id >", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdGreaterThanOrEqualTo(Long value) { - addCriterion("deliver_post_log_id >=", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdLessThan(Long value) { - addCriterion("deliver_post_log_id <", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdLessThanOrEqualTo(Long value) { - addCriterion("deliver_post_log_id <=", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdIn(List values) { - addCriterion("deliver_post_log_id in", values, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdNotIn(List values) { - addCriterion("deliver_post_log_id not in", values, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdBetween(Long value1, Long value2) { - addCriterion("deliver_post_log_id between", value1, value2, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdNotBetween(Long value1, Long value2) { - addCriterion("deliver_post_log_id not between", value1, value2, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andCheckerIdIsNull() { - addCriterion("checker_id is null"); - return (Criteria) this; - } - - public Criteria andCheckerIdIsNotNull() { - addCriterion("checker_id is not null"); - return (Criteria) this; - } - - public Criteria andCheckerIdEqualTo(Long value) { - addCriterion("checker_id =", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdNotEqualTo(Long value) { - addCriterion("checker_id <>", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdGreaterThan(Long value) { - addCriterion("checker_id >", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdGreaterThanOrEqualTo(Long value) { - addCriterion("checker_id >=", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdLessThan(Long value) { - addCriterion("checker_id <", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdLessThanOrEqualTo(Long value) { - addCriterion("checker_id <=", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdIn(List values) { - addCriterion("checker_id in", values, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdNotIn(List values) { - addCriterion("checker_id not in", values, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdBetween(Long value1, Long value2) { - addCriterion("checker_id between", value1, value2, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdNotBetween(Long value1, Long value2) { - addCriterion("checker_id not between", value1, value2, "checkerId"); - return (Criteria) this; - } - - public Criteria andRemarkIsNull() { - addCriterion("remark is null"); - return (Criteria) this; - } - - public Criteria andRemarkIsNotNull() { - addCriterion("remark is not null"); - return (Criteria) this; - } - - public Criteria andRemarkEqualTo(String value) { - addCriterion("remark =", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotEqualTo(String value) { - addCriterion("remark <>", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkGreaterThan(String value) { - addCriterion("remark >", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkGreaterThanOrEqualTo(String value) { - addCriterion("remark >=", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLessThan(String value) { - addCriterion("remark <", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLessThanOrEqualTo(String value) { - addCriterion("remark <=", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLike(String value) { - addCriterion("remark like", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotLike(String value) { - addCriterion("remark not like", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkIn(List values) { - addCriterion("remark in", values, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotIn(List values) { - addCriterion("remark not in", values, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkBetween(String value1, String value2) { - addCriterion("remark between", value1, value2, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotBetween(String value1, String value2) { - addCriterion("remark not between", value1, value2, "remark"); - return (Criteria) this; - } - - public Criteria andCheckStatusIsNull() { - addCriterion("check_status is null"); - return (Criteria) this; - } - - public Criteria andCheckStatusIsNotNull() { - addCriterion("check_status is not null"); - return (Criteria) this; - } - - public Criteria andCheckStatusEqualTo(Integer value) { - addCriterion("check_status =", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusNotEqualTo(Integer value) { - addCriterion("check_status <>", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusGreaterThan(Integer value) { - addCriterion("check_status >", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusGreaterThanOrEqualTo(Integer value) { - addCriterion("check_status >=", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusLessThan(Integer value) { - addCriterion("check_status <", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusLessThanOrEqualTo(Integer value) { - addCriterion("check_status <=", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusIn(List values) { - addCriterion("check_status in", values, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusNotIn(List values) { - addCriterion("check_status not in", values, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusBetween(Integer value1, Integer value2) { - addCriterion("check_status between", value1, value2, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusNotBetween(Integer value1, Integer value2) { - addCriterion("check_status not between", value1, value2, "checkStatus"); - 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 ProTaskDeliverPostLogCheckerExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProTaskDeliverPostLogCheckerExample() { + 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 andDeliverPostLogIdIsNull() { + addCriterion("deliver_post_log_id is null"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdIsNotNull() { + addCriterion("deliver_post_log_id is not null"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdEqualTo(Long value) { + addCriterion("deliver_post_log_id =", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdNotEqualTo(Long value) { + addCriterion("deliver_post_log_id <>", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdGreaterThan(Long value) { + addCriterion("deliver_post_log_id >", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdGreaterThanOrEqualTo(Long value) { + addCriterion("deliver_post_log_id >=", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdLessThan(Long value) { + addCriterion("deliver_post_log_id <", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdLessThanOrEqualTo(Long value) { + addCriterion("deliver_post_log_id <=", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdIn(List values) { + addCriterion("deliver_post_log_id in", values, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdNotIn(List values) { + addCriterion("deliver_post_log_id not in", values, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdBetween(Long value1, Long value2) { + addCriterion("deliver_post_log_id between", value1, value2, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdNotBetween(Long value1, Long value2) { + addCriterion("deliver_post_log_id not between", value1, value2, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andCheckerIdIsNull() { + addCriterion("checker_id is null"); + return (Criteria) this; + } + + public Criteria andCheckerIdIsNotNull() { + addCriterion("checker_id is not null"); + return (Criteria) this; + } + + public Criteria andCheckerIdEqualTo(Long value) { + addCriterion("checker_id =", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdNotEqualTo(Long value) { + addCriterion("checker_id <>", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdGreaterThan(Long value) { + addCriterion("checker_id >", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdGreaterThanOrEqualTo(Long value) { + addCriterion("checker_id >=", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdLessThan(Long value) { + addCriterion("checker_id <", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdLessThanOrEqualTo(Long value) { + addCriterion("checker_id <=", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdIn(List values) { + addCriterion("checker_id in", values, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdNotIn(List values) { + addCriterion("checker_id not in", values, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdBetween(Long value1, Long value2) { + addCriterion("checker_id between", value1, value2, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdNotBetween(Long value1, Long value2) { + addCriterion("checker_id not between", value1, value2, "checkerId"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andCheckStatusIsNull() { + addCriterion("check_status is null"); + return (Criteria) this; + } + + public Criteria andCheckStatusIsNotNull() { + addCriterion("check_status is not null"); + return (Criteria) this; + } + + public Criteria andCheckStatusEqualTo(Integer value) { + addCriterion("check_status =", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusNotEqualTo(Integer value) { + addCriterion("check_status <>", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusGreaterThan(Integer value) { + addCriterion("check_status >", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("check_status >=", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusLessThan(Integer value) { + addCriterion("check_status <", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusLessThanOrEqualTo(Integer value) { + addCriterion("check_status <=", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusIn(List values) { + addCriterion("check_status in", values, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusNotIn(List values) { + addCriterion("check_status not in", values, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusBetween(Integer value1, Integer value2) { + addCriterion("check_status between", value1, value2, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusNotBetween(Integer value1, Integer value2) { + addCriterion("check_status not between", value1, value2, "checkStatus"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Integer value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Integer value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Integer value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Integer value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Integer value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Integer value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Integer value1, Integer value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Integer value1, Integer value2) { + addCriterion("score not between", value1, value2, "score"); + 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); + } + } } \ 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/po/ProTaskLabel.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabel.java new file mode 100644 index 00000000..ee8f78ee --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabel.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProTaskLabel implements Serializable { + private Long id; + + private Long taskDetailId; + + private Long labelId; + + 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 getTaskDetailId() { + return taskDetailId; + } + + public void setTaskDetailId(Long taskDetailId) { + this.taskDetailId = taskDetailId; + } + + public Long getLabelId() { + return labelId; + } + + public void setLabelId(Long labelId) { + this.labelId = labelId; + } + + 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(", taskDetailId=").append(taskDetailId); + sb.append(", labelId=").append(labelId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabelExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabelExample.java new file mode 100644 index 00000000..60eec890 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabelExample.java @@ -0,0 +1,561 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProTaskLabelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProTaskLabelExample() { + 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 andTaskDetailIdIsNull() { + addCriterion("task_detail_id is null"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdIsNotNull() { + addCriterion("task_detail_id is not null"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdEqualTo(Long value) { + addCriterion("task_detail_id =", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdNotEqualTo(Long value) { + addCriterion("task_detail_id <>", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdGreaterThan(Long value) { + addCriterion("task_detail_id >", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdGreaterThanOrEqualTo(Long value) { + addCriterion("task_detail_id >=", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdLessThan(Long value) { + addCriterion("task_detail_id <", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdLessThanOrEqualTo(Long value) { + addCriterion("task_detail_id <=", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdIn(List values) { + addCriterion("task_detail_id in", values, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdNotIn(List values) { + addCriterion("task_detail_id not in", values, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdBetween(Long value1, Long value2) { + addCriterion("task_detail_id between", value1, value2, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdNotBetween(Long value1, Long value2) { + addCriterion("task_detail_id not between", value1, value2, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andLabelIdIsNull() { + addCriterion("label_id is null"); + return (Criteria) this; + } + + public Criteria andLabelIdIsNotNull() { + addCriterion("label_id is not null"); + return (Criteria) this; + } + + public Criteria andLabelIdEqualTo(Long value) { + addCriterion("label_id =", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotEqualTo(Long value) { + addCriterion("label_id <>", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdGreaterThan(Long value) { + addCriterion("label_id >", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdGreaterThanOrEqualTo(Long value) { + addCriterion("label_id >=", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdLessThan(Long value) { + addCriterion("label_id <", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdLessThanOrEqualTo(Long value) { + addCriterion("label_id <=", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdIn(List values) { + addCriterion("label_id in", values, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotIn(List values) { + addCriterion("label_id not in", values, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdBetween(Long value1, Long value2) { + addCriterion("label_id between", value1, value2, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotBetween(Long value1, Long value2) { + addCriterion("label_id not between", value1, value2, "labelId"); + 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); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProUserAttentionRole.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProUserAttentionRole.java new file mode 100644 index 00000000..05a98797 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProUserAttentionRole.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProUserAttentionRole implements Serializable { + private Long id; + + private Long projectId; + + private Long userId; + + private Long roleId; + + 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 getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + 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(", userId=").append(userId); + sb.append(", roleId=").append(roleId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProUserAttentionRoleExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProUserAttentionRoleExample.java new file mode 100644 index 00000000..4aa103d5 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProUserAttentionRoleExample.java @@ -0,0 +1,621 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProUserAttentionRoleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProUserAttentionRoleExample() { + 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 andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(Long value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(Long value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(Long value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(Long value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(Long value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(Long value1, Long value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(Long value1, Long value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + 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); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysImitation.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysImitation.java new file mode 100644 index 00000000..295e9d67 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysImitation.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysImitation implements Serializable { + private Long id; + + private Long userId; + + private Long projectId; + + private Long roleId; + + 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 getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + 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(", userId=").append(userId); + sb.append(", projectId=").append(projectId); + sb.append(", roleId=").append(roleId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysImitationExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysImitationExample.java new file mode 100644 index 00000000..ac32e0e2 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysImitationExample.java @@ -0,0 +1,621 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysImitationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysImitationExample() { + 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 andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + 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 andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(Long value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(Long value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(Long value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(Long value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(Long value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(Long value1, Long value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(Long value1, Long value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + 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); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java index 63e30b09..a5b1fe37 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java @@ -24,6 +24,8 @@ public class SysLabel implements Serializable { private Byte recStatus; + private Byte businessType; + private static final long serialVersionUID = 1L; public Long getId() { @@ -106,6 +108,14 @@ public class SysLabel implements Serializable { this.recStatus = recStatus; } + public Byte getBusinessType() { + return businessType; + } + + public void setBusinessType(Byte businessType) { + this.businessType = businessType; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -122,6 +132,7 @@ public class SysLabel implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); + sb.append(", businessType=").append(businessType); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java index 5abb17a5..cfd729a5 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java @@ -744,6 +744,66 @@ public class SysLabelExample { addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } + + public Criteria andBusinessTypeIsNull() { + addCriterion("business_type is null"); + return (Criteria) this; + } + + public Criteria andBusinessTypeIsNotNull() { + addCriterion("business_type is not null"); + return (Criteria) this; + } + + public Criteria andBusinessTypeEqualTo(Byte value) { + addCriterion("business_type =", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotEqualTo(Byte value) { + addCriterion("business_type <>", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeGreaterThan(Byte value) { + addCriterion("business_type >", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("business_type >=", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeLessThan(Byte value) { + addCriterion("business_type <", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeLessThanOrEqualTo(Byte value) { + addCriterion("business_type <=", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeIn(List values) { + addCriterion("business_type in", values, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotIn(List values) { + addCriterion("business_type not in", values, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeBetween(Byte value1, Byte value2) { + addCriterion("business_type between", value1, value2, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotBetween(Byte value1, Byte value2) { + addCriterion("business_type not between", value1, value2, "businessType"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLog.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLog.java index 9f2f1ea5..a0310ab6 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysLog.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLog.java @@ -1,106 +1,128 @@ -package com.ccsens.tall.bean.po; - -import java.io.Serializable; -import java.util.Date; - -public class SysLog implements Serializable { - private Long id; - - private String url; - - private String methodDesc; - - private String params; - - private String result; - - 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 String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url == null ? null : url.trim(); - } - - public String getMethodDesc() { - return methodDesc; - } - - public void setMethodDesc(String methodDesc) { - this.methodDesc = methodDesc == null ? null : methodDesc.trim(); - } - - public String getParams() { - return params; - } - - public void setParams(String params) { - this.params = params == null ? null : params.trim(); - } - - public String getResult() { - return result; - } - - public void setResult(String result) { - this.result = result == null ? null : result.trim(); - } - - 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(", url=").append(url); - sb.append(", methodDesc=").append(methodDesc); - sb.append(", params=").append(params); - sb.append(", result=").append(result); - 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 SysLog implements Serializable { + private Long id; + + private String url; + + private String methodDesc; + + private String params; + + private String result; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private String facility; + + private Long userId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url == null ? null : url.trim(); + } + + public String getMethodDesc() { + return methodDesc; + } + + public void setMethodDesc(String methodDesc) { + this.methodDesc = methodDesc == null ? null : methodDesc.trim(); + } + + public String getParams() { + return params; + } + + public void setParams(String params) { + this.params = params == null ? null : params.trim(); + } + + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result == null ? null : result.trim(); + } + + 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 String getFacility() { + return facility; + } + + public void setFacility(String facility) { + this.facility = facility == null ? null : facility.trim(); + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + @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(", url=").append(url); + sb.append(", methodDesc=").append(methodDesc); + sb.append(", params=").append(params); + sb.append(", result=").append(result); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", facility=").append(facility); + sb.append(", userId=").append(userId); + sb.append("]"); + return sb.toString(); + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLogExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLogExample.java index 1aae3f62..c327b42a 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysLogExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLogExample.java @@ -1,721 +1,851 @@ -package com.ccsens.tall.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class SysLogExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SysLogExample() { - 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 andUrlIsNull() { - addCriterion("url is null"); - return (Criteria) this; - } - - public Criteria andUrlIsNotNull() { - addCriterion("url is not null"); - return (Criteria) this; - } - - public Criteria andUrlEqualTo(String value) { - addCriterion("url =", value, "url"); - return (Criteria) this; - } - - public Criteria andUrlNotEqualTo(String value) { - addCriterion("url <>", value, "url"); - return (Criteria) this; - } - - public Criteria andUrlGreaterThan(String value) { - addCriterion("url >", value, "url"); - return (Criteria) this; - } - - public Criteria andUrlGreaterThanOrEqualTo(String value) { - addCriterion("url >=", value, "url"); - return (Criteria) this; - } - - public Criteria andUrlLessThan(String value) { - addCriterion("url <", value, "url"); - return (Criteria) this; - } - - public Criteria andUrlLessThanOrEqualTo(String value) { - addCriterion("url <=", value, "url"); - return (Criteria) this; - } - - public Criteria andUrlLike(String value) { - addCriterion("url like", value, "url"); - return (Criteria) this; - } - - public Criteria andUrlNotLike(String value) { - addCriterion("url not like", value, "url"); - return (Criteria) this; - } - - public Criteria andUrlIn(List values) { - addCriterion("url in", values, "url"); - return (Criteria) this; - } - - public Criteria andUrlNotIn(List values) { - addCriterion("url not in", values, "url"); - return (Criteria) this; - } - - public Criteria andUrlBetween(String value1, String value2) { - addCriterion("url between", value1, value2, "url"); - return (Criteria) this; - } - - public Criteria andUrlNotBetween(String value1, String value2) { - addCriterion("url not between", value1, value2, "url"); - return (Criteria) this; - } - - public Criteria andMethodDescIsNull() { - addCriterion("method_desc is null"); - return (Criteria) this; - } - - public Criteria andMethodDescIsNotNull() { - addCriterion("method_desc is not null"); - return (Criteria) this; - } - - public Criteria andMethodDescEqualTo(String value) { - addCriterion("method_desc =", value, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescNotEqualTo(String value) { - addCriterion("method_desc <>", value, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescGreaterThan(String value) { - addCriterion("method_desc >", value, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescGreaterThanOrEqualTo(String value) { - addCriterion("method_desc >=", value, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescLessThan(String value) { - addCriterion("method_desc <", value, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescLessThanOrEqualTo(String value) { - addCriterion("method_desc <=", value, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescLike(String value) { - addCriterion("method_desc like", value, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescNotLike(String value) { - addCriterion("method_desc not like", value, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescIn(List values) { - addCriterion("method_desc in", values, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescNotIn(List values) { - addCriterion("method_desc not in", values, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescBetween(String value1, String value2) { - addCriterion("method_desc between", value1, value2, "methodDesc"); - return (Criteria) this; - } - - public Criteria andMethodDescNotBetween(String value1, String value2) { - addCriterion("method_desc not between", value1, value2, "methodDesc"); - return (Criteria) this; - } - - public Criteria andParamsIsNull() { - addCriterion("params is null"); - return (Criteria) this; - } - - public Criteria andParamsIsNotNull() { - addCriterion("params is not null"); - return (Criteria) this; - } - - public Criteria andParamsEqualTo(String value) { - addCriterion("params =", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsNotEqualTo(String value) { - addCriterion("params <>", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsGreaterThan(String value) { - addCriterion("params >", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsGreaterThanOrEqualTo(String value) { - addCriterion("params >=", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsLessThan(String value) { - addCriterion("params <", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsLessThanOrEqualTo(String value) { - addCriterion("params <=", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsLike(String value) { - addCriterion("params like", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsNotLike(String value) { - addCriterion("params not like", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsIn(List values) { - addCriterion("params in", values, "params"); - return (Criteria) this; - } - - public Criteria andParamsNotIn(List values) { - addCriterion("params not in", values, "params"); - return (Criteria) this; - } - - public Criteria andParamsBetween(String value1, String value2) { - addCriterion("params between", value1, value2, "params"); - return (Criteria) this; - } - - public Criteria andParamsNotBetween(String value1, String value2) { - addCriterion("params not between", value1, value2, "params"); - return (Criteria) this; - } - - public Criteria andResultIsNull() { - addCriterion("result is null"); - return (Criteria) this; - } - - public Criteria andResultIsNotNull() { - addCriterion("result is not null"); - return (Criteria) this; - } - - public Criteria andResultEqualTo(String value) { - addCriterion("result =", value, "result"); - return (Criteria) this; - } - - public Criteria andResultNotEqualTo(String value) { - addCriterion("result <>", value, "result"); - return (Criteria) this; - } - - public Criteria andResultGreaterThan(String value) { - addCriterion("result >", value, "result"); - return (Criteria) this; - } - - public Criteria andResultGreaterThanOrEqualTo(String value) { - addCriterion("result >=", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLessThan(String value) { - addCriterion("result <", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLessThanOrEqualTo(String value) { - addCriterion("result <=", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLike(String value) { - addCriterion("result like", value, "result"); - return (Criteria) this; - } - - public Criteria andResultNotLike(String value) { - addCriterion("result not like", value, "result"); - return (Criteria) this; - } - - public Criteria andResultIn(List values) { - addCriterion("result in", values, "result"); - return (Criteria) this; - } - - public Criteria andResultNotIn(List values) { - addCriterion("result not in", values, "result"); - return (Criteria) this; - } - - public Criteria andResultBetween(String value1, String value2) { - addCriterion("result between", value1, value2, "result"); - return (Criteria) this; - } - - public Criteria andResultNotBetween(String value1, String value2) { - addCriterion("result not between", value1, value2, "result"); - 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 SysLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysLogExample() { + 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 andUrlIsNull() { + addCriterion("url is null"); + return (Criteria) this; + } + + public Criteria andUrlIsNotNull() { + addCriterion("url is not null"); + return (Criteria) this; + } + + public Criteria andUrlEqualTo(String value) { + addCriterion("url =", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotEqualTo(String value) { + addCriterion("url <>", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThan(String value) { + addCriterion("url >", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThanOrEqualTo(String value) { + addCriterion("url >=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThan(String value) { + addCriterion("url <", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThanOrEqualTo(String value) { + addCriterion("url <=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLike(String value) { + addCriterion("url like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotLike(String value) { + addCriterion("url not like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlIn(List values) { + addCriterion("url in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotIn(List values) { + addCriterion("url not in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlBetween(String value1, String value2) { + addCriterion("url between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotBetween(String value1, String value2) { + addCriterion("url not between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andMethodDescIsNull() { + addCriterion("method_desc is null"); + return (Criteria) this; + } + + public Criteria andMethodDescIsNotNull() { + addCriterion("method_desc is not null"); + return (Criteria) this; + } + + public Criteria andMethodDescEqualTo(String value) { + addCriterion("method_desc =", value, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescNotEqualTo(String value) { + addCriterion("method_desc <>", value, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescGreaterThan(String value) { + addCriterion("method_desc >", value, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescGreaterThanOrEqualTo(String value) { + addCriterion("method_desc >=", value, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescLessThan(String value) { + addCriterion("method_desc <", value, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescLessThanOrEqualTo(String value) { + addCriterion("method_desc <=", value, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescLike(String value) { + addCriterion("method_desc like", value, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescNotLike(String value) { + addCriterion("method_desc not like", value, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescIn(List values) { + addCriterion("method_desc in", values, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescNotIn(List values) { + addCriterion("method_desc not in", values, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescBetween(String value1, String value2) { + addCriterion("method_desc between", value1, value2, "methodDesc"); + return (Criteria) this; + } + + public Criteria andMethodDescNotBetween(String value1, String value2) { + addCriterion("method_desc not between", value1, value2, "methodDesc"); + return (Criteria) this; + } + + public Criteria andParamsIsNull() { + addCriterion("params is null"); + return (Criteria) this; + } + + public Criteria andParamsIsNotNull() { + addCriterion("params is not null"); + return (Criteria) this; + } + + public Criteria andParamsEqualTo(String value) { + addCriterion("params =", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotEqualTo(String value) { + addCriterion("params <>", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsGreaterThan(String value) { + addCriterion("params >", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsGreaterThanOrEqualTo(String value) { + addCriterion("params >=", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLessThan(String value) { + addCriterion("params <", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLessThanOrEqualTo(String value) { + addCriterion("params <=", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLike(String value) { + addCriterion("params like", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotLike(String value) { + addCriterion("params not like", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsIn(List values) { + addCriterion("params in", values, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotIn(List values) { + addCriterion("params not in", values, "params"); + return (Criteria) this; + } + + public Criteria andParamsBetween(String value1, String value2) { + addCriterion("params between", value1, value2, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotBetween(String value1, String value2) { + addCriterion("params not between", value1, value2, "params"); + return (Criteria) this; + } + + public Criteria andResultIsNull() { + addCriterion("result is null"); + return (Criteria) this; + } + + public Criteria andResultIsNotNull() { + addCriterion("result is not null"); + return (Criteria) this; + } + + public Criteria andResultEqualTo(String value) { + addCriterion("result =", value, "result"); + return (Criteria) this; + } + + public Criteria andResultNotEqualTo(String value) { + addCriterion("result <>", value, "result"); + return (Criteria) this; + } + + public Criteria andResultGreaterThan(String value) { + addCriterion("result >", value, "result"); + return (Criteria) this; + } + + public Criteria andResultGreaterThanOrEqualTo(String value) { + addCriterion("result >=", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLessThan(String value) { + addCriterion("result <", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLessThanOrEqualTo(String value) { + addCriterion("result <=", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLike(String value) { + addCriterion("result like", value, "result"); + return (Criteria) this; + } + + public Criteria andResultNotLike(String value) { + addCriterion("result not like", value, "result"); + return (Criteria) this; + } + + public Criteria andResultIn(List values) { + addCriterion("result in", values, "result"); + return (Criteria) this; + } + + public Criteria andResultNotIn(List values) { + addCriterion("result not in", values, "result"); + return (Criteria) this; + } + + public Criteria andResultBetween(String value1, String value2) { + addCriterion("result between", value1, value2, "result"); + return (Criteria) this; + } + + public Criteria andResultNotBetween(String value1, String value2) { + addCriterion("result not between", value1, value2, "result"); + 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 andFacilityIsNull() { + addCriterion("facility is null"); + return (Criteria) this; + } + + public Criteria andFacilityIsNotNull() { + addCriterion("facility is not null"); + return (Criteria) this; + } + + public Criteria andFacilityEqualTo(String value) { + addCriterion("facility =", value, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityNotEqualTo(String value) { + addCriterion("facility <>", value, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityGreaterThan(String value) { + addCriterion("facility >", value, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityGreaterThanOrEqualTo(String value) { + addCriterion("facility >=", value, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityLessThan(String value) { + addCriterion("facility <", value, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityLessThanOrEqualTo(String value) { + addCriterion("facility <=", value, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityLike(String value) { + addCriterion("facility like", value, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityNotLike(String value) { + addCriterion("facility not like", value, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityIn(List values) { + addCriterion("facility in", values, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityNotIn(List values) { + addCriterion("facility not in", values, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityBetween(String value1, String value2) { + addCriterion("facility between", value1, value2, "facility"); + return (Criteria) this; + } + + public Criteria andFacilityNotBetween(String value1, String value2) { + addCriterion("facility not between", value1, value2, "facility"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + 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/SysProject.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysProject.java index 1763d352..cb77a0fb 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysProject.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysProject.java @@ -32,6 +32,12 @@ public class SysProject implements Serializable { private Byte recStatus; + private Long parentId; + + private Byte homePageShow; + + private Byte highlight; + private static final long serialVersionUID = 1L; public Long getId() { @@ -146,6 +152,30 @@ public class SysProject implements Serializable { this.recStatus = recStatus; } + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public Byte getHomePageShow() { + return homePageShow; + } + + public void setHomePageShow(Byte homePageShow) { + this.homePageShow = homePageShow; + } + + public Byte getHighlight() { + return highlight; + } + + public void setHighlight(Byte highlight) { + this.highlight = highlight; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -166,6 +196,9 @@ public class SysProject implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); + sb.append(", parentId=").append(parentId); + sb.append(", homePageShow=").append(homePageShow); + sb.append(", highlight=").append(highlight); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectExample.java index 2c31c159..c7f63bed 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectExample.java @@ -974,6 +974,186 @@ public class SysProjectExample { addCriterion("rec_status not between", value1, value2, "recStatus"); 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 andHomePageShowIsNull() { + addCriterion("home_page_show is null"); + return (Criteria) this; + } + + public Criteria andHomePageShowIsNotNull() { + addCriterion("home_page_show is not null"); + return (Criteria) this; + } + + public Criteria andHomePageShowEqualTo(Byte value) { + addCriterion("home_page_show =", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowNotEqualTo(Byte value) { + addCriterion("home_page_show <>", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowGreaterThan(Byte value) { + addCriterion("home_page_show >", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowGreaterThanOrEqualTo(Byte value) { + addCriterion("home_page_show >=", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowLessThan(Byte value) { + addCriterion("home_page_show <", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowLessThanOrEqualTo(Byte value) { + addCriterion("home_page_show <=", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowIn(List values) { + addCriterion("home_page_show in", values, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowNotIn(List values) { + addCriterion("home_page_show not in", values, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowBetween(Byte value1, Byte value2) { + addCriterion("home_page_show between", value1, value2, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowNotBetween(Byte value1, Byte value2) { + addCriterion("home_page_show not between", value1, value2, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHighlightIsNull() { + addCriterion("highlight is null"); + return (Criteria) this; + } + + public Criteria andHighlightIsNotNull() { + addCriterion("highlight is not null"); + return (Criteria) this; + } + + public Criteria andHighlightEqualTo(Byte value) { + addCriterion("highlight =", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightNotEqualTo(Byte value) { + addCriterion("highlight <>", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightGreaterThan(Byte value) { + addCriterion("highlight >", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightGreaterThanOrEqualTo(Byte value) { + addCriterion("highlight >=", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightLessThan(Byte value) { + addCriterion("highlight <", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightLessThanOrEqualTo(Byte value) { + addCriterion("highlight <=", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightIn(List values) { + addCriterion("highlight in", values, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightNotIn(List values) { + addCriterion("highlight not in", values, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightBetween(Byte value1, Byte value2) { + addCriterion("highlight between", value1, value2, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightNotBetween(Byte value1, Byte value2) { + addCriterion("highlight not between", value1, value2, "highlight"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java index 183bfd21..2f9569f7 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java @@ -65,6 +65,8 @@ public class DeliverVo { private String checkerName; @ApiModelProperty("检查情况 0未检查,1合格,2不合格") private int checkerStatus; + @ApiModelProperty("检查人评分") + private int score; @ApiModelProperty("检查人备注") private String remark; } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java index 405a02e4..9ab4ceca 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java @@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + @Data public class PluginVo { @@ -92,5 +94,33 @@ public class PluginVo { private Long wpsFileId; } + @Data + @ApiModel("个人任务汇报插件的入参(包含成员id姓名,项目id姓名,话术)") + public static class PersonalTaskReport{ + @ApiModelProperty("话术") + private String verbalTrick; + @ApiModelProperty("成员信息") + private List memberList; + @ApiModelProperty("项目信息") + private List projectList; + } + @Data + @ApiModel("需要汇报的成员") + public static class ReportMember{ + @ApiModelProperty("成员id") + private Long memberId; + @ApiModelProperty("成员名") + private String memberName; + } + @Data + @ApiModel("需要汇报的项目") + public static class ReportProject{ + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("项目名") + private String projectName; + } + + } 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 6d9cf456..4e30b456 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 @@ -45,6 +45,15 @@ public class ProjectVo { @ApiModelProperty("WPS文件信息") private List wpsFilePaths; + @ApiModelProperty("子项目信息") + private List subProjectList; + @ApiModelProperty("是否在首页展示 0否 1是") + private Byte homePageShow; + @ApiModelProperty("是否高亮展示 0否 1是") + private Byte highlight; + @ApiModelProperty("父项目id") + private Long parentId; + public Long getTotalDuration(){ if(ObjectUtil.isNotNull(endTime) && ObjectUtil.isNotNull(beginTime)){ return endTime - beginTime; @@ -126,7 +135,7 @@ public class ProjectVo { @ApiModelProperty("是否展示MVP 0:不展示 1:展示") private int showMvp = 1; @JsonIgnore//0日程,1天,2周,3月 - private int selectTaskType = 1; + private int selectTaskType = 2; @ApiModelProperty("查询任务类型") private String selectType; @ApiModelProperty("第三列展示页面的路径") @@ -160,10 +169,18 @@ public class ProjectVo { private boolean pm; @ApiModelProperty("当前用户是否属于该角色") private boolean mine; + @ApiModelProperty("是否是变身后 0否 1是") + private byte imitation = 0; @ApiModelProperty("是否是当前角色的奖惩干系人") private boolean stakeholder; @ApiModelProperty("该角色是否显示") - private Boolean isShow; + private Boolean isShow = true; + @ApiModelProperty("是否是项目虚拟的角色 0否 1是") + private byte projectRole = 0; + @ApiModelProperty("关联项目的id") + private Long relevanceProjectId; + @ApiModelProperty("关联项目的名称") + private String relevanceProjectName; @ApiModelProperty("成员信息") private List members; @JsonIgnore @@ -342,4 +359,15 @@ public class ProjectVo { private String phone; } + + @Data + @ApiModel("查找项目内所有的成员") + public static class MemberList{ + @ApiModelProperty("成员id") + private Long memberId; + @ApiModelProperty("成员名") + private String memberName; + } + + } 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..4a009742 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 @@ -86,6 +86,8 @@ public class TaskVo { private String name; @ApiModelProperty("详细描述") private String description; + @ApiModelProperty("父任务名称") + private String parentName; @ApiModelProperty("所属项目id") private Long projectId; @ApiModelProperty("所属项目名称") @@ -148,6 +150,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 +225,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; } @@ -399,39 +409,95 @@ public class TaskVo { * 会议纪要里的任务信息 */ @Data + @ApiModel("每周的任务信息") public static class TaskMinutesWps{ + @ApiModelProperty("分解后的任务id") private Long taskSubTimeId; - //负责人角色名 + @ApiModelProperty("负责人角色名") private String executorRoleName; - //任务名 + @ApiModelProperty("任务名") private String taskName; - //计划开始时间 + @ApiModelProperty("计划开始时间") private String beginTime; - //计划结束时间 + @ApiModelProperty("计划结束时间") private String endTime; - //实际开始时间 + @ApiModelProperty("实际开始时间") private String realBeginTime; - //实际结束时间 + @ApiModelProperty("实际结束时间") private String realEndTime; - //评论 + @ApiModelProperty("是否是里程碑 0否 1是") + private Byte milestone; + @ApiModelProperty("状态:0-未开始,1-进行中,2-已完成") + private Byte process; + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("项目名") + private String projectName; + @ApiModelProperty("评论") private List comment; - //交付物 + @ApiModelProperty("交付物") private List deliverList; @Data + @ApiModel("每周任务的评论") public static class CommentByMinutes{ + @ApiModelProperty("评论id") private Long commentId; - //发送者的名字 + @ApiModelProperty("发送者的名字") private String userName; - //评论内容 + @ApiModelProperty("评论内容") private String commentValue; } @Data + @ApiModel("每周任务的交付物") public static class DeliverByMinutes{ + @ApiModelProperty("交付物id") private Long deliverId; - //交付物名 + @ApiModelProperty("交付物名") private String deliverName; - //交付物文件地址,没有则为空 + @ApiModelProperty("交付物文件地址,没有则为空") private String deliverPath; + @ApiModelProperty("交付物分数") + private int score; } } + + + @Data + @ApiModel("根据项目id查询所有任务信息") + public static class TaskListByProjectId{ + @ApiModelProperty("任务详细信息id") + private Long detailId; + @ApiModelProperty("名称") + private String name; + @ApiModelProperty("父任务名称") + private String parentName; + @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/config/SpringConfig.java b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java index 157e6222..dbfda3cf 100644 --- a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java +++ b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java @@ -139,6 +139,7 @@ public class SpringConfig implements WebMvcConfigurer { .excludePathPatterns("/users/password") .excludePathPatterns("/users/password/account") .excludePathPatterns("/users/account") + .excludePathPatterns("/users/phone") .excludePathPatterns("/users/token") .excludePathPatterns("/users/claims") .excludePathPatterns("/users/member") diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java index 4c5c134e..150514c9 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java @@ -2,6 +2,7 @@ package com.ccsens.tall.persist.dao; import com.ccsens.tall.bean.po.ProMember; import com.ccsens.tall.bean.vo.MemberVo; +import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.WbsVo; import com.ccsens.tall.persist.mapper.ProMemberMapper; @@ -41,4 +42,14 @@ public interface ProMemberDao extends ProMemberMapper{ * @return 用户信息 */ MemberVo.MemberInfo getMemberByUserIdAndTaskId(@Param("userId") Long userId, @Param("taskId")Long taskId); + + + List queryMemberByProjectId(@Param("projectId")Long projectId); + + /** + * 根据项目id查询所有成员信息(不包含奖惩干系人) + * @param projectId + * @return + */ + List queryMembersByProjectId(@Param("projectId")Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java index 0c05070d..3314a123 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java @@ -3,6 +3,7 @@ package com.ccsens.tall.persist.dao; import com.ccsens.cloudutil.bean.tall.dto.MemberRoleDto; import com.ccsens.tall.bean.po.ProRole; import com.ccsens.tall.bean.vo.ProjectVo; +import com.ccsens.tall.bean.vo.RoleVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.mapper.ProRoleMapper; import org.apache.ibatis.annotations.Param; @@ -50,6 +51,15 @@ public interface ProRoleDao extends ProRoleMapper{ */ String getMemberNameByProjectId(@Param("projectId")Long projectId,@Param("parentRoleName")String parentRoleName); + ProjectVo.RoleInfo getRoleInfoByRoleId(@Param("roleId")Long roleId); + + /** + * 通过项目id查找所有项目下的角色(包括“全体成员”) + * @param projectId 项目id + * @return 返回角色信息 + */ + List queryRoleByProjectId(@Param("projectId")Long projectId); + // /** // * 查找项目下的所有成员的名字用“,”分隔 // * @param projectId 项目id diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java index 064794c6..4d783454 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java @@ -9,7 +9,15 @@ import java.util.List; @Repository public interface SysLabelDao extends SysLabelMapper { - List selectLabelByUserId(@Param("userId")Long userId,@Param("key")String key); + List selectLabelByUserId(@Param("userId")Long userId,@Param("key")String key,@Param("type")Byte type); List selectLabelByProjectId(@Param("userId")Long userId,@Param("projectId")Long projectId); + + /** + * 查询任务下的标签信息 + * @param userId + * @param taskId + * @return + */ + List selectLabelByTaskId(@Param("userId")Long userId, @Param("taskId")Long taskId); } 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..63411d98 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,@Param("taskDetailId")Long taskDetailId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java index 70a7ee7f..295c8adf 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java @@ -2,6 +2,7 @@ package com.ccsens.tall.persist.dao; import com.ccsens.tall.bean.po.SysProject; import com.ccsens.tall.bean.vo.ChartVo; +import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.persist.mapper.SysProjectMapper; import org.apache.ibatis.annotations.Param; @@ -40,7 +41,15 @@ public interface SysProjectDao extends SysProjectMapper{ @Param("start")Long start, @Param("end")Long end, @Param("roleId")Long roleId,@Param("allMemberId")Long allMemberId,@Param("type") Integer type); - Integer getTaskTotalByProjectId(@Param("projectId")Long projectId, @Param("start")Long start, @Param("end")Long end, @Param("roleId")Long roleId); +// Integer getTaskTotalByProjectId(@Param("projectId")Long projectId, @Param("start")Long start, @Param("end")Long end, @Param("roleId")Long roleId); ChartVo.ProjectOverview getOverviewByToDay(@Param("projectId")Long projectId, @Param("startTime")Long startTime, @Param("endTime")Long endTime,@Param("roleIdList")List roleIdList); + + /** + * 根据父项目id查找项目,不包含当前项目 + * @param parentId 父项目id + * @param projectId 当前项目id + * @return + */ + List queryProjectByParentIdAndNotOwn(@Param("parentId")Long parentId, @Param("projectId")Long projectId); } 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..a59e7fef 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,@Param("milestone")Integer milestone,@Param("beginTime")Long beginTime,@Param("endTime")Long endTime); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/TaskSubTimeDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/TaskSubTimeDao.java index 5a75b779..b191ad15 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/TaskSubTimeDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/TaskSubTimeDao.java @@ -21,5 +21,15 @@ public interface TaskSubTimeDao extends ProTaskSubTimeMapper{ @Param("type")Integer type,@Param("orderType")Integer orderType,@Param("order")Integer order); List queryMinutesTaskByTime(@Param("projectId")Long projectId, @Param("startTime")Long startTime, @Param("endTime")Long endTime); + + /** + * 根据成员和项目查看本周任务 + * @param projectId 项目id + * @param userId 用户id + * @param thisWeekStartTime 开始时间 + * @param thisWeekEndTime 结束时间 + * @return + */ + List queryWeekTaskByMemberAndProject(@Param("projectId")Long projectId, @Param("userId")Long userId, @Param("startTime")long thisWeekStartTime, @Param("endTime")long thisWeekEndTime); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginParameterMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginParameterMapper.java new file mode 100644 index 00000000..fc163f66 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginParameterMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProPluginParameter; +import com.ccsens.tall.bean.po.ProPluginParameterExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProPluginParameterMapper { + long countByExample(ProPluginParameterExample example); + + int deleteByExample(ProPluginParameterExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProPluginParameter record); + + int insertSelective(ProPluginParameter record); + + List selectByExample(ProPluginParameterExample example); + + ProPluginParameter selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProPluginParameter record, @Param("example") ProPluginParameterExample example); + + int updateByExample(@Param("record") ProPluginParameter record, @Param("example") ProPluginParameterExample example); + + int updateByPrimaryKeySelective(ProPluginParameter record); + + int updateByPrimaryKey(ProPluginParameter record); +} \ No newline at end of file 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/persist/mapper/ProTaskDeliverPostLogCheckerMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDeliverPostLogCheckerMapper.java index 84b95218..885a03ab 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDeliverPostLogCheckerMapper.java +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDeliverPostLogCheckerMapper.java @@ -1,31 +1,30 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.ProTaskDeliverPostLogChecker; -import com.ccsens.tall.bean.po.ProTaskDeliverPostLogCheckerExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface ProTaskDeliverPostLogCheckerMapper { - long countByExample(ProTaskDeliverPostLogCheckerExample example); - - int deleteByExample(ProTaskDeliverPostLogCheckerExample example); - - int deleteByPrimaryKey(Long id); - - int insert(ProTaskDeliverPostLogChecker record); - - int insertSelective(ProTaskDeliverPostLogChecker record); - - List selectByExample(ProTaskDeliverPostLogCheckerExample example); - - ProTaskDeliverPostLogChecker selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") ProTaskDeliverPostLogChecker record, @Param("example") ProTaskDeliverPostLogCheckerExample example); - - int updateByExample(@Param("record") ProTaskDeliverPostLogChecker record, @Param("example") ProTaskDeliverPostLogCheckerExample example); - - int updateByPrimaryKeySelective(ProTaskDeliverPostLogChecker record); - - int updateByPrimaryKey(ProTaskDeliverPostLogChecker record); +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProTaskDeliverPostLogChecker; +import com.ccsens.tall.bean.po.ProTaskDeliverPostLogCheckerExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProTaskDeliverPostLogCheckerMapper { + long countByExample(ProTaskDeliverPostLogCheckerExample example); + + int deleteByExample(ProTaskDeliverPostLogCheckerExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProTaskDeliverPostLogChecker record); + + int insertSelective(ProTaskDeliverPostLogChecker record); + + List selectByExample(ProTaskDeliverPostLogCheckerExample example); + + ProTaskDeliverPostLogChecker selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProTaskDeliverPostLogChecker record, @Param("example") ProTaskDeliverPostLogCheckerExample example); + + int updateByExample(@Param("record") ProTaskDeliverPostLogChecker record, @Param("example") ProTaskDeliverPostLogCheckerExample example); + + int updateByPrimaryKeySelective(ProTaskDeliverPostLogChecker record); + + int updateByPrimaryKey(ProTaskDeliverPostLogChecker record); } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskLabelMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskLabelMapper.java new file mode 100644 index 00000000..ada5af7a --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskLabelMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProTaskLabel; +import com.ccsens.tall.bean.po.ProTaskLabelExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProTaskLabelMapper { + long countByExample(ProTaskLabelExample example); + + int deleteByExample(ProTaskLabelExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProTaskLabel record); + + int insertSelective(ProTaskLabel record); + + List selectByExample(ProTaskLabelExample example); + + ProTaskLabel selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProTaskLabel record, @Param("example") ProTaskLabelExample example); + + int updateByExample(@Param("record") ProTaskLabel record, @Param("example") ProTaskLabelExample example); + + int updateByPrimaryKeySelective(ProTaskLabel record); + + int updateByPrimaryKey(ProTaskLabel record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProUserAttentionRoleMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProUserAttentionRoleMapper.java new file mode 100644 index 00000000..517e3253 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProUserAttentionRoleMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProUserAttentionRole; +import com.ccsens.tall.bean.po.ProUserAttentionRoleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProUserAttentionRoleMapper { + long countByExample(ProUserAttentionRoleExample example); + + int deleteByExample(ProUserAttentionRoleExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProUserAttentionRole record); + + int insertSelective(ProUserAttentionRole record); + + List selectByExample(ProUserAttentionRoleExample example); + + ProUserAttentionRole selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProUserAttentionRole record, @Param("example") ProUserAttentionRoleExample example); + + int updateByExample(@Param("record") ProUserAttentionRole record, @Param("example") ProUserAttentionRoleExample example); + + int updateByPrimaryKeySelective(ProUserAttentionRole record); + + int updateByPrimaryKey(ProUserAttentionRole record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysImitationMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysImitationMapper.java new file mode 100644 index 00000000..8522775f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysImitationMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysImitation; +import com.ccsens.tall.bean.po.SysImitationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysImitationMapper { + long countByExample(SysImitationExample example); + + int deleteByExample(SysImitationExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysImitation record); + + int insertSelective(SysImitation record); + + List selectByExample(SysImitationExample example); + + SysImitation selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysImitation record, @Param("example") SysImitationExample example); + + int updateByExample(@Param("record") SysImitation record, @Param("example") SysImitationExample example); + + int updateByPrimaryKeySelective(SysImitation record); + + int updateByPrimaryKey(SysImitation record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLogMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLogMapper.java index 5152631e..9b032e1d 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLogMapper.java +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLogMapper.java @@ -1,30 +1,30 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.SysLog; -import com.ccsens.tall.bean.po.SysLogExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface SysLogMapper { - long countByExample(SysLogExample example); - - int deleteByExample(SysLogExample example); - - int deleteByPrimaryKey(Long id); - - int insert(SysLog record); - - int insertSelective(SysLog record); - - List selectByExample(SysLogExample example); - - SysLog selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") SysLog record, @Param("example") SysLogExample example); - - int updateByExample(@Param("record") SysLog record, @Param("example") SysLogExample example); - - int updateByPrimaryKeySelective(SysLog record); - - int updateByPrimaryKey(SysLog record); +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysLog; +import com.ccsens.tall.bean.po.SysLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysLogMapper { + long countByExample(SysLogExample example); + + int deleteByExample(SysLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysLog record); + + int insertSelective(SysLog record); + + List selectByExample(SysLogExample example); + + SysLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysLog record, @Param("example") SysLogExample example); + + int updateByExample(@Param("record") SysLog record, @Param("example") SysLogExample example); + + int updateByPrimaryKeySelective(SysLog record); + + int updateByPrimaryKey(SysLog record); } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java b/tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java index 79e8967f..c838931e 100644 --- a/tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java +++ b/tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java @@ -8,6 +8,7 @@ import com.ccsens.tall.service.IProjectMessageService; import com.ccsens.tall.service.IRobotService; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -38,7 +39,7 @@ public class ScheduledService { public static final String AFTER_END = "您在项目's'中的任务's'已经在's'结束了"; public static final String USER_DEFINED = "来自项目's'中的任务's'的提醒"; -// @Scheduled(cron = "*/60 * * * * ?") + @Scheduled(cron = "*/60 * * * * ?") public void runfirst(){ long now = System.currentTimeMillis(); // long now = 1594611047000L; 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..3fa11997 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java @@ -17,11 +17,17 @@ 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.File; import java.io.FileInputStream; import java.io.InputStream; import java.util.*; @@ -145,7 +151,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 +161,8 @@ public class ExcelService implements IExcelService { wbsSubSheetService.getRoBotSheet(sysProject.getId(),xssfWorkbook); //读取关联项目表 wbsSubSheetService.readRelevanceProject(sysProject.getId(),xssfWorkbook); + + saveProTaskSubTime(taskDetails); return sysProject; } @@ -283,6 +290,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(5)); //添加一级角色 if (StrUtil.isNotEmpty(proRoleCell)) { ProRole role = new ProRole(); @@ -311,6 +319,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 +350,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 +373,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 +388,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; @@ -650,30 +678,22 @@ public class ExcelService implements IExcelService { firstTaskDetail.setVirtual((byte) WebConstant.TASK_VIRTUAL.Normal.value); firstTaskDetail.setLevel((byte) WebConstant.TASK_LEVEL.FirstTask.value); firstTaskDetail.setExecutorRole(pmRoleId); - if(ObjectUtil.isNotNull(firstStartTime)){ - firstTaskDetail.setBeginTime(firstStartTime); - }else{ +// if(ObjectUtil.isNotNull(firstStartTime)){ +// firstTaskDetail.setBeginTime(firstStartTime); +// }else{ if (StrUtil.isNotEmpty(beginTime)) { firstTaskDetail.setBeginTime(Long.valueOf(beginTime)); }else { firstTaskDetail.setBeginTime(sysProject.getBeginTime()); } - } +// } firstTaskDetail.setEndTime(sysProject.getEndTime()); - proTaskDetailService.saveTaskDetail(firstTaskDetail); taskDetails.add(firstTaskDetail); firstTaskDetailId = firstTaskDetail.getId(); -// if (CollectionUtil.isNotEmpty(taskDetails)) { -// for (ProTaskDetail proTask1 : taskDetails) { -// if (proTask1.getName().equals(task1)) { -// firstTaskDetailId = proTask1.getId(); -// break; -// } -// } -// } + } if (ObjectUtil.isNull(firstTaskDetailId)) { @@ -994,11 +1014,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); } } @@ -1141,9 +1163,10 @@ public class ExcelService implements IExcelService { } } } - } else { - throw new BaseException(CodeEnum.WBS_NOT_PLUGIN_SHEET); } +// else { +// throw new BaseException(CodeEnum.WBS_NOT_PLUGIN_SHEET); +// } } } @@ -1201,6 +1224,7 @@ public class ExcelService implements IExcelService { business.setUserId(userId); business.setFileName(fileName); business.setFilePath(filePath); + business.setRealFilePath(PropUtil.path + File.separator + filePath); business.setFileSize(fileSize); business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_READ); diff --git a/tall/src/main/java/com/ccsens/tall/service/ExportWbsService.java b/tall/src/main/java/com/ccsens/tall/service/ExportWbsService.java index 06a49334..c0648abb 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExportWbsService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExportWbsService.java @@ -726,11 +726,11 @@ public class ExportWbsService implements IExportWbsService{ list.add(row1); list.add(row1); List row3 = new ArrayList<>(); - row3.add(new PoiUtil.PoiUtilCell("时间",null,null)); - row3.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(System.currentTimeMillis()),null,null)); + row3.add(new PoiUtil.PoiUtilCell("时间")); + row3.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(System.currentTimeMillis()))); row3.add(new PoiUtil.PoiUtilCell()); - row3.add(new PoiUtil.PoiUtilCell("项目",null,null)); - row3.add(new PoiUtil.PoiUtilCell(checklists.get(0).getProjectName(),null,null)); + row3.add(new PoiUtil.PoiUtilCell("项目")); + row3.add(new PoiUtil.PoiUtilCell(checklists.get(0).getProjectName())); list.add(row3); list.add(row1); int index = 1; @@ -745,28 +745,28 @@ public class ExportWbsService implements IExportWbsService{ } } List checkList = new ArrayList<>(); - checkList.add(new PoiUtil.PoiUtilCell(String.valueOf(index),null,null)); - checkList.add(new PoiUtil.PoiUtilCell(checklist.getTaskName(),null,null)); - checkList.add(new PoiUtil.PoiUtilCell(checklist.getRoleName(),null,null)); + checkList.add(new PoiUtil.PoiUtilCell(String.valueOf(index))); + checkList.add(new PoiUtil.PoiUtilCell(checklist.getTaskName())); + checkList.add(new PoiUtil.PoiUtilCell(checklist.getRoleName())); if(StrUtil.isNotEmpty(checklist.getCycle()) && !"不重复".equalsIgnoreCase(checklist.getCycle())){ checkList.add(new PoiUtil.PoiUtilCell()); checkList.add(new PoiUtil.PoiUtilCell(checklist.getCycle())); }else { - checkList.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(checklist.getBeginTime()), null, null)); + checkList.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(checklist.getBeginTime()))); String duration = null; if (checklist.getDuration() / 1000 / 3600 >= 2) { duration = checklist.getDuration() / 1000 / 3600 + "小时"; } else { duration = checklist.getDuration() / 1000 / 60 + "分钟"; } - checkList.add(new PoiUtil.PoiUtilCell(duration, null, null)); + checkList.add(new PoiUtil.PoiUtilCell(duration)); } if(ObjectUtil.isNotNull(checklist.getCompleteTime())) { - checkList.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(checklist.getCompleteTime()), null, null)); + checkList.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(checklist.getCompleteTime()))); }else { checkList.add(new PoiUtil.PoiUtilCell()); } - checkList.add(new PoiUtil.PoiUtilCell(checklist.getProcess(),null,null)); + checkList.add(new PoiUtil.PoiUtilCell(checklist.getProcess())); list.add(checkList); index++; } @@ -843,37 +843,37 @@ public class ExportWbsService implements IExportWbsService{ list.add(row1); list.add(row1); List row3 = new ArrayList<>(); - row3.add(new PoiUtil.PoiUtilCell("时间",null,null)); - row3.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(System.currentTimeMillis()),null,null)); + row3.add(new PoiUtil.PoiUtilCell("时间")); + row3.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(System.currentTimeMillis()))); row3.add(new PoiUtil.PoiUtilCell()); - row3.add(new PoiUtil.PoiUtilCell("项目",null,null)); - row3.add(new PoiUtil.PoiUtilCell(deliverWithExcelList.get(0).getProjectName(),null,null)); + row3.add(new PoiUtil.PoiUtilCell("项目")); + row3.add(new PoiUtil.PoiUtilCell(deliverWithExcelList.get(0).getProjectName())); list.add(row3); list.add(row1); int index = 1; for(WbsVo.DeliverWithExcel deliverWithExcel : deliverWithExcelList){ List mvpList = new ArrayList<>(); - mvpList.add(new PoiUtil.PoiUtilCell(String.valueOf(index),null,null)); + mvpList.add(new PoiUtil.PoiUtilCell(String.valueOf(index))); mvpList.add(new PoiUtil.PoiUtilCell(deliverWithExcel.getTaskName(),2,1,null,null)); mvpList.add(new PoiUtil.PoiUtilCell()); if(StrUtil.isNotEmpty(deliverWithExcel.getTaskCycle()) && !"不重复".equalsIgnoreCase(deliverWithExcel.getTaskCycle())){ mvpList.add(new PoiUtil.PoiUtilCell()); mvpList.add(new PoiUtil.PoiUtilCell(deliverWithExcel.getTaskCycle())); }else { - mvpList.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(deliverWithExcel.getTaskBeginTime()), null, null)); + mvpList.add(new PoiUtil.PoiUtilCell(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(deliverWithExcel.getTaskBeginTime()))); String duration = null; if (deliverWithExcel.getTaskDuration() / 1000 / 3600 >= 2) { duration = deliverWithExcel.getTaskDuration() / 1000 / 3600 + "小时"; } else { duration = deliverWithExcel.getTaskDuration() / 1000 / 60 + "分钟"; } - mvpList.add(new PoiUtil.PoiUtilCell(duration, null, null)); + mvpList.add(new PoiUtil.PoiUtilCell(duration)); } if(StrUtil.isEmpty(deliverWithExcel.getJumpPath())) { - mvpList.add(new PoiUtil.PoiUtilCell(deliverWithExcel.getDeliverName(), null, null)); + mvpList.add(new PoiUtil.PoiUtilCell(deliverWithExcel.getDeliverName())); }else { - PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(deliverWithExcel.getDeliverName(), null, null); + PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(deliverWithExcel.getDeliverName()); poiUtilCell.setPath(deliverWithExcel.getJumpPath()); mvpList.add(poiUtilCell); } diff --git a/tall/src/main/java/com/ccsens/tall/service/ILabelService.java b/tall/src/main/java/com/ccsens/tall/service/ILabelService.java index f921fee1..5796a001 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ILabelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ILabelService.java @@ -8,7 +8,7 @@ import java.util.List; public interface ILabelService { List addLabel(Long userId,LabelDto.AddLabel labelList); - List selectLabel(Long currentUserId,String key); + List selectLabel(Long currentUserId,String key,Byte type); void delLabel(Long currentUserId, LabelDto.DelLabel delLabel); @@ -17,4 +17,20 @@ public interface ILabelService { List projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); List projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); + + /** + * 给任务添加标签 + * @param currentUserId userId + * @param taskLabel 标签信息 + * @return 返回标签信息 + */ + List taskAddLabel(Long currentUserId, LabelDto.TaskLabel taskLabel); + + /** + * 删除任务的标签 + * @param currentUserId + * @param taskLabel + * @return + */ + List taskRemoveLabel(Long currentUserId, LabelDto.TaskLabel taskLabel); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java b/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java index cbf5c8a6..4a31f126 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java @@ -14,9 +14,9 @@ public interface IProMemberService { List selectMembersByProjectId(Long projectId) throws Exception; - Boolean userIsBelongRole(Long currentUserId, Long id) throws Exception; + Boolean userIsBelongRole(Long currentUserId, Long id,Integer imitation) throws Exception; - List selectRolesByUserIdAndProjectId(Long currentUserId, Long projectId) throws Exception; + List selectRolesByUserIdAndProjectId(Long currentUserId, Long projectId,Integer imitation) throws Exception; MemberVo.MemberInfo getProMemberByProjectIdAndUserId(Long projectId, Long currentUserId)throws Exception; @@ -69,4 +69,11 @@ public interface IProMemberService { * @return 用户信息 */ MemberVo.MemberInfo getMemberByUserIdAndTaskId(Long userId, Long taskId); + + /** + * 通过项目id获取所有的成员信息(不包含奖惩干系人) + * @param projectId 项目id + * @return 返回所有成员信息 + */ + List queryMembersByProjectId(Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java b/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java index ea5fab85..61395f0d 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java @@ -14,7 +14,7 @@ public interface IProRoleService { List getProRoleByProjectIdAndUserId(Long projectId, Long currentUserId); - List getRolesByProjectIdAndUserId(Long projectId, Long currentUserId) throws Exception; + List getRolesByProjectIdAndUserId(Long projectId, Long currentUserId,Integer imitation) throws Exception; List getRealMemberRolesByProjectId(Long projectId); @@ -30,16 +30,30 @@ public interface IProRoleService { void saveRole(Long currentUserId, RoleDto.SaveRole saveRole); - void updateRole(Long currentUserId, RoleDto.UpdateRole updateRole); + ProjectVo.RoleInfo updateRole(Long currentUserId, RoleDto.UpdateRole updateRole); - void saveMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember); + ProjectVo.RoleInfo saveMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember); void deleteMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember); + /** + * 点击项目角色查看一级任务和里程碑 + * @param projectId 项目id + * @return 返回一级任务和里程碑 + */ + List queryByProjectVirtualRole(RoleDto.ProjectId projectId); + + /** + * 修改该用户关注的角色(是否展示) + * @param currentUserId + * @param roleShow + */ + void updateRoleShow(Long currentUserId, RoleDto.UpdateRoleShow roleShow); + /** * 查找项目下的角色包含“全体成员” * @param projectId 项目id * @return */ - RoleVo.RoleByProjectId queryRoleByProjectId(Long projectId); + List queryRoleByProjectId(Long projectId); } 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 bc05a89e..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; @@ -10,12 +11,11 @@ import java.util.List; public interface IProTaskDetailService { void saveTaskDetail(ProTaskDetail taskDetail); - Object getTasksByRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, Integer process, - Integer page, Integer pageSize,Integer priority) throws Exception; + Object getTasksByRoleId(Long currentUserId, Long projectId, TaskDto.QueryTaskInfoByRoleId taskInfoByRoleId) throws Exception; List getTaskInfoByMvp(Long projectId); - TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId) throws Exception; + TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId,Integer imitation) throws Exception; TaskVo.TaskCheckList selectTaskList(Long currentUserId, String key, String start, String end, String role, Integer page, Integer pageSize) throws Exception; @@ -37,7 +37,7 @@ public interface IProTaskDetailService { /** * 处理任务的插件 */ - void managePlugin(Long userId,Long roleId,TaskVo.NormalTask normalTask) throws Exception; + void managePlugin(Long userId,Long roleId,TaskVo.NormalTask normalTask,Integer imitation) throws Exception; /** * 修改任务的配置信息 @@ -47,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/IProjectService.java b/tall/src/main/java/com/ccsens/tall/service/IProjectService.java index ea88f826..a0ed1c20 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProjectService.java @@ -44,4 +44,16 @@ public interface IProjectService { * @return 返回修改后的项目信息 */ ProjectVo.ProjectInfo updateProjectConfig(Long currentUserId, ProjectDto.ProjectConfig projectConfig,String token); + + /** + * 变身成为某个角色 + */ + void imitationRole(Long currentUserId, ProjectDto.ImitationRole imitationRole); + + /** + * 新建项目 + * @param currentUserId userId + * @return 返回项目信息 + */ + ProjectVo.ProjectInfo createProject(Long currentUserId,ProjectDto.CreateProject createProject,String token); } diff --git a/tall/src/main/java/com/ccsens/tall/service/ISysPluginService.java b/tall/src/main/java/com/ccsens/tall/service/ISysPluginService.java index 947a99c8..f0e27b76 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ISysPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ISysPluginService.java @@ -1,10 +1,14 @@ package com.ccsens.tall.service; +import com.ccsens.tall.bean.dto.PluginDto; import com.ccsens.tall.bean.vo.PluginVo; import java.util.List; public interface ISysPluginService { + + void saveSysPlugin(PluginDto.SaveSysPlugin saveSysPlugin); + List getPluginAll(); List getSignByPlugin(Long taskPluginId); @@ -12,4 +16,5 @@ public interface ISysPluginService { List getSignFuzzy(Long taskPluginId, String signinName, String key); Long getTaskDetailIdByPlugin(Long taskPluginId); + } 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..1437612b 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,18 @@ public interface ITaskPluginService { * @return 返回wps里的文件的路径 */ List updateMinutesProject(Long currentUserId, PluginDto.UpdateMinutes updateMinutes, String token) throws Exception; + + /** + * 修改插件配置 + * @param updatePluginConfig 插件配置 + * @return + */ + TaskVo.PluginVo updatePluginConfig(PluginDto.UpdatePluginConfig updatePluginConfig); + + /** + * 查找周会项目的父项目的成员和项目 + * @param projectId + * @return + */ + PluginVo.PersonalTaskReport getPersonalTaskReport(Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IWeekMeetingService.java b/tall/src/main/java/com/ccsens/tall/service/IWeekMeetingService.java new file mode 100644 index 00000000..be83e0e6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IWeekMeetingService.java @@ -0,0 +1,52 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.WeekMeetingDto; +import com.ccsens.tall.bean.vo.PluginVo; +import com.ccsens.tall.bean.vo.ProjectVo; +import com.ccsens.tall.bean.vo.TaskVo; + +import java.io.IOException; +import java.util.List; + +/** + * @author 逗 + */ +public interface IWeekMeetingService { + /** + * 查找周会要用到的项目 + * @param projectId 周会项目id + * @param userId userId + * @return 返回查询到的项目列表 + */ + List queryWeekUserProject(Long projectId, Long userId); + + /** + * 查找本周任务 + * @param projectId 项目id + * @return 本周任务 + */ + List queryWeekTaskByProject(Long projectId); + + /** + * 查找个人本周任务 + * @param param 成员id和项目id + * @return 返回本周任务 + */ + List queryWeekTaskByMemberAndProject(WeekMeetingDto.WeekTaskByMemberAndProject param) throws IOException; + + /** + * 生成会议记录表(传控模板) + * @param userId userId + * @param param 项目id和域名 + * @return + */ + String getCcMinutes(Long userId, WeekMeetingDto.WeekMeetingMinutes param) throws IOException; + + /** + * 获取插件相关的参数信息 + * @param userId + * @param param + * @return + */ + String getPluginParameter(Long userId, WeekMeetingDto.PluginParameter param); +} diff --git a/tall/src/main/java/com/ccsens/tall/service/LabelService.java b/tall/src/main/java/com/ccsens/tall/service/LabelService.java index 8b325520..1941d333 100644 --- a/tall/src/main/java/com/ccsens/tall/service/LabelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/LabelService.java @@ -8,76 +8,86 @@ import cn.hutool.core.util.StrUtil; import com.ccsens.tall.bean.dto.LabelDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.LabelVo; -import com.ccsens.tall.persist.dao.SysLabelDao; -import com.ccsens.tall.persist.dao.SysProjectDao; -import com.ccsens.tall.persist.dao.SysProjectLabelDao; +import com.ccsens.tall.persist.dao.*; +import com.ccsens.tall.persist.mapper.ProTaskLabelMapper; +import com.ccsens.tall.persist.mapper.ProTaskSubTimeMapper; import com.ccsens.util.CodeEnum; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.retry.annotation.Recover; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; @Service -public class LabelService implements ILabelService{ - @Autowired +public class LabelService implements ILabelService { + @Resource private Snowflake snowflake; - @Autowired + @Resource private SysLabelDao sysLabelDao; - @Autowired + @Resource private SysProjectDao sysProjectDao; - @Autowired + @Resource private SysProjectLabelDao sysProjectLabelDao; - @Autowired - private ProRoleService proRoleService; + @Resource + private ProTaskLabelMapper proTaskLabelMapper; + @Resource + private TaskSubTimeDao taskSubTimeDao; + @Resource + private TaskDetailDao taskDetailDao; /** * 添加标签 + * * @param label 添加的标签信息 */ @Override - public List addLabel(Long userId,LabelDto.AddLabel label) { - if(ObjectUtil.isNotNull(label)){ + public List addLabel(Long userId, LabelDto.AddLabel label) { + if (ObjectUtil.isNotNull(label)) { SysLabelExample sysLabelExample = new SysLabelExample(); - sysLabelExample.createCriteria().andNameEqualTo(label.getName()).andUserIdEqualTo(userId); + sysLabelExample.createCriteria().andNameEqualTo(label.getName()).andUserIdEqualTo(userId).andBusinessTypeEqualTo(label.getType()); List sysLabels = sysLabelDao.selectByExample(sysLabelExample); - if(CollectionUtil.isNotEmpty(sysLabels)){ + if (CollectionUtil.isNotEmpty(sysLabels)) { throw new BaseException(CodeEnum.REPEAT_LABEL); } SysLabel sysLabel = new SysLabel(); sysLabel.setId(snowflake.nextId()); sysLabel.setUserId(userId); - BeanUtil.copyProperties(label,sysLabel); + sysLabel.setBusinessType(label.getType()); + BeanUtil.copyProperties(label, sysLabel); sysLabelDao.insertSelective(sysLabel); } - return sysLabelDao.selectLabelByUserId(userId,null); + return sysLabelDao.selectLabelByUserId(userId, null, label.getType()); } /** * 查找此用户的所有标签 + * * @param currentUserId userId - * @param key 标签名包含的关键字 + * @param key 标签名包含的关键字 * @return 返回该用户添加的所有标签 */ @Override - public List selectLabel(Long currentUserId,String key) { - return sysLabelDao.selectLabelByUserId(currentUserId,key); + public List selectLabel(Long currentUserId, String key, Byte type) { + return sysLabelDao.selectLabelByUserId(currentUserId, key, type); } /** * 删除标签 + * * @param currentUserId userID - * @param delLabel 被删除的标签id + * @param delLabel 被删除的标签id */ @Override public void delLabel(Long currentUserId, LabelDto.DelLabel delLabel) { SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(delLabel.getId()); - if(ObjectUtil.isNull(sysLabel)){ + if (ObjectUtil.isNull(sysLabel)) { throw new BaseException(CodeEnum.NOT_LABEL); } - if(sysLabel.getUserId().longValue() != currentUserId){ + if (sysLabel.getUserId().longValue() != currentUserId) { throw new BaseException(CodeEnum.NOT_POWER); } sysLabel.setRecStatus((byte) 2); @@ -86,41 +96,46 @@ public class LabelService implements ILabelService{ /** * 修改标签 + * * @param currentUserId userid - * @param changeLabel 修改后的标签信息 + * @param changeLabel 修改后的标签信息 */ @Override public void changeLabel(Long currentUserId, LabelDto.ChangeLabel changeLabel) { SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(changeLabel.getId()); - if(ObjectUtil.isNull(sysLabel)){ + if (ObjectUtil.isNull(sysLabel)) { throw new BaseException(CodeEnum.NOT_LABEL); } - if(sysLabel.getUserId().longValue() != currentUserId){ + if (sysLabel.getUserId().longValue() != currentUserId) { throw new BaseException(CodeEnum.NOT_POWER); } - if(StrUtil.isNotEmpty(changeLabel.getName())){ + if (StrUtil.isNotEmpty(changeLabel.getName())) { sysLabel.setName(changeLabel.getName()); } - if(StrUtil.isNotEmpty(changeLabel.getCode())){ + if (StrUtil.isNotEmpty(changeLabel.getCode())) { sysLabel.setCode(changeLabel.getCode()); } - if(StrUtil.isNotEmpty(changeLabel.getColor())){ + if (StrUtil.isNotEmpty(changeLabel.getColor())) { sysLabel.setColor(changeLabel.getColor()); } - if(StrUtil.isNotEmpty(changeLabel.getDescription())){ + if (StrUtil.isNotEmpty(changeLabel.getDescription())) { sysLabel.setDescription(changeLabel.getDescription()); } - if(ObjectUtil.isNotNull(changeLabel.getLevel())){ + if (ObjectUtil.isNotNull(changeLabel.getLevel())) { sysLabel.setLevel((byte) changeLabel.getLevel()); } + if (ObjectUtil.isNotNull(changeLabel.getType())) { + sysLabel.setBusinessType(changeLabel.getType()); + } sysLabelDao.updateByPrimaryKeySelective(sysLabel); } /** * 给项目添加标签 + * * @param currentUserId userid - * @param projectLabel 项目id和标签id + * @param projectLabel 项目id和标签id */ @Override public List projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { @@ -130,25 +145,25 @@ public class LabelService implements ILabelService{ //用户在项目中的最高权限 // int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); // if (power > 1) { - if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ - projectLabel.getLabelList().forEach(labelId->{ - SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); - if(ObjectUtil.isNull(sysLabel)){ - throw new BaseException(CodeEnum.NOT_LABEL); - } - if(sysLabel.getUserId().longValue() != currentUserId){ - throw new BaseException(CodeEnum.NOT_POWER); - } - //添加项目和标签的关联信息 - SysProjectLabel sysProjectLabel = new SysProjectLabel(); - sysProjectLabel.setId(snowflake.nextId()); - sysProjectLabel.setProjectId(projectLabel.getProjectId()); - sysProjectLabel.setLabelId(labelId); - sysProjectLabelDao.insertSelective(sysProjectLabel); - }); - } - //查询项目内的标签信息 - selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId()); + if (CollectionUtil.isNotEmpty(projectLabel.getLabelList())) { + projectLabel.getLabelList().forEach(labelId -> { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if (ObjectUtil.isNull(sysLabel)) { + throw new BaseException(CodeEnum.NOT_LABEL); + } + if (sysLabel.getUserId().longValue() != currentUserId) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //添加项目和标签的关联信息 + SysProjectLabel sysProjectLabel = new SysProjectLabel(); + sysProjectLabel.setId(snowflake.nextId()); + sysProjectLabel.setProjectId(projectLabel.getProjectId()); + sysProjectLabel.setLabelId(labelId); + sysProjectLabelDao.insertSelective(sysProjectLabel); + }); + } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId, project.getId()); // } else { // throw new BaseException(CodeEnum.NOT_POWER); // } @@ -160,8 +175,9 @@ public class LabelService implements ILabelService{ /** * 删除项目关联的标签 + * * @param currentUserId userID - * @param projectLabel 项目id和被删除的标签的id + * @param projectLabel 项目id和被删除的标签的id */ @Override public List projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { @@ -171,35 +187,110 @@ public class LabelService implements ILabelService{ //用户在项目中的最高权限 // int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); // if (power > 1) { - if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ - projectLabel.getLabelList().forEach(labelId -> { - SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); - if(ObjectUtil.isNull(sysLabel)){ - throw new BaseException(CodeEnum.NOT_LABEL); - } - if(sysLabel.getUserId().longValue() != currentUserId){ - throw new BaseException(CodeEnum.NOT_POWER); - } - //添加项目和标签的关联信息 - SysProjectLabelExample sysProjectLabelExample = new SysProjectLabelExample(); - sysProjectLabelExample.createCriteria().andProjectIdEqualTo(projectLabel.getProjectId()).andLabelIdEqualTo(labelId); - List sysProjectLabelList = sysProjectLabelDao.selectByExample(sysProjectLabelExample); - if(CollectionUtil.isNotEmpty(sysProjectLabelList)){ - sysProjectLabelList.forEach(label -> { - label.setRecStatus((byte) 2); - sysProjectLabelDao.updateByPrimaryKeySelective(label); - }); - } - }); - } - //查询项目内的标签信息 - selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId()); - } else { - throw new BaseException(CodeEnum.NOT_POWER); + if (CollectionUtil.isNotEmpty(projectLabel.getLabelList())) { + projectLabel.getLabelList().forEach(labelId -> { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if (ObjectUtil.isNull(sysLabel)) { + throw new BaseException(CodeEnum.NOT_LABEL); + } + if (sysLabel.getUserId().longValue() != currentUserId) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //项目和标签的关联信息 + SysProjectLabelExample sysProjectLabelExample = new SysProjectLabelExample(); + sysProjectLabelExample.createCriteria().andProjectIdEqualTo(projectLabel.getProjectId()).andLabelIdEqualTo(labelId); + List sysProjectLabelList = sysProjectLabelDao.selectByExample(sysProjectLabelExample); + if (CollectionUtil.isNotEmpty(sysProjectLabelList)) { + sysProjectLabelList.forEach(label -> { + label.setRecStatus((byte) 2); + sysProjectLabelDao.updateByPrimaryKeySelective(label); + }); + } + }); } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId, project.getId()); // } else { -// throw new BaseException(CodeEnum.NOT_PROJECT); +// throw new BaseException(CodeEnum.NOT_POWER); // } + } else { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + return selectLabelList; + } + + + @Override + public List taskAddLabel(Long currentUserId, LabelDto.TaskLabel taskLabel) { + Long taskId = taskLabel.getTaskId(); + ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(taskLabel.getTaskId()); + if (ObjectUtil.isNotNull(proTaskSubTime)) { + taskId = proTaskSubTime.getTaskDetailId(); + } + List selectLabelList; + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskId); + if (ObjectUtil.isNull(taskDetail)) { + throw new BaseException(CodeEnum.NOT_TASK); + } + if (CollectionUtil.isNotEmpty(taskLabel.getLabelList())) { + Long finalTaskId = taskId; + taskLabel.getLabelList().forEach(labelId -> { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if (ObjectUtil.isNull(sysLabel)) { + throw new BaseException(CodeEnum.NOT_LABEL); + } + if (sysLabel.getUserId().longValue() != currentUserId) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //添加项目和标签的关联信息 + ProTaskLabel proTaskLabel = new ProTaskLabel(); + proTaskLabel.setId(snowflake.nextId()); + proTaskLabel.setTaskDetailId(finalTaskId); + proTaskLabel.setLabelId(labelId); + proTaskLabelMapper.insertSelective(proTaskLabel); + }); + } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByTaskId(currentUserId, taskId); + return selectLabelList; + } + + @Override + public List taskRemoveLabel(Long currentUserId, LabelDto.TaskLabel taskLabel) { + Long taskId = taskLabel.getTaskId(); + ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(taskLabel.getTaskId()); + if (ObjectUtil.isNotNull(proTaskSubTime)) { + taskId = proTaskSubTime.getTaskDetailId(); + } + List selectLabelList; + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskId); + if (ObjectUtil.isNull(taskDetail)) { + throw new BaseException(CodeEnum.NOT_TASK); + } + if (CollectionUtil.isNotEmpty(taskLabel.getLabelList())) { + Long finalTaskId = taskId; + taskLabel.getLabelList().forEach(labelId -> { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if (ObjectUtil.isNull(sysLabel)) { + throw new BaseException(CodeEnum.NOT_LABEL); + } + if (sysLabel.getUserId().longValue() != currentUserId) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //项目和标签的关联信息 + ProTaskLabelExample taskLabelExample = new ProTaskLabelExample(); + taskLabelExample.createCriteria().andTaskDetailIdEqualTo(finalTaskId).andLabelIdEqualTo(labelId); + List proTaskLabelList = proTaskLabelMapper.selectByExample(taskLabelExample); + if (CollectionUtil.isNotEmpty(proTaskLabelList)) { + proTaskLabelList.forEach(label -> { + label.setRecStatus((byte) 2); + proTaskLabelMapper.updateByPrimaryKeySelective(label); + }); + } + }); + } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByTaskId(currentUserId, taskId); return selectLabelList; } } 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 a83d2ccc..380c4091 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java @@ -12,6 +12,7 @@ import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.MemberVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.persist.dao.*; +import com.ccsens.tall.persist.mapper.SysImitationMapper; import com.ccsens.util.CodeEnum; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; @@ -49,6 +50,8 @@ public class ProMemberService implements IProMemberService { private Snowflake snowflake; @Resource private UserAttentionDao userAttentionDao; + @Resource + private SysImitationMapper imitationMapper; @Override @@ -65,21 +68,32 @@ public class ProMemberService implements IProMemberService { *该用户是否是角色下的成员 */ @Override - public Boolean userIsBelongRole(Long userId, Long roleId) { + public Boolean userIsBelongRole(Long userId, Long roleId,Integer imitation) { 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; } - ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); - memberRoleExample.createCriteria().andRoleIdEqualTo(roleId); - List memberRoleList = proMemberRoleDao.selectByExample(memberRoleExample); - if (CollectionUtil.isNotEmpty(memberRoleList)) { - for (ProMemberRole memberRole : memberRoleList) { - ProMember proMember = proMemberDao.selectByPrimaryKey(memberRole.getMemberId()); - if (ObjectUtil.isNotNull(proMember) && proMember.getUserId().longValue() == userId) { - flag = true; + if(imitation != null && imitation == 1){ + SysImitationExample sysImitationExample = new SysImitationExample(); + sysImitationExample.createCriteria().andUserIdEqualTo(userId).andRoleIdEqualTo(roleId); + if(imitationMapper.countByExample(sysImitationExample) != 0){ + flag = true; + } + }else { + ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); + memberRoleExample.createCriteria().andRoleIdEqualTo(roleId); + List memberRoleList = proMemberRoleDao.selectByExample(memberRoleExample); + if (CollectionUtil.isNotEmpty(memberRoleList)) { + for (ProMemberRole memberRole : memberRoleList) { + ProMember proMember = proMemberDao.selectByPrimaryKey(memberRole.getMemberId()); + if (ObjectUtil.isNotNull(proMember) && proMember.getUserId().longValue() == userId) { + flag = true; + } } } } @@ -90,16 +104,30 @@ public class ProMemberService implements IProMemberService { * 获取用户在项目中所属的所有角色 */ @Override - public List selectRolesByUserIdAndProjectId(Long userId, Long projectId) { - - List roleList = proRoleDao.selectRolesByProjectIdAndUserId(projectId, userId); - if(CollectionUtil.isEmpty(roleList)){ - ProRoleExample roleExample = new ProRoleExample(); - roleExample.createCriteria().andProjectIdEqualTo(projectId) - .andNameEqualTo(WebConstant.ROLE_NAME.Attention.phase).andParentIdNotEqualTo(0L); - List proRoleList = proRoleDao.selectByExample(roleExample); - if(CollectionUtil.isNotEmpty(proRoleList)){ - roleList.addAll(proRoleList); + public List selectRolesByUserIdAndProjectId(Long userId, Long projectId,Integer imitation) { + List roleList = new ArrayList<>(); + if(imitation != null && imitation == 1){ + SysImitationExample imitationExample = new SysImitationExample(); + imitationExample.createCriteria().andProjectIdEqualTo(projectId).andUserIdEqualTo(userId); + List sysImitationList = imitationMapper.selectByExample(imitationExample); + if(CollectionUtil.isNotEmpty(sysImitationList)){ + for(SysImitation sysImitation: sysImitationList){ + ProRole role = proRoleDao.selectByPrimaryKey(sysImitation.getRoleId()); + if(ObjectUtil.isNotNull(role)){ + roleList.add(role); + } + } + } + }else { + roleList = proRoleDao.selectRolesByProjectIdAndUserId(projectId, userId); + if (CollectionUtil.isEmpty(roleList)) { + ProRoleExample roleExample = new ProRoleExample(); + roleExample.createCriteria().andProjectIdEqualTo(projectId) + .andNameEqualTo(WebConstant.ROLE_NAME.Attention.phase).andParentIdNotEqualTo(0L); + List proRoleList = proRoleDao.selectByExample(roleExample); + if (CollectionUtil.isNotEmpty(proRoleList)) { + roleList.addAll(proRoleList); + } } } return roleList; @@ -193,24 +221,7 @@ public class ProMemberService implements IProMemberService { memberInfo.setUserId(user.getId()); memberInfo.setNickname(user.getNickname()); memberInfo.setAvatarUrl(user.getAvatarUrl()); -// //查询该用户的手机号 -// SysAuthExample authExample = new SysAuthExample(); -// authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) -// .andUserIdEqualTo(user.getId()); -// List authList = authDao.selectByExample(authExample); -// if(CollectionUtil.isNotEmpty(authList)){ -// memberInfo.setPhone(authList.get(0).getIdentifier()); -// } -// if(ObjectUtil.isNull(user.getNickname())){ -// //查找账号名 -// SysAuthExample sysAuthExample = new SysAuthExample(); -// sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) -// .andUserIdEqualTo(user.getId()); -// List accountAuth = authDao.selectByExample(sysAuthExample); -// if(CollectionUtil.isNotEmpty(accountAuth)){ -// memberInfo.setNickname(accountAuth.get(0).getIdentifier()); -// } -// } + } return memberInfo; } @@ -421,4 +432,9 @@ public class ProMemberService implements IProMemberService { public MemberVo.MemberInfo getMemberByUserIdAndTaskId(Long userId, Long taskId) { return proMemberDao.getMemberByUserIdAndTaskId(userId, taskId); } + + @Override + public List queryMembersByProjectId(Long projectId) { + return proMemberDao.queryMembersByProjectId(projectId); + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java b/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java index 94cf02f5..c198cd3e 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java @@ -1,5 +1,6 @@ package com.ccsens.tall.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; @@ -11,6 +12,7 @@ import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.RoleVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.dao.*; +import com.ccsens.tall.persist.mapper.ProUserAttentionRoleMapper; import com.ccsens.util.CodeEnum; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; @@ -18,6 +20,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import org.w3c.dom.ls.LSInput; import javax.annotation.Resource; import java.util.ArrayList; @@ -48,6 +51,12 @@ public class ProRoleService implements IProRoleService { private IUserService userService; @Resource private Snowflake snowflake; + @Resource + private SysProjectDao sysProjectDao; + @Resource + private TaskDetailDao taskDetailDao; + @Resource + private ProUserAttentionRoleMapper userAttentionRoleMapper; @Override public void saveProRole(ProRole proRole) { @@ -66,41 +75,27 @@ public class ProRoleService implements IProRoleService { * 根据项目id和用户Id查询项目下的所有二级角色的详细信息 */ @Override - public List getRolesByProjectIdAndUserId(Long projectId, Long currentUserId) throws Exception { + public List getRolesByProjectIdAndUserId(Long projectId, Long currentUserId, Integer imitation) throws Exception { List memberRoleList; //获取用户在项目中的角色 - List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, projectId); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, projectId, imitation); //1.查询二级角色(项目经理+项目成员+mvp) memberRoleList = getRealMemberRolesByProjectId(projectId); + if (CollectionUtil.isNotEmpty(memberRoleList)) { -// //获取项目的配置(是否展示mvp) -// ProShowExample showExample = new ProShowExample(); -// showExample.createCriteria().andProjectIdEqualTo(projectId); -// List showList = proShowDao.selectByExample(showExample); -// if(CollectionUtil.isNotEmpty(showList)){ -// if(showList.get(0).getIsShowMvp() == 0){ -// for(int i = 0 ; i < memberRoleList.size() ; i++){ -// ProjectVo.RoleInfo roleInfo = memberRoleList.get(i); -// if(roleInfo.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.phase)){ -// memberRoleList.remove(i); -// break; -// } -// } -// } -// } if (CollectionUtil.isNotEmpty(roleList)) { //用户是否只是关注者 boolean isAttention = false; - if(roleList.size() == 1){ + if (roleList.size() == 1) { ProRole role = roleList.get(0); - if(role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)){ + if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)) { isAttention = true; } } //是否mine(若是用户是关注者,则所有角色都暂时属于关注者) for (ProjectVo.RoleInfo memberRole : memberRoleList) { - if(isAttention){ + if (isAttention) { memberRole.setIsShow(true); continue; } @@ -108,10 +103,21 @@ public class ProRoleService implements IProRoleService { if (memberRole.getId().equals(role.getId())) { memberRole.setMine(true); memberRole.setIsShow(true); + if (imitation != null && imitation == 1) { + memberRole.setImitation((byte) 1); + } break; } else { memberRole.setMine(false); - memberRole.setIsShow(false); + //查找当前用户是否关注此角色 + ProUserAttentionRoleExample userAttentionRoleExample = new ProUserAttentionRoleExample(); + userAttentionRoleExample.createCriteria().andProjectIdEqualTo(projectId) + .andUserIdEqualTo(currentUserId).andRoleIdEqualTo(memberRole.getId()); + if (userAttentionRoleMapper.countByExample(userAttentionRoleExample) != 0) { + memberRole.setIsShow(true); + } else { + memberRole.setIsShow(false); + } } } } @@ -132,9 +138,9 @@ public class ProRoleService implements IProRoleService { for (ProjectVo.RoleInfo memberRole : memberRoleList) { if (otherRoleId.longValue() == memberRole.getId().longValue()) { //若是关注者,正常删除。若不是关注者,不删除自己所属的角色 - if(isAttention){ + if (isAttention) { memberRoleList.remove(memberRole); - }else if (!memberRole.isMine()) { + } else if (!memberRole.isMine()) { memberRoleList.remove(memberRole); } break; @@ -178,6 +184,21 @@ public class ProRoleService implements IProRoleService { } } } +// //查找该项目的子项目,转换成项目角色返回 +// SysProjectExample projectExample = new SysProjectExample(); +// projectExample.createCriteria().andParentIdEqualTo(projectId).andParentIdNotEqualTo(0L); +// List sysProject = sysProjectDao.selectByExample(projectExample); +// if(CollectionUtil.isNotEmpty(sysProject)){ +// sysProject.forEach(project -> { +// ProjectVo.RoleInfo roleInfo = new ProjectVo.RoleInfo(); +// roleInfo.setName(project.getName()); +//// roleInfo.setIsShow(true); +// roleInfo.setProjectRole((byte) 1); +// roleInfo.setRelevanceProjectId(project.getId()); +// roleInfo.setRelevanceProjectName(project.getName()); +// memberRoleList.add(roleInfo); +// }); +// } return memberRoleList; } @@ -202,13 +223,14 @@ public class ProRoleService implements IProRoleService { /** * 获取用户在项目中的最高权限 + * * @return 返回权限 */ @Override public int selectPowerByRoleName(Long userId, Long projectId) { int power = 0; SysProject project = projectDao.selectByPrimaryKey(projectId); - if(ObjectUtil.isNotNull(project)) { + if (ObjectUtil.isNotNull(project)) { if (project.getCreatorId().longValue() == userId) { power = 2; } @@ -231,7 +253,7 @@ public class ProRoleService implements IProRoleService { TaskVo.RoleCheckList roleCheckList = null; if (roleId != 0 || ObjectUtil.isNotNull(roleId)) { ProRole role = proRoleDao.selectByPrimaryKey(roleId); - if(ObjectUtil.isNotNull(role)){ + if (ObjectUtil.isNotNull(role)) { roleCheckList = new TaskVo.RoleCheckList(); roleCheckList.setId(role.getId()); roleCheckList.setName(role.getName()); @@ -257,7 +279,7 @@ public class ProRoleService implements IProRoleService { private boolean isPmByRoleId(Long roleId) { Integer i = proRoleDao.isPmByRoleId(roleId); - if(ObjectUtil.isNull(i)){ + if (ObjectUtil.isNull(i)) { throw new BaseException(CodeEnum.NOT_ROLE); } return i == 1; @@ -274,7 +296,7 @@ public class ProRoleService implements IProRoleService { // //本用户在项目中的角色 // List proRoles = getProRoleByProjectIdAndUserId(role.getProjectId(), userId); //用户在项目中的最高权限 - if(ObjectUtil.isNotNull(role)) { + if (ObjectUtil.isNotNull(role)) { int power = selectPowerByRoleName(userId, role.getProjectId()); if (power > 1) { //修改删除状态 @@ -315,7 +337,7 @@ public class ProRoleService implements IProRoleService { if (CollectionUtil.isNotEmpty(memberRoleList)) { for (ProMemberRole memberRole : memberRoleList) { ProMember proMember = proMemberDao.selectByPrimaryKey(memberRole.getMemberId()); - if(ObjectUtil.isNotNull(proMember)) { + if (ObjectUtil.isNotNull(proMember)) { proMember.setRecStatus((byte) 2); proMemberDao.updateByPrimaryKeySelective(proMember); } @@ -327,8 +349,8 @@ public class ProRoleService implements IProRoleService { ProRoleExcludeExample excludeExample = new ProRoleExcludeExample(); excludeExample.createCriteria().andRoleIdEqualTo(roleId); List proRoleExcludeList = excludeDao.selectByExample(excludeExample); - if(CollectionUtil.isNotEmpty(proRoleExcludeList)){ - for(ProRoleExclude proRoleExclude : proRoleExcludeList){ + if (CollectionUtil.isNotEmpty(proRoleExcludeList)) { + for (ProRoleExclude proRoleExclude : proRoleExcludeList) { proRoleExclude.setRecStatus((byte) 2); excludeDao.updateByPrimaryKeySelective(proRoleExclude); } @@ -351,7 +373,7 @@ public class ProRoleService implements IProRoleService { ProRoleExample proRoleExample = new ProRoleExample(); proRoleExample.createCriteria().andProjectIdEqualTo(saveRole.getProjectId()).andNameEqualTo(WebConstant.ROLE_NAME.Member.value); List memberRoleList = proRoleDao.selectByExample(proRoleExample); - if(CollectionUtil.isNotEmpty(memberRoleList)){ + if (CollectionUtil.isNotEmpty(memberRoleList)) { parentId = memberRoleList.get(0).getId(); } //添加角色 @@ -364,10 +386,10 @@ public class ProRoleService implements IProRoleService { } @Override - public void updateRole(Long currentUserId, RoleDto.UpdateRole updateRole) { + public ProjectVo.RoleInfo updateRole(Long currentUserId, RoleDto.UpdateRole updateRole) { //查找角色 ProRole proRole = proRoleDao.selectByPrimaryKey(updateRole.getRoleId()); - if(ObjectUtil.isNull(proRole)){ + if (ObjectUtil.isNull(proRole)) { throw new BaseException(CodeEnum.NOT_ROLE); } //检查操作者的权限 @@ -375,17 +397,31 @@ public class ProRoleService implements IProRoleService { if (power < 2) { throw new BaseException(CodeEnum.NOT_POWER); } - if(StrUtil.isNotEmpty(updateRole.getRoleName())){ + //修改名字 + if (StrUtil.isNotEmpty(updateRole.getRoleName())) { proRole.setName(updateRole.getRoleName()); } + //修改关联项目id + if (ObjectUtil.isNotNull(updateRole.getRelevanceProjectId())) { + SysProject project = sysProjectDao.selectByPrimaryKey(updateRole.getRelevanceProjectId()); + if (ObjectUtil.isNull(project)) { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + //检查角色是否是角色项目 + ProRole parentRole = proRoleDao.selectByPrimaryKey(proRole.getParentId()); + if (parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.ProjectVirtualRole.value)) { + proRole.setRelevanceProjectId(updateRole.getRelevanceProjectId()); + } + } proRoleDao.updateByPrimaryKeySelective(proRole); + return getRoleInfoByRoleId(proRole.getId()); } @Override - public void saveMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember) { + public ProjectVo.RoleInfo saveMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember) { //检查成员是否为空 - ProMember member = proMemberDao.selectByPrimaryKey(saveMember.getMemberId()); - if(ObjectUtil.isNull(member)){ + ProMember member = proMemberDao.selectByPrimaryKey(saveMember.getMemberId()); + if (ObjectUtil.isNull(member)) { throw new BaseException(CodeEnum.NOT_MEMBER); } //检查角色是否为PM 是的话则需要更高权限 @@ -401,13 +437,14 @@ public class ProRoleService implements IProRoleService { proMemberRole.setRoleId(saveMember.getRoleId()); proMemberRole.setMemberId(member.getId()); memberRoleDao.insertSelective(proMemberRole); + return getRoleInfoByRoleId(saveMember.getRoleId()); } @Override public void deleteMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember) { //检查参数是否正确 - ProMember member = proMemberDao.selectByPrimaryKey(saveMember.getMemberId()); - if(ObjectUtil.isNull(member)){ + ProMember member = proMemberDao.selectByPrimaryKey(saveMember.getMemberId()); + if (ObjectUtil.isNull(member)) { throw new BaseException(CodeEnum.NOT_MEMBER); } //检查被操作的角色是否是项目PM @@ -421,17 +458,90 @@ public class ProRoleService implements IProRoleService { ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); memberRoleExample.createCriteria().andRoleIdEqualTo(saveMember.getRoleId()).andMemberIdEqualTo(member.getId()); List memberRoleList = memberRoleDao.selectByExample(memberRoleExample); - if(CollectionUtil.isEmpty(memberRoleList)){ + if (CollectionUtil.isEmpty(memberRoleList)) { throw new BaseException(CodeEnum.NOT_MEMBER); } - for(ProMemberRole memberRole : memberRoleList){ - memberRole.setRecStatus((byte)2); + for (ProMemberRole memberRole : memberRoleList) { + memberRole.setRecStatus((byte) 2); memberRoleDao.updateByPrimaryKeySelective(memberRole); } } @Override - public RoleVo.RoleByProjectId queryRoleByProjectId(Long projectId) { - return null; + public List queryByProjectVirtualRole(RoleDto.ProjectId projectId) { + List taskList = new ArrayList<>(); + //查找项目 + SysProject project = sysProjectDao.selectByPrimaryKey(projectId.getProjectId()); + if (ObjectUtil.isNull(project)) { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + long beginTime = projectId.getStartTime() == null ? project.getBeginTime() : projectId.getStartTime(); + long endTime = projectId.getEndTime() == null ? project.getEndTime() : projectId.getEndTime(); + //1、查找一级任务 + ProTaskDetailExample proTaskDetailExample = new ProTaskDetailExample(); + proTaskDetailExample.createCriteria().andProjectIdEqualTo(projectId.getProjectId()) + .andLevelEqualTo((byte) 1).andBeginTimeLessThanOrEqualTo(endTime).andEndTimeGreaterThanOrEqualTo(beginTime); + proTaskDetailExample.setOrderByClause("begin_time"); + List firstTaskDetailList = taskDetailDao.selectByExample(proTaskDetailExample); + log.info("查找到一级任务:{}", firstTaskDetailList); + if (CollectionUtil.isNotEmpty(firstTaskDetailList)) { + firstTaskDetailList.forEach(firstTaskDetail -> { + int sequence = 1; + TaskVo.NormalTask normalTask = new TaskVo.NormalTask(); + BeanUtil.copyProperties(firstTaskDetail, normalTask); + normalTask.setDetailId(firstTaskDetail.getId()); + normalTask.setSequence(sequence); + + List secondTaskList = taskDetailDao.getTaskByParentId(firstTaskDetail.getId(), 1,beginTime,endTime); + List secondList = new ArrayList<>(); + if (CollectionUtil.isNotEmpty(secondTaskList)) { + secondTaskList.forEach(secondTask -> { + TaskVo.NormalTask second = new TaskVo.NormalTask(); + second.setId(taskDetailDao.selectSubTimeByTaskIdAndTime(secondTask.getDetailId(), System.currentTimeMillis())); + BeanUtil.copyProperties(secondTask, second); + second.setParentName(firstTaskDetail.getName()); + secondList.add(second); + }); + } + normalTask.setSecondTasks(secondList); + taskList.add(normalTask); + }); + } + return taskList; + } + + private ProjectVo.RoleInfo getRoleInfoByRoleId(Long roleId) { + return proRoleDao.getRoleInfoByRoleId(roleId); + } + + @Override + public void updateRoleShow(Long currentUserId, RoleDto.UpdateRoleShow roleShow) { + if (CollectionUtil.isNotEmpty(roleShow.getRoleIdList())) { + //查找该用户在项目下关注的角色 + ProUserAttentionRoleExample userAttentionRoleExample = new ProUserAttentionRoleExample(); + userAttentionRoleExample.createCriteria().andProjectIdEqualTo(roleShow.getProjectId()).andUserIdEqualTo(currentUserId); + List userAttentionRoleList = userAttentionRoleMapper.selectByExample(userAttentionRoleExample); + if (CollectionUtil.isNotEmpty(userAttentionRoleList)) { + //有则全部删除 + userAttentionRoleList.forEach(userAttentionRole -> { + userAttentionRole.setRecStatus((byte) 2); + userAttentionRoleMapper.updateByPrimaryKeySelective(userAttentionRole); + }); + } + //然后重新添加关注信息 + roleShow.getRoleIdList().forEach(roleId -> { + ProUserAttentionRole userAttentionRole = new ProUserAttentionRole(); + userAttentionRole.setId(snowflake.nextId()); + userAttentionRole.setProjectId(roleShow.getProjectId()); + userAttentionRole.setUserId(currentUserId); + userAttentionRole.setRoleId(roleId); + userAttentionRoleMapper.insertSelective(userAttentionRole); + }); + } + } + + @Override + public List queryRoleByProjectId(Long projectId) { + return proRoleDao.queryRoleByProjectId(projectId); } } 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 2628c5d5..fbe80a26 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java @@ -5,18 +5,23 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; 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; +import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.dao.*; import com.ccsens.tall.persist.dao.ProTaskShowDao; import com.ccsens.tall.persist.mapper.ProPluginConfigMapper; +import com.ccsens.tall.util.TallConstant; import com.ccsens.tall.util.TaskUtil; import com.ccsens.util.CodeEnum; import com.ccsens.util.DateUtil; +import com.ccsens.util.JacksonUtil; import com.ccsens.util.WebConstant; import com.ccsens.util.cron.CronConstant; import com.ccsens.util.cron.NatureToDate; @@ -42,7 +47,7 @@ public class ProTaskDetailService implements IProTaskDetailService { @Resource private IUserAttentionService attentionService; @Resource - private ITaskPluginService pluginService; + private TaskPluginDao taskPluginDao; @Resource private IProMemberService proMemberService; @Resource @@ -70,11 +75,17 @@ public class ProTaskDetailService implements IProTaskDetailService { @Resource private MtFeignClient mtFeignClient; @Resource - private ProPluginConfigMapper proPluginConfigMapper; + private ProPluginConfigDao pluginConfigDao; @Resource private IRobotService robotService; @Resource private ProRemindDao proRemindDao; + @Resource + private TaskDeliverDao taskDeliverDao; + @Resource + private ProMemberRoleDao proMemberRoleDao; + @Resource + private TaskPluginService taskPluginService; @Override public void saveTaskDetail(ProTaskDetail taskDetail) { @@ -82,17 +93,16 @@ public class ProTaskDetailService implements IProTaskDetailService { } @Override - public Object getTasksByRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, Integer process, - Integer page, Integer pageSize,Integer priority) throws Exception { + public Object getTasksByRoleId(Long currentUserId, Long projectId, TaskDto.QueryTaskInfoByRoleId taskInfoByRoleId) throws Exception { SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); if (ObjectUtil.isNull(sysProject)) { throw new BaseException(CodeEnum.NOT_PROJECT); } - startTime = startTime == null ? sysProject.getBeginTime() : startTime; - endTime = endTime == null ? sysProject.getEndTime() : endTime; + taskInfoByRoleId.setStartTime(taskInfoByRoleId.getStartTime() == null ? sysProject.getBeginTime() : taskInfoByRoleId.getStartTime()); + taskInfoByRoleId.setEndTime(taskInfoByRoleId.getEndTime() == null ? sysProject.getEndTime() : taskInfoByRoleId.getEndTime()); Object obj = null; - ProRole role = proRoleDao.selectByPrimaryKey(roleId); + ProRole role = proRoleDao.selectByPrimaryKey(taskInfoByRoleId.getRoleId()); if (ObjectUtil.isNull(role)) { throw new BaseException(CodeEnum.NOT_ROLE); } @@ -105,9 +115,13 @@ public class ProTaskDetailService implements IProTaskDetailService { // obj = getTaskInfoByMvp(projectId, page, pageSize); // } else if (parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { - obj = getTaskInfoByProjectIdAndPM(currentUserId, projectId, roleId, startTime, endTime, process, page, pageSize,priority); + 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)) { - obj = getTaskInfoByProjectIdAndRoleId(currentUserId, projectId, roleId, startTime, endTime, process, page, pageSize,priority); + obj = getTaskInfoByProjectIdAndRoleId(currentUserId, projectId, taskInfoByRoleId.getRoleId(), + taskInfoByRoleId.getStartTime(), taskInfoByRoleId.getEndTime(), taskInfoByRoleId.getProcess(), + taskInfoByRoleId.getPage(), taskInfoByRoleId.getPageSize(), taskInfoByRoleId.getPriority(), taskInfoByRoleId.getImitation()); } } else { throw new BaseException(CodeEnum.NOT_ROLE); @@ -121,7 +135,7 @@ public class ProTaskDetailService implements IProTaskDetailService { */ private TaskVo.ProTaskShow getProTaskShow(Long taskId) { TaskVo.ProTaskShow proTaskShow = proTaskShowDao.getProTaskShowByTaskId(taskId); - if(ObjectUtil.isNull(proTaskShow)){ + if (ObjectUtil.isNull(proTaskShow)) { proTaskShow = new TaskVo.ProTaskShow(); proTaskShow.setTimeShow("MM-DD HH:mm"); proTaskShow.setDuration(0); @@ -134,11 +148,12 @@ public class ProTaskDetailService implements IProTaskDetailService { } return proTaskShow; } + /** * 查看任务 项目经理 */ - private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPM(Long currentUserId, Long projectId,Long roleId, Long startTime, Long endTime, - Integer process, Integer page, Integer pageSize,Integer priority) 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<>(); @@ -151,7 +166,9 @@ public class ProTaskDetailService implements IProTaskDetailService { return proTaskInfo; } ProTaskDetailExample proTaskDetailExample = new ProTaskDetailExample(); - proTaskDetailExample.createCriteria().andProjectIdEqualTo(projectId).andLevelEqualTo((byte) 1); + proTaskDetailExample.createCriteria().andProjectIdEqualTo(projectId).andLevelEqualTo((byte) 1) + .andLevelEqualTo((byte) 1).andBeginTimeLessThanOrEqualTo(endTime).andEndTimeGreaterThanOrEqualTo(startTime); + proTaskDetailExample.setOrderByClause("begin_time"); List firstTaskDetailList = taskDetailDao.selectByExample(proTaskDetailExample); if (CollectionUtil.isNotEmpty(firstTaskDetailList)) { int sequence = 1; @@ -163,8 +180,8 @@ public class ProTaskDetailService implements IProTaskDetailService { normalTask.setSequence(sequence); // 查询任务名对应的配置 ProPluginConfigExample configExample = new ProPluginConfigExample(); - configExample.createCriteria().andTaskIdEqualTo(firstTaskDetail.getId()).andPlaceLocationEqualTo((byte)0); - List proPluginConfigs = proPluginConfigMapper.selectByExample(configExample); + configExample.createCriteria().andTaskIdEqualTo(firstTaskDetail.getId()).andPlaceLocationEqualTo((byte) 0); + List proPluginConfigs = pluginConfigDao.selectByExample(configExample); if (CollectionUtil.isNotEmpty(proPluginConfigs)) { ProPluginConfig config = proPluginConfigs.get(0); normalTask.setImportParam(config.getImportParam()); @@ -181,23 +198,23 @@ public class ProTaskDetailService implements IProTaskDetailService { normalTask.setProcess(firstSubTimeMember.getComplatedStatus()); } //查找一级任务下的二级任务 - List secondNormalTaskList = taskDetailDao.selectNormalTaskListByPM(projectId, firstTaskDetail.getId(), startTime, endTime,roleId); + List secondNormalTaskList = taskDetailDao.selectNormalTaskListByPM(projectId, firstTaskDetail.getId(), startTime, endTime, roleId); if (CollectionUtil.isNotEmpty(secondNormalTaskList)) { for (TaskVo.NormalTask task : secondNormalTaskList) { - //处理分数 - BigDecimal score = mtFeignClient.getAdminScore(task.getProjectId(),task.getDetailId()); - if(ObjectUtil.isNotNull(score)){ - task.setScore(score); - } +// //处理分数 +// BigDecimal score = mtFeignClient.getAdminScore(task.getProjectId(), task.getDetailId()); +// if (ObjectUtil.isNotNull(score)) { +// task.setScore(score); +// } //处理插件 - managePlugin(currentUserId,roleId,task); + managePlugin(currentUserId, roleId, task, imitation); //二级任务完成状态 - if(task.getProcess() != 2) { + 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){ + } else if (task.getProcess() > 2) { task.setRealEndTime((long) 0); task.setProcess(0); } @@ -240,7 +257,7 @@ public class ProTaskDetailService implements IProTaskDetailService { * 查看任务 项目成员 */ private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, - Long endTime, Integer process, Integer page, Integer pageSize,Integer priority) throws Exception { + Long endTime, Integer process, Integer page, Integer pageSize, Integer priority, Integer imitation) throws Exception { TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); List globalTaskList = new ArrayList<>(); @@ -254,27 +271,27 @@ public class ProTaskDetailService implements IProTaskDetailService { } //查找该角色的所有任务(全体成员的任务也是这个角色的任务) List secondTaskVoList = taskDetailDao.selectTaskByRoleAndAllMembers(projectId, roleId, - allMemberId, startTime, endTime,priority); + allMemberId, startTime, endTime, priority); if (CollectionUtil.isNotEmpty(secondTaskVoList)) { for (TaskVo.NormalTask normalTask : secondTaskVoList) { - //处理分数 - MemberVo.MemberInfo memberInfo = proMemberService.getMemberByUserIdAndProjectId(currentUserId,normalTask.getProjectId()); - if(ObjectUtil.isNotNull(memberInfo)) { - BigDecimal score = mtFeignClient.getMemberScore(normalTask.getDetailId(), memberInfo.getId()); - if (ObjectUtil.isNotNull(score)) { - normalTask.setScore(score); - } - } +// //处理分数 +// MemberVo.MemberInfo memberInfo = proMemberService.getMemberByUserIdAndProjectId(currentUserId, normalTask.getProjectId()); +// if (ObjectUtil.isNotNull(memberInfo)) { +// BigDecimal score = mtFeignClient.getMemberScore(normalTask.getDetailId(), memberInfo.getId()); +// if (ObjectUtil.isNotNull(score)) { +// normalTask.setScore(score); +// } +// } //处理插件 - managePlugin(currentUserId,roleId,normalTask); + managePlugin(currentUserId, roleId, normalTask, imitation); //任务完成状态 - if(normalTask.getProcess() != 2) { + if (normalTask.getProcess() != 2) { ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, normalTask.getId()); if (ObjectUtil.isNotNull(subTimeMember)) { normalTask.setProcess(subTimeMember.getComplatedStatus()); normalTask.setRealEndTime(subTimeMember.getRealFinishTime()); - }else if(normalTask.getProcess() > 2){ + } else if (normalTask.getProcess() > 2) { normalTask.setRealEndTime((long) 0); normalTask.setProcess(0); } @@ -297,7 +314,7 @@ public class ProTaskDetailService implements IProTaskDetailService { if (CollectionUtil.isNotEmpty(task.getCommonTask())) { if (priority == 0) { normalTaskList = sortTaskTime(task.getCommonTask()); - }else { + } else { normalTaskList = task.getCommonTask(); } } @@ -395,7 +412,7 @@ public class ProTaskDetailService implements IProTaskDetailService { } continue; } - if(secondTaskVo.getBeginTime() < startTime && secondTaskVo.getEndTime() <= endTime && secondTaskVo.getEndTime() > startTime) { + if (secondTaskVo.getBeginTime() < startTime && secondTaskVo.getEndTime() <= endTime && secondTaskVo.getEndTime() > startTime) { secondTaskVo.setBeginTime(startTime); secondTaskVoList.add(secondTaskVo); } else if (secondTaskVo.getBeginTime() >= startTime && secondTaskVo.getEndTime() <= endTime) { @@ -435,35 +452,55 @@ public class ProTaskDetailService implements IProTaskDetailService { * 处理任务的插件 */ @Override - public void managePlugin(Long userId,Long roleId,TaskVo.NormalTask normalTask) throws Exception { - Boolean isMain = proMemberService.userIsBelongRole(userId,roleId); - if(!isMain){ + public void managePlugin(Long userId, Long roleId, TaskVo.NormalTask normalTask, Integer imitation) throws Exception { + Boolean isMain = proMemberService.userIsBelongRole(userId, roleId, imitation); + if (!isMain) { normalTask.setPlugins(null); - }else { - if(CollectionUtil.isNotEmpty(normalTask.getPlugins())){ + } else { + if (CollectionUtil.isNotEmpty(normalTask.getPlugins())) { List pluginVoList = new ArrayList<>(); - for(TaskVo.PluginVo pluginVo : normalTask.getPlugins()){ + for (TaskVo.PluginVo pluginVo : normalTask.getPlugins()) { String[] pluginIds = pluginVo.getId().split(","); String[] pluginNames = pluginVo.getName().split(","); String[] pluginDescription = pluginVo.getDescription().split(","); String[] pluginShowType = pluginVo.getShowType().split(","); TaskVo.PluginVo plugin; - for(int i = 0;i 2){ - taskDetail.setRealEndTime((long) 0); - taskDetail.setProcess(0); - } - } - //任务配置 - taskDetail.setProTaskConfig(getProTaskShow(taskDetail.getDetailId())); - - //添加项目信息 - normalTaskAddPlugin(currentUserId, subTime.getTaskDetailId(), taskDetail); + taskId = subTime.getTaskDetailId(); + taskSubTimeId = subTime.getId(); + } + ProTaskDetail task = taskDetailDao.selectByPrimaryKey(taskId); + if (ObjectUtil.isNull(task)) { + throw new BaseException(CodeEnum.NOT_TASK); + } + if(ObjectUtil.isNull(taskSubTimeId)){ + taskSubTimeId = taskDeliverService.isTaskOrSubTime(taskId); + } - List groupTaskList = new ArrayList<>(); - //提醒信息 - taskDetail.setRemindInfoList(proRemindDao.queryRemindByTask(taskDetail.getId())); - //获取此任务的子任务 - ProTaskDetailExample detailExample = new ProTaskDetailExample(); - detailExample.createCriteria().andParentIdEqualTo(taskDetail.getDetailId()); - List detailList = taskDetailDao.selectByExample(detailExample); - if(CollectionUtil.isNotEmpty(detailList)){ - for(ProTaskDetail detail : detailList){ - TaskVo.NormalTask groupTask; - Long subTimeId = taskDeliverService.isTaskOrSubTime(detail.getId()); - if(ObjectUtil.isNotNull(subTimeId)){ - groupTask = taskDetailDao.selectTaskByTaskId(subTimeId, detail.getId(),detail.getExecutorRole()); - if(ObjectUtil.isNotNull(groupTask)){ - //处理查询到的任务的插件 - managePlugin(currentUserId,task.getExecutorRole(),taskDetail); - //任务的完成状态 - if(taskDetail.getProcess() != 2) { - ProSubTimeMember proSubTimeMember = getProcessByUserIdAndTask(currentUserId, groupTask.getId()); - if (ObjectUtil.isNotNull(proSubTimeMember)) { - groupTask.setProcess(proSubTimeMember.getComplatedStatus()); - groupTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); - }else if(taskDetail.getProcess() > 2){ - taskDetail.setRealEndTime((long) 0); - taskDetail.setProcess(0); - } + taskDetail = taskDetailDao.selectTaskByTaskId(taskSubTimeId, taskId, task.getExecutorRole()); + if (ObjectUtil.isNotNull(taskDetail)) { + //处理查询到的任务的插件 + managePlugin(currentUserId, task.getExecutorRole(), taskDetail, imitation); + //任务的完成状态 + if (taskDetail.getProcess() != 2) { + ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, taskDetail.getId()); + if (ObjectUtil.isNotNull(subTimeMember)) { + taskDetail.setProcess(subTimeMember.getComplatedStatus()); + taskDetail.setRealEndTime(subTimeMember.getRealFinishTime()); + } else if (taskDetail.getProcess() > 2) { + taskDetail.setRealEndTime((long) 0); + taskDetail.setProcess(0); + } + } + //任务配置 + taskDetail.setProTaskConfig(getProTaskShow(taskDetail.getDetailId())); + + //添加项目信息 + normalTaskAddPlugin(taskId, taskDetail); + + List groupTaskList = new ArrayList<>(); + //提醒信息 + taskDetail.setRemindInfoList(proRemindDao.queryRemindByTask(taskDetail.getId())); + //获取此任务的子任务 + ProTaskDetailExample detailExample = new ProTaskDetailExample(); + detailExample.createCriteria().andParentIdEqualTo(taskDetail.getDetailId()); + List detailList = taskDetailDao.selectByExample(detailExample); + if (CollectionUtil.isNotEmpty(detailList)) { + for (ProTaskDetail detail : detailList) { + TaskVo.NormalTask groupTask; + Long subTimeId = taskDeliverService.isTaskOrSubTime(detail.getId()); + if (ObjectUtil.isNotNull(subTimeId)) { + groupTask = taskDetailDao.selectTaskByTaskId(subTimeId, detail.getId(), detail.getExecutorRole()); + if (ObjectUtil.isNotNull(groupTask)) { + //处理查询到的任务的插件 + managePlugin(currentUserId, task.getExecutorRole(), taskDetail, imitation); + //任务的完成状态 + if (taskDetail.getProcess() != 2) { + ProSubTimeMember proSubTimeMember = getProcessByUserIdAndTask(currentUserId, groupTask.getId()); + if (ObjectUtil.isNotNull(proSubTimeMember)) { + groupTask.setProcess(proSubTimeMember.getComplatedStatus()); + groupTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); + } else if (taskDetail.getProcess() > 2) { + taskDetail.setRealEndTime((long) 0); + taskDetail.setProcess(0); } + } - //添加项目信息和插件信息 - normalTaskAddPlugin(currentUserId, groupTask.getDetailId(), groupTask); - //修改返回时子任务的名字(“任务名+(xx和XX)”) - if (detail.getAllMember() == 0) { - groupTask.setName(updateSubTaskName(groupTask.getDetailId(), groupTask.getName())); - } - groupTaskList.add(groupTask); + //添加项目信息和插件信息 + normalTaskAddPlugin(groupTask.getDetailId(), groupTask); + //修改返回时子任务的名字(“任务名+(xx和XX)”) + if (detail.getAllMember() == 0) { + groupTask.setName(updateSubTaskName(groupTask.getDetailId(), groupTask.getName())); } + groupTaskList.add(groupTask); } } - taskDetail.setSecondTasks(new ArrayList<>()); - taskDetail.getSecondTasks().addAll(groupTaskList); } - + taskDetail.setSecondTasks(new ArrayList<>()); + taskDetail.getSecondTasks().addAll(groupTaskList); } + } 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()); @@ -622,17 +668,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); @@ -640,15 +682,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(); } @@ -682,7 +724,7 @@ public class ProTaskDetailService implements IProTaskDetailService { case "创建者": for (SysProject project : projectList) { if (project.getCreatorId().longValue() == currentUserId.longValue()) { - List taskList = getTaskInfoByProjectIdAndUserId(project, currentUserId, startMillisTime, endMillisTime,null); + List taskList = getTaskInfoByProjectIdAndUserId(project, currentUserId, startMillisTime, endMillisTime, null); if (CollectionUtil.isNotEmpty(taskList)) { normalTaskList.addAll(taskList); } @@ -692,7 +734,7 @@ public class ProTaskDetailService implements IProTaskDetailService { case "参与者": for (SysProject project : projectList) { if (project.getCreatorId().longValue() != currentUserId.longValue()) { - List taskList = getTaskInfoByProjectIdAndUserId(project, currentUserId, startMillisTime, endMillisTime,null); + List taskList = getTaskInfoByProjectIdAndUserId(project, currentUserId, startMillisTime, endMillisTime, null); if (CollectionUtil.isNotEmpty(taskList)) { normalTaskList.addAll(taskList); } @@ -704,7 +746,7 @@ public class ProTaskDetailService implements IProTaskDetailService { } } else { for (SysProject project : projectList) { - List taskList = getTaskInfoByProjectIdAndUserId(project, currentUserId, startMillisTime, endMillisTime,null); + List taskList = getTaskInfoByProjectIdAndUserId(project, currentUserId, startMillisTime, endMillisTime, null); if (CollectionUtil.isNotEmpty(taskList)) { normalTaskList.addAll(taskList); } @@ -714,13 +756,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)); } } @@ -761,14 +797,14 @@ public class ProTaskDetailService implements IProTaskDetailService { } private List getTaskInfoByProjectIdAndUserId(SysProject project, Long userId, - Long startTime, Long endTime,Set roleList) throws Exception { + Long startTime, Long endTime, Set roleList) throws Exception { List normalTaskList = new ArrayList<>(); //获取用户的角色 - if(CollectionUtil.isEmpty(roleList)){ + if (CollectionUtil.isEmpty(roleList)) { roleList = new HashSet<>(); //查询此用户在项目中的的所有角色的任务 - List roles = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId()); - for (ProRole role : roles){ + List roles = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId(), null); + for (ProRole role : roles) { roleList.add(role.getId()); } // roles.forEach(role->{ @@ -785,16 +821,16 @@ public class ProTaskDetailService implements IProTaskDetailService { for (Long roleId : roleList) { // SysProject sysProject = sysProjectDao.selectByPrimaryKey(role.getProjectId()); List taskList = - taskDetailDao.selectTaskByRoleAndAllMembers(project.getId(), roleId, null,startTime, endTime,0); + taskDetailDao.selectTaskByRoleAndAllMembers(project.getId(), roleId, null, startTime, endTime, 0); if (CollectionUtil.isNotEmpty(taskList)) { for (TaskVo.NormalTask normalTask : taskList) { //任务的完成状态 - if(normalTask.getProcess() != 2) { + if (normalTask.getProcess() != 2) { ProSubTimeMember proSubTimeMember = getProcessByUserIdAndTask(userId, normalTask.getId()); if (ObjectUtil.isNotNull(proSubTimeMember)) { normalTask.setProcess(proSubTimeMember.getComplatedStatus()); normalTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); - }else if(normalTask.getProcess() > 2){ + } else if (normalTask.getProcess() > 2) { normalTask.setRealEndTime((long) 0); normalTask.setProcess(0); } @@ -838,18 +874,18 @@ public class ProTaskDetailService implements IProTaskDetailService { } //获取需查询的角色 Set roleList = new HashSet<>(); - if(ObjectUtil.isNotNull(list.getRoleList())){ + if (ObjectUtil.isNotNull(list.getRoleList())) { list.getRoleList().forEach(roleId -> { ProRole role = proRoleDao.selectByPrimaryKey(roleId); - if(ObjectUtil.isNotNull(role)){ + if (ObjectUtil.isNotNull(role)) { ProRole parentRole = proRoleDao.selectByPrimaryKey(role.getParentId()); - if(ObjectUtil.isNotNull(parentRole)){ + if (ObjectUtil.isNotNull(parentRole)) { //若角色为项目经理或MVP,则查询全部角色 if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value) || parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { //查询项目下所有角色 List roleInfoList = proRoleService.getRealMemberRolesByProjectId(list.getProjectId()); - if(CollectionUtil.isNotEmpty(roleInfoList)) { + if (CollectionUtil.isNotEmpty(roleInfoList)) { for (ProjectVo.RoleInfo roleInfo : roleInfoList) { // ProRole proRole = proRoleDao.selectByPrimaryKey(roleInfo.getId()); roleList.add(roleInfo.getId()); @@ -859,7 +895,7 @@ public class ProTaskDetailService implements IProTaskDetailService { } } }); - if(CollectionUtil.isEmpty(roleList)){ + if (CollectionUtil.isEmpty(roleList)) { roleList.addAll(list.getRoleList()); } @@ -892,7 +928,7 @@ public class ProTaskDetailService implements IProTaskDetailService { //获取项目 SysProject sysProject = sysProjectDao.selectByPrimaryKey(list.getProjectId()); if (ObjectUtil.isNotNull(sysProject)) { - List taskList = getTaskInfoByProjectIdAndUserId(sysProject, currentUserId, startMillisTime, endMillisTime,roleList); + List taskList = getTaskInfoByProjectIdAndUserId(sysProject, currentUserId, startMillisTime, endMillisTime, roleList); if (CollectionUtil.isNotEmpty(taskList)) { normalTaskList.addAll(taskList); } @@ -970,11 +1006,11 @@ public class ProTaskDetailService implements IProTaskDetailService { public ProSubTimeMember getProcessByUserIdAndTask(Long userId, Long subTimeId) throws Exception { ProSubTimeMember subTimeMember = null; ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(subTimeId); - if(ObjectUtil.isNull(subTime)){ + if (ObjectUtil.isNull(subTime)) { throw new BaseException(CodeEnum.NOT_TASK); } ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId()); - if(ObjectUtil.isNull(taskDetail)){ + if (ObjectUtil.isNull(taskDetail)) { throw new BaseException(CodeEnum.NOT_TASK); } ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample(); @@ -984,20 +1020,20 @@ public class ProTaskDetailService implements IProTaskDetailService { if (CollectionUtil.isNotEmpty(subTimeMemberList)) { if (taskDetail.getFinishNeedAll() == 0) { subTimeMember = subTimeMemberList.get(0); - }else { + } else { //查找此用户在任务下的成员 ProMember porMember = proMemberService.selectByUserId(userId, taskDetail.getProjectId()); //该用户是否是任务的负责人 ProRole role = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); - Boolean isBelongRole = proMemberService.userIsBelongRole(userId, role.getId()); + Boolean isBelongRole = proMemberService.userIsBelongRole(userId, role.getId(), null); if (isBelongRole) { - for(ProSubTimeMember sTimeMember:subTimeMemberList){ - if(sTimeMember.getMemberId().longValue() == porMember.getId()){ + for (ProSubTimeMember sTimeMember : subTimeMemberList) { + if (sTimeMember.getMemberId().longValue() == porMember.getId()) { subTimeMember = sTimeMember; break; } } - }else { + } else { //查找任务负责人下的所有成员 List memberList = proMemberService.selectByRole(taskDetail.getExecutorRole()); @@ -1015,7 +1051,7 @@ public class ProTaskDetailService implements IProTaskDetailService { } subTimeMember = subTimeMemberList.get(0); } - if(flag){ + if (flag) { subTimeMember = null; } } @@ -1041,13 +1077,13 @@ public class ProTaskDetailService implements IProTaskDetailService { } else { taskDetail = taskDetailDao.selectByPrimaryKey(taskId); } - if(ObjectUtil.isNull(taskDetail)){ + if (ObjectUtil.isNull(taskDetail)) { throw new BaseException(CodeEnum.NOT_TASK); } // //本用户在项目中的角色 // List proRoles = proRoleService.getProRoleByProjectIdAndUserId(taskDetail.getProjectId(), currentUserId); //用户在项目中的最高权限 - int power = proRoleService.selectPowerByRoleName(currentUserId,taskDetail.getProjectId()); + int power = proRoleService.selectPowerByRoleName(currentUserId, taskDetail.getProjectId()); if (power > 1) { if (ObjectUtil.isNotNull(taskDetail)) { //修改任务删除状态 @@ -1060,7 +1096,7 @@ public class ProTaskDetailService implements IProTaskDetailService { throw new BaseException(CodeEnum.NOT_POWER); } //通过智能助手发送消息 - robotService.deleteTaskRobotSend(currentUserId,taskDetail); + robotService.deleteTaskRobotSend(currentUserId, taskDetail); } @Override @@ -1068,8 +1104,8 @@ public class ProTaskDetailService implements IProTaskDetailService { ProTaskDetailExample taskDetailExample = new ProTaskDetailExample(); taskDetailExample.createCriteria().andExecutorRoleEqualTo(roleId); List detailList = taskDetailDao.selectByExample(taskDetailExample); - if(CollectionUtil.isNotEmpty(detailList)){ - for(ProTaskDetail taskDetail:detailList){ + if (CollectionUtil.isNotEmpty(detailList)) { + for (ProTaskDetail taskDetail : detailList) { deleteTaskByTaskId(taskDetail.getId()); } } @@ -1087,8 +1123,8 @@ public class ProTaskDetailService implements IProTaskDetailService { ProTaskMemberExample taskMemberExample = new ProTaskMemberExample(); taskMemberExample.createCriteria().andTaskDetailIdEqualTo(taskId); List proTaskMemberList = taskMemberDao.selectByExample(taskMemberExample); - if(CollectionUtil.isNotEmpty(proTaskMemberList)){ - for(ProTaskMember proTaskMember : proTaskMemberList){ + if (CollectionUtil.isNotEmpty(proTaskMemberList)) { + for (ProTaskMember proTaskMember : proTaskMemberList) { proTaskMember.setRecStatus((byte) 2); taskMemberDao.updateByPrimaryKeySelective(proTaskMember); } @@ -1107,57 +1143,82 @@ public class ProTaskDetailService implements IProTaskDetailService { ProTaskDetail taskDetail; ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(updateTaskInfo.getId()); - if(ObjectUtil.isNotNull(taskSubTime)){ + if (ObjectUtil.isNotNull(taskSubTime)) { taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTime.getTaskDetailId()); - }else { + } else { taskDetail = taskDetailDao.selectByPrimaryKey(updateTaskInfo.getId()); } - if(ObjectUtil.isNotNull(taskDetail)) { + if (ObjectUtil.isNotNull(taskDetail)) { SysProject project = sysProjectDao.selectByPrimaryKey(taskDetail.getProjectId()); - if(ObjectUtil.isNotNull(project)) { + if (ObjectUtil.isNotNull(project)) { + //查找权限 int power = proRoleService.selectPowerByRoleName(currentUserId, project.getId()); - if (power > 1) { + //当前用户是否是此任务的负责人 + boolean flag = false; + ProRole executorRole = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); + if (executorRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { + flag = true; + } else { + ProMemberExample memberExample = new ProMemberExample(); + memberExample.createCriteria().andUserIdEqualTo(currentUserId).andProjectIdEqualTo(project.getId()); + List memberList = proMemberDao.selectByExample(memberExample); + if (CollectionUtil.isNotEmpty(memberList)) { + if (ObjectUtil.isNotNull(executorRole)) { + ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); + memberRoleExample.createCriteria().andRoleIdEqualTo(executorRole.getId()).andMemberIdEqualTo(memberList.get(0).getId()); + if (proMemberRoleDao.countByExample(memberRoleExample) != 0) { + flag = true; + } + } + } + } + + if (power > 1 || flag) { //任务名 - if(StrUtil.isNotEmpty(updateTaskInfo.getName())){ + if (StrUtil.isNotEmpty(updateTaskInfo.getName())) { taskDetail.setName(updateTaskInfo.getName()); } //详情 - if(StrUtil.isNotEmpty(updateTaskInfo.getDescription())){ + if (StrUtil.isNotEmpty(updateTaskInfo.getDescription())) { taskDetail.setDescription(updateTaskInfo.getDescription()); } //负责人 - if(ObjectUtil.isNotNull(updateTaskInfo.getExecutorRole())){ + if (ObjectUtil.isNotNull(updateTaskInfo.getExecutorRole())) { taskDetail.setExecutorRole(updateTaskInfo.getExecutorRole()); } //奖惩金额 - if(ObjectUtil.isNotNull(updateTaskInfo.getMoney())){ + if (ObjectUtil.isNotNull(updateTaskInfo.getMoney())) { taskDetail.setMoney(updateTaskInfo.getMoney()); } //切换模式 - if(ObjectUtil.isNotNull(updateTaskInfo.getDelay())){ + if (ObjectUtil.isNotNull(updateTaskInfo.getDelay())) { taskDetail.setDelay((byte) updateTaskInfo.getDelay()); } //修改任务优先级 - if(ObjectUtil.isNotNull(updateTaskInfo.getPriority())){ + if (ObjectUtil.isNotNull(updateTaskInfo.getPriority())) { taskDetail.setPriority(updateTaskInfo.getPriority()); } //延迟切换时间 - if(ObjectUtil.isNotNull(updateTaskInfo.getDelayTime()) && - (taskDetail.getDelay() == WebConstant.TASK_DELAY.DelayManual.value)){ + if (ObjectUtil.isNotNull(updateTaskInfo.getDelayTime()) && + (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()) || + if (ObjectUtil.isNotNull(updateTaskInfo.getBeginTime()) || ObjectUtil.isNotNull(updateTaskInfo.getEndTime()) || - StrUtil.isNotEmpty(updateTaskInfo.getCycle())){ + StrUtil.isNotEmpty(updateTaskInfo.getCycle())) { //一级任务没有时间,不能修改 - if(taskDetail.getLevel() != 1 && taskDetail.getLevel() != 0) { - changeTime(taskDetail,updateTaskInfo.getBeginTime(),updateTaskInfo.getEndTime(),project); + if (taskDetail.getLevel() != 1 && taskDetail.getLevel() != 0) { + changeTime(taskDetail, updateTaskInfo.getBeginTime(), updateTaskInfo.getEndTime(), project); if (StrUtil.isNotEmpty(updateTaskInfo.getCycle())) { taskDetail.setCycle(updateTaskInfo.getCycle()); } //时间赋完值后,检查开始时间是否小于结束时间。(赋值前判断太麻烦) - if (taskDetail.getBeginTime() >= taskDetail.getEndTime()){ + if (taskDetail.getBeginTime() >= taskDetail.getEndTime()) { throw new BaseException(CodeEnum.TIME_ERROR_BEGIN); } //删掉旧的subTime @@ -1168,40 +1229,105 @@ public class ProTaskDetailService implements IProTaskDetailService { partTaskSubTime(taskDetail); } } + + //如果传入的插件不为空,先将原来的插件删除, + if (CollectionUtil.isNotEmpty(updateTaskInfo.getPlugins())) { + ProTaskPluginExample pluginExample = new ProTaskPluginExample(); + pluginExample.createCriteria().andTaskDetailIdEqualTo(taskDetail.getId()) + .andMemberRoleIdEqualTo(taskDetail.getExecutorRole()); + List pluginList = taskPluginDao.selectByExample(pluginExample); + if (CollectionUtil.isNotEmpty(pluginList)) { + pluginList.forEach(proTaskPlugin -> { + proTaskPlugin.setRecStatus((byte) 2); + taskPluginDao.updateByPrimaryKeySelective(proTaskPlugin); + }); + } + //将新的插件加入任务 + updateTaskInfo.getPlugins().forEach(taskPlugin -> { + SysPlugin sysPlugin = sysPluginDao.selectByPrimaryKey(taskPlugin); + if (ObjectUtil.isNull(sysPlugin)) { + throw new BaseException(CodeEnum.WBS_NOT_PLUGIN); + } + ProTaskPlugin plugin = new ProTaskPlugin(); + plugin.setId(snowflake.nextId()); + plugin.setTaskDetailId(taskDetail.getId()); + plugin.setPluginId(taskPlugin); + plugin.setMemberRoleId(taskDetail.getExecutorRole()); + taskPluginDao.insertSelective(plugin); + }); + } + //修改交付物信息 + if (CollectionUtil.isNotEmpty(updateTaskInfo.getDeliverList())) { + updateTaskInfo.getDeliverList().forEach(taskDeliver -> { + if (StrUtil.isNotEmpty(taskDeliver.getDeliverName())) { + if (ObjectUtil.isNotNull(taskDeliver.getDeliverId())) { + ProTaskDeliver deliver = taskDeliverDao.selectByPrimaryKey(taskDeliver.getDeliverId()); + if (ObjectUtil.isNotNull(deliver)) { + deliver.setName(taskDeliver.getDeliverName()); + taskDeliverDao.updateByPrimaryKeySelective(deliver); + } + } else { + ProTaskDeliver deliver = new ProTaskDeliver(); + deliver.setId(snowflake.nextId()); + deliver.setTaskDetailId(taskDetail.getId()); + deliver.setName(taskDeliver.getDeliverName()); + deliver.setIsInput(0); + deliver.setIsFinal(1); + taskDeliverService.saveDeliver(deliver); + } + } + }); + } + //修改数据 taskDetailDao.updateByPrimaryKeySelective(taskDetail); //修改提醒信息 - if(CollectionUtil.isNotEmpty(updateTaskInfo.getTaskRemindList())){ + if (CollectionUtil.isNotEmpty(updateTaskInfo.getTaskRemindList())) { + //删除之前的提醒信息 + ProRemindExample proRemindExample = new ProRemindExample(); + proRemindExample.createCriteria().andSubTaskIdEqualTo(updateTaskInfo.getId()); + List proRemindList = proRemindDao.selectByExample(proRemindExample); + if (CollectionUtil.isNotEmpty(proRemindList)) { + proRemindList.forEach(proRemind -> { + proRemind.setRecStatus((byte) 2); + proRemindDao.updateByPrimaryKeySelective(proRemind); + }); + } updateTaskInfo.getTaskRemindList().forEach(updateTaskRemind -> { - taskSubTimeService.updateRemind(currentUserId,updateTaskRemind); + try { + taskSubTimeService.saveRemind(currentUserId, updateTaskRemind); + } catch (Exception e) { + e.printStackTrace(); + } }); } //返回的任务详细信息 Long subTimeId = taskDeliverService.isTaskOrSubTime(taskDetail.getId()); - normalTask = getTaskInfoByTaskId(currentUserId,project.getId(),subTimeId); + normalTask = getTaskInfoByTaskId(currentUserId, project.getId(), subTimeId, null); } else { throw new BaseException(CodeEnum.NOT_POWER); } - }else { + } else { throw new BaseException(CodeEnum.NOT_POWER); } - }else { + } else { throw new BaseException(CodeEnum.NOT_TASK); } - robotService.changeTaskRobotSend(currentUserId,normalTask); + robotService.changeTaskRobotSend(currentUserId, normalTask); return normalTask; } - private void changeTime(ProTaskDetail taskDetail,Long beginTime,Long endTime,SysProject project){ - if((ObjectUtil.isNotNull(beginTime) && beginTime >= project.getEndTime()) || - (ObjectUtil.isNotNull(endTime) && endTime <= project.getBeginTime())){ + + private void changeTime(ProTaskDetail taskDetail, Long beginTime, Long endTime, SysProject project) { + if ((ObjectUtil.isNotNull(beginTime) && beginTime >= project.getEndTime()) || + (ObjectUtil.isNotNull(endTime) && endTime <= project.getBeginTime())) { throw new BaseException(CodeEnum.TIME_ERROR_PROJECT); } - if(taskDetail.getLevel() == 2){ + if (taskDetail.getLevel() == 2) { //组任务不能修改时间(组任务的时间是其子任务的最早和最晚的时间) - if(taskDetail.getHasGroup() == 1){ + if (taskDetail.getHasGroup() == 1) { throw new BaseException(CodeEnum.HAS_GROUP_TIME_CHANGE); - }else { + } else { if (ObjectUtil.isNotNull(beginTime)) { taskDetail.setBeginTime(beginTime); } @@ -1209,18 +1335,18 @@ public class ProTaskDetailService implements IProTaskDetailService { taskDetail.setEndTime(endTime); } } - }else if(taskDetail.getLevel() == 3){ + } else if (taskDetail.getLevel() == 3) { ProTaskDetail parentTask = taskDetailDao.selectByPrimaryKey(taskDetail.getParentId()); - if(parentTask.getHasGroup() == 1){ + if (parentTask.getHasGroup() == 1) { //查找组任务中的最早和最晚时间 Long bTime = null; Long eTime = null; ProTaskDetailExample detailExample = new ProTaskDetailExample(); detailExample.createCriteria().andParentIdEqualTo(parentTask.getId()); List groupTaskList = taskDetailDao.selectByExample(detailExample); - if(CollectionUtil.isNotEmpty(groupTaskList)){ - for (ProTaskDetail groupTask : groupTaskList){ - if(groupTask.getId().longValue() == taskDetail.getId().longValue()){ + if (CollectionUtil.isNotEmpty(groupTaskList)) { + for (ProTaskDetail groupTask : groupTaskList) { + if (groupTask.getId().longValue() == taskDetail.getId().longValue()) { if (ObjectUtil.isNotNull(beginTime)) { groupTask.setBeginTime(beginTime); taskDetail.setBeginTime(beginTime); @@ -1230,10 +1356,10 @@ public class ProTaskDetailService implements IProTaskDetailService { taskDetail.setEndTime(endTime); } } - if(ObjectUtil.isNull(bTime)){ + if (ObjectUtil.isNull(bTime)) { bTime = groupTask.getBeginTime(); } - if(ObjectUtil.isNull(eTime)){ + if (ObjectUtil.isNull(eTime)) { eTime = groupTask.getEndTime(); } bTime = bTime < groupTask.getBeginTime() ? bTime : groupTask.getBeginTime(); @@ -1241,7 +1367,7 @@ public class ProTaskDetailService implements IProTaskDetailService { } } //如果子任务最早最晚时间和父任务不同,则修改父任务时间 - if(ObjectUtil.isNotNull(bTime) && ObjectUtil.isNotNull(eTime)) { + if (ObjectUtil.isNotNull(bTime) && ObjectUtil.isNotNull(eTime)) { if (bTime != parentTask.getBeginTime().longValue() || eTime != parentTask.getEndTime().longValue()) { parentTask.setBeginTime(bTime); parentTask.setEndTime(eTime); @@ -1258,7 +1384,7 @@ public class ProTaskDetailService implements IProTaskDetailService { } } } - }else { + } else { if (ObjectUtil.isNotNull(beginTime)) { taskDetail.setBeginTime(beginTime); } @@ -1268,7 +1394,8 @@ public class ProTaskDetailService implements IProTaskDetailService { } } } - private void partTaskSubTime(ProTaskDetail taskDetail){ + + private void partTaskSubTime(ProTaskDetail taskDetail) { //cycle为空或者组任务,只加一条数据 if (StrUtil.isEmpty(taskDetail.getCycle()) || taskDetail.getHasGroup() == 1) { ProTaskSubTime proTaskSubTime = new ProTaskSubTime(); @@ -1301,13 +1428,13 @@ public class ProTaskDetailService implements IProTaskDetailService { TaskVo.TaskInfoWithFeign taskInfo = null; ProTaskDetail detail; ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(taskId); - if(ObjectUtil.isNull(subTime)){ + if (ObjectUtil.isNull(subTime)) { detail = taskDetailDao.selectByPrimaryKey(taskId); - }else { + } else { detail = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId()); } - if(ObjectUtil.isNotNull(detail)){ + if (ObjectUtil.isNotNull(detail)) { taskInfo = new TaskVo.TaskInfoWithFeign(); taskInfo.setId(detail.getId()); @@ -1315,7 +1442,7 @@ public class ProTaskDetailService implements IProTaskDetailService { taskInfo.setProjectId(detail.getProjectId()); SysProject project = sysProjectDao.selectByPrimaryKey(detail.getProjectId()); - if(ObjectUtil.isNotNull(project)){ + if (ObjectUtil.isNotNull(project)) { taskInfo.setProjectName(project.getName()); } } @@ -1326,9 +1453,9 @@ public class ProTaskDetailService implements IProTaskDetailService { public TaskVo.NormalTask updateTaskConfig(Long userId, TaskDto.UpdateTaskConfig updateTaskConfig) throws Exception { //检查任务是否存在 ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(updateTaskConfig.getTaskId()); - if(ObjectUtil.isNull(taskDetail)){ + if (ObjectUtil.isNull(taskDetail)) { ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(updateTaskConfig.getTaskId()); - if(ObjectUtil.isNull(taskSubTime)) { + if (ObjectUtil.isNull(taskSubTime)) { throw new BaseException(CodeEnum.NOT_TASK); } taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTime.getTaskDetailId()); @@ -1337,20 +1464,46 @@ public class ProTaskDetailService implements IProTaskDetailService { ProTaskShowExample taskShowExample = new ProTaskShowExample(); taskShowExample.createCriteria().andTaskDetailIdEqualTo(taskDetail.getId()); List proTaskShowList = proTaskShowDao.selectByExample(taskShowExample); - if(CollectionUtil.isEmpty(proTaskShowList)){ + if (CollectionUtil.isEmpty(proTaskShowList)) { //没有则新建配置信息 ProTaskShow proTaskShow = new ProTaskShow(); - BeanUtil.copyProperties(updateTaskConfig,proTaskShow); + BeanUtil.copyProperties(updateTaskConfig, proTaskShow); proTaskShow.setId(snowflake.nextId()); proTaskShow.setProjectId(taskDetail.getProjectId()); proTaskShow.setTaskDetailId(taskDetail.getId()); proTaskShowDao.insertSelective(proTaskShow); - }else { + } else { //有则修改 ProTaskShow proTaskShow = proTaskShowList.get(0); - BeanUtil.copyProperties(updateTaskConfig,proTaskShow); + BeanUtil.copyProperties(updateTaskConfig, proTaskShow); proTaskShowDao.updateByPrimaryKeySelective(proTaskShow); } - return getTaskInfoByTaskId(userId,taskDetail.getProjectId(),updateTaskConfig.getTaskId()); + return getTaskInfoByTaskId(userId, taskDetail.getProjectId(), updateTaskConfig.getTaskId(), null); + } + + @Override + public List queryAllTaskByProjectId(Long currentUserId, TaskDto.QueryAllTaskByProjectId projectIdDto) { + List taskList = new ArrayList<>(); + //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(), null,null,null); + if (CollectionUtil.isNotEmpty(secondTaskList)) { + secondTaskList.forEach(secondTask -> secondTask.setParentName(firstTaskDetail.getName())); + } + firstTask.setSecondTasks(secondTaskList); + taskList.add(firstTask); + }); + } + return taskList; } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java index 1acfc957..5e440c39 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java @@ -5,11 +5,13 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.MemberRoleDto; import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.LabelVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.persist.dao.*; +import com.ccsens.tall.persist.mapper.SysImitationMapper; import com.ccsens.util.CodeEnum; import com.ccsens.util.DateUtil; import com.ccsens.util.WebConstant; @@ -40,6 +42,10 @@ public class ProjectService implements IProjectService { @Resource private ProRoleDao proRoleDao; @Resource + private ProMemberDao proMemberDao; + @Resource + private ProMemberRoleDao memberRoleDao; + @Resource private TaskDetailDao taskDetailDao; @Resource private TaskSubTimeDao taskSubTimeDao; @@ -63,6 +69,17 @@ public class ProjectService implements IProjectService { private IWpsService wpsService; @Resource private ProTaskShowDao proTaskShowDao; + @Resource + private SysImitationMapper imitationMapper; + @Resource + private UserAttentionDao userAttentionDao; + @Resource + private SysUserDao sysUserDao; + @Resource + private SysAuthDao sysAuthDao; + @Resource + private SysProjectLabelDao sysProjectLabelDao; + @Override public void saveProject(SysProject sysProject) { @@ -127,14 +144,15 @@ public class ProjectService implements IProjectService { Calendar max = Calendar.getInstance(); min.setTime(s); max.setTime(e); - Calendar curr = min; - while (curr.before(max)) { - for (String str : dateList) { - if (!sdf.format(min.getTime()).equalsIgnoreCase(str)) { - dateList.add(sdf.format(min.getTime())); - } + while (min.before(max)) { +// for (String str : dateList) { +// if (!sdf.format(min.getTime()).equalsIgnoreCase(str)) { + if(!dateList.contains(sdf.format(min.getTime()))) { + dateList.add(sdf.format(min.getTime())); } - curr.add(Calendar.DATE, 1); +// } +// } + min.add(Calendar.DATE, 1); } } @@ -156,6 +174,7 @@ public class ProjectService implements IProjectService { //查找此用户关注的项目 List projectInfoList = sysProjectDao.findProjectIdByUserId01(currentUserId, startMillisTime, endMillisTime,orderType,order); projectByProject(projectInfoList,currentUserId,token); + return projectInfoList; } private void projectByProject(List projectInfoList, Long currentUserId,String token){ @@ -201,6 +220,12 @@ public class ProjectService implements IProjectService { projectInfo.setProjectUnreadMsg(unreadMsg); //获取wps文件路径 projectInfo.setWpsFilePaths(wpsService.queryVisitUrls(projectInfo.getId(), (byte) 0,token, null)); + //子项目 + projectInfo.setSubProjectList(queryProjectInfoByParentId(currentUserId,projectInfo.getId(),token)); + //是否首页展示 + if(projectInfo.getParentId() == 0 || projectInfo.getParentId() == null){ + projectInfo.setHomePageShow((byte) 1); + } }); } } @@ -282,13 +307,41 @@ public class ProjectService implements IProjectService { /** * 通过项目id查询项目 - * * @param userId 用户id * @param projectId 项目id * @return 返回项目信息 */ @Override public ProjectVo.ProjectInfo getProjectInfoById(Long userId, Long projectId,String token) { + ProjectVo.ProjectInfo projectInfo = getProjectInfoByProjectId(userId,projectId,token); + projectInfo.setHomePageShow((byte) 1); + //TODO 查看项目下的子任务 + projectInfo.setSubProjectList(queryProjectInfoByParentId(userId,projectInfo.getId(),token)); + return projectInfo; + } + + /** + * 查看项目下的子项目信息 + */ + private List queryProjectInfoByParentId(Long userId,Long parentId,String token){ + List projectInfoList = new ArrayList<>(); + //查询改项目下的子项目 + SysProjectExample sysProjectExample = new SysProjectExample(); + sysProjectExample.createCriteria().andParentIdEqualTo(parentId); + List sysProjectList = sysProjectDao.selectByExample(sysProjectExample); + if(CollectionUtil.isNotEmpty(sysProjectList)){ + sysProjectList.forEach(project ->{ + ProjectVo.ProjectInfo projectInfo = getProjectInfoByProjectId(userId,project.getId(),token); + projectInfoList.add(projectInfo); + }); + } + return projectInfoList; + } + + /** + * 通过项目id查询项目信息 + */ + private ProjectVo.ProjectInfo getProjectInfoByProjectId(Long userId, Long projectId,String token){ SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); if(ObjectUtil.isNull(sysProject)){ throw new BaseException(CodeEnum.NOT_PROJECT); @@ -343,6 +396,7 @@ public class ProjectService implements IProjectService { return projectInfo; } + /** * 根据类型查项目 项目类型 0普通项目 1模板项目 2常驻项目 * @return 返回项目信息 @@ -494,10 +548,31 @@ public class ProjectService implements IProjectService { if (power > 1) { //删除项目下的所有信息 deleteProjectById(projectId); + //将此项目的所有子项目解绑 + SysProjectExample projectExample = new SysProjectExample(); + projectExample.createCriteria().andParentIdEqualTo(projectId); + List sysProjectList = sysProjectDao.selectByExample(projectExample); + if(CollectionUtil.isNotEmpty(sysProjectList)){ + sysProjectList.forEach(sysProject -> { + sysProject.setParentId(0L); + sysProjectDao.updateByPrimaryKeySelective(sysProject); + }); + } + //将此项目从父项目的角色中删除 + ProRoleExample proRoleExample = new ProRoleExample(); + proRoleExample.createCriteria().andProjectIdEqualTo(project.getParentId()).andRelevanceProjectIdEqualTo(project.getId()); + List roleList = proRoleDao.selectByExample(proRoleExample); + if(CollectionUtil.isNotEmpty(roleList)){ + roleList.forEach(role -> { + role.setRecStatus((byte) 2); + proRoleDao.updateByPrimaryKeySelective(role); + }); + } //修改项目状态 project.setRecStatus(WebConstant.REC_STATUS.Deleted.value); sysProjectDao.updateByPrimaryKeySelective(project); + } else { throw new BaseException(CodeEnum.NOT_POWER); } @@ -817,8 +892,9 @@ public class ProjectService implements IProjectService { if (power > 1) { if (StrUtil.isNotEmpty(projectInfoDto.getName())) { SysProjectExample projectExample = new SysProjectExample(); - projectExample.createCriteria().andNameEqualTo(projectInfoDto.getName()); + projectExample.createCriteria().andNameEqualTo(projectInfoDto.getName()).andIdNotEqualTo(project.getId()).andCreatorIdEqualTo(currentUserId); List projectList = sysProjectDao.selectByExample(projectExample); + log.info("重名的项目:{}",projectList); if (CollectionUtil.isNotEmpty(projectList)) { throw new BaseException(CodeEnum.REPEAT_PROJECT_NAME); } else { @@ -839,6 +915,17 @@ public class ProjectService implements IProjectService { if(ObjectUtil.isNotNull(projectInfoDto.getEndTime())){ project.setEndTime(projectInfoDto.getEndTime()); } + if(ObjectUtil.isNotNull(projectInfoDto.getParentId())){ + project.setParentId(projectInfoDto.getParentId()); + //将此项目添加为父项目的虚拟项目角色 + saveProjectVirtualRole(project,projectInfoDto.getParentId()); + } + if(ObjectUtil.isNotNull(projectInfoDto.getHomePageShow())){ + project.setHomePageShow(projectInfoDto.getHomePageShow()); + } + if(ObjectUtil.isNotNull(projectInfoDto.getHighlight())){ + project.setHighlight(projectInfoDto.getHighlight()); + } sysProjectDao.updateByPrimaryKeySelective(project); } else { throw new BaseException(CodeEnum.NOT_POWER); @@ -849,6 +936,42 @@ public class ProjectService implements IProjectService { } return getProjectInfoById(currentUserId, project.getId(),token); } + /** + * 将项目加到父项目的项目角色中 + */ + private void saveProjectVirtualRole(SysProject thisProject,Long projectParentId){ + //获取项目下的“普通成员”一级角色的id + Long parentId; + ProRoleExample proRoleExample = new ProRoleExample(); + proRoleExample.createCriteria().andProjectIdEqualTo(projectParentId).andNameEqualTo(WebConstant.ROLE_NAME.ProjectVirtualRole.value); + List memberRoleList = proRoleDao.selectByExample(proRoleExample); + if(CollectionUtil.isNotEmpty(memberRoleList)){ + parentId = memberRoleList.get(0).getId(); + }else { + //添加一个角色项目的一级角色 + ProRole firstRole = new ProRole(); + firstRole.setId(snowflake.nextId()); + firstRole.setProjectId(projectParentId); + firstRole.setName(WebConstant.ROLE_NAME.ProjectVirtualRole.value); + firstRole.setDescription(WebConstant.ROLE_NAME.ProjectVirtualRole.phase); + proRoleDao.insertSelective(firstRole); + parentId = firstRole.getId(); + } + //查找该项目是否已经是项目角色 + ProRoleExample roleExample = new ProRoleExample(); + roleExample.createCriteria().andProjectIdEqualTo(projectParentId) + .andRelevanceProjectIdEqualTo(thisProject.getId()).andParentIdEqualTo(parentId); + if (proRoleDao.countByExample(roleExample) == 0) { + //添加角色 + ProRole proRole = new ProRole(); + proRole.setId(snowflake.nextId()); + proRole.setName(thisProject.getName()); + proRole.setParentId(parentId); + proRole.setProjectId(projectParentId); + proRole.setRelevanceProjectId(thisProject.getId()); + proRoleDao.insertSelective(proRole); + } + } /** * 根据标签查找项目 @@ -912,4 +1035,194 @@ public class ProjectService implements IProjectService { } return getProjectInfoById(currentUserId,projectConfig.getProjectId(),token); } + + @Override + public void imitationRole(Long currentUserId, ProjectDto.ImitationRole imitationRole) { + log.info("用户:{}选择一个角色变身:{}",currentUserId,imitationRole); + //检查此项目是否开启变身功能且变身密码正确 + ProShowExample proShowExample = new ProShowExample(); + proShowExample.createCriteria().andProjectIdEqualTo(imitationRole.getProjectId()); + List proShowList = proShowDao.selectByExample(proShowExample); + if(CollectionUtil.isNotEmpty(proShowList)){ + if(proShowList.get(0).getShareChange() == 4){ + throw new BaseException(CodeEnum.PROJECT_IMITATION_NO); + } + if(!proShowList.get(0).getShareChangeCode().equalsIgnoreCase(imitationRole.getCode())){ + throw new BaseException(CodeEnum.PROJECT_IMITATION_CODE_ERROR); + } + } + //将该用户在此项目中以前的变身角色信息删除 + SysImitationExample sysImitationExample = new SysImitationExample(); + sysImitationExample.createCriteria().andProjectIdEqualTo(imitationRole.getProjectId()).andUserIdEqualTo(currentUserId); + List sysImitationList = imitationMapper.selectByExample(sysImitationExample); + if(CollectionUtil.isNotEmpty(sysImitationList)){ + sysImitationList.forEach(sysImitation -> { + sysImitation.setRecStatus((byte) 2); + imitationMapper.updateByPrimaryKeySelective(sysImitation); + }); + } + //新加一条变身信息 + SysImitation sysImitation = new SysImitation(); + sysImitation.setId(snowflake.nextId()); + sysImitation.setProjectId(imitationRole.getProjectId()); + sysImitation.setRoleId(imitationRole.getRoleId()); + sysImitation.setUserId(currentUserId); + imitationMapper.insertSelective(sysImitation); + } + + @Override + public ProjectVo.ProjectInfo createProject(Long currentUserId,ProjectDto.CreateProject createProject,String token) { + //查找当前账号的用户名和手机号 + String name = sysUserDao.selectByPrimaryKey(currentUserId).getNickname(); + String phone = null; + SysAuthExample sysAuthExample = new SysAuthExample(); + sysAuthExample.createCriteria().andUserIdEqualTo(currentUserId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + List sysAuthList = sysAuthDao.selectByExample(sysAuthExample); + if(CollectionUtil.isNotEmpty(sysAuthList)){ + phone = sysAuthList.get(0).getIdentifier(); + } + log.info("新建项目,操作用户id:{}",currentUserId); + //新建项目 + long beginTime = createProject.getBeginTime() == null ? System.currentTimeMillis() : createProject.getBeginTime(); + long endTime = createProject.getEndTime() == null ? beginTime + (3600 * 24 * 10 * 1000) : createProject.getEndTime(); + SysProject sysProject = new SysProject(); + sysProject.setId(snowflake.nextId()); + sysProject.setName(createProject.getName()); + sysProject.setDescription(createProject.getDescription()); + sysProject.setAddress(createProject.getAddress()); + sysProject.setBeginTime(beginTime); + sysProject.setEndTime(endTime); + sysProject.setCreatorId(currentUserId); + sysProject.setParentId(createProject.getParentId()); + Byte homePageShow = createProject.getHomePageShow(); + if(homePageShow == null){ + if(createProject.getParentId() != null){ + homePageShow = 0; + }else { + homePageShow = 1; + } + } + sysProject.setHomePageShow(homePageShow); + sysProject.setHighlight(createProject.getHighlight()); + sysProjectDao.insertSelective(sysProject); + //让当前用户关注项目 + UserAttention userAttention = new UserAttention(); + userAttention.setId(snowflake.nextId()); + userAttention.setUserId(currentUserId); + userAttention.setProjectId(sysProject.getId()); + userAttentionDao.insertSelective(userAttention); + //添加默认的角色(奖惩干系人、创建者、关注者、项目经理、和项目成员的一级角色) + //添加奖惩干系人角色(一级角色) + ProRole stakeholderRole = new ProRole(); + stakeholderRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.value); + stakeholderRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.phase); + stakeholderRole.setProjectId(sysProject.getId()); + stakeholderRole.setId(snowflake.nextId()); + proRoleService.saveProRole(stakeholderRole); + //添加奖惩干系人角色(二级角色) + ProRole stakeholderProRole = new ProRole(); + stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.phase); + stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.value); + stakeholderProRole.setParentId(stakeholderRole.getId()); + stakeholderProRole.setProjectId(sysProject.getId()); + stakeholderProRole.setId(snowflake.nextId()); + proRoleService.saveProRole(stakeholderProRole); + //添加创建者一级角色 + ProRole creator = new ProRole(); + creator.setName(WebConstant.ROLE_NAME.Creator.value); + creator.setDescription(WebConstant.ROLE_NAME.Creator.phase); + creator.setProjectId(sysProject.getId()); + creator.setId(snowflake.nextId()); + proRoleService.saveProRole(creator); + //添加创建者角色(二级角色) + ProRole creatorRole = new ProRole(); + creatorRole.setName(WebConstant.ROLE_NAME.Creator.phase); + creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.value); + creatorRole.setParentId(creator.getId()); + creatorRole.setProjectId(sysProject.getId()); + creatorRole.setId(snowflake.nextId()); + proRoleService.saveProRole(creatorRole); + + //添加关注者一级角色 + ProRole attention = new ProRole(); + attention.setName(WebConstant.ROLE_NAME.Attention.value); + attention.setDescription(WebConstant.ROLE_NAME.Attention.phase); + attention.setProjectId(sysProject.getId()); + attention.setId(snowflake.nextId()); + proRoleService.saveProRole(attention); + //添加关注者角色(二级角色) + ProRole attentionRole = new ProRole(); + attentionRole.setName(WebConstant.ROLE_NAME.Attention.phase); + attentionRole.setDescription(WebConstant.ROLE_NAME.Attention.value); + attentionRole.setParentId(attention.getId()); + attentionRole.setProjectId(sysProject.getId()); + attentionRole.setId(snowflake.nextId()); + proRoleService.saveProRole(attentionRole); + //添加项目经理一级角色 + ProRole pm = new ProRole(); + pm.setName(WebConstant.ROLE_NAME.PM.value); + pm.setDescription(WebConstant.ROLE_NAME.PM.phase); + pm.setProjectId(sysProject.getId()); + pm.setId(snowflake.nextId()); + proRoleService.saveProRole(pm); + //添加项目经理角色(二级角色) + ProRole pmRole = new ProRole(); + pmRole.setName(WebConstant.ROLE_NAME.PM.value); + pmRole.setParentId(pm.getId()); + pmRole.setProjectId(sysProject.getId()); + pmRole.setId(snowflake.nextId()); + proRoleService.saveProRole(pmRole); + //添加项目成员一级角色 + ProRole memberRole = new ProRole(); + memberRole.setName(WebConstant.ROLE_NAME.Member.value); + memberRole.setDescription(WebConstant.ROLE_NAME.Member.phase); + memberRole.setProjectId(sysProject.getId()); + memberRole.setId(snowflake.nextId()); + proRoleService.saveProRole(memberRole); + + //添加默认成员(当前用户) + ProMember proMember = new ProMember(); + proMember.setId(snowflake.nextId()); + proMember.setNickname(name); + proMember.setPhone(phone); + proMember.setUserId(currentUserId); + proMember.setProjectId(sysProject.getId()); + proMemberDao.insertSelective(proMember); + + //关联成员与项目经理 + ProMemberRole proMemberRole = new MemberRoleDto(); + proMemberRole.setId(snowflake.nextId()); + proMemberRole.setRoleId(pmRole.getId()); + proMemberRole.setMemberId(proMember.getId()); + memberRoleDao.insertSelective(proMemberRole); + //添加一个默认任务 + ProTaskDetail taskDetail = new ProTaskDetail(); + taskDetail.setId(snowflake.nextId()); + taskDetail.setProjectId(sysProject.getId()); + taskDetail.setName("一级任务"); + taskDetail.setBeginTime(sysProject.getBeginTime()); + taskDetail.setEndTime(sysProject.getEndTime()); + taskDetail.setExecutorRole(pmRole.getId()); + taskDetail.setCheckerRole(pmRole.getId()); + taskDetailDao.insertSelective(taskDetail); + //添加标签 + if(CollectionUtil.isNotEmpty(createProject.getLabelList())){ + createProject.getLabelList().forEach(labelId->{ + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + //添加项目和标签的关联信息 + SysProjectLabel sysProjectLabel = new SysProjectLabel(); + sysProjectLabel.setId(snowflake.nextId()); + sysProjectLabel.setProjectId(sysProject.getId()); + sysProjectLabel.setLabelId(labelId); + sysProjectLabelDao.insertSelective(sysProjectLabel); + }); + } + return getProjectInfoById(currentUserId,sysProject.getId(),token); + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/SysPluginService.java b/tall/src/main/java/com/ccsens/tall/service/SysPluginService.java index 717c5dc7..20482654 100644 --- a/tall/src/main/java/com/ccsens/tall/service/SysPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/SysPluginService.java @@ -1,7 +1,9 @@ package com.ccsens.tall.service; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; +import com.ccsens.tall.bean.dto.PluginDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.persist.dao.*; @@ -12,6 +14,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.ContextLoaderListener; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; @@ -29,6 +32,22 @@ public class SysPluginService implements ISysPluginService{ private ProPluginSigninDao pluginSigninDao; @Autowired private SigninFieldDao signinFieldDao; + @Resource + private Snowflake snowflake; + + /** + * 添加插件 + * @param saveSysPlugin + */ + @Override + public void saveSysPlugin(PluginDto.SaveSysPlugin saveSysPlugin) { + SysPlugin sysPlugin = new SysPlugin(); + sysPlugin.setId(snowflake.nextId()); + sysPlugin.setName(saveSysPlugin.getName()); + sysPlugin.setDescription(saveSysPlugin.getDescription()); + sysPlugin.setShowType(saveSysPlugin.getShowType()); + sysPluginDao.insertSelective(sysPlugin); + } @Override public List getPluginAll() { diff --git a/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java b/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java index 61771310..c399ecea 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java @@ -181,7 +181,7 @@ public class TaskDeliverService implements ITaskDeliverService { ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskDeliver.getTaskDetailId()); ProRole role = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); - Boolean isBelongRole = proMemberService.userIsBelongRole(currentUserId, role.getId()); + Boolean isBelongRole = proMemberService.userIsBelongRole(currentUserId, role.getId(),null); if (!role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase) && !isBelongRole){ throw new BaseException(CodeEnum.NOT_CHECKER); } @@ -258,7 +258,7 @@ public class TaskDeliverService implements ITaskDeliverService { } Long roleId; if (role.getName().equals(WebConstant.ROLE_NAME.AllMember.phase)) { - List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, taskDetail.getProjectId()); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, taskDetail.getProjectId(),null); roleId = roleList.get(0).getId(); } else { roleId = taskDetail.getExecutorRole(); @@ -308,6 +308,7 @@ public class TaskDeliverService implements ITaskDeliverService { business.setUserId(currentUserId); business.setFileName(fileInfo.getName()); business.setFilePath(fileInfo.getUrl()); + business.setRealFilePath(PropUtil.path + File.separator + fileInfo.getUrl()); business.setFileSize(file.length()); business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_READ); @@ -403,7 +404,7 @@ public class TaskDeliverService implements ITaskDeliverService { //获取此用户在这个项目中的角色 ProTaskDetail task = taskDetailDao.selectByPrimaryKey(deliver.getTaskDetailId()); - List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, task.getProjectId()); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, task.getProjectId(),null); if (ObjectUtil.isNotNull(deliver)) { deliverInfo.setDeliverId(deliver.getId()); @@ -460,7 +461,7 @@ public class TaskDeliverService implements ITaskDeliverService { } //添加上传人所属的角色 List dRoleList = new ArrayList<>(); - List uploaderRoleList = proMemberService.selectRolesByUserIdAndProjectId(filePath.getUploaderId(), task.getProjectId()); + List uploaderRoleList = proMemberService.selectRolesByUserIdAndProjectId(filePath.getUploaderId(), task.getProjectId(),null); if (CollectionUtil.isNotEmpty(uploaderRoleList)) { for (ProRole role : uploaderRoleList) { DeliverVo.DRole dRole = new DeliverVo.DRole(); @@ -484,6 +485,7 @@ public class TaskDeliverService implements ITaskDeliverService { checker.setCheckerName(role.getName()); checker.setRemark(postLogChecker.getRemark()); checker.setCheckerStatus(postLogChecker.getCheckStatus()); + checker.setScore(postLogChecker.getScore()); checkerList.add(checker); if (CollectionUtil.isNotEmpty(roleList)) { for (ProRole proRole : roleList) { @@ -534,39 +536,32 @@ public class TaskDeliverService implements ITaskDeliverService { throw new BaseException(CodeEnum.NOT_TASK); } ProRole proRole = proRoleDao.selectByPrimaryKey(task.getExecutorRole()); - List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, task.getProjectId()); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, task.getProjectId(),null); if (CollectionUtil.isNotEmpty(roleList)) { for (ProRole role : roleList) { -// ProTaskDeliverPostLogExample logExample = new ProTaskDeliverPostLogExample(); -// logExample.createCriteria().andDeliverIdEqualTo(checkDeliver.getDeliverId()).andTaskSubTimeIdEqualTo(subTimeId); -// logExample.setOrderByClause("time DESC"); -// List deliverPostLogList = deliverPostLogDao.selectByExample(logExample); -// if (CollectionUtil.isNotEmpty(deliverPostLogList)) { -// ProTaskDeliverPostLog postLog = deliverPostLogList.get(0); -// for (ProTaskDeliverPostLog postLog : deliverPostLogList) { - ProTaskDeliverPostLogCheckerExample checkerExample = new ProTaskDeliverPostLogCheckerExample(); - checkerExample.createCriteria().andDeliverPostLogIdEqualTo(deliverPostLog.getId()).andCheckerIdEqualTo(role.getId()); - List postLogCheckerList = postLogCheckerDao.selectByExample(checkerExample); - if (CollectionUtil.isNotEmpty(postLogCheckerList)) { - for (ProTaskDeliverPostLogChecker postLogChecker : postLogCheckerList) { - if (role.getId().longValue() == postLogChecker.getCheckerId().longValue()) { - postLogChecker.setRemark(checkDeliver.getText()); - if (checkDeliver.getCheckStatus()) { - postLogChecker.setCheckStatus(1); - } else { - postLogChecker.setCheckStatus(2); - returnTask(subTimeId); - } - postLogCheckerDao.updateByPrimaryKeySelective(postLogChecker); + + ProTaskDeliverPostLogCheckerExample checkerExample = new ProTaskDeliverPostLogCheckerExample(); + checkerExample.createCriteria().andDeliverPostLogIdEqualTo(deliverPostLog.getId()).andCheckerIdEqualTo(role.getId()); + List postLogCheckerList = postLogCheckerDao.selectByExample(checkerExample); + if (CollectionUtil.isNotEmpty(postLogCheckerList)) { + for (ProTaskDeliverPostLogChecker postLogChecker : postLogCheckerList) { + if (role.getId().longValue() == postLogChecker.getCheckerId().longValue()) { + postLogChecker.setRemark(checkDeliver.getText()); + if (checkDeliver.getCheckStatus()) { + postLogChecker.setCheckStatus(1); + postLogChecker.setScore(checkDeliver.getScore()); + } else { + postLogChecker.setCheckStatus(2); + postLogChecker.setScore(0); + returnTask(subTimeId); } + postLogCheckerDao.updateByPrimaryKeySelective(postLogChecker); } -// } + } userIdSet.add(deliverPostLog.getUserId().toString()); uploadUserId = deliverPostLog.getUserId(); checkRole = role; -// } } - } if (ObjectUtil.isNull(checkRole)) { throw new BaseException(CodeEnum.IS_NOT_CHECKER); 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 3c0a3d8f..b5596ba3 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java @@ -38,6 +38,8 @@ public class TaskPluginService implements ITaskPluginService{ @Resource private TaskPluginDao taskPluginDao; @Resource + private ProPluginConfigDao proPluginConfigDao; + @Resource private TaskDetailDao taskDetailDao; @Resource private TaskSubTimeDao taskSubTimeDao; @@ -48,6 +50,8 @@ public class TaskPluginService implements ITaskPluginService{ @Resource private ProRoleDao roleDao; @Resource + private ProMemberDao memberDao; + @Resource private IProMemberService proMemberService; @Resource private Snowflake snowflake; @@ -85,7 +89,7 @@ public class TaskPluginService implements ITaskPluginService{ List pluginList = new ArrayList<>(); //获取用户在此项目中的所有角色 ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskId); - List roleList = proMemberService.selectRolesByUserIdAndProjectId(userId,taskDetail.getProjectId()); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(userId,taskDetail.getProjectId(),null); List pluginVoList = sysPluginDao.getPluginByTask(taskId); if(CollectionUtil.isNotEmpty(pluginVoList)){ @@ -121,7 +125,6 @@ public class TaskPluginService implements ITaskPluginService{ return pluginList; } - /** * 添加评论 * @param addCommentPlugin 评论信息 @@ -347,28 +350,6 @@ public class TaskPluginService implements ITaskPluginService{ } }); } -// SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); -// if(ObjectUtil.isNull(sysProject)){ -// throw new BaseException(CodeEnum.NOT_PROJECT); -// } -// //获取本周和上周的时间 -// long thisWeekStartTime = DateUtil.beginOfWeek(new Date()).getTime(); -// long thisWeekEndTime = DateUtil.endOfWeek(new Date()).getTime(); -// long lastWeekStartTime = DateUtil.beginOfWeek(new Date(thisWeekStartTime - 1)).getTime(); -// long lastWeekEndTime = DateUtil.endOfWeek(new Date(thisWeekStartTime - 1)).getTime(); -// //查找上周任务 -// List lastWeekTask = taskSubTimeDao.queryMinutesTaskByTime(projectId,lastWeekStartTime,lastWeekEndTime); -// //查找本周任务 -// List thisWeekTask = taskSubTimeDao.queryMinutesTaskByTime(projectId,thisWeekStartTime,thisWeekEndTime); -// //生成excel写入的数据 -// List> minutes = writeMinutes(lastWeekTask,thisWeekTask,sysProject.getName()); - //写入WBS -// ResourceLoader resourceLoader = new DefaultResourceLoader(); -// InputStream is = resourceLoader.getResource("classpath:template/regularMeetingTemplate.xlsx").getInputStream(); -// XSSFWorkbook wb = new XSSFWorkbook(is); - -// PoiUtil.exportWB("会议记录", minutes, wb); -// PoiUtil.setImg(wb,"会议记录",logo,0,1,0,1); //生成文件 String name = "会议记录"+DateUtil.today() + ".xlsx"; @@ -388,6 +369,7 @@ public class TaskPluginService implements ITaskPluginService{ business.setUserId(currentUserId); business.setFileName(name); business.setFilePath(fileName); + business.setRealFilePath(PropUtil.path + File.separator + fileName); business.setFileSize(tmpFile.length()); business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_QUERY); @@ -518,6 +500,7 @@ public class TaskPluginService implements ITaskPluginService{ business.setUserId(currentUserId); business.setFileName(name); business.setFilePath(fileName); + business.setRealFilePath(PropUtil.path + File.separator + fileName); business.setFileSize(tmpFile.length()); business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_QUERY); @@ -728,4 +711,110 @@ public class TaskPluginService implements ITaskPluginService{ }); } } + + + /** + * 修改插件配置 + * @param updatePluginConfig 插件配置 + * @return + */ + @Override + public TaskVo.PluginVo updatePluginConfig(PluginDto.UpdatePluginConfig updatePluginConfig) { + TaskVo.PluginVo pluginVo = new TaskVo.PluginVo(); + //获取任务详情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(); + SysPlugin sysPlugin = sysPluginDao.selectByPrimaryKey(sysPluginId); + if(ObjectUtil.isNotNull(sysPlugin)){ + pluginVo.setId(sysPlugin.getId().toString()); + pluginVo.setName(sysPlugin.getName()); + pluginVo.setDescription(sysPlugin.getDescription()); + pluginVo.setShowType(sysPlugin.getShowType().toString()); + } + } + //查找原来的插件配置 + 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); + } + pluginVo.setWebPath(pluginConfig.getWebPath()); + pluginVo.setImportParam(pluginConfig.getImportParam()); + pluginVo.setRoutineLocation(pluginConfig.getRoutineLocation()); + } 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); + pluginVo.setWebPath(proPluginConfig.getWebPath()); + pluginVo.setImportParam(proPluginConfig.getImportParam()); + pluginVo.setRoutineLocation(proPluginConfig.getRoutineLocation()); + } + return pluginVo; + } + + /** + * (特殊处理插件)个人任务汇报插件 + * 当没有入参的时候默认查询管理者wbs项目理的所有的成员和项目 + */ + @Override + public PluginVo.PersonalTaskReport getPersonalTaskReport(Long projectId){ + PluginVo.PersonalTaskReport personalTaskReport = new PluginVo.PersonalTaskReport(); + + SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); + if(ObjectUtil.isNotNull(sysProject) && ObjectUtil.isNotNull(sysProject.getParentId()) && sysProject.getParentId() != 0){ + //查找该项目(周会项目)的父项目的成员 + List reportMemberList = memberDao.queryMemberByProjectId(sysProject.getParentId()); + if(CollectionUtil.isNotEmpty(reportMemberList)){ + personalTaskReport.setMemberList(reportMemberList); + } + //查找父项目下的所有子项目除去当前项目 + List reportProjectList = sysProjectDao.queryProjectByParentIdAndNotOwn(sysProject.getParentId(),sysProject.getId()); + if(CollectionUtil.isNotEmpty(reportProjectList)){ + personalTaskReport.setProjectList(reportProjectList); + } + } + //添加一个默认话术“本周的第X个工作计划是XXX,重点是XXX” + personalTaskReport.setVerbalTrick("本周的第X个工作计划是XXX,重点是XXX"); + return personalTaskReport; + } + } 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 e3a62cb3..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); + } + } /** @@ -107,7 +127,7 @@ public class TaskSubTimeService implements ITaskSubTimeService { } //该用户是否是任务的负责人 ProRole role = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); - Boolean isBelongRole = proMemberService.userIsBelongRole(currentUserId, role.getId()); + Boolean isBelongRole = proMemberService.userIsBelongRole(currentUserId, role.getId(),null); if (!role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase) && !isBelongRole) { log.info("此用户不是该任务的负责人:{}", role); throw new BaseException(CodeEnum.IS_NOT_EXECUTOR); @@ -193,7 +213,7 @@ public class TaskSubTimeService implements ITaskSubTimeService { //返回的任务详细信息 - TaskVo.NormalTask normalTask = taskDetailService.getTaskInfoByTaskId(currentUserId, taskDetail.getProjectId(), subTimeId.getId()); + TaskVo.NormalTask normalTask = taskDetailService.getTaskInfoByTaskId(currentUserId, taskDetail.getProjectId(), subTimeId.getId(),null); //用智能助手/ws/wx发送消息 robotService.finishTaskRobotSend(currentUserId, normalTask.getProjectId(), normalTask.getProjectName(), normalTask.getName(), normalTask.getExecutorRole(), completedStatus); @@ -462,7 +482,7 @@ public class TaskSubTimeService implements ITaskSubTimeService { TaskVo.NormalTask taskDetail = taskDetailDao.selectTaskByTaskId(subTimeId, detail.getId(), detail.getExecutorRole()); if (ObjectUtil.isNotNull(taskDetail)) { - taskDetailService.managePlugin(currentUserId, detail.getExecutorRole(), taskDetail); + taskDetailService.managePlugin(currentUserId, detail.getExecutorRole(), taskDetail,null); taskDetail.setRemindInfoList(remindInfoList); } //通过智能助手发送通知 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..f2979cf0 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); @@ -168,7 +190,7 @@ public class UserInfoService implements IUserInfoService{ selectUserInfo.setDayOfUseTall((int) ((now - selectUserInfo.getCreatedAt().getTime()) / 1000 / 3600 / 24)); } //获取标签信息 - selectUserInfo.setLabelList(sysLabelDao.selectLabelByUserId(currentUserId,null)); + selectUserInfo.setLabelList(sysLabelDao.selectLabelByUserId(currentUserId,null,null)); //获取空间使用信息 UserVo.Interspace interspace = sysUserDao.selectInterspace(currentUserId); selectUserInfo.setInterspace(interspace); diff --git a/tall/src/main/java/com/ccsens/tall/service/UserService.java b/tall/src/main/java/com/ccsens/tall/service/UserService.java index 4f357332..540bd4e2 100644 --- a/tall/src/main/java/com/ccsens/tall/service/UserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/UserService.java @@ -22,7 +22,6 @@ import com.ccsens.util.enterprisewx.vo.WeiXinVo; import com.ccsens.util.exception.BaseException; import com.ccsens.util.wx.WxGzhUtil; import com.ccsens.util.wx.WxXcxUtil; -import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomStringUtils; import org.springframework.stereotype.Service; @@ -36,6 +35,9 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * @author 逗 + */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) @@ -57,8 +59,6 @@ public class UserService implements IUserService { @Resource private RedisUtil redisUtil; @Resource - private SysWxDao sysWxDao; - @Resource private SysProjectDao sysProjectDao; @Resource private UserAttentionDao userAttentionDao; @@ -307,15 +307,6 @@ public class UserService implements IUserService { return userSignVo; } -// public void __addSigninRecord(WebConstant.CLIENT_TYPE clientType, String clientIp, Long authId) { -// SigninLog siginLog = new SigninLog(); -// siginLog.setId(snowflake.nextId()); -// siginLog.setAuthId(authId); -// siginLog.setClient((byte) clientType.value); -// siginLog.setSigninIp(clientIp); -// siginLog.setSigninTime(DateUtil.date()); -// signinLogDao.insertSelective(siginLog); -// } /** * 手机号登陆 @@ -328,8 +319,8 @@ public class UserService implements IUserService { UserVo.UserSign userSignVo; if (isSmsCodeCorrect(phone, smsVerifyCode)) { //1.查找对应账户,不存在则注册 - List authList = null; - SysAuth theAuth = null; + List authList; + SysAuth theAuth; SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) .andIdentifierEqualTo(phone); @@ -348,9 +339,7 @@ public class UserService implements IUserService { return userSignVo; } -// private UserVo.UserSign emailLogin(String phone, String emailVerifyCode) { -// return null; -// } + /** * 账号登录 @@ -397,12 +386,12 @@ public class UserService implements IUserService { } - @Data - private static class WxEnterpriseParam { - private String suiteAccessToken; - private String userTicket; - private String redirect; - } +// @Data +// private static class WxEnterpriseParam { +// private String suiteAccessToken; +// private String userTicket; +// private String redirect; +// } /** @@ -498,11 +487,11 @@ public class UserService implements IUserService { /** * 获取企业微信信息,并绑定用户 - * @param identifyType - * @param userid - * @param corpId - * @param redirect - * @param user + * @param identifyType 登录类型 + * @param userid userId + * @param corpId corpId + * @param redirect redirect + * @param user 用户信息 */ private void getUserDetail(byte identifyType, String userid, String corpId, String redirect, SysUser user) { if (identifyType == WebConstant.IDENTIFY_TYPE.WxEnterprise.value && StrUtil.isNotBlank(redirect)) { @@ -649,7 +638,7 @@ public class UserService implements IUserService { throw new SmsException(SmsException.Error_SendTooFast); } - //2.生成随机验证码 默认1111,生产开启验证码则获取随机数 + String verifyCode = "1111"; if("1".equalsIgnoreCase(PropUtil.smsCode)){ verifyCode = RandomUtil.randomNumbers(4); @@ -1169,84 +1158,53 @@ public class UserService implements IUserService { public UserVo.TokenBean getUserInfoAndToken(WebConstant.CLIENT_TYPE clientType, WebConstant.IDENTIFY_TYPE identifyType,UserVo.UserSign userSignVo, Map theMap) { long start = System.currentTimeMillis(); UserVo.TokenBean tokenBean = userDao.getTokenBeanByUserId(userSignVo.getUserId()); + //如果只有手机号没有账号信息,则将手机号脱敏当成账号 + if (StrUtil.isEmpty(tokenBean.getAccount()) && StrUtil.isNotEmpty(tokenBean.getPhone())){ + String phoneNumber = tokenBean.getPhone().substring(0, 3) + "****" + tokenBean.getPhone().substring(7, tokenBean.getPhone().length()); + tokenBean.setAccount(phoneNumber); + } long end1 = System.currentTimeMillis(); log.info("查询用户信息用了:{}",end1 - start); UserVo.TokenBean tokenBean1 = generateToken(clientType, userSignVo.getUserId(), theMap); tokenBean.setToken(tokenBean1.getToken()); tokenBean.setRefresh_token(tokenBean1.getRefresh_token()); -// //获取手机号 -// String phone = getPhoneByRegisterType(userSignVo.getUserId(),identifyType); -// long end2 = System.currentTimeMillis(); -// log.info("查询手机号:{}",end2 - end1); -// //获取账号 -// String account = selectAccountByUserId(userSignVo.getUserId()); -// if(StrUtil.isEmpty(account)){ -// account = WebConstant.DEFAULT_NICKNAME; -// } -// long end3 = System.currentTimeMillis(); -// log.info("查询账号:{}",end3 - end2); -// //获取用户的基本信息、 -// UserVo.WxInfo wxInfo = null; -// SysUser user = userDao.selectByPrimaryKey(userSignVo.getUserId()); -// if (ObjectUtil.isNotNull(user)) { -// wxInfo = new UserVo.WxInfo(); -// BeanUtil.copyProperties(user, wxInfo); -// wxInfo.setSex(user.getGender()); -// wxInfo.setHeadImgUrl(user.getAvatarUrl()); -// } -// long end4 = System.currentTimeMillis(); -// log.info("查询信息:{}",end4 - end3); -// tokenBean.setId(userSignVo.getUserId()); -// tokenBean.setPhone(phone); -// tokenBean.setAccount(account); -// tokenBean.setWxInfo(wxInfo); - return tokenBean; - } - /** - * 通过userId查找账号 - * @param userId userId - * @return 账号 - */ - private String selectAccountByUserId(Long userId) { - String account = null; - SysAuthExample sysAuthExample = new SysAuthExample(); - sysAuthExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); - List authList = authDao.selectByExample(sysAuthExample); - if(CollectionUtil.isNotEmpty(authList)){ - account = authList.get(0).getIdentifier(); - } - return account; + return tokenBean; } - private String getPhoneByRegisterType(Long userId, WebConstant.IDENTIFY_TYPE identifyType) { - SysAuthExample authExample = new SysAuthExample(); - authExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); - List sysAuthList = authDao.selectByExample(authExample); - if (CollectionUtil.isNotEmpty(sysAuthList)) { - return sysAuthList.get(0).getIdentifier(); - } else { - SysAuthExample authExampleType = new SysAuthExample(); - authExampleType.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) identifyType.value); - List sysAuthList1 = authDao.selectByExample(authExampleType); - if (CollectionUtil.isNotEmpty(sysAuthList1)){ - if(sysAuthList1.get(0).getRegisterType() == 1){ - return "1"; - } - } - return null; - } - } +// /** +// * 通过userId查找账号 +// * @param userId userId +// * @return 账号 +// */ +// private String selectAccountByUserId(Long userId) { +// String account = null; +// SysAuthExample sysAuthExample = new SysAuthExample(); +// sysAuthExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); +// List authList = authDao.selectByExample(sysAuthExample); +// if(CollectionUtil.isNotEmpty(authList)){ +// account = authList.get(0).getIdentifier(); +// } +// return account; +// } // -// private SysWx getSysWx(String unionId) { -// SysWx sysWx = null; -// SysWxExample sysWxExample = new SysWxExample(); -// sysWxExample.createCriteria().andUnionIdEqualTo(unionId); -// List sysWxList = sysWxDao.selectByExample(sysWxExample); -// if (CollectionUtil.isNotEmpty(sysWxList)) { -// sysWx = sysWxList.get(0); +// private String getPhoneByRegisterType(Long userId, WebConstant.IDENTIFY_TYPE identifyType) { +// SysAuthExample authExample = new SysAuthExample(); +// authExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); +// List sysAuthList = authDao.selectByExample(authExample); +// if (CollectionUtil.isNotEmpty(sysAuthList)) { +// return sysAuthList.get(0).getIdentifier(); +// } else { +// SysAuthExample authExampleType = new SysAuthExample(); +// authExampleType.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) identifyType.value); +// List sysAuthList1 = authDao.selectByExample(authExampleType); +// if (CollectionUtil.isNotEmpty(sysAuthList1)){ +// if(sysAuthList1.get(0).getRegisterType() == 1){ +// return "1"; +// } +// } +// return null; // } -// return sysWx; // } /** @@ -1293,6 +1251,7 @@ public class UserService implements IUserService { oldUser.setRecStatus((byte) 2); userDao.updateByPrimaryKeySelective(oldUser); + } else { throw new BaseException(CodeEnum.PARAM_ERROR); } @@ -1304,8 +1263,25 @@ public class UserService implements IUserService { List authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { SysAuth auth = authList.get(0); - auth.setUserId(currentUserId); + //查找这个手机号以前的用户,并删除 + SysUser user = userDao.selectByPrimaryKey(auth.getUserId()); + user.setRecStatus((byte) 2); + userDao.updateByPrimaryKeySelective(user); + //删除这个手机号的认证方式 + auth.setRecStatus((byte) 2); authDao.updateByPrimaryKeySelective(auth); + //将当前的用户手机号改为新的手机号 + SysAuthExample sysAuthExample = new SysAuthExample(); + sysAuthExample.createCriteria().andUserIdEqualTo(currentUserId) + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + List sysAuthList = authDao.selectByExample(authExample); + if (CollectionUtil.isNotEmpty(sysAuthList)) { + SysAuth sysAuth = sysAuthList.get(0); + sysAuth.setIdentifier(wxPhone.getPhone()); + authDao.updateByPrimaryKeySelective(sysAuth); + } +// auth.setUserId(currentUserId); +// authDao.updateByPrimaryKeySelective(auth); } } @@ -1628,6 +1604,7 @@ public class UserService implements IUserService { //将两个数的和,存在redis内,key为新生成的id String imageCodeKey = WebConstant.IMAGE_CODE + id; redisUtil.set(imageCodeKey,codeMap.get("sum"),90); + log.info("将图形验证码存入redis:{}",imageCodeKey); String imageBase64 = "data:image/png;base64," + ImageCodeGeneratorUtil.generateCodeImage(null, (String) codeMap.get("imageCode"), 200, 70); UserVo.VerificationCode vertifyCode = new UserVo.VerificationCode(); diff --git a/tall/src/main/java/com/ccsens/tall/service/WeekMeetingService.java b/tall/src/main/java/com/ccsens/tall/service/WeekMeetingService.java new file mode 100644 index 00000000..72d89bb0 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/WeekMeetingService.java @@ -0,0 +1,374 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.WeekMeetingDto; +import com.ccsens.tall.bean.po.*; +import com.ccsens.tall.bean.vo.PluginVo; +import com.ccsens.tall.bean.vo.TaskVo; +import com.ccsens.tall.persist.dao.*; +import com.ccsens.tall.persist.mapper.ProPluginParameterMapper; +import com.ccsens.tall.util.TallConstant; +import com.ccsens.util.JacksonUtil; +import com.ccsens.util.PoiUtil; +import com.ccsens.util.PropUtil; +import com.ccsens.util.WebConstant; +import lombok.extern.slf4j.Slf4j; +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.IOException; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class WeekMeetingService implements IWeekMeetingService{ + @Resource + private SysProjectDao sysProjectDao; + @Resource + private TaskSubTimeDao taskSubTimeDao; + @Resource + private ProMemberDao proMemberDao; + @Resource + private SysDomainDao sysDomainDao; + @Resource + private SysPluginDao sysPluginDao; + @Resource + private ProPluginConfigDao proPluginConfigDao; + @Resource + private ITaskPluginService taskPluginService; + @Resource + private ProPluginParameterMapper parameterMapper; + + /** + * 查找周会要用到的项目 + * @param projectId 周会项目id + * @param userId userId + * @return 返回项目id和名字 + */ + @Override + public List queryWeekUserProject(Long projectId, Long userId) { + SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); + List reportProjectList = null; + if(ObjectUtil.isNotNull(sysProject)){ + reportProjectList = sysProjectDao.queryProjectByParentIdAndNotOwn(sysProject.getParentId(),sysProject.getId()); + } + //查找父项目下的所有子项目除去当前项目 + return reportProjectList; + } + + /** + * 查找项目本周任务 + * @param projectId 项目id + * @return 返回项目的本周任务 + */ + @Override + public List queryWeekTaskByProject(Long projectId) { + long thisWeekStartTime = DateUtil.beginOfWeek(new Date()).getTime(); + long thisWeekEndTime = DateUtil.endOfWeek(new Date()).getTime(); + + return taskSubTimeDao.queryMinutesTaskByTime(projectId,thisWeekStartTime,thisWeekEndTime); + } + + /** + * 查找个人本周任务 + * @param param 成员id和项目id + * @return 返回当前成员在这些项目中本周的任务 + */ + @Override + public List queryWeekTaskByMemberAndProject(WeekMeetingDto.WeekTaskByMemberAndProject param) throws IOException { + List taskList = new ArrayList<>(); + long thisWeekStartTime = DateUtil.beginOfWeek(new Date()).getTime(); + long thisWeekEndTime = DateUtil.endOfWeek(new Date()).getTime(); + ProMember member = proMemberDao.selectByPrimaryKey(param.getMemberId()); + if(ObjectUtil.isNotNull(member) && ObjectUtil.isNotNull(member.getUserId()) && member.getUserId() != 0){ + //查找关联的项目(通过插件的入参查找) + PluginVo.PersonalTaskReport taskReportByTaskId = getTaskReportByTaskId(param.getTaskId(), param.getProjectId()); + //查找每个项目 + if(CollectionUtil.isNotEmpty(taskReportByTaskId.getProjectList())){ + taskReportByTaskId.getProjectList().forEach(project ->{ + List taskMinutesWpsList = taskSubTimeDao.queryWeekTaskByMemberAndProject(project.getProjectId(),member.getUserId(),thisWeekStartTime,thisWeekEndTime); + if(CollectionUtil.isNotEmpty(taskMinutesWpsList)){ + taskList.addAll(taskMinutesWpsList); + } + }); + } + } + return taskList; + } + + @Override + public String getCcMinutes(Long userId, WeekMeetingDto.WeekMeetingMinutes param) throws IOException { + //根据域名查找公司logo + String logo = "/home/staticrec/logo.png"; + if(StrUtil.isNotEmpty(param.getDomainName())) { + SysDomainExample domainExample = new SysDomainExample(); + domainExample.createCriteria().andDomainNameEqualTo(param.getDomainName()); + List sysDomainList = sysDomainDao.selectByExample(domainExample); + if (CollectionUtil.isNotEmpty(sysDomainList)) { + logo = sysDomainList.get(0).getLogoPath(); + } + } + log.info("获取公司logo:{}",logo); + //获取本周的开始和结束时间 + long thisWeekStartTime = DateUtil.beginOfWeek(new Date()).getTime(); + long thisWeekEndTime = DateUtil.endOfWeek(new Date()).getTime(); + + //生成一个excel文件 + XSSFWorkbook workbook = new XSSFWorkbook(); + //获取周会用到的项目 + List projectList = queryWeekUserProject(param.getProjectId(), userId); + log.info("导出模板-获取周会用到的项目:{}",projectList); + //生成第一个sheet(项目汇报) + List> projectMinutes = writeProjectMinutes(projectList,thisWeekStartTime,thisWeekEndTime); + PoiUtil.exportWB("项目汇报", projectMinutes, workbook); + PoiUtil.setImg(workbook,"项目汇报", logo,0,1,0,1); + + //通过个人汇报的任务id查找插件的入参(汇报的成员和项目id) + PluginVo.PersonalTaskReport taskReport = getTaskReportByTaskId(param.getTaskId(),param.getProjectId()); + if(CollectionUtil.isNotEmpty(taskReport.getMemberList())){ + taskReport.getMemberList().forEach(reportMember -> { + //生成每个成员汇报的任务 + List> memberMinutes = writeMemberTaskMinutes(reportMember,taskReport.getProjectList(),thisWeekStartTime,thisWeekEndTime); + PoiUtil.exportWB(reportMember.getMemberName(), memberMinutes, workbook); + }); + } + + //生成文件 + String fileName = "minutes/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = PropUtil.path + fileName; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + OutputStream stream = new FileOutputStream(tmpFile); + workbook.write(stream); + stream.close(); + + return PropUtil.imgDomain + "/" + fileName; + } + + /** + * 查找插件相关的参数信息 + */ + @Override + public String getPluginParameter(Long userId, WeekMeetingDto.PluginParameter param) { + String parameter = null; + ProPluginParameterExample parameterExample = new ProPluginParameterExample(); + parameterExample.createCriteria().andSubTaskIdEqualTo(param.getSubTaskId()).andPluginIdEqualTo(param.getPluginId()) + .andMemberIdEqualTo(param.getMemberId()).andProjectIdEqualTo(param.getProjectId()); + List parameterList = parameterMapper.selectByExample(parameterExample); + if(CollectionUtil.isNotEmpty(parameterList)){ + parameter = parameterList.get(0).getParameter(); + } + return parameter; + } + + /** + * 生成个人汇报的任务 + * @param reportMember + * @param projectList + * @param thisWeekStartTime + * @param thisWeekEndTime + * @return + */ + private List> writeMemberTaskMinutes(PluginVo.ReportMember reportMember, List projectList, long thisWeekStartTime, long thisWeekEndTime) { + List> sheet = new ArrayList<>(); + //logo 和标题 + List headerTitle = new ArrayList<>(); + headerTitle.add(new PoiUtil.PoiUtilCell("个人任务汇报-"+reportMember.getMemberName(),7,1)); + sheet.add(headerTitle); + //任务表头 + List projectTitle = new ArrayList<>(); + projectTitle.add(new PoiUtil.PoiUtilCell("项目名",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("任务名",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("计划开始时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("计划结束时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("实际开始时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("实际结束时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("负责人",1,1)); + sheet.add(projectTitle); + if(CollectionUtil.isNotEmpty(projectList)){ + projectList.forEach(project ->{ + SysProject sysProject = sysProjectDao.selectByPrimaryKey(project.getProjectId()); + if(ObjectUtil.isNotNull(sysProject)){ + //查找成员在这个项目内的任务 + List taskMinutesWpsList = new ArrayList<>(); + ProMember member = proMemberDao.selectByPrimaryKey(reportMember.getMemberId()); + if(ObjectUtil.isNotNull(member) && ObjectUtil.isNotNull(member.getUserId()) && member.getUserId() != 0) { + taskMinutesWpsList = taskSubTimeDao.queryWeekTaskByMemberAndProject(sysProject.getId(), member.getUserId(), thisWeekStartTime, thisWeekEndTime); + } + + if(CollectionUtil.isNotEmpty(taskMinutesWpsList)){ + int i = 0; + for (TaskVo.TaskMinutesWps weekTask : taskMinutesWpsList) { + List lastWeekValue = new ArrayList<>(); + if(i == 0){ + lastWeekValue.add(new PoiUtil.PoiUtilCell(project.getProjectName(),1,taskMinutesWpsList.size())); + }else { + lastWeekValue.add(new PoiUtil.PoiUtilCell()); + } + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getTaskName())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getBeginTime())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getEndTime())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getRealBeginTime())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getRealEndTime())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getExecutorRoleName())); + sheet.add(lastWeekValue); + i++; + } + } + } + }); + } + return sheet; + } + + /** + * 查找个人会报任务里的成员和项目 + * @param taskId + * @param projectId + * @return + */ + private PluginVo.PersonalTaskReport getTaskReportByTaskId(Long taskId,Long projectId) throws IOException { + PluginVo.PersonalTaskReport personalTaskReport = new PluginVo.PersonalTaskReport(); + //插件入参 + String importParam = null; + if(ObjectUtil.isNotNull(taskId)) { + //获取任务详情id + Long taskDetailId = taskId; + ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(taskId); + if (ObjectUtil.isNotNull(proTaskSubTime)) { + taskDetailId = proTaskSubTime.getTaskDetailId(); + } + //查找“个人汇报”插件 + long pluginId = 0; + SysPluginExample sysPluginExample = new SysPluginExample(); + sysPluginExample.createCriteria().andNameEqualTo(TallConstant.PERSONAL_TASK_REPORT); + List sysPluginList = sysPluginDao.selectByExample(sysPluginExample); + if (CollectionUtil.isNotEmpty(sysPluginList)) { + pluginId = sysPluginList.get(0).getId(); + } + + ProPluginConfigExample proPluginConfigExample = new ProPluginConfigExample(); + proPluginConfigExample.createCriteria().andTaskIdEqualTo(taskDetailId).andPluginIdEqualTo(pluginId); + List pluginConfigList = proPluginConfigDao.selectByExample(proPluginConfigExample); + if (CollectionUtil.isNotEmpty(pluginConfigList)) { + importParam = pluginConfigList.get(0).getImportParam(); + } + } + if(StrUtil.isNotEmpty(importParam)){ + personalTaskReport = JacksonUtil.jsonToBean(importParam,PluginVo.PersonalTaskReport.class); + }else { + taskPluginService.getPersonalTaskReport(projectId); + } + return personalTaskReport; + } + + /** + * 生成项目汇报的数据 + * @param projectList 项目列表 + * @return 返回写入的数据 + */ + private List> writeProjectMinutes(List projectList,long thisWeekStartTime,long thisWeekEndTime) { + List> sheet = new ArrayList<>(); + //logo 和标题 + List headerTitle = new ArrayList<>(); + headerTitle.add(new PoiUtil.PoiUtilCell("",1,1,1650,18)); + headerTitle.add(new PoiUtil.PoiUtilCell("项目汇报",7,1)); + sheet.add(headerTitle); + //会议时间和主持人 + List header1 = new ArrayList<>(); + header1.add(new PoiUtil.PoiUtilCell("会议时间")); + header1.add(new PoiUtil.PoiUtilCell("",3,1)); + header1.add(new PoiUtil.PoiUtilCell()); + header1.add(new PoiUtil.PoiUtilCell()); + header1.add(new PoiUtil.PoiUtilCell("主持人")); + header1.add(new PoiUtil.PoiUtilCell("",3,1)); + sheet.add(header1); + //参会人员 + List header2 = new ArrayList<>(); + header2.add(new PoiUtil.PoiUtilCell("参会人员",1,1)); + header2.add(new PoiUtil.PoiUtilCell("",7,1)); + sheet.add(header2); + //主题议题 + List header3 = new ArrayList<>(); + header3.add(new PoiUtil.PoiUtilCell("主题议题",1,1)); + header3.add(new PoiUtil.PoiUtilCell("",7,1)); + sheet.add(header3); + //再空一行 + List header4 = new ArrayList<>(); + header4.add(new PoiUtil.PoiUtilCell("",8,1)); + sheet.add(header4); +// //会议记录内容 +// List minutesValue = new ArrayList<>(); +// minutesValue.add(new PoiUtil.PoiUtilCell("会议记录内容",8,1)); +// sheet.add(minutesValue); + //任务表头 + List projectTitle = new ArrayList<>(); + projectTitle.add(new PoiUtil.PoiUtilCell("项目名",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("任务名",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("计划开始时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("计划结束时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("实际开始时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("实际结束时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("负责人",1,1)); + sheet.add(projectTitle); + if(CollectionUtil.isNotEmpty(projectList)){ + projectList.forEach(project ->{ + SysProject sysProject = sysProjectDao.selectByPrimaryKey(project.getProjectId()); + if(ObjectUtil.isNotNull(sysProject)){ + List weekTaskList = taskSubTimeDao.queryMinutesTaskByTime(sysProject.getId(), thisWeekStartTime, thisWeekEndTime); + log.info("查找项目内的本周任务:{}",weekTaskList); + if(CollectionUtil.isNotEmpty(weekTaskList)){ + int i = 0; + for (TaskVo.TaskMinutesWps weekTask : weekTaskList) { + List lastWeekValue = new ArrayList<>(); + if(i == 0){ + lastWeekValue.add(new PoiUtil.PoiUtilCell(project.getProjectName(),1,weekTaskList.size())); + }else { + lastWeekValue.add(new PoiUtil.PoiUtilCell()); + } + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getTaskName())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getBeginTime())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getEndTime())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getRealBeginTime())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getRealEndTime())); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getExecutorRoleName())); + sheet.add(lastWeekValue); + i++; + } + } + } + }); + } + //会议记录人和领导签字 + List end = new ArrayList<>(); + end.add(new PoiUtil.PoiUtilCell("会议记录人",1,1)); + end.add(new PoiUtil.PoiUtilCell("",3,1)); + end.add(new PoiUtil.PoiUtilCell()); + end.add(new PoiUtil.PoiUtilCell()); + end.add(new PoiUtil.PoiUtilCell("负责人签字",1,1)); + end.add(new PoiUtil.PoiUtilCell("",3,1)); + sheet.add(end); + //备注留白 + List remark = new ArrayList<>(); + remark.add(new PoiUtil.PoiUtilCell("",8,8)); + sheet.add(remark); + return sheet; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/service/WpsService.java b/tall/src/main/java/com/ccsens/tall/service/WpsService.java index 56ee8acc..b063bdae 100644 --- a/tall/src/main/java/com/ccsens/tall/service/WpsService.java +++ b/tall/src/main/java/com/ccsens/tall/service/WpsService.java @@ -101,7 +101,7 @@ public class WpsService implements IWpsService { // 保存文件版本信息 WpsFile wpsFile = saveWpsFile(business.getWpsFileId() == null ? null : String.valueOf(business.getWpsFileId()), - business.getFileSize(), business.getUserId(), business.getFilePath(), + business.getFileSize(), business.getUserId(), business.getFilePath(),business.getRealFilePath(), business.getFileName()); // 更新文件记录 WpsFileVersion version = saveVersion(wpsFile); @@ -353,7 +353,7 @@ public class WpsService implements IWpsService { String filePath = WebConstant.UPLOAD_PATH_WPS + File.separator + path; String name = UploadFileUtil_Servlet3.getFileNameByPart(file); // 保存文件版本信息 - WpsFile wpsFile = saveWpsFile(fileId, file.getSize(), userId, filePath, name); + WpsFile wpsFile = saveWpsFile(fileId, file.getSize(), userId, filePath,PropUtil.path + File.separator + filePath, name); // 更新文件记录 WpsFileVersion version = saveVersion(wpsFile); // 调用接口,更新数据项目接口(异步调用) @@ -389,10 +389,11 @@ public class WpsService implements IWpsService { * @param fileSize 文件大小 * @param userId 用户id * @param filePath 文件位置,默认在:WebConstant.UPLOAD_PATH_BASE 下 + * @param realFilePath 文件真正路径 * @param name 文件名字 * @return wpsFile */ - private WpsFile saveWpsFile(String fileId, Long fileSize, Long userId, String filePath, String name) { + private WpsFile saveWpsFile(String fileId, Long fileSize, Long userId, String filePath,String realFilePath, String name) { WpsFile wpsFile; if (StrUtil.isEmpty(fileId)) { // 创建文件ID @@ -412,7 +413,7 @@ public class WpsService implements IWpsService { wpsFile.setName(name); wpsFile.setSize(fileSize); wpsFile.setDownloadUrl(PropUtil.domain + "file/download/" + name + "?path=" + filePath); - wpsFile.setSaveUrl(WebConstant.UPLOAD_PATH_BASE + File.separator + filePath); + wpsFile.setSaveUrl(realFilePath); wpsFile.setModifier(userId); if (StrUtil.isEmpty(fileId)) { diff --git a/tall/src/main/java/com/ccsens/tall/util/TallConstant.java b/tall/src/main/java/com/ccsens/tall/util/TallConstant.java index 2d0d8543..69c3815e 100644 --- a/tall/src/main/java/com/ccsens/tall/util/TallConstant.java +++ b/tall/src/main/java/com/ccsens/tall/util/TallConstant.java @@ -11,6 +11,8 @@ public class TallConstant { public static final String UPDATE_NICKNAME = "update_nickname_"; /*** redis key: 查找登陆用户 格式 identifier_login_identifyType 有效期一天*/ public static final String LOGIN = "_login_"; + /*** (需要特殊处理的插件)个人任务汇报插件*/ + public static final String PERSONAL_TASK_REPORT = "personal_task_report"; /***一天 */ public static final long LOGIN_TIME = 60 * 60 * 24; diff --git a/tall/src/main/java/com/ccsens/tall/util/TaskUtil.java b/tall/src/main/java/com/ccsens/tall/util/TaskUtil.java index db9e0673..c89b326e 100644 --- a/tall/src/main/java/com/ccsens/tall/util/TaskUtil.java +++ b/tall/src/main/java/com/ccsens/tall/util/TaskUtil.java @@ -38,7 +38,7 @@ public class TaskUtil { } public static Task splitTask(List taskDetails, long start, long end,Integer process) { - log.info("传入判断是否是全局:{}",taskDetails); +// log.info("传入判断是否是全局:{}",taskDetails); Task task = new Task(); List globalTask = new ArrayList<>(); List commonTask = new ArrayList<>(); @@ -53,6 +53,7 @@ public class TaskUtil { } //判断时间不明确的为全局任务(时间为空或跨天) for (TaskVo.NormalTask detail : taskDetails) { + log.info("传入判断是否是全局:{}",detail); if((process==1 && detail.getProcess()!=2) || (process==2 && detail.getProcess()==2)){ continue; } diff --git a/tall/src/main/java/com/ccsens/tall/web/DeliverController.java b/tall/src/main/java/com/ccsens/tall/web/DeliverController.java index a93f2fbd..eceabb0b 100644 --- a/tall/src/main/java/com/ccsens/tall/web/DeliverController.java +++ b/tall/src/main/java/com/ccsens/tall/web/DeliverController.java @@ -11,6 +11,7 @@ import com.ccsens.util.annotation.OperateType; import io.jsonwebtoken.Claims; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; @@ -111,7 +112,7 @@ public class DeliverController { }) @RequestMapping(value = "/check", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse checkDeliver(HttpServletRequest request, - @ApiParam @RequestBody DeliverDto.CheckDeliver checker) throws Exception { + @Validated @ApiParam @RequestBody DeliverDto.CheckDeliver checker) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); diff --git a/tall/src/main/java/com/ccsens/tall/web/FileController.java b/tall/src/main/java/com/ccsens/tall/web/FileController.java index c61ac494..581c467f 100644 --- a/tall/src/main/java/com/ccsens/tall/web/FileController.java +++ b/tall/src/main/java/com/ccsens/tall/web/FileController.java @@ -24,7 +24,11 @@ public class FileController { @ApiOperation(value = "文件下载") @GetMapping(value = "download/{fileName}") public void download(HttpServletResponse response, @PathVariable("fileName")String fileName, String path) throws Exception { - String parentPath = WebConstant.UPLOAD_PATH_BASE + File.separator + path; + String ch = "/"; + String parentPath = path; + if(!path.startsWith(ch)) { + parentPath = WebConstant.UPLOAD_PATH_BASE + File.separator + path; + } UploadFileUtil_Servlet3.download(response, parentPath, fileName); } diff --git a/tall/src/main/java/com/ccsens/tall/web/LabelController.java b/tall/src/main/java/com/ccsens/tall/web/LabelController.java index 5b6b95f1..3f161ba3 100644 --- a/tall/src/main/java/com/ccsens/tall/web/LabelController.java +++ b/tall/src/main/java/com/ccsens/tall/web/LabelController.java @@ -1,10 +1,7 @@ package com.ccsens.tall.web; import com.ccsens.tall.bean.dto.LabelDto; -import com.ccsens.tall.bean.dto.ProjectDto; -import com.ccsens.tall.bean.vo.DomainVo; import com.ccsens.tall.bean.vo.LabelVo; -import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.service.ILabelService; import com.ccsens.util.JsonResponse; import com.ccsens.util.WebConstant; @@ -29,12 +26,14 @@ public class LabelController { @ApiOperation(value = "搜索标签",notes = "") @ApiImplicitParams({ + @ApiImplicitParam(name = "type", value = "标签类型 0项目标签 1任务标签", required = true, paramType = "query"), }) @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse> selectLabel(HttpServletRequest request, - @RequestParam(required = false)String key) throws Exception { + @RequestParam(required = false)String key,Byte type) throws Exception { + type = type == null ? 0 : type; Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List selectLabelList = labelService.selectLabel(currentUserId,key); + List selectLabelList = labelService.selectLabel(currentUserId,key,type); return JsonResponse.newInstance().ok(selectLabelList); } @@ -93,4 +92,27 @@ public class LabelController { return JsonResponse.newInstance().ok(selectLabelList); } + + @ApiOperation(value = "给任务添加标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/task", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> taskAddLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.TaskLabel taskLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.taskAddLabel(currentUserId,taskLabel); + return JsonResponse.newInstance().ok(selectLabelList); + } + + @ApiOperation(value = "删除项目关联的标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/task/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> taskRemoveLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.TaskLabel taskLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.taskRemoveLabel(currentUserId,taskLabel); + return JsonResponse.newInstance().ok(selectLabelList); + } + } diff --git a/tall/src/main/java/com/ccsens/tall/web/MemberController.java b/tall/src/main/java/com/ccsens/tall/web/MemberController.java index c9cbcc8a..0c2890c6 100644 --- a/tall/src/main/java/com/ccsens/tall/web/MemberController.java +++ b/tall/src/main/java/com/ccsens/tall/web/MemberController.java @@ -79,4 +79,16 @@ public class MemberController { return JsonResponse.newInstance().ok(attentionInfo); } + @ApiOperation(value = "查找项目内的所有成员(不包含奖惩干系人)",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/query/all", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryMembersByProjectId(HttpServletRequest request, + @ApiParam @Validated @RequestBody ProjectDto.ProjectIdDto projectIdDto) { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List membersInfo = proMemberService.queryMembersByProjectId(projectIdDto.getProjectId()); + return JsonResponse.newInstance().ok(membersInfo); + } + + } 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..3d120009 100644 --- a/tall/src/main/java/com/ccsens/tall/web/PluginController.java +++ b/tall/src/main/java/com/ccsens/tall/web/PluginController.java @@ -1,7 +1,9 @@ package com.ccsens.tall.web; import com.ccsens.tall.bean.dto.PluginDto; +import com.ccsens.tall.bean.dto.WeekMeetingDto; import com.ccsens.tall.bean.vo.PluginVo; +import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.service.ISysPluginService; import com.ccsens.tall.service.ITaskPluginService; import com.ccsens.util.JsonResponse; @@ -9,13 +11,14 @@ import com.ccsens.util.WebConstant; import com.ccsens.util.annotation.OperateType; import io.jsonwebtoken.Claims; import io.swagger.annotations.*; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.List; - +@Slf4j @Api(tags = "插件相关", description = "") @RestController @RequestMapping("/plugins") @@ -25,6 +28,18 @@ public class PluginController { @Autowired private ISysPluginService sysPluginService; + @ApiOperation(value = "添加插件", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/save", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveSysPlugin(HttpServletRequest request, @ApiParam @Validated @RequestBody PluginDto.SaveSysPlugin saveSysPlugin) throws Exception { + log.info("添加一个插件:{}",saveSysPlugin); + sysPluginService.saveSysPlugin(saveSysPlugin); + return JsonResponse.newInstance().ok(); + } + + + @ApiOperation(value = "查询所有插件", notes = "按照优先级倒序+时间正序排序") @ApiImplicitParams({ }) @@ -181,4 +196,16 @@ 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(HttpServletRequest request, @ApiParam @Validated @RequestBody PluginDto.UpdatePluginConfig updatePluginConfig) throws Exception { + TaskVo.PluginVo pluginVo = taskPluginService.updatePluginConfig(updatePluginConfig); + return JsonResponse.newInstance().ok(pluginVo); + } + + } 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 5d315f5f..8ba3206c 100644 --- a/tall/src/main/java/com/ccsens/tall/web/ProjectController.java +++ b/tall/src/main/java/com/ccsens/tall/web/ProjectController.java @@ -1,7 +1,7 @@ package com.ccsens.tall.web; -import cn.hutool.core.util.ObjectUtil; import com.ccsens.tall.bean.dto.ProjectDto; +import com.ccsens.tall.bean.dto.TaskDto; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.service.IProMemberService; @@ -40,7 +40,7 @@ public class ProjectController { @Resource private IProTaskDetailService taskDetailService; - @ApiOperation(value = "获取日历上哪天有小红点",notes = "按照优先级倒序+时间正序排序") + @ApiOperation(value = "获取日历上哪天有小红点",notes = "") @ApiImplicitParams({ @ApiImplicitParam(name = "date", value = "日期(格式:yy-[MM]-[dd])", required = true, paramType = "query",dataType = "string",example = "2019-02-13") }) @@ -87,13 +87,15 @@ public class ProjectController { @ApiOperation(value = "根据项目id获取二级角色列表",notes = "PM,MVP,Mine,Others...") @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path") + @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"), + @ApiImplicitParam(name = "imitation", value = "是否是变身模式 0否 1是", required = true, paramType = "query") }) @RequestMapping(value = "/{id}/roles", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse> getRolesByProjectId(HttpServletRequest request, - @PathVariable("id") Long projectId) throws Exception { + @PathVariable("id") Long projectId, + @RequestParam(required = false) Integer imitation) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List roleInfoList = proRoleService.getRolesByProjectIdAndUserId(projectId, currentUserId); + List roleInfoList = proRoleService.getRolesByProjectIdAndUserId(projectId, currentUserId,imitation); return JsonResponse.newInstance().ok(roleInfoList); } @@ -109,6 +111,7 @@ public class ProjectController { return JsonResponse.newInstance().ok(membersByProjects); } + @ApiOperation(value = "根据角色id获取日程(任务列表 + 插件列表)",notes = "") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"), @@ -119,18 +122,13 @@ 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.GET, 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, - @RequestParam(required = true) Long roleId, Integer page, - Long startTime, Long endTime, Integer process,Integer priority) throws Exception{ - Integer pageSize = 10; - page = page == null ? 1 : page; - process = process == null ? 0 : process; - priority = priority == null ? 0 :priority; + @PathVariable("id") Long projectId, + @RequestBody TaskDto.QueryTaskInfoByRoleId taskInfoByRoleId) throws Exception{ Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - Object proTaskInfo = taskDetailService.getTasksByRoleId(currentUserId,projectId,roleId,startTime,endTime,process,page,pageSize,priority); + Object proTaskInfo = taskDetailService.getTasksByRoleId(currentUserId,projectId,taskInfoByRoleId); return JsonResponse.newInstance().ok(proTaskInfo); } @@ -155,9 +153,10 @@ public class ProjectController { @RequestMapping(value = "/{id}/tasks/{taskId}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse getTasksByTaskId(HttpServletRequest request, @PathVariable("id") Long projectId, - @PathVariable("taskId") Long taskId) throws Exception{ + @PathVariable("taskId") Long taskId, + @RequestParam(required = false) Integer imitation) throws Exception{ Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - TaskVo.NormalTask taskVo = taskDetailService.getTaskInfoByTaskId(currentUserId,projectId,taskId); + TaskVo.NormalTask taskVo = taskDetailService.getTaskInfoByTaskId(currentUserId,projectId,taskId,imitation); return JsonResponse.newInstance().ok(taskVo); } @@ -215,6 +214,18 @@ public class ProjectController { return JsonResponse.newInstance().ok(projectByKeyList); } + @ApiOperation(value = "新建项目", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/create", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse createProject(HttpServletRequest request,@RequestBody ProjectDto.CreateProject createProject) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + ProjectVo.ProjectInfo projectInfo = projectService.createProject(currentUserId,createProject,token); + return JsonResponse.newInstance().ok(projectInfo); + } + //============================================================== @@ -297,4 +308,15 @@ public class ProjectController { return JsonResponse.newInstance().ok(projectInfo); } + @ApiOperation(value = "变身", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/imitation", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse imitationRole(HttpServletRequest request, + @Validated @RequestBody ProjectDto.ImitationRole imitationRole) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + projectService.imitationRole(currentUserId,imitationRole); + return JsonResponse.newInstance().ok(); + } + } diff --git a/tall/src/main/java/com/ccsens/tall/web/RoleController.java b/tall/src/main/java/com/ccsens/tall/web/RoleController.java index 3cc31ce9..9fd4b27c 100644 --- a/tall/src/main/java/com/ccsens/tall/web/RoleController.java +++ b/tall/src/main/java/com/ccsens/tall/web/RoleController.java @@ -1,7 +1,10 @@ package com.ccsens.tall.web; +import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.RoleDto; +import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.RoleVo; +import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.service.IProRoleService; import com.ccsens.util.JsonResponse; import com.ccsens.util.WebConstant; @@ -12,6 +15,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; +import java.util.List; /** * @author 逗 @@ -26,13 +30,12 @@ public class RoleController { @ApiOperation(value = "删除角色",notes = "") @ApiImplicitParams({ - @ApiImplicitParam(name = "roleId", value = "角色Id", required = true, paramType = "query") }) - @RequestMapping(value = "/delete", method = RequestMethod.DELETE, produces = {"application/json;charset=UTF-8"}) + @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse deleteTask(HttpServletRequest request, - @RequestParam(required = false)Long roleId) throws Exception { + @ApiParam @Validated @RequestBody RoleDto.DeleteRole deleteRole) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - proRoleService.deleteRole(currentUserId,roleId); + proRoleService.deleteRole(currentUserId,deleteRole.getRoleId()); return JsonResponse.newInstance().ok(); } @@ -51,22 +54,22 @@ public class RoleController { @ApiImplicitParams({ }) @RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse updateRole(HttpServletRequest request, - @ApiParam @Validated @RequestBody RoleDto.UpdateRole updateRole) throws Exception { + public JsonResponse updateRole(HttpServletRequest request, + @ApiParam @Validated @RequestBody RoleDto.UpdateRole updateRole) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - proRoleService.updateRole(currentUserId,updateRole); - return JsonResponse.newInstance().ok(); + ProjectVo.RoleInfo roleInfo = proRoleService.updateRole(currentUserId,updateRole); + return JsonResponse.newInstance().ok(roleInfo); } @ApiOperation(value = "给角色添加成员",notes = "") @ApiImplicitParams({ }) @RequestMapping(value = "/saveMember", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse saveMemberByRole(HttpServletRequest request, + public JsonResponse saveMemberByRole(HttpServletRequest request, @ApiParam @Validated @RequestBody RoleDto.SaveMember saveMember) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - proRoleService.saveMemberByRole(currentUserId,saveMember); - return JsonResponse.newInstance().ok(); + ProjectVo.RoleInfo roleInfo = proRoleService.saveMemberByRole(currentUserId,saveMember); + return JsonResponse.newInstance().ok(roleInfo); } @ApiOperation(value = "删除角色下的成员",notes = "") @@ -80,15 +83,35 @@ public class RoleController { return JsonResponse.newInstance().ok(); } - @ApiOperation(value = "通过",notes = "") + @ApiOperation(value = "点击项目角色查询一级任务及里程碑",notes = "") @ApiImplicitParams({ }) - @RequestMapping(value = "/deleteMember", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse queryRoleByProjectId(HttpServletRequest request, - @RequestParam(required = true)Long projectId) throws Exception { + @RequestMapping(value = "/ProjectVirtualRole", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryByProjectVirtualRole(HttpServletRequest request, + @ApiParam @Validated @RequestBody RoleDto.ProjectId projectId) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - RoleVo.RoleByProjectId roleInfo = proRoleService.queryRoleByProjectId(projectId); - return JsonResponse.newInstance().ok(roleInfo); + List taskListByProjectIdList = proRoleService.queryByProjectVirtualRole(projectId); + return JsonResponse.newInstance().ok(taskListByProjectIdList); + } + + @ApiOperation(value = "修改用户可见角色展示",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/update/show", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateRoleShow(HttpServletRequest request,@ApiParam @Validated @RequestBody RoleDto.UpdateRoleShow roleShow) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + proRoleService.updateRoleShow(currentUserId,roleShow); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "查找项目内所有的二级角色(包括“全体成员”)",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/query/allRole", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryRoleByProject(HttpServletRequest request, @ApiParam @Validated @RequestBody ProjectDto.ProjectIdDto projectIdDto) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List roleByProjectIdList = proRoleService.queryRoleByProjectId(projectIdDto.getProjectId()); + return JsonResponse.newInstance().ok(roleByProjectIdList); } } 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/java/com/ccsens/tall/web/UserController.java b/tall/src/main/java/com/ccsens/tall/web/UserController.java index 8b1d24db..e5f91ce5 100644 --- a/tall/src/main/java/com/ccsens/tall/web/UserController.java +++ b/tall/src/main/java/com/ccsens/tall/web/UserController.java @@ -119,6 +119,7 @@ public class UserController { @ApiParam @RequestParam String phone, // @ApiParam Integer client, @RequestParam(required = true) String verificationCodeId, String verificationCodeValue) throws Exception { + log.info("发送验证码,手机号:{},图形验证码id:{},值:{}",phone,verificationCodeId,verificationCodeValue); UserVo.SmsCode smsCodeVo = userService.getSignInSmsCode(phone,verificationCodeId,verificationCodeValue); return JsonResponse.newInstance().ok(smsCodeVo); @@ -162,22 +163,22 @@ public class UserController { @ApiImplicitParams({ }) @RequestMapping(value = "/account", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse accounts(@ApiParam @RequestParam String account) throws Exception { + public JsonResponse accounts(@ApiParam @RequestParam String account) throws Exception { Boolean flag = userService.findAccount(account); return JsonResponse.newInstance().ok(flag); } -// @ApiOperation(value = "/检查手机号是否被注册", notes = "") -// @ApiImplicitParams({ -// }) -// @RequestMapping(value = "/phone", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) -// public JsonResponse findPhone(@ApiParam @RequestParam String phone) throws Exception { -// -// Boolean flag = userService.findPhone(phone); -// return JsonResponse.newInstance().ok(flag); -// } + @ApiOperation(value = "/检查手机号是否被注册", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/phone", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse findPhone(@ApiParam @RequestParam String phone) throws Exception { + + Boolean flag = userService.findPhone(phone); + return JsonResponse.newInstance().ok(flag); + } // @ApiOperation(value = "/修改账号信息",notes = "") // @ApiImplicitParams({ diff --git a/tall/src/main/java/com/ccsens/tall/web/UserInfoController.java b/tall/src/main/java/com/ccsens/tall/web/UserInfoController.java index 8dc223c4..8c3b46df 100644 --- a/tall/src/main/java/com/ccsens/tall/web/UserInfoController.java +++ b/tall/src/main/java/com/ccsens/tall/web/UserInfoController.java @@ -14,10 +14,7 @@ import io.jsonwebtoken.Claims; import io.swagger.annotations.*; import org.apache.commons.io.FileUtils; 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 org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -65,7 +62,7 @@ public class UserInfoController { }) @RequestMapping(value = "/avatarUrl", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse uploadAvatarUrl(HttpServletRequest request, - @ApiParam @Validated @RequestBody Part file) throws Exception { + @RequestParam(required = true) Part file) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); userInfoService.uploadAvatarUrl(currentUserId,file); diff --git a/tall/src/main/java/com/ccsens/tall/web/WeekMeetingController.java b/tall/src/main/java/com/ccsens/tall/web/WeekMeetingController.java new file mode 100644 index 00000000..b92b5a0d --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/WeekMeetingController.java @@ -0,0 +1,90 @@ +package com.ccsens.tall.web; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.tall.bean.dto.WeekMeetingDto; +import com.ccsens.tall.bean.vo.PluginVo; +import com.ccsens.tall.bean.vo.TaskVo; +import com.ccsens.tall.service.IWeekMeetingService; +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; +import java.io.IOException; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "周会相关" , description = "") +@RestController +@RequestMapping("/weekMeeting") +public class WeekMeetingController { + @Resource + private IWeekMeetingService weekMeetingService; + + @MustLogin + @ApiOperation(value = "获取周会用的项目(管理者项目的子项目内的除了周会的所有项目)",notes = "") + @RequestMapping(value = "/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryWeekUserProject(@ApiParam @Validated @RequestBody QueryDto param) { + log.info("获取周会用的项目:{}", param); + List projectInfoList = weekMeetingService.queryWeekUserProject(param.getParam().getProjectId(), param.getUserId()); + log.info("查询到的项目列表:{}", projectInfoList); + return JsonResponse.newInstance().ok(projectInfoList); + } + + @MustLogin + @ApiOperation(value = "查找项目本周的任务",notes = "获取未读消息数") + @RequestMapping(value = "/week/task", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryWeekTaskByProject(@ApiParam @Validated @RequestBody QueryDto param) { + log.info("查找项目本周的任务:{}", param); + //查找本周任务 + List thisWeekTask = weekMeetingService.queryWeekTaskByProject(param.getParam().getProjectId()); + log.info("项目本周的任务:{}", thisWeekTask); + return JsonResponse.newInstance().ok(thisWeekTask); + } + + @MustLogin + @ApiOperation(value = "根据成员和项目查找本周任务",notes = "获取未读消息数") + @RequestMapping(value = "/member/task", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryWeekTaskByMemberAndProject( + @ApiParam @Validated @RequestBody QueryDto param) throws IOException { + log.info("根据成员和项目查找本周任务:{}", param); + //查找本周任务 + List thisWeekTask = weekMeetingService.queryWeekTaskByMemberAndProject(param.getParam()); + log.info("根据成员和项目查找本周任务:{}", thisWeekTask); + return JsonResponse.newInstance().ok(thisWeekTask); + } + + + @MustLogin + @ApiOperation(value = "会议纪要表-传控模板", notes = "") + @RequestMapping(value = "/cc/minutes", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getCcMinutes(@ApiParam @Validated @RequestBody QueryDto param) throws IOException { + log.info("生成会议纪要表-传控模板:{}", param); + String path = weekMeetingService.getCcMinutes(param.getUserId(),param.getParam()); + log.info("返回会议纪要表-传控模板路径:{}", path); + return JsonResponse.newInstance().ok(path); + } + + + @MustLogin + @ApiOperation(value = "获取插件的相关数据(json)", notes = "") + @RequestMapping(value = "/get/parameter", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getPluginParameter(@ApiParam @Validated @RequestBody QueryDto param) throws IOException { + log.info("获取插件的相关数据:{}", param); + String parameter = weekMeetingService.getPluginParameter(param.getUserId(),param.getParam()); + log.info("获取插件的相关数据:{}", parameter); + return JsonResponse.newInstance().ok(parameter); + } + +} diff --git a/tall/src/main/resources/application-dev.yml b/tall/src/main/resources/application-dev.yml index 1a5926fe..ee0a41b5 100644 --- a/tall/src/main/resources/application-dev.yml +++ b/tall/src/main/resources/application-dev.yml @@ -11,7 +11,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: 81.70.54.64 + host: 192.168.0.99 password: 111111 port: 5672 username: admin @@ -36,5 +36,6 @@ smsCode: 0 wx: prefixUrl: https://test.tall.wiki/wxconfigurer-api/ file: + path: /home/cloud/tall/uploads/ domain: http://localhost:7030/v1.0/ imgDomain: http://localhost:7030/v1.0/uploads \ No newline at end of file diff --git a/tall/src/main/resources/application-prod.yml b/tall/src/main/resources/application-prod.yml index c966508c..6d3d0d97 100644 --- a/tall/src/main/resources/application-prod.yml +++ b/tall/src/main/resources/application-prod.yml @@ -4,8 +4,8 @@ server: context-path: /v1.0 spring: snowflake: - datacenterId: 2 - workerId: 2 + datacenterId: 1 + workerId: 1 application: name: tall datasource: @@ -24,7 +24,8 @@ spring: max-idle: 10 max-wait: -1ms min-idle: 0 - password: + password: '' +# password: port: 6379 timeout: 1000ms swagger: @@ -33,6 +34,7 @@ eureka: instance: # www.tall.wiki # ip-address: 140.143.228.3 +# ip-address: 81.70.54.64 ip-address: 192.144.182.42 gatewayUrl: https://www.tall.wiki/gateway/ @@ -41,5 +43,6 @@ smsCode: 1 wx: prefixUrl: https://www.tall.wiki/wxconfigurer-api/ file: + path: /home/cloud/tall/uploads/ domain: https://www.tall.wiki/gateway/tall/v1.0/ imgDomain: https://www.tall.wiki/gateway/tall/v1.0/uploads \ No newline at end of file diff --git a/tall/src/main/resources/application-test.yml b/tall/src/main/resources/application-test.yml index 9965c9c7..0d2c66c4 100644 --- a/tall/src/main/resources/application-test.yml +++ b/tall/src/main/resources/application-test.yml @@ -42,6 +42,7 @@ smsCode: 0 wx: prefixUrl: https://www.tall.wiki/wxconfigurer-api/ file: + path: /home/cloud/tall/uploads/ domain: https://test.tall.wiki/gateway/tall/v1.0/ imgDomain: https://test.tall.wiki/gateway/tall/v1.0/uploads diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index b2acd365..b5408a3a 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -2,3 +2,4 @@ spring: profiles: active: dev include: util-dev,common + diff --git a/tall/src/main/resources/mapper_dao/ProMemberDao.xml b/tall/src/main/resources/mapper_dao/ProMemberDao.xml index ac2771e7..5e2c6916 100644 --- a/tall/src/main/resources/mapper_dao/ProMemberDao.xml +++ b/tall/src/main/resources/mapper_dao/ProMemberDao.xml @@ -299,4 +299,38 @@ limit 1 + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/ProRoleDao.xml b/tall/src/main/resources/mapper_dao/ProRoleDao.xml index c2621faa..fbef8214 100644 --- a/tall/src/main/resources/mapper_dao/ProRoleDao.xml +++ b/tall/src/main/resources/mapper_dao/ProRoleDao.xml @@ -13,6 +13,9 @@ + + + @@ -55,7 +58,7 @@ + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysLabelDao.xml b/tall/src/main/resources/mapper_dao/SysLabelDao.xml index 27f92b6f..f76b54f5 100644 --- a/tall/src/main/resources/mapper_dao/SysLabelDao.xml +++ b/tall/src/main/resources/mapper_dao/SysLabelDao.xml @@ -3,11 +3,20 @@ + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysPluginDao.xml b/tall/src/main/resources/mapper_dao/SysPluginDao.xml index 404a50c7..c684094e 100644 --- a/tall/src/main/resources/mapper_dao/SysPluginDao.xml +++ b/tall/src/main/resources/mapper_dao/SysPluginDao.xml @@ -95,4 +95,20 @@ )t GROUP BY t.taskId,t.roleId + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysProjectDao.xml b/tall/src/main/resources/mapper_dao/SysProjectDao.xml index b271a3aa..f811ee10 100644 --- a/tall/src/main/resources/mapper_dao/SysProjectDao.xml +++ b/tall/src/main/resources/mapper_dao/SysProjectDao.xml @@ -18,6 +18,9 @@ + + + @@ -131,6 +134,9 @@ p.address AS pAddress, p.begin_time AS pBeginTime, p.end_time AS pEndTime, + p.home_page_show as homePageShow, + p.highlight as highlight, + p.parent_id as parentId, if(p.creator_id = #{userId},true,false) as pCreator, l.id as lId, l.name as lName, @@ -142,20 +148,16 @@ t_sys_project p LEFT JOIN t_sys_user_attention a ON a.project_id = p.id left join t_sys_project_label pl on pl.project_id = p.id - left join t_sys_label l on pl.label_id = l.id and - l.user_id = #{userId} + AND ( pl.rec_status = 0 OR pl.rec_status IS NULL ) + left join t_sys_label l on pl.label_id = l.id + AND ( l.rec_status = 0 OR l.rec_status IS NULL ) + and l.user_id = #{userId} WHERE a.user_id = #{userId} - AND - p.rec_status = 0 - and - a.rec_status = 0 - and - (l.rec_status = 0 or l.rec_status is null) - and - (pl.rec_status = 0 or pl.rec_status is null) - AND - p.template = 0 + and (p.parent_id = 0 or p.home_page_show = 1) + AND p.rec_status = 0 + and a.rec_status = 0 + AND p.template = 0 and @@ -190,6 +192,9 @@ p.address AS pAddress, p.begin_time AS pBeginTime, p.end_time AS pEndTime, + p.home_page_show as homePageShow, + p.highlight as highlight, + p.parent_id as parentId, if(p.creator_id = #{userId},true,false) as pCreator, l.id as lId, l.name as lName, @@ -551,4 +556,16 @@ group by FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d') + \ 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..323ed68f 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 @@ + @@ -59,8 +61,8 @@ resultMap="secondTask"> SELECT *, - GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, - GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, + GROUP_CONCAT(t.p_id ORDER BY t.spid) as pId, + GROUP_CONCAT(t.spName ORDER BY t.spid) as pName, GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM @@ -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 @@ -102,7 +105,7 @@ p.id IS NULL ) LEFT JOIN t_sys_plugin sp ON sp.id = p.plugin_id - left join t_pro_plugin_config c on d.id = c.task_id + left join t_pro_plugin_config c on d.id = c.task_id and c.plugin_id = 0 WHERE d.rec_status = 0 and @@ -144,8 +147,8 @@ resultMap="secondTask"> SELECT *, - GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, - GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, + GROUP_CONCAT(t.p_id ORDER BY t.spid) as pId, + GROUP_CONCAT(t.spName ORDER BY t.spid) as pName, GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM @@ -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 @@ -186,7 +190,7 @@ p.id IS NULL ) LEFT JOIN t_sys_plugin sp ON sp.id = p.plugin_id - left join t_pro_plugin_config c on d.id = c.task_id + left join t_pro_plugin_config c on d.id = c.task_id and c.plugin_id = 0 WHERE d.rec_status = 0 and @@ -218,8 +222,8 @@ resultMap="secondTask"> SELECT *, - GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, - GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, + GROUP_CONCAT(t.p_id ORDER BY t.spid) as pId, + GROUP_CONCAT(t.spName ORDER BY t.spid) as pName, GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM @@ -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 @@ -273,8 +278,8 @@ resultMap="secondTask"> SELECT *, - GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, - GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, + GROUP_CONCAT(t.p_id ORDER BY t.spid) as pId, + GROUP_CONCAT(t.spName ORDER BY t.spid) as pName, GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM @@ -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 @@ -355,8 +361,8 @@ + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/TaskSubTimeDao.xml b/tall/src/main/resources/mapper_dao/TaskSubTimeDao.xml index 1ad2a0f8..e2831abd 100644 --- a/tall/src/main/resources/mapper_dao/TaskSubTimeDao.xml +++ b/tall/src/main/resources/mapper_dao/TaskSubTimeDao.xml @@ -10,6 +10,10 @@ + + + + @@ -17,8 +21,9 @@ - + + @@ -182,16 +187,18 @@ s.id as taskSubTimeId, r.`name` as executorRoleName, d.`name` as taskName, - FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d %H:%m') as beginTime, - FROM_UNIXTIME(s.end_time/1000,'%Y-%m-%d %H:%m') as endTime, - if(s.real_begin_time = 0,'' ,FROM_UNIXTIME(s.real_begin_time/1000,'%Y-%m-%d %H:%m')) as realBeginTime, - if(s.real_end_time = 0,'' ,FROM_UNIXTIME(s.real_end_time/1000,'%Y-%m-%d %H:%m')) as realEndTime, + d.milestone as milestone, + FROM_UNIXTIME(s.begin_time/1000,'%m-%d %H:%m') as beginTime, + FROM_UNIXTIME(s.end_time/1000,'%m-%d %H:%m') as endTime, + if(s.real_begin_time = 0,'' ,FROM_UNIXTIME(s.real_begin_time/1000,'%m-%d %H:%m')) as realBeginTime, + if(s.real_end_time = 0,'' ,FROM_UNIXTIME(s.real_end_time/1000,'%m-%d %H:%m')) as realEndTime, t.commentId as commentId, t.userName as userName, t.commentValue as commentValue, td.`name` as deliverName, n.deliverPath as deliverPath, - td.id as deliverId + td.id as deliverId, + s.complated_status as process 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_role r on d.executor_role = r.id @@ -216,9 +223,12 @@ SELECT dl.id as deliverLogPostId, dl.task_sub_time_id as taskId, - cf.path as deliverPath + cf.path as deliverPath, + AVG(ch.score) FROM t_pro_task_deliver_post_log dl LEFT JOIN t_sys_commited_file cf on cf.id = dl.file_id + LEFT JOIN t_pro_task_deliver_post_log_checker ch on ch.deliver_post_log_id = dl.id + GROUP BY dl.id )n on s.id = n.taskId WHERE d.rec_status = 0 @@ -230,5 +240,73 @@ s.end_time > #{startTime} and d.level != 1 + group by d.id + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/WpsFileDao.xml b/tall/src/main/resources/mapper_dao/WpsFileDao.xml index 1ae71d7e..908ca8a1 100644 --- a/tall/src/main/resources/mapper_dao/WpsFileDao.xml +++ b/tall/src/main/resources/mapper_dao/WpsFileDao.xml @@ -92,5 +92,6 @@ AND p.business_type = #{businessType} AND p.rec_status = 0 AND f.rec_status = 0 + order by p.id DESC \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProPluginParameterMapper.xml b/tall/src/main/resources/mapper_raw/ProPluginParameterMapper.xml new file mode 100644 index 00000000..311c8da1 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProPluginParameterMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + 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, sub_task_id, member_id, project_id, plugin_id, parameter, created_at, updated_at, + rec_status + + + + + delete from t_pro_plugin_parameter + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_plugin_parameter + + + + + + insert into t_pro_plugin_parameter (id, sub_task_id, member_id, + project_id, plugin_id, parameter, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{subTaskId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, + #{projectId,jdbcType=BIGINT}, #{pluginId,jdbcType=BIGINT}, #{parameter,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_pro_plugin_parameter + + + id, + + + sub_task_id, + + + member_id, + + + project_id, + + + plugin_id, + + + parameter, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{subTaskId,jdbcType=BIGINT}, + + + #{memberId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{pluginId,jdbcType=BIGINT}, + + + #{parameter,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_plugin_parameter + + + id = #{record.id,jdbcType=BIGINT}, + + + sub_task_id = #{record.subTaskId,jdbcType=BIGINT}, + + + member_id = #{record.memberId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + plugin_id = #{record.pluginId,jdbcType=BIGINT}, + + + parameter = #{record.parameter,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_plugin_parameter + set id = #{record.id,jdbcType=BIGINT}, + sub_task_id = #{record.subTaskId,jdbcType=BIGINT}, + member_id = #{record.memberId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + plugin_id = #{record.pluginId,jdbcType=BIGINT}, + parameter = #{record.parameter,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_plugin_parameter + + + sub_task_id = #{subTaskId,jdbcType=BIGINT}, + + + member_id = #{memberId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + plugin_id = #{pluginId,jdbcType=BIGINT}, + + + parameter = #{parameter,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_plugin_parameter + set sub_task_id = #{subTaskId,jdbcType=BIGINT}, + member_id = #{memberId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + plugin_id = #{pluginId,jdbcType=BIGINT}, + parameter = #{parameter,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ 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/ProShowMapper.xml b/tall/src/main/resources/mapper_raw/ProShowMapper.xml index ec0d9933..7177adff 100644 --- a/tall/src/main/resources/mapper_raw/ProShowMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProShowMapper.xml @@ -8,15 +8,17 @@ - - - + + + + + @@ -77,8 +79,9 @@ - id, project_id, slide, filter, is_show_mvp, create_task, created_at, updated_at, - rec_status, time_show, duration, show_shortcuts, select_task_type, detail_path, pims_nav_type + id, project_id, slide, filter, is_show_mvp, create_task, time_show, duration, show_shortcuts, + select_task_type, detail_path, pims_nav_type, share_change, share_change_code, created_at, + updated_at, rec_status @@ -248,15 +263,6 @@ create_task = #{record.createTask,jdbcType=TINYINT}, - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - time_show = #{record.timeShow,jdbcType=VARCHAR}, @@ -275,6 +281,21 @@ pims_nav_type = #{record.pimsNavType,jdbcType=TINYINT}, + + share_change = #{record.shareChange,jdbcType=TINYINT}, + + + share_change_code = #{record.shareChangeCode,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + @@ -288,15 +309,17 @@ filter = #{record.filter,jdbcType=TINYINT}, is_show_mvp = #{record.isShowMvp,jdbcType=TINYINT}, create_task = #{record.createTask,jdbcType=TINYINT}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT}, time_show = #{record.timeShow,jdbcType=VARCHAR}, duration = #{record.duration,jdbcType=TINYINT}, show_shortcuts = #{record.showShortcuts,jdbcType=TINYINT}, select_task_type = #{record.selectTaskType,jdbcType=TINYINT}, detail_path = #{record.detailPath,jdbcType=VARCHAR}, - pims_nav_type = #{record.pimsNavType,jdbcType=TINYINT} + pims_nav_type = #{record.pimsNavType,jdbcType=TINYINT}, + share_change = #{record.shareChange,jdbcType=TINYINT}, + share_change_code = #{record.shareChangeCode,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} @@ -319,15 +342,6 @@ create_task = #{createTask,jdbcType=TINYINT}, - - created_at = #{createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{recStatus,jdbcType=TINYINT}, - time_show = #{timeShow,jdbcType=VARCHAR}, @@ -346,6 +360,21 @@ pims_nav_type = #{pimsNavType,jdbcType=TINYINT}, + + share_change = #{shareChange,jdbcType=TINYINT}, + + + share_change_code = #{shareChangeCode,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -356,15 +385,17 @@ filter = #{filter,jdbcType=TINYINT}, is_show_mvp = #{isShowMvp,jdbcType=TINYINT}, create_task = #{createTask,jdbcType=TINYINT}, - created_at = #{createdAt,jdbcType=TIMESTAMP}, - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT}, time_show = #{timeShow,jdbcType=VARCHAR}, duration = #{duration,jdbcType=TINYINT}, show_shortcuts = #{showShortcuts,jdbcType=TINYINT}, select_task_type = #{selectTaskType,jdbcType=TINYINT}, detail_path = #{detailPath,jdbcType=VARCHAR}, - pims_nav_type = #{pimsNavType,jdbcType=TINYINT} + pims_nav_type = #{pimsNavType,jdbcType=TINYINT}, + share_change = #{shareChange,jdbcType=TINYINT}, + share_change_code = #{shareChangeCode,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProTaskDeliverPostLogCheckerMapper.xml b/tall/src/main/resources/mapper_raw/ProTaskDeliverPostLogCheckerMapper.xml index cb2f12a7..fdb40fa1 100644 --- a/tall/src/main/resources/mapper_raw/ProTaskDeliverPostLogCheckerMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProTaskDeliverPostLogCheckerMapper.xml @@ -1,259 +1,276 @@ - - - - - - - - - - - - - - - - - - - - - - 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, deliver_post_log_id, checker_id, remark, check_status, created_at, updated_at, - rec_status - - - - - delete from t_pro_task_deliver_post_log_checker - where id = #{id,jdbcType=BIGINT} - - - delete from t_pro_task_deliver_post_log_checker - - - - - - insert into t_pro_task_deliver_post_log_checker (id, deliver_post_log_id, checker_id, - remark, check_status, created_at, - updated_at, rec_status) - values (#{id,jdbcType=BIGINT}, #{deliverPostLogId,jdbcType=BIGINT}, #{checkerId,jdbcType=BIGINT}, - #{remark,jdbcType=VARCHAR}, #{checkStatus,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, - #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) - - - insert into t_pro_task_deliver_post_log_checker - - - id, - - - deliver_post_log_id, - - - checker_id, - - - remark, - - - check_status, - - - created_at, - - - updated_at, - - - rec_status, - - - - - #{id,jdbcType=BIGINT}, - - - #{deliverPostLogId,jdbcType=BIGINT}, - - - #{checkerId,jdbcType=BIGINT}, - - - #{remark,jdbcType=VARCHAR}, - - - #{checkStatus,jdbcType=INTEGER}, - - - #{createdAt,jdbcType=TIMESTAMP}, - - - #{updatedAt,jdbcType=TIMESTAMP}, - - - #{recStatus,jdbcType=TINYINT}, - - - - - - update t_pro_task_deliver_post_log_checker - - - id = #{record.id,jdbcType=BIGINT}, - - - deliver_post_log_id = #{record.deliverPostLogId,jdbcType=BIGINT}, - - - checker_id = #{record.checkerId,jdbcType=BIGINT}, - - - remark = #{record.remark,jdbcType=VARCHAR}, - - - check_status = #{record.checkStatus,jdbcType=INTEGER}, - - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - - - - - - - - update t_pro_task_deliver_post_log_checker - set id = #{record.id,jdbcType=BIGINT}, - deliver_post_log_id = #{record.deliverPostLogId,jdbcType=BIGINT}, - checker_id = #{record.checkerId,jdbcType=BIGINT}, - remark = #{record.remark,jdbcType=VARCHAR}, - check_status = #{record.checkStatus,jdbcType=INTEGER}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} - - - - - - update t_pro_task_deliver_post_log_checker - - - deliver_post_log_id = #{deliverPostLogId,jdbcType=BIGINT}, - - - checker_id = #{checkerId,jdbcType=BIGINT}, - - - remark = #{remark,jdbcType=VARCHAR}, - - - check_status = #{checkStatus,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_task_deliver_post_log_checker - set deliver_post_log_id = #{deliverPostLogId,jdbcType=BIGINT}, - checker_id = #{checkerId,jdbcType=BIGINT}, - remark = #{remark,jdbcType=VARCHAR}, - check_status = #{checkStatus,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, deliver_post_log_id, checker_id, remark, check_status, score, created_at, updated_at, + rec_status + + + + + delete from t_pro_task_deliver_post_log_checker + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_task_deliver_post_log_checker + + + + + + insert into t_pro_task_deliver_post_log_checker (id, deliver_post_log_id, checker_id, + remark, check_status, score, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{deliverPostLogId,jdbcType=BIGINT}, #{checkerId,jdbcType=BIGINT}, + #{remark,jdbcType=VARCHAR}, #{checkStatus,jdbcType=INTEGER}, #{score,jdbcType=INTEGER}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_pro_task_deliver_post_log_checker + + + id, + + + deliver_post_log_id, + + + checker_id, + + + remark, + + + check_status, + + + score, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{deliverPostLogId,jdbcType=BIGINT}, + + + #{checkerId,jdbcType=BIGINT}, + + + #{remark,jdbcType=VARCHAR}, + + + #{checkStatus,jdbcType=INTEGER}, + + + #{score,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_task_deliver_post_log_checker + + + id = #{record.id,jdbcType=BIGINT}, + + + deliver_post_log_id = #{record.deliverPostLogId,jdbcType=BIGINT}, + + + checker_id = #{record.checkerId,jdbcType=BIGINT}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + check_status = #{record.checkStatus,jdbcType=INTEGER}, + + + score = #{record.score,jdbcType=INTEGER}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_task_deliver_post_log_checker + set id = #{record.id,jdbcType=BIGINT}, + deliver_post_log_id = #{record.deliverPostLogId,jdbcType=BIGINT}, + checker_id = #{record.checkerId,jdbcType=BIGINT}, + remark = #{record.remark,jdbcType=VARCHAR}, + check_status = #{record.checkStatus,jdbcType=INTEGER}, + score = #{record.score,jdbcType=INTEGER}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_task_deliver_post_log_checker + + + deliver_post_log_id = #{deliverPostLogId,jdbcType=BIGINT}, + + + checker_id = #{checkerId,jdbcType=BIGINT}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + check_status = #{checkStatus,jdbcType=INTEGER}, + + + score = #{score,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_task_deliver_post_log_checker + set deliver_post_log_id = #{deliverPostLogId,jdbcType=BIGINT}, + checker_id = #{checkerId,jdbcType=BIGINT}, + remark = #{remark,jdbcType=VARCHAR}, + check_status = #{checkStatus,jdbcType=INTEGER}, + score = #{score,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + 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/tall/src/main/resources/mapper_raw/ProTaskLabelMapper.xml b/tall/src/main/resources/mapper_raw/ProTaskLabelMapper.xml new file mode 100644 index 00000000..7dd42bf7 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProTaskLabelMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + 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, task_detail_id, label_id, created_at, updated_at, rec_status + + + + + delete from t_pro_task_label + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_task_label + + + + + + insert into t_pro_task_label (id, task_detail_id, label_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{taskDetailId,jdbcType=BIGINT}, #{labelId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_pro_task_label + + + id, + + + task_detail_id, + + + label_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{taskDetailId,jdbcType=BIGINT}, + + + #{labelId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_task_label + + + id = #{record.id,jdbcType=BIGINT}, + + + task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, + + + label_id = #{record.labelId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_task_label + set id = #{record.id,jdbcType=BIGINT}, + task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, + label_id = #{record.labelId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_task_label + + + task_detail_id = #{taskDetailId,jdbcType=BIGINT}, + + + label_id = #{labelId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_task_label + set task_detail_id = #{taskDetailId,jdbcType=BIGINT}, + label_id = #{labelId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProUserAttentionRoleMapper.xml b/tall/src/main/resources/mapper_raw/ProUserAttentionRoleMapper.xml new file mode 100644 index 00000000..e7e77714 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProUserAttentionRoleMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + 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, user_id, role_id, created_at, updated_at, rec_status + + + + + delete from t_pro_user_attention_role + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_user_attention_role + + + + + + insert into t_pro_user_attention_role (id, project_id, user_id, + role_id, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, + #{roleId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_pro_user_attention_role + + + id, + + + project_id, + + + user_id, + + + role_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_user_attention_role + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + role_id = #{record.roleId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_user_attention_role + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + role_id = #{record.roleId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_user_attention_role + + + project_id = #{projectId,jdbcType=BIGINT}, + + + user_id = #{userId,jdbcType=BIGINT}, + + + role_id = #{roleId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_user_attention_role + set project_id = #{projectId,jdbcType=BIGINT}, + user_id = #{userId,jdbcType=BIGINT}, + role_id = #{roleId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysImitationMapper.xml b/tall/src/main/resources/mapper_raw/SysImitationMapper.xml new file mode 100644 index 00000000..45299910 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysImitationMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + 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, user_id, project_id, role_id, created_at, updated_at, rec_status + + + + + delete from t_sys_imitation + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_imitation + + + + + + insert into t_sys_imitation (id, user_id, project_id, + role_id, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{roleId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_imitation + + + id, + + + user_id, + + + project_id, + + + role_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_imitation + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + role_id = #{record.roleId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_imitation + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + role_id = #{record.roleId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_imitation + + + user_id = #{userId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + role_id = #{roleId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_imitation + set user_id = #{userId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + role_id = #{roleId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysLabelMapper.xml b/tall/src/main/resources/mapper_raw/SysLabelMapper.xml index 9885577b..b8732f19 100644 --- a/tall/src/main/resources/mapper_raw/SysLabelMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysLabelMapper.xml @@ -12,6 +12,7 @@ + @@ -72,7 +73,8 @@ - id, name, code, color, description, level, user_id, created_at, updated_at, rec_status + id, name, code, color, description, level, user_id, created_at, updated_at, rec_status, + business_type @@ -220,6 +228,9 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + business_type = #{record.businessType,jdbcType=TINYINT}, + @@ -236,7 +247,8 @@ user_id = #{record.userId,jdbcType=BIGINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + business_type = #{record.businessType,jdbcType=TINYINT} @@ -271,6 +283,9 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + business_type = #{businessType,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -284,7 +299,8 @@ user_id = #{userId,jdbcType=BIGINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + business_type = #{businessType,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysLogMapper.xml b/tall/src/main/resources/mapper_raw/SysLogMapper.xml index a101e01f..a9b87760 100644 --- a/tall/src/main/resources/mapper_raw/SysLogMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysLogMapper.xml @@ -1,258 +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, url, method_desc, params, result, created_at, updated_at, rec_status - - - - - delete from t_sys_log - where id = #{id,jdbcType=BIGINT} - - - delete from t_sys_log - - - - - - insert into t_sys_log (id, url, method_desc, - params, result, created_at, - updated_at, rec_status) - values (#{id,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR}, #{methodDesc,jdbcType=VARCHAR}, - #{params,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, - #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) - - - insert into t_sys_log - - - id, - - - url, - - - method_desc, - - - params, - - - result, - - - created_at, - - - updated_at, - - - rec_status, - - - - - #{id,jdbcType=BIGINT}, - - - #{url,jdbcType=VARCHAR}, - - - #{methodDesc,jdbcType=VARCHAR}, - - - #{params,jdbcType=VARCHAR}, - - - #{result,jdbcType=VARCHAR}, - - - #{createdAt,jdbcType=TIMESTAMP}, - - - #{updatedAt,jdbcType=TIMESTAMP}, - - - #{recStatus,jdbcType=TINYINT}, - - - - - - update t_sys_log - - - id = #{record.id,jdbcType=BIGINT}, - - - url = #{record.url,jdbcType=VARCHAR}, - - - method_desc = #{record.methodDesc,jdbcType=VARCHAR}, - - - params = #{record.params,jdbcType=VARCHAR}, - - - result = #{record.result,jdbcType=VARCHAR}, - - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - - - - - - - - update t_sys_log - set id = #{record.id,jdbcType=BIGINT}, - url = #{record.url,jdbcType=VARCHAR}, - method_desc = #{record.methodDesc,jdbcType=VARCHAR}, - params = #{record.params,jdbcType=VARCHAR}, - result = #{record.result,jdbcType=VARCHAR}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} - - - - - - update t_sys_log - - - url = #{url,jdbcType=VARCHAR}, - - - method_desc = #{methodDesc,jdbcType=VARCHAR}, - - - params = #{params,jdbcType=VARCHAR}, - - - result = #{result,jdbcType=VARCHAR}, - - - created_at = #{createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{recStatus,jdbcType=TINYINT}, - - - where id = #{id,jdbcType=BIGINT} - - - update t_sys_log - set url = #{url,jdbcType=VARCHAR}, - method_desc = #{methodDesc,jdbcType=VARCHAR}, - params = #{params,jdbcType=VARCHAR}, - result = #{result,jdbcType=VARCHAR}, - 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, url, method_desc, params, result, created_at, updated_at, rec_status, facility, + user_id + + + + + delete from t_sys_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_log + + + + + + insert into t_sys_log (id, url, method_desc, + params, result, created_at, + updated_at, rec_status, facility, + user_id) + values (#{id,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR}, #{methodDesc,jdbcType=VARCHAR}, + #{params,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{facility,jdbcType=VARCHAR}, + #{userId,jdbcType=BIGINT}) + + + insert into t_sys_log + + + id, + + + url, + + + method_desc, + + + params, + + + result, + + + created_at, + + + updated_at, + + + rec_status, + + + facility, + + + user_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{url,jdbcType=VARCHAR}, + + + #{methodDesc,jdbcType=VARCHAR}, + + + #{params,jdbcType=VARCHAR}, + + + #{result,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{facility,jdbcType=VARCHAR}, + + + #{userId,jdbcType=BIGINT}, + + + + + + update t_sys_log + + + id = #{record.id,jdbcType=BIGINT}, + + + url = #{record.url,jdbcType=VARCHAR}, + + + method_desc = #{record.methodDesc,jdbcType=VARCHAR}, + + + params = #{record.params,jdbcType=VARCHAR}, + + + result = #{record.result,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + facility = #{record.facility,jdbcType=VARCHAR}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + + + + + + update t_sys_log + set id = #{record.id,jdbcType=BIGINT}, + url = #{record.url,jdbcType=VARCHAR}, + method_desc = #{record.methodDesc,jdbcType=VARCHAR}, + params = #{record.params,jdbcType=VARCHAR}, + result = #{record.result,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + facility = #{record.facility,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=BIGINT} + + + + + + update t_sys_log + + + url = #{url,jdbcType=VARCHAR}, + + + method_desc = #{methodDesc,jdbcType=VARCHAR}, + + + params = #{params,jdbcType=VARCHAR}, + + + result = #{result,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + facility = #{facility,jdbcType=VARCHAR}, + + + user_id = #{userId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_log + set url = #{url,jdbcType=VARCHAR}, + method_desc = #{methodDesc,jdbcType=VARCHAR}, + params = #{params,jdbcType=VARCHAR}, + result = #{result,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + facility = #{facility,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysProjectMapper.xml b/tall/src/main/resources/mapper_raw/SysProjectMapper.xml index e543673b..b8c39700 100644 --- a/tall/src/main/resources/mapper_raw/SysProjectMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysProjectMapper.xml @@ -16,6 +16,9 @@ + + + @@ -77,7 +80,8 @@ id, creator_id, parent_task_id, scene_id, name, description, begin_time, end_time, - address, published, template, created_at, updated_at, rec_status + address, published, template, created_at, updated_at, rec_status, parent_id, home_page_show, + highlight @@ -263,6 +287,15 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + home_page_show = #{record.homePageShow,jdbcType=TINYINT}, + + + highlight = #{record.highlight,jdbcType=TINYINT}, + @@ -283,7 +316,10 @@ template = #{record.template,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + home_page_show = #{record.homePageShow,jdbcType=TINYINT}, + highlight = #{record.highlight,jdbcType=TINYINT} @@ -330,6 +366,15 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + parent_id = #{parentId,jdbcType=BIGINT}, + + + home_page_show = #{homePageShow,jdbcType=TINYINT}, + + + highlight = #{highlight,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -347,7 +392,10 @@ template = #{template,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + parent_id = #{parentId,jdbcType=BIGINT}, + home_page_show = #{homePageShow,jdbcType=TINYINT}, + highlight = #{highlight,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/util/src/main/java/com/ccsens/util/CodeEnum.java b/util/src/main/java/com/ccsens/util/CodeEnum.java index 58a523a8..9d96e5ce 100644 --- a/util/src/main/java/com/ccsens/util/CodeEnum.java +++ b/util/src/main/java/com/ccsens/util/CodeEnum.java @@ -112,9 +112,11 @@ public enum CodeEnum { HEALTH_TYPE_ERROR(94,"您的健康状态异常,打卡失败。",true), NOT_HEALTH_RECORD(95,"您今天还未上报健康信息,请上报后再试。",true), SELECT_TIME_ERROR(96,"请输入正确的查询时间",true), + TASK_PREPARATION(97,"任务已经开始了,请勿重复操作",true), NOT_COMMENT(98,"该评论不存在",true), NOT_MESSAGE_TYPE(99,"找不到消息类型,请检查名称是否正确",true), + NOT_LABEL(100,"标签不存在,请检查后操作",true), REPEAT_LABEL(101,"标签已存在,请勿重复添加",true), @@ -150,9 +152,46 @@ public enum CodeEnum { PLAYER_INFO_ALREADY(127,"您已经有了报名信息,请不要重复提交", true), GAME_TIME_DUE(128,"您的游戏已到期,请重新购买", true), + TEAM_MEMBER_ERROR(129,"参赛人数不符合,请重新填写", true), + SIGN_UP_TIME_NOT_START(130,"报名未开始", true), + SIGN_UP_TIME_FINISHED(131,"报名已结束", true), + + PROJECT_IMITATION_NO(132,"该项目未开启变身系统", true), + PROJECT_IMITATION_CODE_ERROR(131,"秘钥错误", true), + + DINGDING_EXCEPTION(132,"钉钉接口调用异常。",true), + URL_ERROR(133, "请求路径转换异常", true), + + JOIN_PROJECT_NUM_FULL(134, "可参赛次数已满", true), + PHOTO_FILE_EXCEED_2M(135, "图片大小不能超过2M", true), + COACH_NUM_FULL(136,"教练人数已达上限",true), + LEADER_NUM_FULL(137,"领队人数已达上限",true), + AUTHORIZATION_AGREE(138,"请阅读并同意安全责任书",true), + NAME_EMPTY(139,"单位名称不能为空",true), + PHOTO_IS_EMPTY(140,"请上传证件照",true), + ID_CARD_ALREADY(141,"此身份证已注册",true), + NOT_COMPANY(142,"请先填写基础信息",true), + MT_NOT_GROUP(143,"请选择正确的组别信息",true), + CONTACTS_NAME_EMPTY(144,"联系人名称不能为空",true), + MEMBER_NUM_ERROR(145,"参赛人数不满足比赛人数要求",true), + GENDER_ERROR(146,"请选择正确的性别",true), ; + + public CodeEnum mtMsgPhoto(String msg){ + this.msg = "请上传"+msg; + return this; + } + + public CodeEnum mtProjectMsg(String msg){ + this.msg = msg+"项目参赛次数已满"; + return this; + } + public CodeEnum mtProjectMsg1(String msg){ + this.msg = msg+"报名人数已满"; + return this; + } public CodeEnum addMsg(String msg){ this.msg = msg+"行:"+this.msg; return this; diff --git a/util/src/main/java/com/ccsens/util/PdfUtil.java b/util/src/main/java/com/ccsens/util/PdfUtil.java index 63699f09..0116bb91 100644 --- a/util/src/main/java/com/ccsens/util/PdfUtil.java +++ b/util/src/main/java/com/ccsens/util/PdfUtil.java @@ -2,6 +2,7 @@ package com.ccsens.util; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; import com.itextpdf.text.*; import com.itextpdf.text.pdf.BaseFont; import com.itextpdf.text.pdf.PdfPCell; @@ -29,11 +30,12 @@ public class PdfUtil { * 生成pdf * @param parentPath * @param title + * @param subhead 副标题 * @param intros * @param content * @return */ - public static String credatePdf(String parentPath, String title, List intros, List content) { + public static String credatePdf(String parentPath, String title, String subhead, List intros, List content, Margin margin) { String fileName = "pdf/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".pdf"; log.info("pdf文件名:{}", fileName ); File file = new File(parentPath, fileName); @@ -43,21 +45,28 @@ public class PdfUtil { //新建文件 Document document = new Document(); try { - + document.setMargins(margin.left, margin.right, margin.top, margin.bottom); PdfWriter.getInstance(document, new FileOutputStream(file)); document.open(); - // 中文字体 BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); // 标题字体 - Font titleChinese = new Font(bfChinese, 18, Font.BOLD); + Font titleChinese = new Font(bfChinese, 24, Font.BOLD); //设置标题 Paragraph par = new Paragraph(title, titleChinese); par.setAlignment(Element.ALIGN_CENTER); document.add(par); + + if (StrUtil.isNotBlank(subhead)) { + // 标题字体 + Font subheadChinese = new Font(bfChinese, 22, Font.NORMAL); + //设置标题 + Paragraph subheadPar = new Paragraph(subhead, subheadChinese); + subheadPar.setAlignment(Element.ALIGN_CENTER); + document.add(subheadPar); + } // 每行加空白 fillBlankRow(document, titleChinese); - //设置介绍内容 if (CollectionUtil.isNotEmpty(intros)) { fillRow(intros, document); @@ -112,7 +121,7 @@ public class PdfUtil { PdfPTable table = new PdfPTable(size); table.setSpacingBefore(0); - table.setWidthPercentage(100); + table.setWidthPercentage(90); for (int j = 0; j < rows.size(); j++) { Row row = rows.get(j); table.setHorizontalAlignment(row.align); @@ -120,12 +129,20 @@ public class PdfUtil { for (int i = 0; i < row.cells.size(); i++) { Cell cell = row.cells.get(i); PdfPCell pdfpCell = new PdfPCell(new Phrase(cell.content,font)); - pdfpCell.setBorderWidthTop(j == 0 ? cell.border : 0); - pdfpCell.setBorderWidthLeft(cell.border); - pdfpCell.setBorderWidthRight(i == row.cells.size() - 1 ? cell.border : 0); - pdfpCell.setBorderWidthBottom(cell.border); + pdfpCell.setBorderWidthTop(cell.borderTop == null ? 0 : cell.borderTop); + pdfpCell.setBorderWidthLeft(cell.borderLeft == null ? 0 : cell.borderLeft); + pdfpCell.setBorderWidthRight(cell.borderRight == null ? 0 : cell.borderRight); + pdfpCell.setBorderWidthBottom(cell.borderBottom == null ? 0 : cell.borderBottom); pdfpCell.setColspan(cell.colSpan); pdfpCell.setRowspan(cell.rowSpan); + if (cell.isCenter) { + //水平居中 + pdfpCell.setHorizontalAlignment(Element.ALIGN_CENTER); + } + + //垂直居中 + pdfpCell.setVerticalAlignment(Element.ALIGN_MIDDLE); + pdfpCell.setMinimumHeight(cell.height); table.addCell(pdfpCell); } } @@ -156,14 +173,38 @@ public class PdfUtil { } @Data public static class Cell{ + public final static int defaultHeight = 24; //内容 private String content; //边框宽度 private int border = 1; + // 上边框宽度 + private Integer borderTop = null; + // 下边框宽度 + private Integer borderBottom = 1; + // 左边框宽度 + private Integer borderLeft = 1; + // 右边框宽度 + private Integer borderRight = null; //横向合并数 private int colSpan = 1; //纵向合并数 private int rowSpan = 1; + //单元格高度 + private int height = defaultHeight; + // 单元格是否居中 + private boolean isCenter = true; } + + /** + * pdf位置 + */ + @Data + public static class Margin{ + private float left = 72; + private float right = 0; + private float top = 32; + private float bottom = 32; + } } diff --git a/util/src/main/java/com/ccsens/util/PoiUtil.java b/util/src/main/java/com/ccsens/util/PoiUtil.java index 45b38a59..3bbcb1c2 100644 --- a/util/src/main/java/com/ccsens/util/PoiUtil.java +++ b/util/src/main/java/com/ccsens/util/PoiUtil.java @@ -26,6 +26,7 @@ import java.util.Map; /** * 导入导出excel + * @author wu */ @Slf4j @Component @@ -33,8 +34,17 @@ public class PoiUtil { @Data public static class PoiUtilCell { + /** + * 单元格内容 + */ private String value = ""; + /** + * 跨列 + */ private int colspan = 1; + /** + * 跨行 + */ private int rowspan = 1; /** * 水平居中 @@ -62,7 +72,13 @@ public class PoiUtil { */ private String function; + /** + * 是否是数字格式 0否 1是 + */ + private byte num = 0; + public PoiUtilCell() { + } public PoiUtilCell(String value) { @@ -104,7 +120,7 @@ public class PoiUtil { * @param sheetName sheet名称 * @param rows 行 * @param wb XSSFWorkbook对象 无则创建 - * @return + * @return 返回生成的excel数据 */ public static Workbook exportWB(String sheetName, List> rows, Workbook wb) { @@ -145,21 +161,38 @@ public class PoiUtil { } List cells = rows.get(i); for (int j = 0; j < cells.size(); j++) { - CellStyle style = wb.createCellStyle(); - - //将内容按顺序赋给对应的列对象 PoiUtilCell cell = cells.get(j); - Cell newCell = row.createCell(j); + if(ObjectUtil.isNull(cell)){ + continue; + } + //查找当前单元格 + Cell newCell = row.getCell(j); + if(ObjectUtil.isNull(newCell)){ + newCell = row.createCell(j); + } + //查找当前单元格的样式 +// CellStyle style = newCell.getCellStyle(); +// if(ObjectUtil.isNull(style)){ +// style = wb.createCellStyle(); +// } + CellStyle style = wb.createCellStyle(); + //设置内容 + if (!cell.value.equals(WebConstant.CELL_NULL)){ + if(cell.num == 1){ + newCell.setCellValue(Integer.parseInt(cell.value)); + }else { + newCell.setCellValue(cell.value); + } + } //设置行高 if (ObjectUtil.isNotNull(cell.height)) { if (j == 0) { row.setHeight(cell.height.shortValue()); } } - newCell.setCellValue(cell.value); + //设置水平居中和垂直居中 style.setAlignment(cell.style); style.setVerticalAlignment(cell.verticalAlignment); - //设置跳转路径 if (StrUtil.isNotEmpty(cell.path)) { XSSFCreationHelper createHelper = (XSSFCreationHelper) wb.getCreationHelper(); @@ -175,8 +208,51 @@ public class PoiUtil { if(StrUtil.isNotEmpty(cell.getFunction())) { newCell.setCellFormula(cell.getFunction()); } - style.setFillForegroundColor(IndexedColors.RED.getIndex()); + //设置自动换行 + style.setWrapText(true); + //将样式添加至单元格 newCell.setCellStyle(style); + +// CellStyle style = wb.createCellStyle(); +// 将内容按顺序赋给对应的列对象 +// 如果value是cell_null代表次单元格不需要赋值 +// if (cell.value.equals(WebConstant.CELL_NULL)){ +// continue; +// } +// Cell newCell = row.createCell(j); +// //设置行高 +// if (ObjectUtil.isNotNull(cell.height)) { +// if (j == 0) { +// row.setHeight(cell.height.shortValue()); +// } +// } +// +// if(cell.num == 1){ +// newCell.setCellValue(Integer.parseInt(cell.value)); +// }else { +// newCell.setCellValue(cell.value); +// } +// style.setAlignment(cell.style); +// style.setVerticalAlignment(cell.verticalAlignment); + +// //设置跳转路径 +// if (StrUtil.isNotEmpty(cell.path)) { +// XSSFCreationHelper createHelper = (XSSFCreationHelper) wb.getCreationHelper(); +// XSSFHyperlink link = createHelper.createHyperlink(HyperlinkType.URL); +// link.setAddress(cell.path); +// newCell.setHyperlink(link); +// //设置字体颜色 +// Font font = wb.createFont(); +// font.setColor(Font.COLOR_RED); +// style.setFont(font); +// } +// //添加函数 +// if(StrUtil.isNotEmpty(cell.getFunction())) { +// newCell.setCellFormula(cell.getFunction()); +// } +// //设置自动换行 +// style.setWrapText(true); +// newCell.setCellStyle(style); } } return wb; @@ -185,11 +261,10 @@ public class PoiUtil { /** * 合并单元格 * - * @param sheet - * @param rows - * @param cols - * @param cell - * @return + * @param sheet 当前sheet + * @param rows 行数 + * @param cols 列数 + * @param cell 单元格信息 */ private static void mergedRegion(Sheet sheet, int rows, int cols, PoiUtilCell cell) { // @@ -429,7 +504,6 @@ public class PoiUtil { /** * 生成sheet - * * @param file * @param index * @return @@ -450,13 +524,7 @@ public class PoiUtil { } /** - * 插入图片 - */ - private static void insertImage(){ - - } - /** - * + * 插入图片 * @param row1:起始行 * @param row2:终止行 * @param col1:起始列 @@ -496,79 +564,15 @@ public class PoiUtil { anchor.setCol2(col2); // 插入图片 Picture pict = drawing.createPicture(anchor, pictureIdx); - -// FileOutputStream fileOut = null; -// fileOut = new FileOutputStream("D:/测试Excel.xlsx"); -// // 写入excel文件 -// wb.write(fileOut); -// System.out.println("----Excle文件已生成------"); return wb; } - public static void main(String[] args) throws Exception { - InputStream inputStream = new FileInputStream("D:\\1.xlsx"); - Workbook workbook = new XSSFWorkbook(inputStream); - XSSFSheet sheet = (XSSFSheet) workbook.getSheetAt(0); - XSSFRow row = sheet.getRow(6); - XSSFCell newCell = row.createCell(2); - XSSFCell newCell1 = row.createCell(3); - //添加公式 - newCell.setCellFormula("A7+B7"); - newCell1.setCellFormula("A8/B8"); - //设置打印区域 - workbook.setPrintArea( - 0, //工作薄 下标0开始 - 0, //起始列 下标0开始 - 20, //终止列 下标0开始 - 0, //起始行 下标0开始 - 20 //终止行 下标0开始 - ); -// CellStyle style = workbook.createCellStyle(); -// style.setFillBackgroundColor(); - - OutputStream stream = new FileOutputStream(new File("D:\\1.xlsx")); - workbook.write(stream); - stream.close(); - -// List> list = new ArrayList<>(); -// List cells = new ArrayList<>(); -// cells.add(new PoiUtilCell("1", 2, 1)); -// cells.add(new PoiUtilCell()); -// cells.add(new PoiUtilCell()); -// cells.add(new PoiUtilCell()); -// cells.add(new PoiUtilCell()); -// cells.add(new PoiUtilCell("2")); -// list.add(cells); -// List cells2 = new ArrayList<>(); -// cells2.add(new PoiUtilCell("3", 1, 2)); -// cells2.add(new PoiUtilCell("4")); -// cells2.add(new PoiUtilCell("",3,1)); -// list.add(cells2); -// List cells3 = new ArrayList<>(); -// cells3.add(new PoiUtilCell("5")); -// cells3.add(new PoiUtilCell("6")); -// list.add(cells3); -// List cells4 = new ArrayList<>(); -// list.add(cells4); -// List cells5 = new ArrayList<>(); -// cells5.add(new PoiUtilCell("9", 2, 2)); -// cells5.add(new PoiUtilCell("9")); -// list.add(cells5); - -// Workbook wbs = exportWB("wbs", list, workbook); -// OutputStream stream = new FileOutputStream(new File("D:\\1.xlsx")); -// wbs.write(stream); -// stream.close(); - -// setImg("C:\\Users\\逗\\Desktop\\0cf3ffd8f0001c4310b02f706753721.png",1,2,1,2); - - } /** * 获取excel的列号 * @param num 第几列(从1开始) - * @return + * @return 返回列号 */ public static String toRadix(Integer num) throws Exception{ String[] array = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; @@ -584,9 +588,90 @@ public class PoiUtil { out = array[num - 1]; } return out; - } + public static void main(String[] args) throws Exception { + +// File file = new File("F:\\wenjian\\3.xlsx"); +// file.createNewFile(); +// InputStream inputStream = new FileInputStream(file); + Workbook workbook = new XSSFWorkbook(); +// XSSFSheet sheet = (XSSFSheet) workbook.getSheetAt(0); +// XSSFRow row = sheet.getRow(6); +// XSSFCell newCell = row.createCell(2); +// XSSFCell newCell1 = row.createCell(3); +// //添加公式 +// newCell.setCellFormula("A7+B7"); +// newCell1.setCellFormula("A8/B8"); +// //设置打印区域 +// workbook.setPrintArea( +// 0, //工作薄 下标0开始 +// 0, //起始列 下标0开始 +// 20, //终止列 下标0开始 +// 0, //起始行 下标0开始 +// 20 //终止行 下标0开始 +// ); +//// CellStyle style = workbook.createCellStyle(); +//// style.setFillBackgroundColor(); +// +// OutputStream stream = new FileOutputStream(new File("D:\\1.xlsx")); +// workbook.write(stream); +// stream.close(); + + + + PoiUtilCell poiUtilCell = new PoiUtilCell(); + poiUtilCell.setValue("111222333"); + poiUtilCell.setColspan(3); + PoiUtilCell poiUtilCella = new PoiUtilCell(); + PoiUtilCell poiUtilCellb = new PoiUtilCell(); + PoiUtilCell poiUtilCell1 = new PoiUtilCell(); + poiUtilCell1.setValue("aaadddfffersdfsdfasftargadfgergsdfhasfgasfgaertagaergafdhsfgjfyk"); + + List cells = new ArrayList<>(); + cells.add(poiUtilCell); + cells.add(poiUtilCella); + cells.add(poiUtilCellb); + cells.add(poiUtilCell1); + + List> list = new ArrayList<>(); + list.add(cells); + + + +// list.add(cells); +// +// List cells1 = new ArrayList<>(); +// cells1.add(new PoiUtilCell("两列一行", 2, 1)); +// list.add(cells1); +// +// List cells2 = new ArrayList<>(); +// cells2.add(new PoiUtilCell("一列两行", 1, 2)); +// list.add(cells2); +// List cells3 = new ArrayList<>(); +// cells3.add(new PoiUtilCell("5")); +// cells3.add(new PoiUtilCell("6")); +// list.add(cells3); +// List cells4 = new ArrayList<>(); +// list.add(cells4); +// List cells5 = new ArrayList<>(); +// cells5.add(new PoiUtilCell("9", 2, 2)); +// cells5.add(new PoiUtilCell("9")); +// list.add(cells5); + String fileName = "zzz/" + cn.hutool.core.date.DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = WebConstant.UPLOAD_PATH_BASE + fileName; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + + Workbook wbs = exportWB("Sheet1", list, workbook); + OutputStream stream = new FileOutputStream(tmpFile); + wbs.write(stream); + stream.close(); + + + } } diff --git a/util/src/main/java/com/ccsens/util/QrCodeUtil.java b/util/src/main/java/com/ccsens/util/QrCodeUtil.java index ce7b5256..c6e93cf8 100644 --- a/util/src/main/java/com/ccsens/util/QrCodeUtil.java +++ b/util/src/main/java/com/ccsens/util/QrCodeUtil.java @@ -24,7 +24,7 @@ public class QrCodeUtil { */ public static String urlToQRCode(String url, String parentPath) throws IOException { String fileName = "qrCode/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png"; - ByteArrayOutputStream stream = QRCode.from(url).to(ImageType.BMP).stream(); + ByteArrayOutputStream stream = QRCode.from(url).to(ImageType.BMP).withSize(500,500).stream(); byte[] codeByte = stream.toByteArray(); File file = new File(parentPath, fileName); if (!file.getParentFile().exists()) { diff --git a/util/src/main/java/com/ccsens/util/RedisUtil.java b/util/src/main/java/com/ccsens/util/RedisUtil.java index e4a9b300..eb416311 100644 --- a/util/src/main/java/com/ccsens/util/RedisUtil.java +++ b/util/src/main/java/com/ccsens/util/RedisUtil.java @@ -146,7 +146,7 @@ public class RedisUtil { * 递减 * * @param key 键 - * @param by 要减少几(小于0) + * @param delta 要减少几(小于0) * @return */ public long decr(String key, long delta) { @@ -496,7 +496,7 @@ public class RedisUtil { * @param time 时间(秒) * @return */ - public boolean lSet(String key, List value) { + public boolean lSet(String key, List value) { try { redisTemplate.opsForList().rightPushAll(key, value); return true; diff --git a/util/src/main/java/com/ccsens/util/RestTemplateUtil.java b/util/src/main/java/com/ccsens/util/RestTemplateUtil.java index b260f6b6..ff73a2ab 100644 --- a/util/src/main/java/com/ccsens/util/RestTemplateUtil.java +++ b/util/src/main/java/com/ccsens/util/RestTemplateUtil.java @@ -3,6 +3,7 @@ package com.ccsens.util; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; @@ -15,6 +16,8 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; import javax.annotation.PostConstruct; +import java.net.URI; +import java.net.URISyntaxException; import java.util.Map; @Slf4j @@ -61,7 +64,15 @@ public class RestTemplateUtil { JSONObject json = JSON.parseObject(JSON.toJSONString(params)); HttpEntity> objectHttpEntity = new HttpEntity<>(json,httpHeaders); - ResponseEntity response = util.restTemplate.postForEntity(url, objectHttpEntity, String.class); + URI uri = null; + try { + uri = new URI(url); + }catch (URISyntaxException e) { + log.error("转换路径异常:{}", e); + throw new BaseException(CodeEnum.URL_ERROR); + } + + ResponseEntity response = util.restTemplate.postForEntity(uri, objectHttpEntity, String.class); log.info("返回:{}", response); return response.getBody(); } diff --git a/util/src/main/java/com/ccsens/util/StringUtil.java b/util/src/main/java/com/ccsens/util/StringUtil.java index 84d83767..c2d39a9e 100644 --- a/util/src/main/java/com/ccsens/util/StringUtil.java +++ b/util/src/main/java/com/ccsens/util/StringUtil.java @@ -166,7 +166,7 @@ public class StringUtil { */ public static String replaceComma(String str) { //可以在中括号内加上任何想要替换的字符 - String regEx = "[,,]"; + String regEx = "[,,、]"; String lBracket = "[(]"; String rBracket = "[)]"; diff --git a/util/src/main/java/com/ccsens/util/UploadFileUtil_Servlet3.java b/util/src/main/java/com/ccsens/util/UploadFileUtil_Servlet3.java index af725210..4d55ff52 100644 --- a/util/src/main/java/com/ccsens/util/UploadFileUtil_Servlet3.java +++ b/util/src/main/java/com/ccsens/util/UploadFileUtil_Servlet3.java @@ -5,7 +5,6 @@ import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; -import cn.hutool.crypto.SecureUtil; import lombok.extern.slf4j.Slf4j; import javax.servlet.http.HttpServletResponse; @@ -100,6 +99,7 @@ public class UploadFileUtil_Servlet3 { File file = new File(path); // 如果文件存在,则进行下载 if (!file.exists()) { + log.info("该路径不存在:{}",path); return; } // 配置文件下载 diff --git a/util/src/main/java/com/ccsens/util/WebConstant.java b/util/src/main/java/com/ccsens/util/WebConstant.java index c39d32f1..fb48601b 100644 --- a/util/src/main/java/com/ccsens/util/WebConstant.java +++ b/util/src/main/java/com/ccsens/util/WebConstant.java @@ -1,17 +1,26 @@ package com.ccsens.util; import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.URLUtil; +import lombok.Getter; +import lombok.Setter; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.Pattern; import java.io.File; public class WebConstant { - + /**cell内容不赋值*/ + public static final String CELL_NULL = "cell_null"; /**数据存在*/ public static final byte STATUS_EXIT = 0; /**数据已删除*/ public static final byte STATUS_DELETE = 1; public static final String IMG_TYPE = "bmp,jpg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp,jpeg"; + /**手机号正则*/ +// public static final String REGEX_PHONE = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,1-9]))\\d{8}$"; + public static final String REGEX_PHONE = "^[1]([3-9])[0-9]{9}$"; /**属性名*/ public static class Field{ @@ -19,6 +28,37 @@ public class WebConstant { } + public static class Wx{ + public static final String ACCESS_TOKEN = "tall_wx_access_token_"; + public static final long EXPIRE_TIME = 1 * 60 * 60; + public static final String DOMAIN = PropUtil.wxPrefix; + public static final String TEMPLATE_SEND = DOMAIN + "template/send"; + + public static final String GZH_AUTH_URL + = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%1$s&redirect_uri=%2$s&response_type=code&scope=%3$s&state=STATE#wechat_redirect"; + public static final String ACCOUNT_WX_APPID = "account_wx_appId"; + + public static String getAuthedUrl(String url, WxGzhAuthType wxGzhAuthType,String appId){ + return String.format(GZH_AUTH_URL,appId, URLUtil.encode(url),wxGzhAuthType.getText()); + } + + } + + public enum WxGzhAuthType { + //基本授权类型,静默,只能获取openId + SNSAPI_BASE("snsapi_base"), + //信息授权类型,弹出提示框,可以获取openId,unionId,nickanme,city等用户信息 + SNSAPI_USERINFO("snsapi_userinfo"); + + @Getter + @Setter + private String text; + + private WxGzhAuthType(String text){ + this.text = text; + } + } + public static enum TemplateParam { Operator("{{operator}}", "操作者"), @@ -112,12 +152,6 @@ public class WebConstant { } } - public static final class Wx { - public static final String ACCESS_TOKEN = "tall_wx_access_token_"; - public static final long EXPIRE_TIME = 1 * 60 * 60; - public static final String DOMAIN = PropUtil.wxPrefix; - public static final String TEMPLATE_SEND = DOMAIN + "template/send"; - } /**注册来源*/ public static final class Regist { @@ -160,6 +194,7 @@ public class WebConstant { public static final String IMG_PATH_PREFIX_SHARE_IMG = IMG_PATH_PREFIX + File.separator + "shareimg"; public static final String IMG_PATH_SHARE_IMG = "/shareimg"; + public static final String PATH_WX_CRET = "/home/packet/1513955071_20181128_cert.p12"; //public static final String WX_CRET_PWD = xxx; @@ -213,7 +248,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/bean/dto/QueryDto.java b/util/src/main/java/com/ccsens/util/bean/dto/QueryDto.java index 50cf2a80..f5d7d93e 100644 --- a/util/src/main/java/com/ccsens/util/bean/dto/QueryDto.java +++ b/util/src/main/java/com/ccsens/util/bean/dto/QueryDto.java @@ -3,10 +3,8 @@ package com.ccsens.util.bean.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import org.springframework.validation.annotation.Validated; import javax.validation.Valid; -import javax.validation.constraints.NotNull; /** * @program: ptpro diff --git a/util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java b/util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java index e2ff582f..d240028f 100644 --- a/util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java +++ b/util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java @@ -38,6 +38,7 @@ public class RabbitMQConfig { public Queue queue2(){ return new Queue(TALL_MESSAGE_2); } + @Bean public Queue queue3(){ return new Queue(GAME_SCORE); 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/main/java/com/ccsens/util/wx/WxXcxUtil.java b/util/src/main/java/com/ccsens/util/wx/WxXcxUtil.java index 34d4d9ba..da7968dd 100644 --- a/util/src/main/java/com/ccsens/util/wx/WxXcxUtil.java +++ b/util/src/main/java/com/ccsens/util/wx/WxXcxUtil.java @@ -255,6 +255,30 @@ public class WxXcxUtil { } + + /** + * 获取小程序二维码/小程序码(小程序码) 使用C方法 + * @param code 不同的小程序的code + * @return + * @throws Exception + */ + public static void getWxCodeC(String page,String path,String code) throws Exception { + + File file = new File(path); + if(!file.getParentFile().exists()){ + file.getParentFile().mkdirs(); + } + String url = String.format(URL_GET_WX_CODE_C, WxGzhUtil.getAccessToken(appId(code),secret(code))); + + WechatCodeA wechatCode = new WechatCodeA(); + wechatCode.path = page; + + String postStr = JacksonUtil.beanToJson(wechatCode); + System.out.println(postStr); + HttpsUtil.httpsRequest(url,"POST",postStr,path); + + } + // /** // * 获取小程序二维码/小程序码(长度128,有数量限制)(二维码) // * @return diff --git a/util/src/test/java/com/ccsens/util/Base64Test.java b/util/src/test/java/com/ccsens/util/Base64Test.java index 4fb07f8b..8260070a 100644 --- a/util/src/test/java/com/ccsens/util/Base64Test.java +++ b/util/src/test/java/com/ccsens/util/Base64Test.java @@ -1,6 +1,9 @@ package com.ccsens.util; import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.ZipUtil; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.junit.Test; @@ -33,7 +36,29 @@ public class Base64Test { @Test public void test02() throws Exception { + ZipUtil.zip("C:\\Users\\逗\\Desktop\\新建文件夹","C:\\Users\\逗\\Desktop\\ht.zip"); +// 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/OtherTest.java b/util/src/test/java/com/ccsens/util/OtherTest.java new file mode 100644 index 00000000..723727e2 --- /dev/null +++ b/util/src/test/java/com/ccsens/util/OtherTest.java @@ -0,0 +1,40 @@ +package com.ccsens.util; + + +import cn.hutool.core.util.ImageUtil; +import lombok.extern.slf4j.Slf4j; +import org.junit.Test; + +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import javax.script.ScriptException; +import java.io.File; + +@Slf4j +public class OtherTest { + + + public static final String REGEX_PHONE = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,1-9]))\\d{8}$"; + + @Test + public void test2() throws ScriptException { + String str = "18200000000"; + if (str.matches(REGEX_PHONE)) { + System.out.println("是手机号"); + } else { + System.out.println("不是手机号"); + } + } + + @Test + public void test3() { + File file = new File("C:\\Users\\逗\\Desktop\\ABDBBE53630FE09D526858C4A8029873.jpg"); + File file1 = new File("C:\\Users\\逗\\Desktop\\1.jpg"); + File file2 = new File("C:\\Users\\逗\\Desktop\\2.jpg"); + System.out.println(file.length()); + ImageUtil.scale(file,file1,0.5f); + System.out.println(file1); + ImageUtil.scale(file1,file2,2); + } + +} diff --git a/util/src/test/java/com/ccsens/util/PdfUtilTest.java b/util/src/test/java/com/ccsens/util/PdfUtilTest.java index 57261336..cf481300 100644 --- a/util/src/test/java/com/ccsens/util/PdfUtilTest.java +++ b/util/src/test/java/com/ccsens/util/PdfUtilTest.java @@ -49,7 +49,7 @@ public class PdfUtilTest { contents.add(row); contents.add(row2); } - PdfUtil.credatePdf("/home/", "评测", rows, contents); + PdfUtil.credatePdf("/home/", "山大一院","评测", rows, contents, new PdfUtil.Margin()); } diff --git a/util/src/test/java/com/ccsens/util/TestQrCord.java b/util/src/test/java/com/ccsens/util/TestQrCord.java index 88479ac4..dc5425c5 100644 --- a/util/src/test/java/com/ccsens/util/TestQrCord.java +++ b/util/src/test/java/com/ccsens/util/TestQrCord.java @@ -29,8 +29,12 @@ public class TestQrCord { // 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://www.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=https://www.tall.wiki/compete-province&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=https://www.tall.wiki/compete-people&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=https://test.tall.wiki/compete&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; + String fileName = "zzz/" + "远程比赛省赛(测试)1.png"; QRCodeWriter qrCodeWriter = new QRCodeWriter(); diff --git a/util/src/test/java/com/ccsens/util/ZipTest.java b/util/src/test/java/com/ccsens/util/ZipTest.java index 90acd8a7..4b03bb60 100644 --- a/util/src/test/java/com/ccsens/util/ZipTest.java +++ b/util/src/test/java/com/ccsens/util/ZipTest.java @@ -31,6 +31,7 @@ public class ZipTest { log.info("length:" + new String(bytes, "UTF-8").length()); } + @Test public void test2() throws ScriptException { String expr = "(1+2/5)*3"; @@ -38,7 +39,6 @@ public class ZipTest { ScriptEngine engine = manager.getEngineByName("js"); Object result = engine.eval(expr); log.info((String) result); - } }