Commit 7ad00e16 by chenweisong

更新

parent be1b3b48
......@@ -171,8 +171,8 @@ public class TaskController {
CommonValidator.isTrue(excelForm.getAuditIdList() != null && excelForm.getAuditIdList().size() != 0, "模板审核人idList不能为空");
CommonValidator.isTrue(excelForm.getNeedAudit() != null && excelForm.getNeedAudit() != 0, "模板needAudit不能为空");
CommonValidator.isFalse((StringUtils.isEmpty(excelForm.getUpStreamAddr()) && StringUtils.isNotEmpty(excelForm.getBackStreamAddr())
|| (StringUtils.isNotEmpty(excelForm.getUpStreamAddr()) && StringUtils.isEmpty(excelForm.getBackStreamAddr()))), "上游地址和回流地址需同时填写或者同时为空");
CommonValidator.isFalse((StringUtils.isEmpty(excelForm.getUpStreamAddr()) && StringUtils.isNotEmpty(excelForm.getColumnName())
|| (StringUtils.isNotEmpty(excelForm.getUpStreamAddr()) && StringUtils.isEmpty(excelForm.getColumnName()))), "上游地址和拆分字段名称需同时填写或者同时为空");
excelForm.setActivity(finalActivity);
......@@ -350,7 +350,7 @@ public class TaskController {
for (HistoricActivityInstance hai : lisst) {
System.out.println("活动ID:" + hai.getId());
}
List<ProcessInstance> s = runtimeService.createProcessInstanceQuery()
List<ProcessInstance> s = runtimeService.createProcessInstanceQuery()
.processInstanceId(process.getProcessId())
.list();
for (ProcessInstance hai : s) {
......
......@@ -149,12 +149,21 @@ public class TemplateController {
return DataFileUtil.convertDatToJson(path.getPath(), dataAt);
}
@ApiOperation(value = "按列名拆分excel", hidden = true)
@ApiOperation(value = "按列名拆分excel")
@ApiImplicitParams({
@ApiImplicitParam(name = "columnName", required = true, value = "列名称", dataType = "string", paramType = "query")
@ApiImplicitParam(name = "columnName", required = true, value = "列名称", dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "exportPath", required = true, value = "导出路径", dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "modelPath", required = true, value = "模板路径", dataType = "string", paramType = "query")
})
@PostMapping(value = "/excel/breakExcel")
public Object breakExcelByColumn(MultipartFile file, String columnName) {
return null;
public Object breakExcelByColumn(MultipartFile file, String columnName, String exportPath, String modelPath) {
String msg = null;
try {
msg = breakExcelService.breakExcel(file, columnName, exportPath, modelPath);
} catch (Exception e) {
e.printStackTrace();
}
return msg;
}
}
......@@ -33,21 +33,24 @@ public class ExcelForm {
@ApiModelProperty(name = "remark", value = "表格描述")
private String remark;
@ApiModelProperty(name = "dataAt", value = "数据开始行数 列如 1", example = "1")
private Integer dataAt = 1;
@ApiModelProperty(name = "headerLine", value = "spreadJs表头行数", example = "0")
private Integer headerLine = 0;
@ApiModelProperty(name = "needAudit", value = "需要审核 1 不需要 2 需要", required = true, example = "1")
private Integer needAudit = 1;
@ApiModelProperty(name = "needMerge", value = "需要数据合并 1 不需要 2 需要", example = "1")
@ApiModelProperty(name = "needMerge", value = "需要数据合并 1 不需要 2 需要", example = "1", hidden = true)
private Integer needMerge = 1;
@ApiModelProperty(name = "upStreamAddr", value = "上游地址 与 回流地址 同时填写")
private String upStreamAddr;
@ApiModelProperty(name = "backStreamAddr", value = "回流地址 与 上流地址 同时填写")
@ApiModelProperty(name = "backStreamAddr", value = "回流地址 与 上流地址 同时填写", hidden = true)
private String backStreamAddr;
@ApiModelProperty(name = "columnName", value = "拆分字段")
private String columnName;
@JsonIgnore
private Activity activity;
}
......@@ -31,7 +31,7 @@ public class Template implements Serializable {
@Column(nullable = false, columnDefinition = ("varchar(2000) comment '模板配置'"))
private String config;
@Column(name = "data_at", columnDefinition = ("integer(20) default 1 comment '数据开始行数'"))
@Column(name = "data_at", columnDefinition = ("integer(20) default 1 comment 'spreadJs表头行数'"))
private Integer dataAt = 1;
@Column(name = "need_audit", columnDefinition = ("integer(2) default 1 comment '需要审核'"))
......
......@@ -25,7 +25,7 @@ spring:
application:
name: dataCollector
jpa:
show-sql: false
show-sql: true
database-platform: org.hibernate.dialect.MySQL5Dialect
hibernate:
ddl-auto: update
......@@ -61,8 +61,8 @@ app:
default-bpmn-file: SubProcessStandard.bpmn
swagger2:
host: 192.168.0.240:8762/api/datacollector
# host: localhost:8110
# host: 192.168.0.240:8762/api/datacollector
host: localhost:8110
security:
authUser: root
authPwd: pwd
......
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