first commit

This commit is contained in:
2024-11-29 11:03:13 +08:00
commit fdef054baf
372 changed files with 24482 additions and 0 deletions

20
.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
/target/
/dev/
/hs_err_pid23072.log
/hs_err_pid6732.log
/replay_pid23072.log
/replay_pid6732.log
/hs_err_pid17440.log
/hs_err_pid6008.log
/replay_pid6008.log
/*.log
/.idea/
/.settings/
/test-output/
/*.iml
/.classpath
/.project
/disconf/
/log.txt
/*.idea
/zentao.iml

0
README.md Normal file
View File

249
pom.xml Normal file
View File

@ -0,0 +1,249 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.sa</groupId>
<artifactId>zentao</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>zentao</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>17</java.version>
<boot.version>3.3.0</boot.version>
</properties>
<dependencies>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>3.1.975</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- websocket -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${boot.version}</version>
</dependency>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.0.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.httpcomponents</groupId>-->
<!-- <artifactId>httpclient</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.httpcomponents</groupId>-->
<!-- <artifactId>httpmime</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.5</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>3.5.5</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.4.1</version>
<exclusions>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.19</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.12</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<!-- 特别注意版本问题 -->
<!-- <version>1.3.0</version>-->
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-freemarker</artifactId>-->
<!-- <version>2.3.10.RELEASE</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.8.1</version>
</dependency>
</dependencies>
<build>
<finalName>zentao</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArguments>
<extdirs>src\main\webapp\WEB-INF\lib</extdirs>
</compilerArguments>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,18 @@
package com.sa.zentao;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(scanBasePackages = {"com.sa.zentao"})
@MapperScan({"com.sa.zentao.mapper","com.sa.**.mapper"})
@EnableScheduling
public class ZentaoApplication {
public static void main(String[] args) {
SpringApplication.run(ZentaoApplication.class, args);
}
}

View File

@ -0,0 +1,36 @@
package com.sa.zentao.conf;
//import com.dritec.FastDFSClient;
import com.sa.zentao.service.IFestivalConfigService;
import com.sa.zentao.task.SpringTaskJob;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@Component
@Order(value = 1)
@Slf4j
public class AfterRunner implements ApplicationRunner {
@Autowired
private IFestivalConfigService festivalConfigService;
@Autowired
private com.sa.zentao.task.SpringTaskJob springTaskJob;
@Override
public void run(ApplicationArguments args) throws Exception {
//初始化假期
festivalConfigService.initfestivalAndHoliday();
springTaskJob.dkEveryDay();
new Thread(new DevopsRunner()).start();
}
}

View File

@ -0,0 +1,166 @@
package com.sa.zentao.conf;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.config.rules.FileType;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import org.apache.commons.lang3.StringUtils;
import javax.swing.*;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CodeGenerator {
//自己的名字
static String Author = "gqb";
public static String tableName = "zt_yw_fault_list";
/**
* <p>
* 读取控制台内容
* </p>
*/
public static void main(String[] args) throws Exception {
// Author = JOptionPane.showInputDialog(null, "请输入作者");
// if (StringUtils.isEmpty(Author)) {
// throw new Exception("请输入作者");
// }
// 代码生成器
AutoGenerator mpg = new AutoGenerator();
// 全局配置
GlobalConfig gc = new GlobalConfig();
String projectPath = System.getProperty("user.dir") ;
gc.setOutputDir(projectPath + "/src/main/java");
gc.setAuthor(Author);
gc.setOpen(false);
// gc.setSwagger2(true); 实体属性 Swagger2 注解
mpg.setGlobalConfig(gc);
// 数据源配置
DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:mysql://192.168.1.161:3306/zentao?useUnicode=true&useSSL=false&characterEncoding=utf8");
// dsc.setSchemaName("public");
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
// dsc.setUsername("root");
// dsc.setPassword("123456");
dsc.setUsername("devgps");
dsc.setPassword("dev@2021GPS");
mpg.setDataSource(dsc);
// 包配置
PackageConfig pc = new PackageConfig();
pc.setModuleName("");
pc.setParent("com.sa.zentao");
mpg.setPackageInfo(pc);
// 自定义配置
InjectionConfig cfg = new InjectionConfig() {
@Override
public void initMap() {
Map<String, Object> map = new HashMap<String, Object>();
map.put("entityPackage", "com.sa.zentao.pojo");
map.put("mapperPackage", "com.sa.zentao.mapper");
this.setMap(map);
}
};
// 如果模板引擎是 freemarker
String templatePath = "/templates/mapper.xml.ftl";
// 如果模板引擎是 velocity
// String templatePath = "/templates/mapper.xml.vm";
String templatePathBean = "/templates/entity.java.ftl";
// 自定义输出配置
List<FileOutConfig> focList = new ArrayList<>();
// 自定义配置会被优先输出
focList.add(new FileOutConfig(templatePath) {
@Override
public String outputFile(TableInfo tableInfo) {
// 自定义输出文件名 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return projectPath + "/src/main/resources/mapper/"
+ "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
}
});
focList.add(new FileOutConfig(templatePathBean) {
@Override
public String outputFile(TableInfo tableInfo) {
// 自定义输出文件名 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return System.getProperty("user.dir") + "/src/main/java/com/sa/zentao/entity/"
+ "/" + tableInfo.getEntityName() + StringPool.DOT_JAVA;
}
});
cfg.setFileCreate(new IFileCreate() {
@Override
public boolean isCreate(ConfigBuilder configBuilder, FileType fileType, String filePath) {
// 判断自定义文件夹是否需要创建
// checkDir("调用默认方法创建的目录,自定义目录用");
if (fileType == FileType.MAPPER) {
// 已经生成 mapper 文件判断存在,不想重新生成返回 false
return !new File(filePath).exists();
}
// if (fileType == FileType.ENTITY) {
// if (filePath.contains("outbound-parent/outbound/src/main/java\\com\\sa\\care\\outbound\\entity\\")) {
//
// return false;
// }
// }
// 允许生成模板文件
return true;
}
});
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg);
// 配置模板
TemplateConfig templateConfig = new TemplateConfig();
// 配置自定义输出模板
//指定自定义模板路径,注意不要带上.ftl/.vm, 会根据使用的模板引擎自动识别
// templateConfig.setEntity("templates/entity2.java");
// templateConfig.setService("templates/service.java");
// templateConfig.setController();
templateConfig.setXml(null);
mpg.setTemplate(templateConfig);
// 策略配置
StrategyConfig strategy = new StrategyConfig();
strategy.setNaming(NamingStrategy.underline_to_camel);
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
// strategy.setSuperEntityClass("com.sa.care.base.baseenity.BaseEntity");
strategy.setEntityLombokModel(true);
strategy.setRestControllerStyle(true);
// strategy.set
// 公共父类
// strategy.setSuperControllerClass("你自己的父类控制器,没有就不用设置!");
// 写于父类中的公共字段
// strategy.setSuperEntityColumns("id");
strategy.setInclude(tableName);
strategy.setControllerMappingHyphenStyle(true);
strategy.setTablePrefix(pc.getModuleName() + "_");
mpg.setStrategy(strategy);
mpg.setTemplateEngine(new FreemarkerTemplateEngine());
mpg.execute();
}
}

View File

@ -0,0 +1,38 @@
package com.sa.zentao.conf;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @author : sean
* @date Date : 2022-10-29 23:21
* @Description:
*/
public class DateConverter implements Converter<Date> {
private static final String PATTERN_YYYY_MM_DD = "yyyy-MM-dd hh:mm:hh";
@Override
public Class<?> supportJavaTypeKey() {
return Converter.super.supportJavaTypeKey();
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return Converter.super.supportExcelTypeKey();
}
@Override
public WriteCellData<?> convertToExcelData(Date value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat(PATTERN_YYYY_MM_DD);
String dateValue = sdf.format(value);
return new WriteCellData<>(dateValue);
}
}

View File

@ -0,0 +1,45 @@
package com.sa.zentao.conf;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.boot.jackson.JsonComponent;
import org.springframework.context.annotation.Bean;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.TimeZone;
@JsonComponent
public class DateFormatConfig {
@Value("${spring.jackson.date-format:yyyy-MM-dd HH:mm:ss}")
private String pattern;
@Bean
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilder() {
return builder -> {
TimeZone tz = TimeZone.getTimeZone("UTC");
DateFormat df = new SimpleDateFormat(pattern);
df.setTimeZone(tz);
builder.failOnEmptyBeans(false)
.failOnUnknownProperties(false)
.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.dateFormat(df);
};
}
@Bean
public LocalDateTimeSerializer localDateTimeDeserializer() {
return new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(pattern));
}
@Bean
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
return builder -> builder.serializerByType(LocalDateTime.class, localDateTimeDeserializer());
}
}

View File

@ -0,0 +1,71 @@
package com.sa.zentao.conf;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sa.zentao.entity.ZtCronDevops;
import com.sa.zentao.entity.ZtCronDevopsUser;
import com.sa.zentao.service.IZtCronDevopsUserService;
import com.sa.zentao.utils.Constant;
import com.sa.zentao.utils.DateUtils;
//import com.sa.zentao.utils.SendEmail;
import com.sa.zentao.utils.SendEmail;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import java.util.*;
@Slf4j
public class DevopsRunner implements Runnable{
IZtCronDevopsUserService cronDevopsUserService;
@Override
public void run() {
if(cronDevopsUserService==null){
cronDevopsUserService=SpringUtil.getBean(IZtCronDevopsUserService.class);
}
while (true){
try {
Date date = new Date();
Calendar instance = Calendar.getInstance();
instance.setTime(date);
instance.add(Calendar.MINUTE,1);
Date time = instance.getTime();
String s = DateUtils.formatDate(date, "yyyy-MM-dd HH:mm:00");
log.info("定时任务 {}",s);
List<ZtCronDevops> ztCronDevops = Constant.devMap.get(s);
if(!CollectionUtils.isEmpty(ztCronDevops)){
for (ZtCronDevops d: ztCronDevops) {
String phone = d.getPhone();
try {
List<ZtCronDevopsUser> list = cronDevopsUserService.list(new QueryWrapper<ZtCronDevopsUser>().lambda().eq(ZtCronDevopsUser::getDevopsId, d.getId()));
if(!CollectionUtils.isEmpty(list)){
for (ZtCronDevopsUser u:list) {
SendEmail.sendMail(u.getMail(),"尊敬的"+u.getUsername()+d.getContent());
}
}
}catch (Exception e){
log.error("邮件发送失败",e);
}
}
}
long t =time.getTime()-System.currentTimeMillis();
if(t>0){
Thread.sleep(t);
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}

View File

@ -0,0 +1,40 @@
package com.sa.zentao.conf;
import com.sa.zentao.dao.BusinessException;
import com.sa.zentao.dao.Code;
import com.sa.zentao.dao.Result;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {
@Value("spring.application.name")
private String application;
@ExceptionHandler(Exception.class)
public Result bizExceptionHandler(Exception e, HttpServletRequest request) {
log.error("发生业务异常!原因是: {}", e.getMessage());
log.error(application +"发生了异常 ,异常信息 {}",e);
return Result.fail(Code.FAIL);
}
@ExceptionHandler(BusinessException.class)
public Result bizExceptionHandler(BusinessException e, HttpServletRequest request) {
log.error("发生业务异常!原因是: {}", e.getMessage());
log.error(application +"发生了异常 ,异常信息 {}",e);
if(e.code==null){
return Result.fail(e.value);
}else{
return Result.fail(e.code);
}
}
}

View File

@ -0,0 +1,100 @@
package com.sa.zentao.conf;
import com.alibaba.fastjson.JSON;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtUserDTO;
import com.sa.zentao.utils.JwtUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.connector.RequestFacade;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.CollectionUtils;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* @Auther: JiangHeng
* @Date: 2022/9/21 19:52
*/
@Component
@Slf4j
public class JwtAuthenticationFilter implements jakarta.servlet.Filter {
public void init(FilterConfig filterConfig) throws ServletException {
}
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse servletResponse
, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException {
servletResponse.setCharacterEncoding("UTF-8");
// 如果匹配不需要授权的路径,就不需要校验是否需要授权
AntPathMatcher pathMatcher = new AntPathMatcher();
String token = ((RequestFacade) request).getHeader("Authorization");
String ipAddress = getIpAddress(request);
// if ("websocket".equals(request.("upgrade"))) {
// token = request.getParameter("token");
// log.info("websocket 链接----- token ,{}", token);
// } else {
// String authorization = request.getHeader("Authorization");
// token = StringUtils.isBlank(authorization) ? null : authorization.replace("Bearer ", StringUtils.EMPTY).trim();
// log.info("http接入 ------ token {} ", token);
// }
// String ipAddress = getIpAddress(request);
// log.info("当前ip================================={}",ipAddress);
log.info("token: " + token);
if (StringUtils.isNotBlank(token)){
//解析token
ZtUserDTO user = JwtUtil.checkToken(token);
if (Objects.isNull(user)){
servletResponse.getWriter().write(JSON.toJSONString(Result.fail("请登录")));
return;
}else {
LoginRiskUser u=new LoginRiskUser();
u.setName(user.getAccount());
u.setUserId(user.getId());
u.setUserType(user.getUserType());
RiskUserThreadLocal.set(u);
RiskUserThreadLocal.risk.set(u);
}
}
filterChain.doFilter(request,servletResponse);
}
@Override
public void destroy() {
}
public static String getIpAddress(jakarta.servlet.ServletRequest request) {
String ip = ((RequestFacade) request).getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = ((RequestFacade) request).getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = ((RequestFacade) request).getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = ((RequestFacade) request).getHeader("HTTP_CLIENT_IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = ((RequestFacade) request).getHeader("HTTP_X_FORWARDED_FOR");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = ((RequestFacade) request).getRemoteAddr();
}
return ip;
}
}

View File

@ -0,0 +1,85 @@
package com.sa.zentao.conf;
import com.sa.zentao.enums.UserType;
import lombok.Data;
import java.io.Serializable;
@Data
public class LoginRiskUser implements Serializable {
public LoginRiskUser(){
}
private static final long serialVersionUID = 1L;
/**
* 用户唯一标识
*/
private String userKey;
/**
* 用户ID自增主键
*/
private Integer userId;
/**
* 登录名
*/
private String account;
/**
* 密码
*/
private String password;
/**
* 姓名
*/
private String name;
/**
* token时间
*/
private Long tokenTime;
/**
* 过期时间
*/
private Long expireTime;
/**
* 登录IP地址
*/
private String ipAddress;
/**
* 所属部门
*/
private Integer groupId;
/**
* 所属角色
*/
private Integer roleId;
/**
* 网关
*/
private String gateway;
/**
* 联系电话
*/
private String contactTel;
private UserType userType;
public int getRiskUserId(){
return userId;
}
}

View File

@ -0,0 +1,47 @@
package com.sa.zentao.conf;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.util.CollectionUtils;
import java.util.*;
public class RiskUserThreadLocal {
public static ThreadLocal<LoginRiskUser> risk=new ThreadLocal(){
{
LoginRiskUser loginRiskUser = new LoginRiskUser();
loginRiskUser.setUserId(1);
loginRiskUser.setName("admin");
set(loginRiskUser);
}
};
public static LoginRiskUser get(){
return risk.get();
}
public static void set(LoginRiskUser loginRiskUser){
risk.set(loginRiskUser);
}
public static void clean() {
if (Objects.nonNull(risk.get())) {
risk.remove();
}
}
public static boolean isAdmin(){
LoginRiskUser loginRiskUser = risk.get();
if(loginRiskUser==null){
return false;
}
if(loginRiskUser.getRiskUserId()==2){
return true;
}else{
return false;
}
}
}

View File

@ -0,0 +1,31 @@
package com.sa.zentao.conf;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.sms.v20210111.SmsClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* 短信服务配置
* @Auther: JiangHeng
* @Date: 2023/9/20 14:37
*/
@Configuration
public class SmsConfig {
private final String tSecretId = "AKIDEWVewIbm5UuCUsqlbZWoGiCe0PqO2fP4";
private final String tSecretKey = "odMtBQnFoGb4Rq7HUZUFGA61nYFkHd8Z";
@Bean(name = "tencentSmsClient")
public SmsClient tencentSmsClient(){
Credential cred = new Credential(tSecretId, tSecretKey);
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("sms.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
return new SmsClient(cred, "ap-guangzhou", clientProfile);
}
}

View File

@ -0,0 +1,49 @@
package com.sa.zentao.conf;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
@Component
public class SpringUtil implements ApplicationContextAware {
private static ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if(SpringUtil.applicationContext == null) {
SpringUtil.applicationContext = applicationContext;
}
System.out.println("---------------------------------------------------------------------");
System.out.println("---------------------------------------------------------------------");
System.out.println("---------------me.shijunjie.util.SpringUtil------------------------------------------------------");
System.out.println("========ApplicationContext配置成功,在普通类可以通过调用SpringUtils.getAppContext()获取applicationContext对象,applicationContext="+SpringUtil.applicationContext+"========");
System.out.println("---------------------------------------------------------------------");
}
//获取applicationContext
public static ApplicationContext getApplicationContext() {
return applicationContext;
}
//通过name获取 Bean.
public static Object getBean(String name){
return getApplicationContext().getBean(name);
}
//通过class获取Bean.
public static <T> T getBean(Class<T> clazz){
return getApplicationContext().getBean(clazz);
}
//通过name,以及Clazz返回指定的Bean
public static <T> T getBean(String name, Class<T> clazz){
return getApplicationContext().getBean(name, clazz);
}
}

View File

@ -0,0 +1,38 @@
package com.sa.zentao.conf;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@Slf4j
public class WebMvcConfig implements WebMvcConfigurer {
@Value("${file.path.windows}")
private String windowsFilePath;
@Value("${file.path.linux}")
private String linuxFilePath;
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
for (int i =0;i<200;i++){
log.info("win");
}
String os = System.getProperty("os.name");
if (os.toLowerCase().startsWith("win")) { //如果是Windows系统
log.info("win");
registry.addResourceHandler("/img/**").addResourceLocations("file:"+windowsFilePath+"/");
}else{ //linux和mac系统
log.info("linux");
registry.addResourceHandler("/img/**").addResourceLocations("file:"+linuxFilePath+"/");
}
// registry.addResourceHandler("/static/**")
// .addResourceLocations("classpath:/static/");
// registry.addResourceHandler(GlobalConstants.DOWNLOAD_URL_PREFIX + "/**")
// .addResourceLocations("file:"+ GlobalConstants.sharePath+"/");
}
}

View File

@ -0,0 +1,86 @@
package com.sa.zentao.controller;
import com.sa.zentao.dao.BusinessException;
import com.sa.zentao.dao.Code;
import com.sa.zentao.dao.Result;
import com.sa.zentao.utils.DateUtils;
import com.sa.zentao.utils.UploadUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@RestController
@RequestMapping("/common")
public class CommonsController {
// @PostMapping("/upload")
// public Result<String> upload(@RequestParam("file") MultipartFile file){
// if (file.isEmpty()) {
// return Result.fail(Code.FAIL);
// }
// try {
// byte[] bytes = file.getBytes();
// String url = UploadUtil.upload(bytes,file.getOriginalFilename());
// return Result.success(url);
// } catch (IOException e) {
// e.printStackTrace();
// }
// return Result.fail(Code.FAIL);
// }
@Value("${file.path.windows}")
private String windowsFilePath;
@Value("${file.path.linux}")
private String linuxFilePath;
@Value("${file.baseUrl}")
private String baseUrl;
@PostMapping("/upload")
public Result<String> upload(@RequestParam("file") MultipartFile file){
if (file.isEmpty()) {
return Result.fail(Code.FAIL);
}
try {
// 获取文件名
String fName = file.getOriginalFilename();
fName=fName.substring(fName.lastIndexOf("."),fName.length());
fName= DateUtils.formatDate(new Date(),"yyyyMMddHHmmss")+UUID.randomUUID().toString().replaceAll("-","")+fName;
// 获取文件的字节
byte[] bytes = file.getBytes();
String p ="";
String os = System.getProperty("os.name");
if (os.toLowerCase().startsWith("win")) { //如果是Windows系统
log.info("win");
os=windowsFilePath +"\\";
}else{ //linux和mac系统
log.info("linux");
os=linuxFilePath+"/";
}
// 使用文件名在服务器端创建文件
java.nio.file.Path path = java.nio.file.Paths.get(os + fName);
// 写入文件到服务器的指定目录
java.nio.file.Files.write(path, bytes);
return Result.success(baseUrl+"/zentao/img/"+fName);
} catch (Exception e) {
throw new BusinessException("文件上传失败");
}
}
}

View File

@ -0,0 +1,112 @@
package com.sa.zentao.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.BusinessException;
import com.sa.zentao.dao.FestivalConfigDTO;
import com.sa.zentao.dao.Result;
import com.sa.zentao.entity.FestivalConfig;
import com.sa.zentao.enums.DeleteFlagEnum;
import com.sa.zentao.qo.FestivalConfigQo;
import com.sa.zentao.service.IFestivalConfigService;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
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.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2023-03-20
*/
@RestController
@RequestMapping("/festival-config")
public class FestivalConfigController {
@Autowired
private IFestivalConfigService festivalConfigService;
//打开记录
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<FestivalConfigDTO>> pageList(@RequestBody FestivalConfigQo qo) {
PageInfo<FestivalConfigDTO> p = festivalConfigService.pageList(qo);
return Result.success(p);
}
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody FestivalConfigQo qo) {
festivalConfigService.add(qo);
return Result.success();
}
@RequestMapping(value = "/delete", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result delete(@RequestBody FestivalConfigQo qo) {
FestivalConfig festivalConfig = festivalConfigService.getById(qo.getId());
festivalConfig.setDeleteFlag(DeleteFlagEnum.DELETED);
this.festivalConfigService.updateById(festivalConfig);
return Result.success();
}
@RequestMapping(value = "/updateById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result updateFestivalConfig(@RequestBody FestivalConfigQo qo) {
List<String> vacationDate = qo.getVacationDate();
if (!CollectionUtils.isEmpty(vacationDate)) {
if (vacationDate.size() != vacationDate.stream().distinct().collect(Collectors.toList()).size()) {
throw new BusinessException("假期重复,请重新选择");
}
}
List<String> repairDate = qo.getRepairDate();
if (!CollectionUtils.isEmpty(repairDate)) {
if (repairDate.size() != repairDate.stream().distinct().collect(Collectors.toList()).size()) {
throw new BusinessException("补班重复,请重新选择");
}
}
festivalConfigService.updateFestivalConfig(qo);
return Result.success();
}
private void dealDownloadExcelProperty(Class detailClass, int level, String v) throws NoSuchFieldException, IllegalAccessException {
Field field = detailClass.getDeclaredField("regionsName");
ExcelProperty annotation = field.getAnnotation(ExcelProperty.class);
InvocationHandler invocationHandler = Proxy.getInvocationHandler(annotation);
Field memberValues = invocationHandler.getClass().getDeclaredField("memberValues");
memberValues.setAccessible(true);
Map memberValuesMap = (Map) memberValues.get(invocationHandler);
memberValuesMap.put("value", new String[]{v});
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-09-14
*/
@RestController
@RequestMapping("/verification-code")
public class VerificationCodeController {
}

View File

@ -0,0 +1,48 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtActionDTO;
import com.sa.zentao.dao.ZtBugDTO;
import com.sa.zentao.entity.ZtAction;
import com.sa.zentao.qo.ActionQo;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtActionService;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-27
*/
@RestController
@RequestMapping("/zt-action")
public class ZtActionController {
@Autowired
private IZtActionService actionService;
@RequestMapping(value = "/actionList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtActionDTO>> actionList(@RequestBody ActionQo qo){
List<ZtActionDTO> p =actionService.actionList(qo);
return Result.success( p);
}
@RequestMapping(value = "/todayActionList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtActionDTO>> todayActionList(@RequestBody ActionQo qo){
List<ZtActionDTO> p =actionService.todayActionList(qo);
return Result.success( p);
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-27
*/
@RestController
@RequestMapping("/zt-actionrecent")
public class ZtActionrecentController {
}

View File

@ -0,0 +1,94 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtBugDTO;
import com.sa.zentao.dao.ZtCaseDTO;
import com.sa.zentao.entity.ZtBug;
import com.sa.zentao.qo.ZtBugQo;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtBugService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-04
*/
@RestController
@RequestMapping("/zt-bug")
public class ZtBugController {
@Autowired
private IZtBugService bugService;
@RequestMapping(value = "/bugPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtBugDTO>> bugPageList(@RequestBody ZtProjectQo qo){
PageInfo<ZtBugDTO> p =bugService.bugPageList(qo);
return Result.success( p);
}
@RequestMapping(value = "/myBugPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtBugDTO>> myBugPageList(@RequestBody ZtProjectQo qo){
PageInfo<ZtBugDTO> p =bugService.myBugPageList(qo);
return Result.success( p);
}
@RequestMapping(value = "/addBug", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addBug(@RequestBody ZtBugDTO dto){
bugService.addBug(dto);
return Result.success();
}
@RequestMapping(value = "/editBug", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result editBug(@RequestBody ZtBugDTO dto){
bugService.editBug(dto);
return Result.success();
}
@RequestMapping(value = "/reActive", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result reActive(@RequestBody ZtBugDTO dto){
bugService.reActive(dto);
return Result.success();
}
@RequestMapping(value = "/changeStatus", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeStatus(@RequestBody ZtBugQo qo){
bugService.changeStatus(qo);
return Result.success();
}
@RequestMapping(value = "/bugById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result bugById(@RequestBody ZtBugQo qo){
return Result.success(bugService.getById(qo.getId()));
}
@RequestMapping(value = "/bugInfoById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result bugInfoById(@RequestBody ZtBugQo qo){
return Result.success(bugService.bugInfoById(qo.getId()));
}
@RequestMapping(value = "/resolved", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result resolved(@RequestBody ZtBugDTO dto){
bugService.resolved(dto);
return Result.success();
}
}

View File

@ -0,0 +1,100 @@
package com.sa.zentao.controller;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtCaseDTO;
import com.sa.zentao.dao.ZtCasestepDTO;
import com.sa.zentao.dao.ZtProjectDTO;
import com.sa.zentao.entity.ZtCasestep;
import com.sa.zentao.entity.ZtTestresult;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtCaseService;
import com.sa.zentao.service.IZtCasestepService;
import com.sa.zentao.service.IZtTestresultService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.ArrayList;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-03
*/
@RestController
@RequestMapping("/zt-case")
public class ZtCaseController {
@Autowired
private IZtCaseService caseService;
@Autowired
private IZtCasestepService casestepService;
@Autowired
private IZtTestresultService testresultService;
@RequestMapping(value = "/addCase", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addCase(@RequestBody ZtCaseDTO dto){
caseService.addCase(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modify(@RequestBody ZtCaseDTO dto){
caseService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/casePageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtCaseDTO>> casePageList(@RequestBody ZtProjectQo qo){
return Result.success(caseService.casePageList(qo));
}
@RequestMapping(value = "/caseStepByCase", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtCasestep>> caseStepByCase(@RequestBody ZtProjectQo qo){
return Result.success(casestepService.list(new QueryWrapper<ZtCasestep>()
.lambda().eq(ZtCasestep::getCaseId,qo.getId())));
}
@RequestMapping(value = "/execCase", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result execCase(@RequestBody ZtCaseDTO dto){
casestepService.execCase(dto);
return Result.success();
}
@RequestMapping(value = "/execListById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result execListById(@RequestBody ZtCaseDTO dto){
List<ZtTestresult> ztTestresult = testresultService.list(new QueryWrapper<ZtTestresult>()
.lambda().eq(ZtTestresult::getCaseId, dto.getId())
.orderByDesc(ZtTestresult::getId)
);
if(ztTestresult==null){
return Result.success(new ArrayList<>());
}
// String stepresults = ztTestresult.getStepresults();
// if(StringUtils.isEmpty(stepresults)){
// return Result.success(new ArrayList<>());
// }
// List<ZtCasestepDTO> ztCasestepDTOS = JSONArray.parseArray(stepresults, ZtCasestepDTO.class);
return Result.success(ztTestresult);
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-03
*/
@RestController
@RequestMapping("/zt-casestep")
public class ZtCasestepController {
}

View File

@ -0,0 +1,122 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sa.zentao.conf.RiskUserThreadLocal;
import com.sa.zentao.dao.BusinessException;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtCaseDTO;
import com.sa.zentao.entity.ZtBug;
import com.sa.zentao.entity.ZtProject;
import com.sa.zentao.entity.ZtStory;
import com.sa.zentao.entity.ZtTask;
import com.sa.zentao.qo.ZtCountQo;
import com.sa.zentao.service.IZtBugService;
import com.sa.zentao.service.IZtProjectService;
import com.sa.zentao.service.IZtStoryService;
import com.sa.zentao.service.IZtTaskService;
import com.sa.zentao.service.impl.IZtCountService;
import com.sa.zentao.utils.DateUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/count")
public class ZtCountController {
@Autowired
private IZtCountService countService;
@Autowired
private IZtProjectService projectService;
/**
* 开发看到的
* 今日工作统计
* 我的任务
* 我的bug
* 我的软件需求
*
* BOSS 刘总 人事待评审 评审通过 进行中 延期 测试完成 上线待验收 验收不通过 验收通过
*
* 产品 只看自己的需求
*
* 项目管理员 bug
*/
@RequestMapping(value = "/todayWorkCount", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result todayWorkCount(@RequestBody ZtCaseDTO dto){
return Result.success(countService.todayWorkCount(dto)) ;
}
@RequestMapping(value = "/storyCount", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result storyCount(@RequestBody ZtCaseDTO dto){
return Result.success(countService.storyCount(dto)) ;
}
//work工作量 月
//任务总量
//需求总工时
//实际产出工时
//其他支持项目产出工时
//实际产出总工时
//可用工时
//工作饱和度
//工作饱和度备注
//产出线上bug率
@RequestMapping(value = "/workDetailsCount", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result workDetailsCount(@RequestBody ZtCountQo qo){
return Result.success(countService.workDetailsCount(qo)) ;
}
//导出work工作量
@RequestMapping(value = "/exportWorkDetailsCount", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public void exportWorkDetailsCount(@RequestBody ZtCountQo qo, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response){
if(qo.getDate()!=null){
qo.setDate(DateUtils.getDayEndDate(qo.getDate()));
}
countService.exportWorkDetailsCount(qo,request,response);
}
//导出项目统计
//work总量 月
@RequestMapping(value = "/exportProjectCount", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public void exportProjectCount(@RequestBody ZtCountQo qo, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response){
countService.exportProjectCount(qo,request,response) ;
}
//
@RequestMapping(value = "/projectList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectList(@RequestBody ZtCaseDTO dto){
List<ZtProject> project = projectService.list(new QueryWrapper<ZtProject>().lambda().eq(ZtProject::getType, "project")
.eq(ZtProject::getStatus,"doing")
);
return Result.success(project) ;
}
//项目 任务 需求 等统计 项目统计
@RequestMapping(value = "/projectInfoById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectInfoById(@RequestBody ZtCaseDTO dto){
return Result.success(countService.projectInfoById(dto.getId())) ;
}
}

View File

@ -0,0 +1,63 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtCronDevopsDTO;
import com.sa.zentao.qo.ZtUserQo;
import com.sa.zentao.service.IZtCronDevopsService;
import org.springframework.beans.factory.annotation.Autowired;
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 java.text.ParseException;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-10-22
*/
@RestController
@RequestMapping("/zt-cron-devops")
public class ZtCronDevopsController {
@Autowired
private IZtCronDevopsService cronDevopsService;
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtCronDevopsDTO> add(@RequestBody ZtCronDevopsDTO dto) throws ParseException {
cronDevopsService.add(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtCronDevopsDTO> modify(@RequestBody ZtCronDevopsDTO dto) throws ParseException {
cronDevopsService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/close", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtCronDevopsDTO> close(@RequestBody ZtCronDevopsDTO dto){
cronDevopsService.close(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo> pageList(@RequestBody ZtUserQo qo){
PageInfo<ZtCronDevopsDTO> page= cronDevopsService.pageList(qo);
return Result.success(page);
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-10-23
*/
@RestController
@RequestMapping("/zt-cron-devops-user")
public class ZtCronDevopsUserController {
}

View File

@ -0,0 +1,66 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtBugDTO;
import com.sa.zentao.dao.ZtEffortDTO;
import com.sa.zentao.entity.ZtEffort;
import com.sa.zentao.qo.EffortQo;
import com.sa.zentao.service.IZtEffortService;
import com.sa.zentao.utils.BeanCopyUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
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 java.util.List;
import java.util.Map;
/**
* <p>
* 工时
* </p>
*
* @author gqb
* @since 2024-08-13
*/
@RestController
@RequestMapping("/zt-effort")
public class ZtEffortController {
@Autowired
private IZtEffortService effortService;
@RequestMapping(value = "/batchAdd", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result batchAdd(@RequestBody ZtEffortDTO dto){
effortService.batchAdd(dto);
return Result.success();
}
@RequestMapping(value = "/timeWork", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result timeWork(@RequestBody ZtEffortDTO dto){
Map<String, String> map = effortService.timeWork(dto);
return Result.success(map);
}
@RequestMapping(value = "/list", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtEffortDTO>> batchAdd(@RequestBody EffortQo qo){
List<ZtEffort> list = effortService.list(new QueryWrapper<ZtEffort>().lambda()
.eq(ZtEffort::getObjecttype,qo.getType())
.eq(ZtEffort::getObjectid,qo.getId())
);
if(CollectionUtils.isEmpty(list)){
return Result.success();
}
return Result.success(BeanCopyUtil.copyListProperties(list,ZtEffortDTO::new));
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-08-01
*/
@RestController
@RequestMapping("/zt-executionproject")
public class ZtExecutionprojectController {
}

View File

@ -0,0 +1,56 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtKanbanDTO;
import com.sa.zentao.dao.ZtKanbancolumnDTO;
import com.sa.zentao.dao.ZtKanbanlaneDTO;
import com.sa.zentao.entity.*;
import com.sa.zentao.qo.KanbanQo;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.*;
import com.sa.zentao.utils.BeanCopyUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
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 java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@RestController
@RequestMapping("/zt-kanban")
public class ZtKanbanController {
@Autowired
private IZtKanbanlaneService kanbanlaneService;
//根据执行id获取看板列表
@RequestMapping(value = "/lookInfoByExec", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtKanbanlaneDTO>> productList(@RequestBody ZtProjectQo qo){
List<ZtKanbanlaneDTO> ztKanbanlanes = kanbanlaneService.lookInfoByExec(qo);
return Result.success(ztKanbanlanes);
}
//根据执行id获取看板列表
@RequestMapping(value = "/changeStatus", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeStatus(@RequestBody KanbanQo qo){
kanbanlaneService.changeStatus(qo);
return Result.success();
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@RestController
@RequestMapping("/zt-kanbancard")
public class ZtKanbancardController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@RestController
@RequestMapping("/zt-kanbancell")
public class ZtKanbancellController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@RestController
@RequestMapping("/zt-kanbancolumn")
public class ZtKanbancolumnController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@RestController
@RequestMapping("/zt-kanbangroup")
public class ZtKanbangroupController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@RestController
@RequestMapping("/zt-kanbanlane")
public class ZtKanbanlaneController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@RestController
@RequestMapping("/zt-kanbanregion")
public class ZtKanbanregionController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@RestController
@RequestMapping("/zt-kanbanspace")
public class ZtKanbanspaceController {
}

View File

@ -0,0 +1,209 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sa.zentao.conf.RiskUserThreadLocal;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtModuleDTO;
import com.sa.zentao.entity.*;
import com.sa.zentao.enums.ActionStatus;
import com.sa.zentao.enums.ActionType;
import com.sa.zentao.qo.ZtModuleQo;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.*;
import com.sa.zentao.utils.BeanCopyUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
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 java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-08-05
*/
@RestController
@RequestMapping("/zt-module")
public class ZtModuleController {
@Autowired
private IZtModuleService moduleService;
@Autowired
private IZtProjectproductService projectproductService;
@Autowired
private IZtProjectService projectService;
@Autowired
private IZtProductService productService;
@Autowired
private IZtExecutionprojectService executionprojectService;
@Autowired
private IZtActionService actionService;
//模块
@RequestMapping(value = "/projectList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtModuleDTO>> projectList(@RequestBody ZtProjectQo qo) {
//项目
List<ZtModule> list = moduleService.list(new QueryWrapper<ZtModule>().lambda()
.eq(ZtModule::getRoot, qo.getId()).eq(ZtModule::getType, "project-story")
);
return Result.success(list);
}
//模块
@RequestMapping(value = "/getById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtModuleDTO>> getById(@RequestBody ZtProjectQo qo) {
//项目
return Result.success(moduleService.getById(qo.getId()));
}
//模块
@RequestMapping(value = "/list", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtModuleDTO>> list(@RequestBody ZtProjectQo qo){
if("story".equalsIgnoreCase(qo.getType())){
List<ZtModule> list = moduleService.list(new QueryWrapper<ZtModule>().lambda()
.eq(ZtModule::getRoot, qo.getId()).eq(ZtModule::getType, qo.getType())
);
return Result.success(list);
}
if("project-story".equalsIgnoreCase(qo.getType())){
//项目模块-加上产品模块
ZtProject project = projectService.getById(qo.getId());
//项目
List<ZtModuleDTO> result=new ArrayList<>();
List<ZtModule> list = moduleService.list(new QueryWrapper<ZtModule>().lambda()
.eq(ZtModule::getRoot, qo.getId()).eq(ZtModule::getType, qo.getType())
);
if(!CollectionUtils.isEmpty(list)){
ZtModuleDTO d=new ZtModuleDTO();
d.setId(project.getId());
d.setName(project.getName());
d.setList(BeanCopyUtil.copyListProperties(list,ZtModuleDTO::new));
d.setType("project-story");
result.add(d);
}
//产品
List<ZtProjectproduct> listProject =
projectproductService.list(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, qo.getId()));
if(!CollectionUtils.isEmpty(listProject)){
ZtProjectproduct ztProjectproduct = listProject.get(0);
List<ZtModule> story = moduleService.list(new QueryWrapper<ZtModule>().lambda()
.eq(ZtModule::getRoot, ztProjectproduct.getProduct()).eq(ZtModule::getType, "story")
);
ZtProduct product = productService.getById(ztProjectproduct.getProduct());
if(!CollectionUtils.isEmpty(story)){
ZtModuleDTO d=new ZtModuleDTO();
d.setId(product.getId());
d.setName(product.getName());
d.setList(BeanCopyUtil.copyListProperties(story,ZtModuleDTO::new));
result.add(d);
}
}
return Result.success(result);
}
if("execution-story".equalsIgnoreCase(qo.getType())){
List<ZtExecutionproject> list = executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda()
.eq(ZtExecutionproject::getExecution, qo.getId())
);
if(CollectionUtils.isEmpty(list)){
return Result.success();
}
List<ZtModuleDTO> result=new ArrayList<>();
//项目
for (ZtExecutionproject p:list) {
List<ZtModule> projectModuleList = moduleService.list(new QueryWrapper<ZtModule>().lambda()
.eq(ZtModule::getRoot,p.getProject()).eq(ZtModule::getType, "project-story")
);
if(!CollectionUtils.isEmpty(projectModuleList)){
ZtProject project = projectService.getById(p.getProject());
ZtModuleDTO d=new ZtModuleDTO();
d.setId(project.getId());
d.setName(project.getName());
d.setList(BeanCopyUtil.copyListProperties(projectModuleList,ZtModuleDTO::new));
result.add(d);
}
}
//产品
List<Integer> pIds = list.stream().map(o -> o.getProject()).collect(Collectors.toList());
List<ZtProjectproduct> listProject =
projectproductService.list(new QueryWrapper<ZtProjectproduct>().lambda().in(ZtProjectproduct::getProject, pIds));
if(!CollectionUtils.isEmpty(listProject)){
for (ZtProjectproduct ztProjectproduct:listProject) {
List<ZtModule> story = moduleService.list(new QueryWrapper<ZtModule>().lambda()
.eq(ZtModule::getRoot, ztProjectproduct.getProduct()).eq(ZtModule::getType, "story")
);
ZtProduct product = productService.getById(ztProjectproduct.getProduct());
if(!CollectionUtils.isEmpty(story)){
ZtModuleDTO d=new ZtModuleDTO();
d.setId(product.getId());
d.setName(product.getName());
d.setList(BeanCopyUtil.copyListProperties(story,ZtModuleDTO::new));
result.add(d);
}
}
}
return Result.success(result);
}
return Result.success();
}
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody ZtModuleDTO dto) {
List<ZtModuleDTO> list = dto.getList();
List<ZtModule> saveList = new ArrayList();
for (ZtModuleDTO l : list) {
ZtModule ztModule = new ZtModule();
BeanUtils.copyProperties(ztModule, l);
saveList.add(ztModule);
}
moduleService.saveBatch(saveList);
actionService.addAction(ActionType.CP, ActionStatus.BJ,null,null,null,null, RiskUserThreadLocal.get().getName(),null,null);
return Result.success();
}
@RequestMapping(value = "/modifyModule", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modifyModule(@RequestBody ZtModuleDTO dto) {
moduleService.modifyModule(dto);
return Result.success();
}
@RequestMapping(value = "/getModuleByStoryId", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result getModuleByStoryId(@RequestBody ZtModuleQo qo) {
List<ZtModule> moduleList = moduleService.getModuleByStoryId(qo);
return Result.success(moduleList);
}
}

View File

@ -0,0 +1,107 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtProductDTO;
import com.sa.zentao.dao.ZtProjectDTO;
import com.sa.zentao.entity.ZtProduct;
import com.sa.zentao.entity.ZtProjectproduct;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtProductService;
import com.sa.zentao.service.IZtProjectproductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
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 java.util.List;
import java.util.stream.Collectors;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-13
*/
@RestController
@RequestMapping("/zt-product")
public class ZtProductController {
@Autowired
private IZtProductService ztProductService;
@Autowired
private IZtProjectproductService projectproductService;
//项目集
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtProjectDTO>> pageList(@RequestBody ZtProjectQo qo){
return Result.success(ztProductService.pageList(qo));
}
//产品
@RequestMapping(value = "/productPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtProjectDTO>> productPageList(@RequestBody ZtProjectQo qo){
return Result.success(ztProductService.productPageList(qo));
}
//关闭项目
@RequestMapping(value = "/productClose", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectClose(@RequestBody ZtProductDTO dto){
ztProductService.productClose(dto);
return Result.success();
}
//删除项目
@RequestMapping(value = "/productDeleted", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result productDeleted(@RequestBody ZtProductDTO dto){
ztProductService.productDeleted(dto);
return Result.success();
}
@RequestMapping(value = "/productList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtProjectDTO>> productList(@RequestBody ZtProjectQo qo){
return Result.success(ztProductService.productList(qo));
}
@RequestMapping(value = "/productListByProductId", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtProjectDTO>> productListByProductId(@RequestBody ZtProjectQo qo){
return Result.success(ztProductService.productListByProductId
(qo));
}
@RequestMapping(value = "/addProduct", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addProduct(@RequestBody ZtProductDTO dto){
ztProductService.addProduct(dto);
return Result.success();
}
@RequestMapping(value = "/modifyProduct", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modifyProduct(@RequestBody ZtProductDTO dto){
ztProductService.modifyProduct(dto);
return Result.success();
}
@RequestMapping(value = "/getProductByProjectId", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result getProductByProjectId(@RequestBody ZtProductDTO dto){
ZtProjectproduct project = projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda()
.eq(ZtProjectproduct::getProject, dto.getId()));
if(project==null){
return Result.success();
}
ZtProduct product = ztProductService.getById(project.getProduct());
return Result.success(product);
}
}

View File

@ -0,0 +1,319 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.BusinessException;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtProjectDTO;
import com.sa.zentao.dao.ZtStoryDTO;
import com.sa.zentao.entity.ZtProject;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtKanbancolumnService;
import com.sa.zentao.service.IZtKanbanlaneService;
import com.sa.zentao.service.IZtProductService;
import com.sa.zentao.service.IZtProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
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 java.util.ArrayList;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-13
*/
@RestController
@RequestMapping("/zt-project")
public class ZtProjectController {
@Autowired
private IZtProjectService ztProjectService;
@Autowired
private IZtProductService IZtProductService;
//添加项目集
@RequestMapping(value = "/addProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addProject(@RequestBody ZtProjectDTO dto){
ztProjectService.addProject(dto);
return Result.success();
}
//修改执行
@RequestMapping(value = "/editImplement", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result editImplement(@RequestBody ZtProjectDTO dto){
ztProjectService.editImplement(dto);
return Result.success();
}
@RequestMapping(value = "/changeStatusImplement", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeStatusImplement(@RequestBody ZtProjectDTO dto){
ztProjectService.changeStatusImplement(dto);
return Result.success();
}
//开始项目
@RequestMapping(value = "/projectStart", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectStart(@RequestBody ZtProjectDTO dto){
ztProjectService.projectStart(dto);
return Result.success();
}
@RequestMapping(value = "/copyExecList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result copyExecList(@RequestBody ZtProjectDTO dto){
List<ZtProjectDTO> list = ztProjectService.copyExecList(dto);
return Result.success(list);
}
@RequestMapping(value = "/copyExecInfoById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result copyExecInfoById(@RequestBody ZtProjectDTO dto){
ZtProjectDTO projectDTO = ztProjectService.copyExecInfoById(dto);
return Result.success(projectDTO);
}
//关闭项目集
@RequestMapping(value = "/projectClose", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectClose(@RequestBody ZtProjectDTO dto){
ztProjectService.projectClose(dto);
return Result.success();
}
//删除项目集
@RequestMapping(value = "/projectDeleted", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectDeleted(@RequestBody ZtProjectDTO dto){
ztProjectService.projectDeleted(dto);
return Result.success();
}
//activated 激活
@RequestMapping(value = "/projectActivated", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectActivated(@RequestBody ZtProjectDTO dto){
ztProjectService.projectActivated(dto);
return Result.success();
}
//suspended 挂起
@RequestMapping(value = "/projectSuspended", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectSuspended(@RequestBody ZtProjectDTO dto){
ztProjectService.projectSuspended(dto);
return Result.success();
}
//修改项目集
@RequestMapping(value = "/modifyProgram", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modifyProgram(@RequestBody ZtProjectDTO dto){
ztProjectService.modifyProgram(dto);
return Result.success();
}
//添加项目
//添加执行
@RequestMapping(value = "/addImplement", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtProjectDTO>> implement(@RequestBody ZtProjectDTO dto){
ztProjectService.addProject(dto);
return Result.success();
}
@RequestMapping(value = "/parentList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtProjectDTO>> parentList(@RequestBody ZtProjectDTO dto){
return Result.success(ztProjectService.parentList(dto));
}
@RequestMapping(value = "/getStoryByImplementId", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtStoryDTO>> getStoryByImplementId(@RequestBody ZtProjectDTO dto){
return Result.success(ztProjectService.getStoryByImplementId(dto));
}
//执行关联需求
@RequestMapping(value = "/implementSyncStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result implementSyncStory(@RequestBody ZtProjectDTO dto){
if(dto.getId()==null|| CollectionUtils.isEmpty(dto.getStoryIds())){
throw new BusinessException("添加失败");
}
ztProjectService.implementSyncStory(dto);
return Result.success();
}
//项目关联需求
@RequestMapping(value = "/projectSyncStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectSyncStory(@RequestBody ZtProjectDTO dto){
if(dto.getProject()==null|| CollectionUtils.isEmpty(dto.getStoryIds())){
throw new BusinessException("添加失败");
}
ztProjectService.projectSyncStory(dto);
return Result.success();
}
//项目关联需求
@RequestMapping(value = "/executionSyncStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result executionSyncStory(@RequestBody ZtProjectDTO dto){
if(dto.getExcludeId()==null|| CollectionUtils.isEmpty(dto.getStoryIds())){
throw new BusinessException("添加失败");
}
ztProjectService.executionSyncStory(dto);
return Result.success();
}
//查询项目信息根据需求
@RequestMapping(value = "/projectByExecution", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectByExecution(@RequestBody ZtProjectDTO dto){
return Result.success(ztProjectService.projectByExecution(dto));
}
@RequestMapping(value = "/implementSyncProduct", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result implementSyncProduct(@RequestBody ZtProjectDTO dto){
if(dto.getId()==null|| CollectionUtils.isEmpty(dto.getProductIds())){
throw new BusinessException("添加失败");
}
ztProjectService.implementSyncProduct(dto);
return Result.success();
}
@RequestMapping(value = "/authTreeParentList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtProjectDTO>> authTreeParentList(@RequestBody ZtProjectDTO dto){
return Result.success(ztProjectService.authTreeParentList(dto));
}
@RequestMapping(value = "/treeParentList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtProjectDTO>> treeParentList(@RequestBody ZtProjectDTO dto){
return Result.success(ztProjectService.treeParentList(dto));
}
//项目集
@RequestMapping(value = "/groupPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtProjectDTO>> pageList(@RequestBody ZtProjectQo qo){
return Result.success(ztProjectService.groupPageList(qo));
}
//项目列表
@RequestMapping(value = "/typeProductList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtProjectDTO>> typeProductList(@RequestBody ZtProjectQo qo){
return Result.success(ztProjectService.typeProductList(qo));
}
//项目根据id
@RequestMapping(value = "/projectInfoById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtProject> projectInfoById(@RequestBody ZtProjectQo qo){
return Result.success(ztProjectService.getById(qo.getId()));
}
//执行列表
@RequestMapping(value = "/implementPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtProjectDTO>> implementPageList(@RequestBody ZtProjectQo qo){
return Result.success(ztProjectService.implementPageList(qo));
}
//执行下拉
@RequestMapping(value = "/implementList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtProjectDTO>> implementList(@RequestBody ZtProjectQo qo){
if(qo.getImplementId()==null){
return Result.success(new ArrayList<ZtProjectDTO>());
}
//执行
ZtProject project = ztProjectService.getById(qo.getImplementId());
//项目
if(project==null){
return Result.success(new ArrayList<ZtProjectDTO>());
}
List<ZtProject> list = ztProjectService.list(new QueryWrapper<ZtProject>().lambda().eq(ZtProject::getProject, project.getProject()));
return Result.success(list);
}
//项目列表
@RequestMapping(value = "/pageProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtProjectDTO>> pageProject(@RequestBody ZtProjectQo qo){
return Result.success(ztProjectService.pageProject(qo));
}
//修改项目
@RequestMapping(value = "/modifyProduct", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modifyProduct(@RequestBody ZtProjectDTO dto){
ztProjectService.modifyProject(dto);
return Result.success();
}
//搜索项目根据产品
@RequestMapping(value = "/projectListByProduct", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectListByProduct(@RequestBody ZtProjectQo qo){
return Result.success(this.ztProjectService.getProjectByProduct(qo));
}
//搜索执行根据产品 和 项目
@RequestMapping(value = "/executionListByProduct", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result executionListByProduct(@RequestBody ZtProjectQo qo){
return Result.success(this.ztProjectService.executionListByProduct(qo));
}
@RequestMapping(value = "/executionListByProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result executionListByProject(@RequestBody ZtProjectQo qo){
return Result.success(this.ztProjectService.executionListByProject(qo));
}
//查询执行 根据项目
@RequestMapping(value = "/implementByProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result implementByProject(@RequestBody ZtProjectQo qo){
return Result.success(this.ztProjectService.implementByProject(qo));
}
//countProject
@RequestMapping(value = "/countProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result countProject(@RequestBody ZtProjectQo qo){
return Result.success(this.ztProjectService.countProject(qo));
}
//查询team根据执行id
@RequestMapping(value = "/execTeamById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result execTeamById(@RequestBody ZtProjectQo qo){
return Result.success(this.ztProjectService.execTeamById(qo));
}
@RequestMapping(value = "/execTeamUpdate", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result execTeamUpdate(@RequestBody ZtProjectQo qo){
this.ztProjectService.execTeamUpdate(qo);
return Result.success();
}
@RequestMapping(value = "/execTeamList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result execTeamList(@RequestBody ZtProjectQo qo){
return Result.success(this.ztProjectService.execTeamList(qo));
}
//项目工时 每个人 按月份 工时统计
@RequestMapping(value = "/projectTeamTimeWork", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result projectTeamTimeWork(@RequestBody ZtProjectQo qo){
return Result.success(this.ztProjectService.projectTeamTimeWork(qo));
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-18
*/
@RestController
@RequestMapping("/zt-projectproduct")
public class ZtProjectproductController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-02
*/
@RestController
@RequestMapping("/zt-projectstory")
public class ZtProjectstoryController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-24
*/
@RestController
@RequestMapping("/zt-searchindex")
public class ZtSearchindexController {
}

View File

@ -0,0 +1,180 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtProjectDTO;
import com.sa.zentao.dao.ZtStoryDTO;
import com.sa.zentao.entity.ZtProject;
import com.sa.zentao.entity.ZtProjectproduct;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtProjectproductService;
import com.sa.zentao.service.IZtStoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
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 java.util.List;
import java.util.stream.Collectors;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-24
*/
@RestController
@RequestMapping("/zt-story")
public class ZtStoryController {
@Autowired
private IZtStoryService ztStoryService;
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtStoryDTO> storyPageList(@RequestBody ZtProjectQo qo){
return Result.success(ztStoryService.pageList(qo));
}
@RequestMapping(value = "/projectStoryPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtStoryDTO> projectStoryPageList(@RequestBody ZtProjectQo qo){
return Result.success(ztStoryService.projectStoryPageList(qo));
}
@RequestMapping(value = "/storyListByProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtStoryDTO> storyListByProject(@RequestBody ZtProjectQo qo){
List<ZtStoryDTO> list=ztStoryService.storyListByProject(qo);
return Result.success(list);
}
@RequestMapping(value = "/storyListByProductId", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtStoryDTO> storyListByProductId(@RequestBody ZtProjectQo qo){
List<ZtStoryDTO> list=ztStoryService.storyListByProductId(qo);
return Result.success(list);
}
@RequestMapping(value = "/storyListByExecution", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtStoryDTO> storyListByExecution(@RequestBody ZtProjectQo qo){
List<ZtStoryDTO> list=ztStoryService.storyListByExecution(qo);
return Result.success(list);
}
@RequestMapping(value = "/storyNoSyncProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtStoryDTO> storyNoSyncProject(@RequestBody ZtProjectQo qo){
List<ZtStoryDTO> list=ztStoryService.storyNoSyncProject(qo);
return Result.success(list);
}
@RequestMapping(value = "/execNoSyncProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtStoryDTO> execNoSyncProject(@RequestBody ZtProjectQo qo){
List<ZtStoryDTO> list=ztStoryService.execNoSyncProject(qo);
return Result.success(list);
}
@RequestMapping(value = "/addStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addStory(@RequestBody ZtStoryDTO dto){
ztStoryService.addStory(dto);
return Result.success();
}
@RequestMapping(value = "/editStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result editStory(@RequestBody ZtStoryDTO dto){
ztStoryService.editStory(dto);
return Result.success();
}
//关闭
@RequestMapping(value = "/closeStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result closeStory(@RequestBody ZtStoryDTO dto){
ztStoryService.closeStory(dto);
return Result.success();
}
//指派
@RequestMapping(value = "/assignedTo", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result assignedTo(@RequestBody ZtStoryDTO dto){
ztStoryService.assignedTo(dto);
return Result.success();
}
//验收
@RequestMapping(value = "/storyYs", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result storyYs(@RequestBody ZtStoryDTO dto){
ztStoryService.storyYs(dto);
return Result.success();
}
//撤销评审
@RequestMapping(value = "/cancelReview", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result cancelReview(@RequestBody ZtStoryDTO dto){
ztStoryService.cancelReview(dto);
return Result.success();
}
//添加评审
@RequestMapping(value = "/addReview", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addReview(@RequestBody ZtStoryDTO dto){
ztStoryService.addReview(dto);
return Result.success();
}
//评审
@RequestMapping(value = "/userReview", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result userReview(@RequestBody ZtStoryDTO dto){
ztStoryService.userReview(dto);
return Result.success();
}
//获取需求 根据id
@RequestMapping(value = "/getStoryById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result getStoryById(@RequestBody ZtStoryDTO dto){
ZtStoryDTO storyDTO = ztStoryService.getStoryById(dto.getId());
return Result.success(storyDTO);
}
//切换状态
@RequestMapping(value = "/changeStatus", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeStatus(@RequestBody ZtStoryDTO dto){
ztStoryService.changeStatus(dto);
return Result.success();
}
//切换执行
@RequestMapping(value = "/changeExecution", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeExecution(@RequestBody ZtStoryDTO dto){
ztStoryService.changeExecution(dto);
return Result.success();
}
//切换指派
@RequestMapping(value = "/changeAssignedTo", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeAssignedTo(@RequestBody ZtStoryDTO dto){
ztStoryService.changeAssignedTo(dto);
return Result.success();
}
@Autowired
private IZtProjectproductService projectproductService;
//迭代列表根据项目id
@RequestMapping(value = "/execListByProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result execListByProject(@RequestBody ZtStoryDTO dto){
if(dto.getProduct()!=null){
List<ZtProjectproduct> list = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>().lambda()
.eq(ZtProjectproduct::getProduct, dto.getProduct()));
if(CollectionUtils.isEmpty(list)){
return Result.success();
}
dto.setProjects(list.stream().map(o->o.getProject()).collect(Collectors.toList()));
}
List<ZtProject> list = ztStoryService.execListByProject(dto);
return Result.success(list);
}
}

View File

@ -0,0 +1,69 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtStoryDTO;
import com.sa.zentao.dao.ZtStoryFeedbackDTO;
import com.sa.zentao.entity.ZtStoryFeedback;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtStoryFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-10-15
*/
@RestController
@RequestMapping("/zt-story-feedback")
public class ZtStoryFeedbackController {
@Autowired
private IZtStoryFeedbackService storyFeedbackService;
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtStoryFeedbackDTO> storyPageList(@RequestBody ZtProjectQo qo){
return Result.success(storyFeedbackService.pageList(qo));
}
@RequestMapping(value = "/addFeedback", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addStory(@RequestBody ZtStoryFeedbackDTO dto){
storyFeedbackService.addFeedback(dto);
return Result.success();
}
@RequestMapping(value = "/editFeedback", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result editFeedback(@RequestBody ZtStoryFeedbackDTO dto){
storyFeedbackService.editFeedback(dto);
return Result.success();
}
@RequestMapping(value = "/changeStatus", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeStatus(@RequestBody ZtStoryFeedbackDTO dto){
storyFeedbackService.changeStatus(dto);
return Result.success();
}
@RequestMapping(value = "/list", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result list(@RequestBody ZtStoryFeedbackDTO dto){
List<ZtStoryFeedback> waitList = storyFeedbackService.list(new QueryWrapper<ZtStoryFeedback>()
.lambda().eq(ZtStoryFeedback::getStatus, "wait"));
return Result.success(waitList);
}
}

View File

@ -0,0 +1,72 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtStoryDTO;
import com.sa.zentao.dao.ZtStoryUserDTO;
import com.sa.zentao.entity.ZtStoryUser;
import com.sa.zentao.qo.StoryQo;
import com.sa.zentao.service.IZtStoryUserService;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.Arrays;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-10-21
*/
@RestController
@RequestMapping("/zt-story-user")
public class ZtStoryUserController {
@Autowired
private IZtStoryUserService storyUserService;
@RequestMapping(value = "/changeStatus", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeStatus(@RequestBody ZtStoryUserDTO dto){
storyUserService.changeStatus(dto);
return Result.success();
}
@RequestMapping(value = "/addStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addStory(@RequestBody ZtStoryUserDTO dto){
storyUserService.addStory(dto);
return Result.success();
}
@RequestMapping(value = "/editStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result editStory(@RequestBody ZtStoryUserDTO dto){
storyUserService.editStory(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody StoryQo qo){
PageInfo<ZtStoryUserDTO> p = storyUserService.pageList(qo);
return Result.success(p);
}
@RequestMapping(value = "/storyList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result storyList(@RequestBody StoryQo qo){
List<ZtStoryUser> list = storyUserService.list(new QueryWrapper<ZtStoryUser>()
.lambda().eq(ZtStoryUser::getProduct,qo.getId()).in(ZtStoryUser::getStatus, "wait","active"));
return Result.success(list);
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-24
*/
@RestController
@RequestMapping("/zt-storyreview")
public class ZtStoryreviewController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-03
*/
@RestController
@RequestMapping("/zt-storyspec")
public class ZtStoryspecController {
}

View File

@ -0,0 +1,111 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtProjectDTO;
import com.sa.zentao.dao.ZtTaskDTO;
import com.sa.zentao.entity.ZtTask;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtTaskService;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-25
*/
@RestController
@RequestMapping("/zt-task")
public class ZtTaskController {
@Autowired
private IZtTaskService ztTaskService;
@RequestMapping(value = "/taskPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<PageInfo<ZtTaskDTO>> taskPageList(@RequestBody ZtProjectQo qo){
return Result.success(ztTaskService.taskPageList(qo));
}
@RequestMapping(value = "/addTask", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result addTask(@RequestBody ZtTaskDTO dto){
ztTaskService.addTask(dto);
return Result.success();
}
@RequestMapping(value = "/batchAddTask", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result batchAddTask(@RequestBody ZtTaskDTO dto){
ztTaskService.batchAddTask(dto);
return Result.success();
}
@RequestMapping(value = "/modifyTask", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modifyTask(@RequestBody ZtTaskDTO dto){
ztTaskService.modifyTask(dto);
return Result.success();
}
//开始任务
@RequestMapping(value = "/startTask", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result startTask(@RequestBody ZtTaskDTO dto){
ztTaskService.startTask(dto);
return Result.success();
}
//结束任务
@RequestMapping(value = "/finishTask", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result finishTask(@RequestBody ZtTaskDTO dto){
ztTaskService.finishTask(dto);
return Result.success();
}
//关闭任务
@RequestMapping(value = "/closeTask", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result closeTask(@RequestBody ZtTaskDTO dto){
ztTaskService.closeTask(dto);
return Result.success();
}
//取消任务
@RequestMapping(value = "/cancelTask", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result cancelTask(@RequestBody ZtTaskDTO dto){
ztTaskService.cancelTask(dto);
return Result.success();
}
//任务根据执行 和 需求
@RequestMapping(value = "/taskListByExecution", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result taskListByExecution(@RequestBody ZtTaskDTO dto){
List<ZtTaskDTO> list=ztTaskService.taskListByExecution(dto);
return Result.success(list);
}
//获取Task根据id
@RequestMapping(value = "/getTaskById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result getTaskById(@RequestBody ZtTaskDTO dto){
return Result.success(ztTaskService.getById(dto.getId()));
}
//取消任务
@RequestMapping(value = "/taskListByStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result taskListByStory(@RequestBody ZtTaskDTO dto){
// 需求关联的迭代
List<ZtTask> list = this.ztTaskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, dto.getStory()));
return Result.success(list);
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-25
*/
@RestController
@RequestMapping("/zt-taskestimate")
public class ZtTaskestimateController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-25
*/
@RestController
@RequestMapping("/zt-taskspec")
public class ZtTaskspecController {
}

View File

@ -0,0 +1,31 @@
package com.sa.zentao.controller;
import com.sa.zentao.dao.Result;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtTaskteamService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-17
*/
@RestController
@RequestMapping("/zt-taskteam")
public class ZtTaskteamController {
@Autowired
private IZtTaskteamService taskteamService;
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-05
*/
@RestController
@RequestMapping("/zt-team")
public class ZtTeamController {
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-07-29
*/
@RestController
@RequestMapping("/zt-testresult")
public class ZtTestresultController {
}

View File

@ -0,0 +1,36 @@
package com.sa.zentao.controller;
import com.sa.zentao.dao.Result;
import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.IZtTesttaskService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-10-21
*/
@RestController
@RequestMapping("/zt-testtask")
public class ZtTesttaskController {
@Autowired
private IZtTesttaskService testtaskService;
//查询执行 根据项目
@RequestMapping(value = "/testtaskByProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result testtaskByProject(@RequestBody ZtProjectQo qo){
return Result.success(this.testtaskService.testtaskByProject(qo));
}
}

View File

@ -0,0 +1,160 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.conf.RiskUserThreadLocal;
import com.sa.zentao.dao.BusinessException;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtProjectDTO;
import com.sa.zentao.dao.ZtUserDTO;
import com.sa.zentao.entity.ZtUser;
import com.sa.zentao.enums.ActionStatus;
import com.sa.zentao.enums.ActionType;
import com.sa.zentao.qo.ZtUserQo;
import com.sa.zentao.service.IZtActionService;
import com.sa.zentao.service.IZtUserService;
import com.sa.zentao.utils.JwtUtil;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.sms.v20190711.SmsClient;
import com.tencentcloudapi.sms.v20190711.models.SendSmsRequest;
import com.tencentcloudapi.sms.v20190711.models.SendSmsResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.CollectionUtils;
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 java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-06-18
*/
@RestController
@RequestMapping("/zt-user")
public class ZtUserController {
@Autowired
private IZtUserService userService;
@Autowired
private IZtActionService actionService;
@RequestMapping(value = "/userList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtUser>> userList(@RequestBody ZtProjectDTO dto){
return Result.success(userService.list(new QueryWrapper<ZtUser>()
.lambda().eq(ZtUser::getDeleted,"0")
));
}
@RequestMapping(value = "/storyReviewList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtUser>> storyReviewList(@RequestBody ZtProjectDTO dto){
return Result.success(userService.storyReviewList(dto));
}
@RequestMapping(value = "/sendCode", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<List<ZtUser>> sendCode(@RequestBody ZtUser user){
userService.sendCode(user);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody ZtUserQo qo){
PageInfo<ZtUserDTO> page=userService.pageList(qo);
return Result.success(page);
}
@RequestMapping(value = "/login", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtUser> login(@RequestBody ZtUser user){
ZtUser login =userService.login(user);
ZtUserDTO ztUserDTO = new ZtUserDTO();
BeanUtils.copyProperties(login,ztUserDTO);
String sign = JwtUtil.sign(ztUserDTO);
ztUserDTO.setToken(sign);
this.actionService.addAction(ActionType.LOGIN, ActionStatus.LOGIN,login.getId(),null,null,null,login.getAccount(),null,null);
return Result.success(ztUserDTO);
}
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtUser> add(@RequestBody ZtUserDTO user){
ZtUser login = userService.getOne(new QueryWrapper<ZtUser>().lambda().eq(ZtUser::getAccount, user.getAccount()));
if(login!=null){
throw new BusinessException("存在");
}
ZtUser ztUser = new ZtUser();
BeanUtils.copyProperties(user,ztUser);
List<String> productList = user.getProductList();
if(!CollectionUtils.isEmpty(productList)){
ztUser.setProductIds(StringUtils.join(productList,","));
}
this.userService.save(ztUser);
this.actionService.addAction(ActionType.USER, ActionStatus.XJ,ztUser.getId(),null,null,null, RiskUserThreadLocal.get().getName(),null,ztUser.getAccount());
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result<ZtUser> modify(@RequestBody ZtUserDTO user){
ZtUser ztUser = userService.getById(user.getId());
if(ztUser==null){
throw new BusinessException("不存在");
}
List<ZtUser> list = userService.list(new QueryWrapper<ZtUser>().lambda().eq(ZtUser::getAccount, user.getAccount())
.ne(ZtUser::getId, user.getId())
);
if(!CollectionUtils.isEmpty(list)){
throw new BusinessException("请检查用户");
}
ztUser.setAccount(user.getAccount());
ztUser.setPassword(user.getPassword());
ztUser.setUserType(user.getUserType());
ztUser.setEmail(user.getEmail());
ztUser.setPhone(user.getPhone());
if(!CollectionUtils.isEmpty(user.getProductList())){
ztUser.setProductIds(StringUtils.join(user.getProductList(),","));
}
this.userService.update(new UpdateWrapper<ZtUser>().lambda()
.set(ZtUser::getPassword,user.getPassword())
.set(ZtUser::getUserType,user.getUserType())
.set(ZtUser::getEmail,user.getEmail())
.set(ZtUser::getProductIds,ztUser.getProductIds())
.set(ZtUser::getPhone,ztUser.getPhone())
.eq(ZtUser::getId,ztUser.getId())
);
this.actionService.addAction(ActionType.USER, ActionStatus.BJ,ztUser.getId(),null,null,null,RiskUserThreadLocal.get().getName(),null,user.getAccount());
return Result.success();
}
}

View File

@ -0,0 +1,55 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtYwBackupsDTO;
import com.sa.zentao.dao.ZtYwPatrolDTO;
import com.sa.zentao.qo.ZtYwPatrolQo;
import com.sa.zentao.service.IZtYwBackupsService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-11-18
*/
@RestController
@RequestMapping("/zt-yw-backups")
public class ZtYwBackupsController {
@Autowired
private IZtYwBackupsService backupsService;
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody ZtYwBackupsDTO dto){
backupsService.add(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modify(@RequestBody ZtYwBackupsDTO dto){
backupsService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody ZtYwPatrolQo qo){
PageInfo<ZtYwBackupsDTO> page=backupsService.pageList(qo);
return Result.success(page);
}
}

View File

@ -0,0 +1,82 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtYwChangeDTO;
import com.sa.zentao.dao.ZtYwFwqsearchDTO;
import com.sa.zentao.qo.ZtYwPatrolQo;
import com.sa.zentao.service.IZtYwChangeService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@RestController
@RequestMapping("/zt-yw-change")
public class ZtYwChangeController {
@Autowired
private IZtYwChangeService ywChangeService;
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody ZtYwChangeDTO dto){
ywChangeService.add(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modify(@RequestBody ZtYwChangeDTO dto){
ywChangeService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody ZtYwPatrolQo qo){
PageInfo<ZtYwChangeDTO> page=ywChangeService.pageList(qo);
return Result.success(page);
}
@RequestMapping(value = "/approval", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result approval(@RequestBody ZtYwPatrolQo qo){
ywChangeService.approval(qo);
return Result.success();
}
@RequestMapping(value = "/changeStart", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result changeStart(@RequestBody ZtYwPatrolQo qo){
ywChangeService.changeStart(qo);
return Result.success();
}
@RequestMapping(value = "/ssResult", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result ssResult(@RequestBody ZtYwPatrolQo qo){
ywChangeService.ssResult(qo);
return Result.success();
}
@RequestMapping(value = "/check", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result check(@RequestBody ZtYwPatrolQo qo){
ywChangeService.check(qo);
return Result.success();
}
}

View File

@ -0,0 +1,63 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtYwFaultDTO;
import com.sa.zentao.dao.ZtYwPatrolDTO;
import com.sa.zentao.qo.ZtYwPatrolQo;
import com.sa.zentao.service.IZtYwFaultService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@RestController
@RequestMapping("/zt-yw-fault")
public class ZtYwFaultController {
@Autowired
private IZtYwFaultService ywFaultService;
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody ZtYwFaultDTO dto){
ywFaultService.add(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modify(@RequestBody ZtYwFaultDTO dto){
ywFaultService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/handle", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result handle(@RequestBody ZtYwFaultDTO dto){
ywFaultService.handle(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody ZtYwPatrolQo qo){
PageInfo<ZtYwFaultDTO> page=ywFaultService.pageList(qo);
return Result.success(page);
}
}

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@RestController
@RequestMapping("/zt-yw-fault-list")
public class ZtYwFaultListController {
}

View File

@ -0,0 +1,55 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtYwBackupsDTO;
import com.sa.zentao.dao.ZtYwFwqsearchDTO;
import com.sa.zentao.qo.ZtYwPatrolQo;
import com.sa.zentao.service.IZtYwFwqsearchService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@RestController
@RequestMapping("/zt-yw-fwqsearch")
public class ZtYwFwqsearchController {
@Autowired
private IZtYwFwqsearchService ywFwqsearchService;
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody ZtYwFwqsearchDTO dto){
ywFwqsearchService.add(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modify(@RequestBody ZtYwFwqsearchDTO dto){
ywFwqsearchService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody ZtYwPatrolQo qo){
PageInfo<ZtYwFwqsearchDTO> page=ywFwqsearchService.pageList(qo);
return Result.success(page);
}
}

View File

@ -0,0 +1,57 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtYwMachineRoomDTO;
import com.sa.zentao.dao.ZtYwPatrolDTO;
import com.sa.zentao.qo.ZtYwPatrolQo;
import com.sa.zentao.service.IZtYwMachineRoomService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@RestController
@RequestMapping("/zt-yw-machine-room")
public class ZtYwMachineRoomController {
@Autowired
private IZtYwMachineRoomService machineRoomService;
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody ZtYwMachineRoomDTO dto){
machineRoomService.add(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modify(@RequestBody ZtYwMachineRoomDTO dto){
machineRoomService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody ZtYwPatrolQo qo){
PageInfo<ZtYwMachineRoomDTO> page=machineRoomService.pageList(qo);
return Result.success(page);
}
}

View File

@ -0,0 +1,64 @@
package com.sa.zentao.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.BusinessException;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtUserDTO;
import com.sa.zentao.dao.ZtYwPatrolDTO;
import com.sa.zentao.entity.ZtUser;
import com.sa.zentao.qo.ZtUserQo;
import com.sa.zentao.qo.ZtYwPatrolQo;
import com.sa.zentao.service.IZtYwPatrolService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-11-18
*/
@RestController
@RequestMapping("/zt-yw-patrol")
public class ZtYwPatrolController {
@Autowired
private IZtYwPatrolService ywPatrolService;
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody ZtYwPatrolDTO dto){
ywPatrolService.add(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modify(@RequestBody ZtYwPatrolDTO dto){
ywPatrolService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody ZtYwPatrolQo qo){
PageInfo<ZtYwPatrolDTO> page=ywPatrolService.pageList(qo);
return Result.success(page);
}
}

View File

@ -0,0 +1,80 @@
package com.sa.zentao.controller;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.dao.Result;
import com.sa.zentao.dao.ZtYwChangeDTO;
import com.sa.zentao.dao.ZtYwTaskDTO;
import com.sa.zentao.qo.ZtYwPatrolQo;
import com.sa.zentao.service.IZtYwTaskService;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@RestController
@RequestMapping("/zt-yw-task")
public class ZtYwTaskController {
@Autowired
private IZtYwTaskService ywTaskService;
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result add(@RequestBody ZtYwTaskDTO dto){
ywTaskService.add(dto);
return Result.success();
}
@RequestMapping(value = "/start", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result start(@RequestBody ZtYwTaskDTO dto){
ywTaskService.start(dto);
return Result.success();
}
@RequestMapping(value = "/finish", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result finish(@RequestBody ZtYwTaskDTO dto){
ywTaskService.finish(dto);
return Result.success();
}
@RequestMapping(value = "/check", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result check(@RequestBody ZtYwTaskDTO dto){
ywTaskService.check(dto);
return Result.success();
}
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result modify(@RequestBody ZtYwTaskDTO dto){
ywTaskService.modify(dto);
return Result.success();
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
public Result pageList(@RequestBody ZtYwPatrolQo qo){
PageInfo<ZtYwTaskDTO> page=ywTaskService.pageList(qo);
return Result.success(page);
}
}

View File

@ -0,0 +1,17 @@
package com.sa.zentao.dao;
public class BusinessException extends RuntimeException {
public BusinessException(Code code){
super(code.getValue());
this.code=code;
}
public BusinessException(String value){
super(value);
this.value=value;
}
public String value;
public Code code;
}

View File

@ -0,0 +1,38 @@
package com.sa.zentao.dao;
public enum Code {
SUCCESS(0, "成功"),
FAIL(-1, "失败"),
CFTJ(-2, "重复添加"),
PLEASELOGIN(401, "请登录");
private Integer code;
private String value;
private Code(Integer code, String value) {
this.code = code;
this.value = value;
}
public static Code trans(Integer code) {
Code[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
Code val = var1[var3];
if (val.getCode() == code) {
return val;
}
}
throw new IllegalArgumentException();
}
public String getValue() {
return this.value;
}
public Integer getCode() {
return this.code;
}
}

View File

@ -0,0 +1,86 @@
package com.sa.zentao.dao;
import com.sa.zentao.enums.DeleteFlagEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2023-03-20
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class FestivalConfigDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
/**
* 名称
*/
private String name;
/**
* 哪一年
*/
private String year;
/**
* 假期
*/
private String vacationDate;
private String vacationDateValue;
/**
* 补班
*/
private String repairDate;
private String repairDateValue;
//f法定节假日
private String legalVacationDate;
//f法定节假日
private String legalVacationDateValue;
/**
* 1删除
*/
private DeleteFlagEnum deleteFlag;
/**
* 创建
*/
private Date createDate;
/**
* 创建
*/
private Integer createUser;
/**
* 更新
*/
private Date updateDate;
/**
* 更新
*/
private Integer updateUser;
/**
* 天数
*/
private Integer days;
}

View File

@ -0,0 +1,40 @@
package com.sa.zentao.dao;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
@EqualsAndHashCode(callSuper = false)
public class ProjectWorkDetailsDTO implements Serializable {
@ExcelProperty(value = "项目",index =0)
private String projectName;
//完成需求总量
@ExcelProperty(value = "完成需求总量",index =1)
private Integer finishCount;
//完成任务总量
@ExcelProperty(value = "完成任务总量",index =2)
private Integer finishTaskCount;
//完成需求总工时
@ExcelProperty(value = "完成需求总工时",index =3)
private BigDecimal storyTotalTime;
//实际产出工时
@ExcelProperty(value = "实际产出工时",index =4)
private BigDecimal useStoryTotalTime;
//上月剩余未完成需求量
//已验收需求总量
@ExcelProperty(value = "已验收需求总量",index =5)
private Integer ysTaskCount;
//验收通过率
@ExcelProperty(value = "验收通过率",index =6)
private BigDecimal ysYesRate;
//验收不通过数量
@ExcelProperty(value = "验收不通过数量",index =7)
private BigDecimal ysNoRate;
//验收情况备注
}

View File

@ -0,0 +1,75 @@
package com.sa.zentao.dao;
import java.io.Serializable;
public class Result<T> implements Serializable {
private Integer code;
private String message;
private T data;
public Result() {
}
public Result(Integer code, String message) {
this.code = code;
this.message = message;
}
public Result(Integer code, String message, T data) {
this.code = code;
this.message = message;
this.data = data;
}
public Result(Integer code) {
this.code = code;
}
public static Result fail(Code c) {
if (c == null) {
c = Code.FAIL;
}
return new Result(c.getCode(), c.getValue());
}
public static Result fail(String c) {
return new Result(-1, c);
}
public static Result success() {
return new Result(Code.SUCCESS.getCode(), Code.SUCCESS.getValue());
}
public static Result success(Object data) {
return new Result(Code.SUCCESS.getCode(), Code.SUCCESS.getValue(), data);
}
public Integer getCode() {
return this.code;
}
public String getMessage() {
return this.message;
}
public T getData() {
return this.data;
}
public void setCode(final Integer code) {
this.code = code;
}
public void setMessage(final String message) {
this.message = message;
}
public void setData(final T data) {
this.data = data;
}
public String toString() {
return "Result(code=" + this.getCode() + ", message=" + this.getMessage() + ", data=" + this.getData() + ")";
}
}

View File

@ -0,0 +1,16 @@
package com.sa.zentao.dao;
import lombok.Data;
@Data
public class ServerListDTO {
private String ip;
private String name;
private Double cpu;
//内存
private Double memory;
//负载
private Double average;
//磁盘
private Double disk;
}

View File

@ -0,0 +1,34 @@
package com.sa.zentao.dao;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
@EqualsAndHashCode(callSuper = false)
public class WorkDetailsDTO implements Serializable {
@ExcelProperty(value = "员工",index =0)
private String userName;
//任务总量
@ExcelProperty(value = "任务总量",index =1)
private BigDecimal taskCount;
//需求总工时
@ExcelProperty(value = "需求总工时",index =2)
private BigDecimal storyTotalTime;
//实际产出工时
@ExcelProperty(value = "实际产出工时",index =3)
private BigDecimal workTime;
//可用工时 6*工作天数
@ExcelProperty(value = "可用工时 ",index =4)
private BigDecimal haveTime;
//工作饱和度
@ExcelProperty(value = "工作饱和度 ",index =5)
private BigDecimal saturation;
//产出线上Bug
@ExcelProperty(value = "产出线上Bug ",index =6)
private BigDecimal bugCount;
}

View File

@ -0,0 +1,59 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-06-27
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtActionDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@TableField("objectType")
private String objecttype;
@TableField("objectID")
private Integer objectid;
private String product;
private Integer project;
private Integer execution;
private String actor;
private String action;
private String actionValue;
private Date date;
private String comment;
private String extra;
private String read;
private String vision;
private Boolean efforted;
}

View File

@ -0,0 +1,193 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.sa.zentao.entity.ZtProject;
import com.sa.zentao.entity.ZtStory;
import com.sa.zentao.entity.ZtTask;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-07-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtBugDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer project;
private Integer product;
private Integer injection;
private Integer identify;
private Integer branch;
private Integer module;
private Integer execution;
private Integer plan;
private Integer story;
@TableField("storyVersion")
private Integer storyversion;
private Integer task;
@TableField("toTask")
private Integer totask;
@TableField("toStory")
private Integer tostory;
private String title;
private String keywords;
private Integer severity;
private Integer pri;
private String type;
private String os;
private String browser;
private String hardware;
private String found;
private String steps;
private String status;
@TableField("subStatus")
private String substatus;
private String color;
private Boolean confirmed;
@TableField("activatedCount")
private Integer activatedcount;
@TableField("activatedDate")
private LocalDateTime activateddate;
@TableField("feedbackBy")
private String feedbackby;
@TableField("notifyEmail")
private String notifyemail;
private String mailto;
@TableField("openedBy")
private String openedby;
private String openedbyName;
@TableField("openedDate")
private Date openeddate;
@TableField("openedBuild")
private String openedbuild;
@TableField("assignedTo")
private String assignedto;
private String assignedtoName;
@TableField("assignedDate")
private Date assigneddate;
private Date deadline;
@TableField("resolvedBy")
private String resolvedby;
private String resolution;
@TableField("resolvedBuild")
private String resolvedbuild;
@TableField("resolvedDate")
private Date resolveddate;
@TableField("closedBy")
private String closedby;
@TableField("closedDate")
private Date closeddate;
@TableField("duplicateBug")
private Integer duplicatebug;
@TableField("linkBug")
private String linkbug;
private Integer caseId;
@TableField("caseVersion")
private Integer caseversion;
private Integer feedback;
private Integer result;
private Integer repo;
private Integer mr;
private String entry;
private String lines;
private String v1;
private String v2;
@TableField("repoType")
private String repotype;
@TableField("issueKey")
private String issuekey;
private Integer testtask;
@TableField("lastEditedBy")
private String lasteditedby;
@TableField("lastEditedDate")
private Date lastediteddate;
private String deleted;
private String fileUrl;
private String remark;
private ZtProject ztProject;
private ZtProject ztExecution;
private ZtStory ztStory;
private ZtTask ztTask;
}

View File

@ -0,0 +1,145 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-07-03
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtCaseDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer project;
private Integer product;
private Integer execution;
private Integer branch;
private Integer lib;
private Integer module;
private Integer path;
private Integer story;
@TableField("storyVersion")
private Integer storyversion;
private String title;
private String precondition;
private String keywords;
private Integer pri;
private String type;
private String auto;
private String frame;
private String stage;
@TableField("howRun")
private String howrun;
private String script;
@TableField("scriptedBy")
private String scriptedby;
@TableField("scriptedDate")
private LocalDate scripteddate;
@TableField("scriptStatus")
private String scriptstatus;
@TableField("scriptLocation")
private String scriptlocation;
private String status;
@TableField("subStatus")
private String substatus;
private String color;
private String frequency;
private Integer order;
@TableField("openedBy")
private String openedby;
@TableField("openedDate")
private Date openeddate;
@TableField("reviewedBy")
private String reviewedby;
@TableField("reviewedDate")
private Date revieweddate;
@TableField("lastEditedBy")
private String lasteditedby;
@TableField("lastEditedDate")
private Date lastediteddate;
private Integer version;
@TableField("linkCase")
private String linkcase;
@TableField("fromBug")
private Integer frombug;
@TableField("fromCaseID")
private Integer fromcaseid;
@TableField("fromCaseVersion")
private Integer fromcaseversion;
private String deleted;
@TableField("lastRunner")
private String lastrunner;
@TableField("lastRunDate")
private LocalDateTime lastrundate;
@TableField("lastRunResult")
private String lastrunresult;
private Integer scene;
private Integer sort;
List<ZtCasestepDTO> list;
}

View File

@ -0,0 +1,43 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-07-03
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtCasestepDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer parent;
private Integer caseId;
private Integer version;
private String type;
private String desc;
private String expect;
//0失败 1成功
private Integer status;
private String caseResult;
}

View File

@ -0,0 +1,50 @@
package com.sa.zentao.dao;
import com.sa.zentao.entity.ZtCronDevopsUser;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-10-22
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtCronDevopsDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private String name;
private String content;
private String mail;
private String phone;
private String cron;
private String createUser;
private Date createDate;
private Date updateDate;
private String updateUser;
//0正常 1关闭
private Integer status;
private List<ZtCronDevopsUser> itemList;
}

View File

@ -0,0 +1,67 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-08-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtEffortDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@TableField("objectType")
private String objecttype;
@TableField("objectID")
private Integer objectid;
private String product;
private Integer project;
private Integer execution;
private String account;
private String work;
private String vision;
private Date date;
private Float left;
private Float consumed;
private Integer begin;
private Integer end;
private String extra;
private Integer order;
private String deleted;
private List<ZtEffortDTO> list;
}

View File

@ -0,0 +1,100 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtKanbanDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer space;
private String name;
private String owner;
private String team;
private String desc;
private String acl;
private String whitelist;
private String archived;
private String performable;
private String status;
private Integer order;
@TableField("displayCards")
private Integer displaycards;
@TableField("showWIP")
private String showwip;
@TableField("fluidBoard")
private String fluidboard;
@TableField("colWidth")
private Integer colwidth;
@TableField("minColWidth")
private Integer mincolwidth;
@TableField("maxColWidth")
private Integer maxcolwidth;
private String object;
private String alignment;
@TableField("createdBy")
private String createdby;
@TableField("createdDate")
private LocalDateTime createddate;
@TableField("lastEditedBy")
private String lasteditedby;
@TableField("lastEditedDate")
private LocalDateTime lastediteddate;
@TableField("closedBy")
private String closedby;
@TableField("closedDate")
private LocalDateTime closeddate;
@TableField("activatedBy")
private String activatedby;
@TableField("activatedDate")
private LocalDateTime activateddate;
private String deleted;
}

View File

@ -0,0 +1,65 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.poi.ss.formula.functions.T;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtKanbancolumnDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer parent;
private String parentName;
private String type;
@TableField("`region`")
private Integer region;
@TableField("`group`")
private Integer group;
private String name;
private String color;
@TableField("`limit`")
private Integer limit;
@TableField("`order`")
private Integer order;
private String archived;
private String deleted;
//行id
private Integer lane;
//执行id
private Integer kanban;
// 需求 ,任务 BUG
private String cards;
private List list=new ArrayList();
private String cardType;
private String same;
}

View File

@ -0,0 +1,56 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-07-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtKanbanlaneDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer execution;
@TableField("`type`")
private String type;
private Integer region;
@TableField("`group`")
private Integer group;
private String groupby;
private String extra;
private String name;
private String color;
@TableField("`order`")
private Integer order;
@TableField("lastEditedTime")
private Date lasteditedtime;
private String deleted;
private List<ZtKanbancolumnDTO> list;
}

View File

@ -0,0 +1,54 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-08-05
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtModuleDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer root;
private Integer branch;
private String name;
private Integer parent;
private String path;
private Integer grade;
private Integer order;
private String type;
private Integer from;
private String owner;
private String collector;
private String deleted;
private List<ZtModuleDTO> list;
}

View File

@ -0,0 +1,136 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-06-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtProductDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer program;
private String name;
private String code;
private Boolean shadow;
private String bind;
private Integer line;
private String type;
private String status;
@TableField("subStatus")
private String subStatus;
private String desc;
@TableField("PO")
private String po;
@TableField(exist = false)
private String pm;
@TableField("QD")
private String qd;
@TableField("RD")
private String rd;
private String feedback;
private String ticket;
private String acl;
private String whitelist;
private String reviewer;
@TableField("PMT")
private String pmt;
@TableField("draftStories")
private Integer draftStories;
@TableField("activeStories")
private Integer activeStories;
@TableField("changingStories")
private Integer changingStories;
@TableField("reviewingStories")
private Integer reviewingStories;
@TableField("finishedStories")
private Integer finishedStories;
@TableField("closedStories")
private Integer closedStories;
@TableField("totalStories")
private Integer totalStories;
@TableField("unresolvedBugs")
private Integer unresolvedBugs;
@TableField("closedBugs")
private Integer closedBugs;
@TableField("fixedBugs")
private Integer fixedBugs;
@TableField("totalBugs")
private Integer totalBugs;
private Integer plans;
private Integer releases;
@TableField("createdBy")
private String createdBy;
@TableField("createdDate")
private LocalDateTime createdDate;
@TableField("createdVersion")
private String createdVersion;
@TableField("closedDate")
private LocalDate closedDate;
private Integer order;
private String vision;
private String deleted;
private String poValue;
private List<String> approvalList;
private List<String> authList;
}

View File

@ -0,0 +1,224 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-06-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtProjectDTO<T> implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer project;
private List<Integer> projectList;
private Integer charter;
private String model;
// program 项目集 project 项目 sprint 执行
private String type;
private String category;
private String lifetime;
private String budget;
@TableField("budgetUnit")
private String budgetUnit;
private String attribute;
private Float percent;
private String milestone;
private String output;
private String auth;
private List<String> authList;
private Integer parent;
private String path;
private Integer grade;
private String name;
private String projectName;
private String code;
@TableField("hasProduct")
private Boolean hasProduct;
private Date begin;
private Date end;
@TableField("firstEnd")
private Date firstEnd;
@TableField("realBegan")
private Date realBegan;
@TableField("realEnd")
private Date realEnd;
private Integer days;
private String status;
@TableField("subStatus")
private String subStatus;
private String pri;
private String desc;
private Integer version;
@TableField("parentVersion")
private Integer parentVersion;
@TableField("planDuration")
private Integer planDuration;
@TableField("realDuration")
private Integer realDuration;
private BigDecimal progress;
private Float estimate;
private Float plan;
private Float left;
private Float consumed;
@TableField("teamCount")
private Integer teamCount;
private Integer market;
@TableField("openedBy")
private String openedBy;
@TableField("openedDate")
private Date openedDate;
@TableField("openedVersion")
private String openedVersion;
@TableField("lastEditedBy")
private String lastEditedBy;
@TableField("lastEditedDate")
private Date lastEditedDate;
@TableField("closedBy")
private String closedBy;
@TableField("closedDate")
private Date closedDate;
@TableField("closedReason")
private String closedReason;
@TableField("canceledBy")
private String canceledBy;
@TableField("canceledDate")
private Date canceledDate;
@TableField("suspendedDate")
private Date suspendedDate;
@TableField("PO")
private String po;
private String poValue;
@TableField("PM")
private String pm;
@TableField("QD")
private String qd;
@TableField("RD")
private String rd;
private String team;
private String acl;
private String whitelist;
private Integer order;
private String vision;
private String division;
@TableField("displayCards")
private Integer displayCards;
@TableField("fluidBoard")
private String fluidBoard;
private String multiple;
@TableField("colWidth")
private Integer colWidth;
@TableField("minColWidth")
private Integer minColWidth;
@TableField("maxColWidth")
private Integer maxColWidth;
private String deleted;
private List<T> children;
private List<Integer> storyIds;
// private boolean hasChildren=false;
private List<Integer> productIds;
private Integer productId;
private String productName;
private Integer excludeId;
private List<String> teamList;
}

View File

@ -0,0 +1,47 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* <p>
* BOSS 刘总 人事待评审 评审通过 进行中 延期 测试完成 上线待验收 验收不通过 验收通过
* </p>
*
* @author gqb
* @since 2024-06-24
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtStoryCountDTO implements Serializable {
//待评审
private BigDecimal dpsCount;
//评审通过
private BigDecimal pstgCount;
//进行中
private BigDecimal jxzCount;
//延期
private BigDecimal yqCount;
//测试完毕
private BigDecimal cswbCount;
//上线待验收
private BigDecimal dysCount;
//验收不通过
private BigDecimal ysNoCount;
//验收通过
private BigDecimal ysYesCount;
//bug量
private BigDecimal bugCount;
}

View File

@ -0,0 +1,235 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.sa.zentao.entity.ZtStoryreview;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-06-24
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtStoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private List<Integer> idList;
private String vision;
private Integer parent;
private Integer product;
private Integer branch;
private Integer module;
private String plan;
private String source;
@TableField("sourceNote")
private String sourceNote;
@TableField("fromBug")
private Integer frombug;
private Integer feedback;
private String title;
private String keywords;
private String type;
private String category;
private Integer pri;
private Float estimate;
private String status;
@TableField("subStatus")
private String substatus;
private String color;
//
// {key:'研发中',value:'developing'}
// ,{key:'研发完毕',value:'developed'}
// ,{key:'测试中',value:'testing'}
// ,{key:'测试完毕',value:'tested'}
// ,{key:'已验收',value:'verified'}
// ,{key:'已发布',value:'released'}
// ,{key:'已关闭',value:'closed'}
private String stage;
@TableField("stagedBy")
private String stagedby;
private String mailto;
private Integer lib;
@TableField("fromStory")
private Integer fromstory;
@TableField("fromVersion")
private Integer fromversion;
@TableField("openedBy")
private String openedby;
private String openedbyName;
@TableField("openedDate")
private Date openeddate;
@TableField("assignedTo")
private String assignedTo;
private String assignedToName;
@TableField("assignedDate")
private Date assigneddate;
@TableField("approvedDate")
private Date approveddate;
@TableField("lastEditedBy")
private String lasteditedby;
@TableField("lastEditedDate")
private Date lastediteddate;
@TableField("changedBy")
private String changedby;
@TableField("changedDate")
private Date changeddate;
@TableField("reviewedBy")
private String reviewedby;
private String revieweUser;
private Integer revieweResult;
@TableField("reviewedDate")
private Date revieweddate;
@TableField("releasedDate")
private Date releaseddate;
@TableField("closedBy")
private String closedby;
@TableField("closedDate")
private Date closeddate;
@TableField("closedReason")
private String closedreason;
@TableField("activatedDate")
private Date activateddate;
@TableField("toBug")
private Integer tobug;
@TableField("childStories")
private String childstories;
@TableField("linkStories")
private String linkstories;
@TableField("linkRequirements")
private String linkrequirements;
private String twins;
@TableField("duplicateStory")
private Integer duplicatestory;
private Integer version;
@TableField("storyChanged")
private String storychanged;
@TableField("feedbackBy")
private String feedbackby;
@TableField("notifyEmail")
private String notifyemail;
@TableField("BSA")
private String bsa;
private String duration;
private Integer demand;
//描述
private String desc;
@TableField("submitedBy")
private String submitedby;
private String roadmap;
@TableField("URChanged")
private String urchanged;
private String deleted;
private List<String> userViewId;
private String remark;
private List<ZtStoryreviewDTO> views;
private String fileUrl;
private String verify;
private String spec;
//计划开始时间
private Date planStartDate;
//计划结束时间
private Date planEndDate;
//开始日期
private Date startDate;
//结束日期
private Date endDate;
private Integer project;
private List<Integer> projects;
private String files;
//1通过 2不通过
private Integer ysFlag;
private Integer execution;
private Boolean psFlag;
private String executionName;
private Integer feedbackId;
private Integer userStory;
}

View File

@ -0,0 +1,78 @@
package com.sa.zentao.dao;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-10-15
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtStoryFeedbackDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
/**
* 名称
*/
private String name;
/**
* 备注
*/
private String remark;
/**
* 文件,隔开
*/
private String files;
private String openedBy;
private String openedByName;
private Date openedDate;
private Date updateDate;
private String updateUser;
/**
* 需求d
*/
private Integer storyId;
private String storyName;
/**
* 来源
*/
private String source;
private Date planEndDate;
private String assignedTo;
private String assignedToName;
private String spec;
// wait finish close
private String status;
private String fileUrl;
private Integer type;
private String closeRemark;
private Integer product;
}

View File

@ -0,0 +1,203 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-10-21
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtStoryUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String vision;
private Integer parent;
private Integer product;
private Integer project;
private Integer branch;
private Integer module;
private String plan;
private String source;
@TableField("sourceNote")
private String sourcenote;
@TableField("fromBug")
private Integer frombug;
private Integer feedback;
private String title;
private String keywords;
private String type;
private String category;
private Integer pri;
private Float estimate;
private String status;
@TableField("subStatus")
private String substatus;
private String color;
private String stage;
@TableField("stagedBy")
private String stagedby;
private String mailto;
private Integer lib;
@TableField("fromStory")
private Integer fromstory;
@TableField("fromVersion")
private Integer fromversion;
@TableField("openedBy")
private String openedby;
@TableField("openedDate")
private LocalDateTime openeddate;
@TableField("assignedTo")
private String assignedto;
@TableField("assignedDate")
private Date assigneddate;
@TableField("approvedDate")
private Date approveddate;
@TableField("lastEditedBy")
private String lasteditedby;
@TableField("lastEditedDate")
private Date lastediteddate;
@TableField("changedBy")
private String changedby;
@TableField("changedDate")
private Date changeddate;
@TableField("reviewedBy")
private String reviewedby;
@TableField("reviewedDate")
private Date revieweddate;
@TableField("releasedDate")
private Date releaseddate;
@TableField("closedBy")
private String closedby;
@TableField("closedDate")
private Date closeddate;
@TableField("closedReason")
private String closedreason;
@TableField("activatedDate")
private Date activateddate;
@TableField("toBug")
private Integer tobug;
@TableField("childStories")
private String childstories;
@TableField("linkStories")
private String linkstories;
@TableField("linkRequirements")
private String linkrequirements;
private String twins;
@TableField("duplicateStory")
private Integer duplicatestory;
private Integer version;
@TableField("storyChanged")
private String storychanged;
@TableField("feedbackBy")
private String feedbackby;
@TableField("notifyEmail")
private String notifyemail;
@TableField("BSA")
private String bsa;
private String duration;
private Integer demand;
@TableField("submitedBy")
private String submitedby;
private String roadmap;
@TableField("URChanged")
private String urchanged;
private String deleted;
private Date planStartDate;
private Date planEndDate;
private Date startDate;
private Date endDate;
/**
* 1通过 2不通过
*/
private Integer ysFlag;
private String spec;
private String fileUrl;
private String remark;
private String storyList;
}

View File

@ -0,0 +1,39 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-06-24
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtStoryreviewDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer story;
private Integer version;
private String reviewer;
private String result;
@TableField("reviewDate")
private Date reviewdate;
private String reviewerName;
public String getKey(){
return version+"-"+story;
}
}

View File

@ -0,0 +1,175 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-06-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtTaskDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer project;
private Integer parent;
private Integer execution;
private Integer module;
private Integer design;
private Integer story;
@TableField("storyVersion")
private Integer storyversion;
@TableField("designVersion")
private Integer designversion;
@TableField("fromBug")
private Integer frombug;
private Integer feedback;
@TableField("fromIssue")
private Integer fromissue;
private String name;
private String type;
private String mode;
private Integer pri;
private Float estimate;
private Float consumed;
private Float left;
private Date deadline;
private String status;
@TableField("subStatus")
private String substatus;
private String color;
private String mailto;
private String desc;
private Integer version;
@TableField("openedBy")
private String openedby;
@TableField("openedDate")
private Date openeddate;
@TableField("assignedTo")
private String assignedTo;
private String assignedToName;
@TableField("assignedDate")
private Date assignedDate;
@TableField("estStarted")
private Date estStarted;
@TableField("realStarted")
private Date realstarted;
@TableField("finishedBy")
private String finishedby;
private String finishedbyName;
@TableField("finishedDate")
private Date finishedDate;
@TableField("finishedList")
private String finishedlist;
@TableField("canceledBy")
private String canceledby;
@TableField("canceledDate")
private Date canceleddate;
@TableField("closedBy")
private String closedby;
@TableField("closedDate")
private Date closeddate;
@TableField("planDuration")
private Integer planduration;
@TableField("realDuration")
private Integer realduration;
@TableField("closedReason")
private String closedreason;
@TableField("lastEditedBy")
private String lasteditedby;
@TableField("lastEditedDate")
private Date lastediteddate;
@TableField("activatedDate")
private Date activateddate;
private Integer order;
private Integer repo;
private Integer mr;
private String entry;
private String lines;
private String v1;
private String v2;
private String deleted;
private String vision;
private String statusType;
private String tabType;
private Integer moveId;
private Integer fromId;
private Integer toId;
private String remark;
private String files;
private List<ZtTaskDTO> list;
}

View File

@ -0,0 +1,84 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-07-17
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtTesttaskDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer project;
private String projectName;
private Integer product;
private String productName;
@TableField("`name`")
private String name;
private Integer execution;
private String build;
private String type;
@TableField("`owner`")
private String owner;
private Integer pri;
@TableField("`begin`")
private Date begin;
@TableField("`end`")
private Date end;
@TableField("realFinishedDate")
private Date realfinisheddate;
private String mailto;
@TableField("`desc`")
private String desc;
private String report;
private String members;
@TableField("`status`")
private String status;
private Integer testreport;
private String auto;
@TableField("subStatus")
private String substatus;
@TableField("createdBy")
private String createdby;
@TableField("createdDate")
private Date createddate;
private String deleted;
}

View File

@ -0,0 +1,133 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.sa.zentao.enums.UserType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-06-18
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer company;
private String type;
private Integer dept;
private String account;
@TableField("`password`")
private String password;
private String role;
private String realname;
private String pinyin;
private String nickname;
private String commiter;
private String avatar;
private Date birthday;
private String gender;
private String email;
private String skype;
private String qq;
private String mobile;
private String phone;
private String weixin;
private String dingding;
private String slack;
private String whatsapp;
private String address;
private String zipcode;
private String nature;
private String analysis;
private String strategy;
@TableField("`join`")
private Date join;
private Integer visits;
private String visions;
private String ip;
private Integer last;
private Integer fails;
private Date locked;
private String feedback;
private String ranzhi;
private String ldap;
private Integer score;
@TableField("scoreLevel")
private Integer scoreLevel;
@TableField("resetToken")
private String resetToken;
private String deleted;
@TableField("clientStatus")
private String clientStatus;
@TableField("clientLang")
private String clientLang;
private String token;
private UserType userType;
private String userTypeValue;
private List<String> productList;
private String productIds;
private String productNames;
}

View File

@ -0,0 +1,67 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-11-18
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtYwBackupsDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 系统名称
*/
private String name;
/**
* 备份日期
*/
private Date backupsDate;
/**
* 备份文件名称
*/
private String backupsFileName;
/**
* 文件存储
*/
private String saveRemark;
/**
* 文件大小
*/
private Double fileSize;
/**
* 是否正常
*/
private Integer normalFlag;
/**
* 异常描述
*/
private String errorRemark;
private Date createDate;
private String createUser;
}

View File

@ -0,0 +1,113 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtYwChangeDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 申请日期
*/
private Date applyDate;
/**
* 变更内容
*/
private String changeContent;
/**
* 便跟范围
*/
private String changeRange;
/**
* 期望实施时间
*/
private Date effectDate;
/**
* 风险等级 123 中低搞
*/
private String level;
/**
* 应急方案
*/
private String emergencyPlan;
/**
* 审批中 审批通过 实施中 实施完成
*/
private Integer changeStatus;
/**
* 同意 不同意
*/
private String result;
/**
* 审批人
*/
private String approvalUser;
/**
* 审批日期
*/
private Date approvalDate;
/**
* 变更实施日期
*/
private Date changeEffectDate;
/**
* 变更实施结果
*/
private String changeEffectResult;
private String changeEffectUser;
/**
* 1不通过 0通过
*/
private String ysFlag;
/**
* 验收备注
*/
private String ysRemark;
/**
* 验收人
*/
private String ysUser;
/**
* 验收日期
*/
private Date ysDate;
private Date createDate;
private String createUser;
}

View File

@ -0,0 +1,54 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtYwFaultDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String eventName;
private String eventRemark;
private String eventLevel;
private String eventRange;
private String eventHandle;
private Date repairStartDate;
private Date repairEndDate;
//发生原因分析
private String analyse;
private Date createDate;
private String createUser;
private String userName;
// 后续处理结果
private String result;
//最终结果
private String lastResult;
}

View File

@ -0,0 +1,67 @@
package com.sa.zentao.dao;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtYwFwqsearchDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private String name;
/**
* 1正常 0异常网络
*/
private Integer networkError;
private Integer network;
/**
* 资源服务器是否异常
*/
private Integer serverError;
/**
* 资源异常描述
*/
private String serverRemark;
/**
* 是否有报警
*/
private Integer alarmError;
/**
* 描述
*/
private String alarmRemark;
/**
* 报警内容
*/
private String alarmContent;
private Date createDate;
private String createUser;
private String ipJson;
private List<ServerListDTO> serverList;
}

View File

@ -0,0 +1,91 @@
package com.sa.zentao.dao;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtYwMachineRoomDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private String roomName;
/**
* 巡检日期
*/
private Date inspectDate;
/**
* 巡检人
*/
private String inspectUser;
/**
* 温度
*/
private String temperature;
/**
* 湿度
*/
private String humidity;
/**
* 服务器情况 正常 异常
*/
private Integer errorFlag;
/**
* 服务器异常描述
*/
private String errorRemark;
/**
* 网络异常
*/
private Integer networkFlag;
/**
* 网络异常描述
*/
private String networkRemark;
/**
* ups是否异常
*/
private Integer upsFlag;
/**
* ups异常描述
*/
private String upsRemark;
/**
* 消防是否异常
*/
private Integer xiaofangFlag;
/**
* 消防异常描述
*/
private String xiaofangRemark;
private String url;
private String createUser;
private Date createDate;
}

View File

@ -0,0 +1,77 @@
package com.sa.zentao.dao;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-11-18
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtYwPatrolDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
/**
* 巡检日期
*/
private Date patrolDate;
private String patrolUser;
private String patrolUserName;
/**
* 是否使用电器
*/
private Integer dqFlag;
private String dqRemark;
/**
* 是否违规wifi
*/
private Integer wifiFlag;
private String wifiRemark;
/**
* 私拉电线
*/
private Integer dxFlag;
private String dxRemark;
/**
* 桌面整洁
*/
private Integer zmzjFlag;
private String zmzjRemark;
/**
* 安全风险
*/
private Integer safeFlag;
private String safeRemark;
/**
* 连接
*/
private String url;
private Date createDate;
private String createUser;
}

View File

@ -0,0 +1,98 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-11-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtYwTaskDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 任务事项
*/
private String name;
/**
* 任务描述
*/
private String remark;
/**
* 任务提醒时间
*/
private Date taskRemindDate;
/**
* 任务开始时间
*/
private Date taskStartDate;
/**
* 任务结束时间
*/
private Date taskEndDate;
/**
* 所属人归属人负责人
*/
private String belongToUser;
/**
* 邮箱
*/
private String mail;
/**
* 状态 1.等待中 2.已提醒 3.进行中 4.已完成
*/
private Integer taskStatus;
private String result;
/**
* 任务完成时间
*/
private Date finishDate;
/**
* 验收物
*/
private String deliver;
/**
* 1.不通过 0通过
*/
private Integer ysFlag;
/**
* 验收人
*/
private String ysUser;
/**
* 验收日期
*/
private Date ysDate;
private Date createDate;
private String createUser;
private String copyToUser;
private String copyMail;
}

View File

@ -0,0 +1,62 @@
package com.sa.zentao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import com.sa.zentao.enums.DeleteFlagEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-09-02
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class FestivalConfig implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String name;
private Integer year;
/**
* 假期
*/
private String vacationDate;
/**
* 补班
*/
private String repairDate;
private DeleteFlagEnum deleteFlag;
private Date createDate;
private Integer createUser;
private Date updateDate;
private Integer updateUser;
private Integer days;
/**
* 法定节假日
*/
private String legalVacationDate;
}

View File

@ -0,0 +1,44 @@
package com.sa.zentao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2024-09-14
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class VerificationCode implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 手机号
*/
private String phoneNumber;
/**
* 验证码
*/
private String code;
/**
* 有效期
*/
private LocalDateTime expirationTime;
}

Some files were not shown because too many files have changed in this diff Show More