Commit b757bc91 by chenweisong

更新

parent a9c71cd7
...@@ -4,12 +4,9 @@ import com.keymobile.rest.common.bean.ApiResponse; ...@@ -4,12 +4,9 @@ import com.keymobile.rest.common.bean.ApiResponse;
import com.keymobile.rest.common.utils.DateUtil; import com.keymobile.rest.common.utils.DateUtil;
import com.keymobile.rest.common.validator.CommonValidator; import com.keymobile.rest.common.validator.CommonValidator;
import com.keymobile.rest.model.DataInfo; import com.keymobile.rest.model.DataInfo;
import com.keymobile.rest.model.Mission; import com.keymobile.rest.model.Process;
import com.keymobile.rest.model.Template; import com.keymobile.rest.model.Template;
import com.keymobile.rest.service.DataInfoService; import com.keymobile.rest.service.*;
import com.keymobile.rest.service.TemplateService;
import com.keymobile.rest.service.MissionService;
import com.keymobile.rest.service.UserService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.activiti.engine.*; import org.activiti.engine.*;
import org.activiti.engine.task.Task; import org.activiti.engine.task.Task;
...@@ -28,7 +25,7 @@ public class ExcelController { ...@@ -28,7 +25,7 @@ public class ExcelController {
@Autowired @Autowired
private DataInfoService dataInfoService; private DataInfoService dataInfoService;
@Autowired @Autowired
private MissionService missionService; private ProcessService processService;
@Autowired @Autowired
private UserService userService; private UserService userService;
@Autowired @Autowired
...@@ -49,11 +46,14 @@ public class ExcelController { ...@@ -49,11 +46,14 @@ public class ExcelController {
Template template = templateService.get(excelId); Template template = templateService.get(excelId);
CommonValidator.notNull(template, "模板不存在"); CommonValidator.notNull(template, "模板不存在");
Process process = processService.findByProcessId(task.getProcessInstanceId());
DataInfo dataInfo = new DataInfo(); DataInfo dataInfo = new DataInfo();
dataInfo.setCreateAt(DateUtil.getTimestamp()); dataInfo.setCreateAt(DateUtil.getTimestamp());
dataInfo.setTemplate(template); dataInfo.setTemplate(template);
dataInfo.setTaskId(taskId); dataInfo.setTaskId(taskId);
dataInfo.setUserId(3L); dataInfo.setUserId(3L);
dataInfo.setProcess(process);
dataInfo.setData(dataStr); dataInfo.setData(dataStr);
dataInfoService.save(dataInfo); dataInfoService.save(dataInfo);
...@@ -88,15 +88,7 @@ public class ExcelController { ...@@ -88,15 +88,7 @@ public class ExcelController {
) )
@PostMapping(value = "/excel/getData") @PostMapping(value = "/excel/getData")
public ApiResponse getRecordData(long excelId) { public ApiResponse getRecordData(long excelId) {
// User curUser = userService.getNormalUser();
// ProcessInfo processInfo = processInfoService.findByExcelIdAndUserId(excelId, curUser.getId());
//
// List<DataInfo> dataInfoList = processInfo.getDataInfoList();
// if (dataInfoList.size() > 0) {
// return ApiResponse.ok(dataInfoList.get(0));
// } else {
return ApiResponse.ok(); return ApiResponse.ok();
// }
} }
} }
...@@ -28,10 +28,13 @@ public class DataInfo implements Serializable { ...@@ -28,10 +28,13 @@ public class DataInfo implements Serializable {
@Column(nullable = false, columnDefinition = ("bigint(22) comment '补录人员id'")) @Column(nullable = false, columnDefinition = ("bigint(22) comment '补录人员id'"))
private Long userId; private Long userId;
@Column(nullable = false, columnDefinition = ("bigint(22) comment '补录任务id'")) @Column(nullable = false, columnDefinition = ("bigint(22) comment 'task id'"))
private String taskId; private String taskId;
@ManyToOne(fetch = FetchType.LAZY) @ManyToOne(fetch = FetchType.LAZY)
private Process process;
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore @JsonIgnore
private Template template; private Template template;
} }
...@@ -28,9 +28,12 @@ spring: ...@@ -28,9 +28,12 @@ spring:
hibernate: hibernate:
ddl-auto: update ddl-auto: update
datasource: datasource:
url: jdbc:mysql://192.168.0.192:3306/cmb_dev?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8 # url: jdbc:mysql://192.168.0.192:3306/cmb_dev?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: test # username: test
password: test # password: test
url: jdbc:mysql://47.105.193.165:3306/dev0?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: 123456
hikari: hikari:
maximum-pool-size: 3 maximum-pool-size: 3
servlet: servlet:
...@@ -38,7 +41,8 @@ spring: ...@@ -38,7 +41,8 @@ spring:
max-file-size: 20Mb max-file-size: 20Mb
max-request-size: 100Mb max-request-size: 100Mb
redis: redis:
host: 192.168.0.192 # host: 192.168.0.192
host: 127.0.0.1
port: 6379 port: 6379
session: session:
store-type: redis store-type: redis
...@@ -58,4 +62,5 @@ swagger2: ...@@ -58,4 +62,5 @@ swagger2:
security: security:
authUser: root authUser: root
authPwd: pwd authPwd: pwd
permit: false # permit: false
\ No newline at end of file permit: true
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment