owl-cli 6.182.0 → 6.184.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,11 +18,13 @@
18
18
  var taskInfoId = params.taskInfoId;
19
19
 
20
20
  var taskInfo = @projectCodeService.getExportTaskInfo(taskInfoId);
21
- if(taskInfo.fileId){
22
- var downloadUrl = FileService.getFullPath(taskInfo.fileId);
23
- taskInfo.downloadUrl = downloadUrl;
21
+
22
+ if(taskInfo){
23
+ taskInfo.downloadUrl = taskInfo.fileUrl;
24
24
  }
25
25
 
26
+
27
+
26
28
  var ret = {
27
29
  state:"ok",
28
30
  taskInfo:taskInfo
@@ -811,7 +811,7 @@ var @projectCodeService = (function (pigeon) {
811
811
 
812
812
 
813
813
  taskInfo = owl_task_infoService.get(taskInfo.id);
814
- taskInfo.taskId = taskId;
814
+ taskInfo.taskId = "" + taskId;
815
815
  owl_task_infoService.update(taskInfo);
816
816
  return taskInfo.id
817
817
  },
@@ -24,6 +24,7 @@ function main(modelService,spec){
24
24
  taskInfo.processState = "processing";
25
25
  taskInfo.percent = 20;
26
26
  taskInfo.lastTime = new Date().getTime();
27
+ taskInfo.total = ret.total;
27
28
  taskInfo.msg = "获取数据记录完成, 数据条数:" + ret.total;
28
29
  modelService.updateExportTaskInfo(taskInfoId, taskInfo);
29
30
  /*****************************/
@@ -40,6 +41,13 @@ function main(modelService,spec){
40
41
  titleList.forEach(function(title){
41
42
  var field = title.field;
42
43
  var value = modelService.getValue(field,row);
44
+ if(title.type==="date"){
45
+ if(value){
46
+ var ts = new Date(value).getTime();
47
+ value = ts /86400000+25569; //这是excel的特殊的格式,用小数点表示
48
+ }
49
+
50
+ }
43
51
  record[field] = value;
44
52
  });
45
53
  return record;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owl-cli",
3
- "version": "6.182.0",
3
+ "version": "6.184.0",
4
4
  "main": "index.js",
5
5
  "preferGlobal": true,
6
6
  "bin": {