@mldong/jeeflow 1.8.28 → 1.8.29
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.
- package/dist/facade.js +14 -8
- package/package.json +1 -1
package/dist/facade.js
CHANGED
|
@@ -831,7 +831,7 @@ export class JeeflowFacade {
|
|
|
831
831
|
// issues/122:可空时间列空值出 '' 不出 null——mldong-nestjs 全局 SmartNullStripping
|
|
832
832
|
// 拦截器会把 null 值整键剥掉(本出口是对象字面量,拿不到 keepNull:fields 元数据),
|
|
833
833
|
// 出 '' 才能让键恒在,形状也与 boot2 的 record 行一致。
|
|
834
|
-
finishTime: fmtTime(t.finishTime)
|
|
834
|
+
finishTime: fmtTime(t.finishTime), variable: t.variables ?? {},
|
|
835
835
|
ext: t.variables ?? {}, // issues/15:前端读 ext.tf_approvalComment
|
|
836
836
|
}));
|
|
837
837
|
}
|
|
@@ -1145,11 +1145,11 @@ export class JeeflowFacade {
|
|
|
1145
1145
|
id: t.id, processInstanceId: t.processInstanceId, taskName: t.taskName,
|
|
1146
1146
|
displayName: t.displayName, taskType: t.taskType ?? null,
|
|
1147
1147
|
performType: t.performType ?? null, taskState: t.taskState,
|
|
1148
|
-
operator: t.actorId ?? '', finishTime: t.finishTime,
|
|
1149
|
-
expireTime: t.expireTime, formKey: t.formKey ?? '', taskParentId: t.parentTaskId ?? null,
|
|
1148
|
+
operator: t.actorId ?? '', finishTime: fmtTime(t.finishTime),
|
|
1149
|
+
expireTime: fmtTime(t.expireTime), formKey: t.formKey ?? '', taskParentId: t.parentTaskId ?? null,
|
|
1150
1150
|
variable: JSON.stringify(t.variables ?? {}),
|
|
1151
|
-
createTime: t.createTime, createUser: t.createUser,
|
|
1152
|
-
updateTime: t.updateTime, updateUser: t.updateUser,
|
|
1151
|
+
createTime: fmtTime(t.createTime), createUser: t.createUser,
|
|
1152
|
+
updateTime: fmtTime(t.updateTime), updateUser: t.updateUser,
|
|
1153
1153
|
taskActorIdList: t.actorIds ?? [],
|
|
1154
1154
|
taskFormData: formDataOf(t.variables, 'tf_'), // issues/15
|
|
1155
1155
|
};
|
|
@@ -1170,7 +1170,7 @@ export class JeeflowFacade {
|
|
|
1170
1170
|
businessNo: inst.businessNo, operator: inst.operator,
|
|
1171
1171
|
variables: inst.variables,
|
|
1172
1172
|
formData: formDataOf(inst.variables, 'f_'), // issues/15
|
|
1173
|
-
createTime: inst.createTime, createUser: inst.createUser,
|
|
1173
|
+
createTime: fmtTime(inst.createTime), createUser: inst.createUser,
|
|
1174
1174
|
jsonObject: graph, // issues/05
|
|
1175
1175
|
tasks,
|
|
1176
1176
|
activeTaskList,
|
|
@@ -1419,10 +1419,16 @@ function formDataOf(vars, prefix) {
|
|
|
1419
1419
|
}
|
|
1420
1420
|
return out;
|
|
1421
1421
|
}
|
|
1422
|
-
/**
|
|
1422
|
+
/**
|
|
1423
|
+
* Date → 'yyyy-MM-dd HH:mm:ss';**空值出 ''、不出 null**。
|
|
1424
|
+
*
|
|
1425
|
+
* 出 null 会被下游 `mldong-nestjs` 的全局剥-null 拦截器(SmartNullStripping)连键一起吞掉,
|
|
1426
|
+
* 13 栈里就只有 nestjs 少这些列(issues/122 的机理)。规范 06 §2.4 的时间列是"必出键、空即空串",
|
|
1427
|
+
* 所以归一放在这一层:所有行投影共用它,逐个补 `?? ''` 迟早漏一处。
|
|
1428
|
+
*/
|
|
1423
1429
|
function fmtTime(v) {
|
|
1424
1430
|
if (v == null)
|
|
1425
|
-
return
|
|
1431
|
+
return '';
|
|
1426
1432
|
const p = (n) => String(n).padStart(2, '0');
|
|
1427
1433
|
return `${v.getFullYear()}-${p(v.getMonth() + 1)}-${p(v.getDate())} ${p(v.getHours())}:${p(v.getMinutes())}:${p(v.getSeconds())}`;
|
|
1428
1434
|
}
|