feat(项目仪表盘):#132587 加注释

This commit is contained in:
wanjia 2025-07-23 17:03:30 +08:00
parent 30daa7b00c
commit 9b12911095
1 changed files with 10 additions and 4 deletions

View File

@ -598,26 +598,31 @@ public class PmsProjectServiceImpl implements IPmsProjectService {
JSONObject documentDynamics = new JSONObject();
JSONObject operParam = JSONObject.parseObject(log.getOperParam());
Integer pmsProjectId = operParam.getInteger("pmsProjectId");
if (pmsProjectId == 0) {
if (pmsProjectId == null || pmsProjectId == 0) {
continue;
}
Long documentId = operParam.getLong("id");
String docName = operParam.getString("name");
Integer docType = operParam.getInteger("docType");
Integer isTop = operParam.getInteger("isTop");
Integer businessType = log.getBusinessType();
String operateContent;
// 处理时间字段
Date operTime = log.getOperTime();
Long operTimeUnix = DateUtils.dateTimeToUnix(operTime);
documentDynamics.put("created_at", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, operTime));
documentDynamics.put("updated_at", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, operTime));
String formattedTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, operTime);
documentDynamics.put("created_at", formattedTime);
documentDynamics.put("updated_at", formattedTime);
documentDynamics.put("created_time", operTimeUnix);
documentDynamics.put("updated_time", operTimeUnix);
// 构建用户信息
JSONObject user = buildUserJson(pmsCommonService.getSimpleSysUserByUsername(log.getOperName()));
documentDynamics.put("user", user);
// 处理操作内容
String operateContent;
if (BusinessType.DELETE.ordinal() == businessType) {
String docNames = operParam.getString("names");
String docTypes = operParam.getString("docTypes");
@ -636,6 +641,7 @@ public class PmsProjectServiceImpl implements IPmsProjectService {
operateContent = generateOperateContent(businessType, docType, docName, isTop);
}
// 添加到结果集
if (operateContent != null) {
documentDynamics.put("operate_content", operateContent);
journals.add(documentDynamics);