提交 319e872e authored 作者: 133's avatar 133

1

上级 7650b9c6
package com.tykj.dev.config;
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;
/**
* @author zjm
* @version 1.0.0
* @ClassName MyWebMvcConfig.java
* @Description TODO
* @createTime 2020年08月09日 17:28:00
*/
@Configuration
public class MyWebMvcConfig implements WebMvcConfigurer {
@Value("${file.path}")
private String path;
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
// 将/static/**访问映射到classpath:/mystatic/
registry.addResourceHandler("/file/**").addResourceLocations("file:"+path);
}
}
...@@ -154,12 +154,13 @@ public class FileController { ...@@ -154,12 +154,13 @@ public class FileController {
List<MultipartFile> multipartFiles = ((MultipartHttpServletRequest)request).getFiles("file"); List<MultipartFile> multipartFiles = ((MultipartHttpServletRequest)request).getFiles("file");
System.out.println("数据条数"+multipartFiles.size()); System.out.println("数据条数"+multipartFiles.size());
File file1 = new File(url+"print/");
if (!file1.exists()){
file1.mkdirs();
}
String fileName = UUID.randomUUID().toString()+".pdf"; String fileName = UUID.randomUUID().toString()+".pdf";
File file = new File(url+"print/"+fileName); File file = new File(url+"print/"+fileName);
if (file.exists()){
file.mkdirs();
}
// 第一步:创建一个document对象。 // 第一步:创建一个document对象。
Document document = new Document(); Document document = new Document();
document.setMargins(0, 0, 0, 0); document.setMargins(0, 0, 0, 0);
......
...@@ -23,7 +23,7 @@ public class signUpReturn { ...@@ -23,7 +23,7 @@ public class signUpReturn {
@ApiModelProperty(value = "是否报名 0 报名 1否" ,name ="returns" ) @ApiModelProperty(value = "是否报名 0 报名 1否" ,name ="returns" )
private Integer returns; private Integer returns;
@ApiModelProperty(value = "job——id" ,name ="jobId" ) @ApiModelProperty(value = "job——id" ,name ="taskId" )
private Integer taskId; private Integer taskId;
@ApiModelProperty(value = "培训id" ,name ="trainThemeId" ) @ApiModelProperty(value = "培训id" ,name ="trainThemeId" )
......
...@@ -62,14 +62,21 @@ public class UserTrainVo { ...@@ -62,14 +62,21 @@ public class UserTrainVo {
/** /**
* 用户单位 * 用户单位
*/ */
@ApiModelProperty(value = "用户单位", name = "unitsId", example = "12321L") @ApiModelProperty(value = "用户单位", name = "unitsName", example = "12321L")
private String unitsName; private String unitsName;
/**
* 用户单位id
*/
@ApiModelProperty(value = "用户单位id", name = "unitsId", example = "12321L")
private Integer unitsId;
/** /**
* 培训状态 0.已培训 1.已过期 2.未培训 3.快过期 * 培训状态 0.已培训 1.已过期 2.未培训 3.快过期
*/ */
private Integer trainStatus; private Integer trainStatus;
/** /**
* 0 是 1 否 * 0 是 1 否
*/ */
......
...@@ -86,7 +86,7 @@ public class User { ...@@ -86,7 +86,7 @@ public class User {
private String fax; private String fax;
/** /**
* 状态 默认0,1表示删除 * 状态 默认0、1表示冻结
*/ */
@ApiModelProperty(value = "状态", name = "isDel", example = "12321L") @ApiModelProperty(value = "状态", name = "isDel", example = "12321L")
private Integer isDel=0; private Integer isDel=0;
......
...@@ -226,7 +226,7 @@ public class UserServiceImpl implements UserService { ...@@ -226,7 +226,7 @@ public class UserServiceImpl implements UserService {
}else { }else {
userTrainVo.setIsMustJoin(1); userTrainVo.setIsMustJoin(1);
} }
userTrainVo.setUnitsName(units.getName()); userTrainVo.setUnitsName(unitsService.findById(user.getUnitsId()).getName());
list.add(userTrainVo); list.add(userTrainVo);
} }
); );
......
...@@ -31,7 +31,8 @@ import java.util.List; ...@@ -31,7 +31,8 @@ import java.util.List;
@Component @Component
public class InventoryScheduled { public class InventoryScheduled {
private String cron = "0 0/1 * * * ? "; // private String cron = "0 0/1 * * * ? ";
private String cron = "0 0 1 * * ?";
private ThreadPoolTaskScheduler threadPoolTaskScheduler; private ThreadPoolTaskScheduler threadPoolTaskScheduler;
......
...@@ -62,6 +62,18 @@ ...@@ -62,6 +62,18 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>com.tykj.dev</groupId>
<artifactId>device-usereport</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.tykj.dev</groupId>
<artifactId>union</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency> <dependency>
<groupId>com.tykj.dev</groupId> <groupId>com.tykj.dev</groupId>
<artifactId>device-apply</artifactId> <artifactId>device-apply</artifactId>
......
...@@ -16,6 +16,6 @@ server.servlet.session.timeout=PT1H ...@@ -16,6 +16,6 @@ server.servlet.session.timeout=PT1H
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8 spring.jackson.time-zone=GMT+8
file.path=/Users/zjm/code/ file.path=/Users/zjm/code/
preview.path=192.168.0.10:8087/file/ preview.path=192.168.102.26:8087/file/
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论