feat(项目仪表盘):#132587 加注释
This commit is contained in:
parent
30daa7b00c
commit
9b12911095
|
@ -598,26 +598,31 @@ public class PmsProjectServiceImpl implements IPmsProjectService {
|
||||||
JSONObject documentDynamics = new JSONObject();
|
JSONObject documentDynamics = new JSONObject();
|
||||||
JSONObject operParam = JSONObject.parseObject(log.getOperParam());
|
JSONObject operParam = JSONObject.parseObject(log.getOperParam());
|
||||||
Integer pmsProjectId = operParam.getInteger("pmsProjectId");
|
Integer pmsProjectId = operParam.getInteger("pmsProjectId");
|
||||||
if (pmsProjectId == 0) {
|
if (pmsProjectId == null || pmsProjectId == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Long documentId = operParam.getLong("id");
|
Long documentId = operParam.getLong("id");
|
||||||
String docName = operParam.getString("name");
|
String docName = operParam.getString("name");
|
||||||
Integer docType = operParam.getInteger("docType");
|
Integer docType = operParam.getInteger("docType");
|
||||||
Integer isTop = operParam.getInteger("isTop");
|
Integer isTop = operParam.getInteger("isTop");
|
||||||
Integer businessType = log.getBusinessType();
|
Integer businessType = log.getBusinessType();
|
||||||
String operateContent;
|
|
||||||
|
|
||||||
|
// 处理时间字段
|
||||||
Date operTime = log.getOperTime();
|
Date operTime = log.getOperTime();
|
||||||
Long operTimeUnix = DateUtils.dateTimeToUnix(operTime);
|
Long operTimeUnix = DateUtils.dateTimeToUnix(operTime);
|
||||||
documentDynamics.put("created_at", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, operTime));
|
String formattedTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, operTime);
|
||||||
documentDynamics.put("updated_at", 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("created_time", operTimeUnix);
|
||||||
documentDynamics.put("updated_time", operTimeUnix);
|
documentDynamics.put("updated_time", operTimeUnix);
|
||||||
|
|
||||||
|
// 构建用户信息
|
||||||
JSONObject user = buildUserJson(pmsCommonService.getSimpleSysUserByUsername(log.getOperName()));
|
JSONObject user = buildUserJson(pmsCommonService.getSimpleSysUserByUsername(log.getOperName()));
|
||||||
documentDynamics.put("user", user);
|
documentDynamics.put("user", user);
|
||||||
|
|
||||||
|
// 处理操作内容
|
||||||
|
String operateContent;
|
||||||
if (BusinessType.DELETE.ordinal() == businessType) {
|
if (BusinessType.DELETE.ordinal() == businessType) {
|
||||||
String docNames = operParam.getString("names");
|
String docNames = operParam.getString("names");
|
||||||
String docTypes = operParam.getString("docTypes");
|
String docTypes = operParam.getString("docTypes");
|
||||||
|
@ -636,6 +641,7 @@ public class PmsProjectServiceImpl implements IPmsProjectService {
|
||||||
operateContent = generateOperateContent(businessType, docType, docName, isTop);
|
operateContent = generateOperateContent(businessType, docType, docName, isTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加到结果集
|
||||||
if (operateContent != null) {
|
if (operateContent != null) {
|
||||||
documentDynamics.put("operate_content", operateContent);
|
documentDynamics.put("operate_content", operateContent);
|
||||||
journals.add(documentDynamics);
|
journals.add(documentDynamics);
|
||||||
|
|
Loading…
Reference in New Issue