Commit b757bc91 by chenweisong

更新

parent a9c71cd7
......@@ -4,12 +4,9 @@ import com.keymobile.rest.common.bean.ApiResponse;
import com.keymobile.rest.common.utils.DateUtil;
import com.keymobile.rest.common.validator.CommonValidator;
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.service.DataInfoService;
import com.keymobile.rest.service.TemplateService;
import com.keymobile.rest.service.MissionService;
import com.keymobile.rest.service.UserService;
import com.keymobile.rest.service.*;
import io.swagger.annotations.*;
import org.activiti.engine.*;
import org.activiti.engine.task.Task;
......@@ -28,7 +25,7 @@ public class ExcelController {
@Autowired
private DataInfoService dataInfoService;
@Autowired
private MissionService missionService;
private ProcessService processService;
@Autowired
private UserService userService;
@Autowired
......@@ -49,11 +46,14 @@ public class ExcelController {
Template template = templateService.get(excelId);
CommonValidator.notNull(template, "模板不存在");
Process process = processService.findByProcessId(task.getProcessInstanceId());
DataInfo dataInfo = new DataInfo();
dataInfo.setCreateAt(DateUtil.getTimestamp());
dataInfo.setTemplate(template);
dataInfo.setTaskId(taskId);
dataInfo.setUserId(3L);
dataInfo.setProcess(process);
dataInfo.setData(dataStr);
dataInfoService.save(dataInfo);
......@@ -88,15 +88,7 @@ public class ExcelController {
)
@PostMapping(value = "/excel/getData")
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();
// }
}
}
......@@ -28,10 +28,13 @@ public class DataInfo implements Serializable {
@Column(nullable = false, columnDefinition = ("bigint(22) comment '补录人员id'"))
private Long userId;
@Column(nullable = false, columnDefinition = ("bigint(22) comment '补录任务id'"))
@Column(nullable = false, columnDefinition = ("bigint(22) comment 'task id'"))
private String taskId;
@ManyToOne(fetch = FetchType.LAZY)
private Process process;
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnore
private Template template;
}
......@@ -28,9 +28,12 @@ spring:
hibernate:
ddl-auto: update
datasource:
url: jdbc:mysql://192.168.0.192:3306/cmb_dev?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: test
password: test
# url: jdbc:mysql://192.168.0.192:3306/cmb_dev?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
# username: 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:
maximum-pool-size: 3
servlet:
......@@ -38,7 +41,8 @@ spring:
max-file-size: 20Mb
max-request-size: 100Mb
redis:
host: 192.168.0.192
# host: 192.168.0.192
host: 127.0.0.1
port: 6379
session:
store-type: redis
......@@ -58,4 +62,5 @@ swagger2:
security:
authUser: root
authPwd: pwd
permit: false
\ No newline at end of file
# permit: false
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