瀏覽代碼

操作计量,增加项目合同字段,并增加废除日志

qianxb 1 年之前
父節點
當前提交
df85460aa3

+ 5 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/OperationLog.java

@@ -37,6 +37,11 @@ import lombok.EqualsAndHashCode;
 public class OperationLog extends BaseEntity {
 
     private static final long serialVersionUID = 1L;
+    @ApiModelProperty("项目id")
+    private Long projectId;
+    @ApiModelProperty("合同id")
+    private Long contractId;
+    /**
 
     /**
      * 操作类型

+ 8 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/ArchiveFileController.java

@@ -212,6 +212,8 @@ public class ArchiveFileController extends BladeController {
                         JSONObject json = new JSONObject();
                         json.put("operationObjIds", Func.toStrList(archiveFile.getId().toString()));
                         json.put("operationObjName", archiveFile.getFileName());
+                        json.put("projectId", archiveFile.getProjectId());
+                        json.put("contractId", archiveFile.getContractId());
                         this.operationLogClient.saveUserOperationLog(26, "其它文件", "工程文件", json);
 
                         if (linkList != null && linkList.size() > 0) {
@@ -288,6 +290,8 @@ public class ArchiveFileController extends BladeController {
             JSONObject json = new JSONObject();
             json.put("operationObjIds", Func.toStrList(archiveTaskIds));
             json.put("operationObjName", title);
+            json.put("projectId", startTaskVO.getProjectId());
+            json.put("contractId", startTaskVO.getContractId());
             this.operationLogClient.saveUserOperationLog(25, "其它文件", "工程文件", json);
 
             taskVO.setReportUserId(SecureUtil.getUserId().toString());
@@ -368,6 +372,8 @@ public class ArchiveFileController extends BladeController {
             JSONObject json = new JSONObject();
             json.put("operationObjIds", Func.toStrList(archiveTaskIds));
             json.put("operationObjName", title.substring(0, title.length() - 1));
+            json.put("projectId", startTaskVO.getProjectId());
+            json.put("contractId", startTaskVO.getContractId());
             this.operationLogClient.saveUserOperationLog(25, "其它文件", "工程文件", json);
 
             return R.data(200, aopParamsSet, "操作成功");
@@ -504,6 +510,8 @@ public class ArchiveFileController extends BladeController {
                 JSONObject json = new JSONObject();
                 json.put("operationObjIds", Func.toStrList(ids));
                 json.put("operationObjName", title);
+                json.put("projectId", fileList.get(0).getProjectId());
+                json.put("contractId", fileList.get(0).getContractId());
 
                 this.operationLogClient.saveUserOperationLog(27, "其它文件", "工程文件", json);
 

+ 4 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/ContractLogController.java

@@ -450,6 +450,8 @@ public class ContractLogController extends BladeController {
                         JSONObject json = new JSONObject();
                         json.put("operationObjIds", Func.toStrList(task.getFormDataId()));
                         json.put("operationObjName", contractLog.getFileName());
+                        json.put("projectId", task.getProjectId());
+                        json.put("contractId", task.getContractId());
 
                         this.operationLogClient.saveUserOperationLog(9, "台账日志", "日志填报", json);
 
@@ -576,6 +578,8 @@ public class ContractLogController extends BladeController {
                     JSONObject json = new JSONObject();
                     json.put("operationObjIds", Func.toStrList(startTaskVO.getIds()));
                     json.put("operationObjName", title);
+                    json.put("projectId", startTaskVO.getProjectId());
+                    json.put("contractId", startTaskVO.getContractId());
 
                     this.operationLogClient.saveUserOperationLog(8, "台账日志", "日志填报", json);
                 } catch (Exception e) {

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java

@@ -708,6 +708,8 @@ public class ImageClassificationFileController extends BladeController {
             JSONObject json = new JSONObject();
             json.put("operationObjIds", Func.toStrList(ids));
             json.put("operationObjName", title);
+            json.put("projectId", fileList.get(0).getProjectId());
+            json.put("contractId", fileList.get(0).getContractId());
 
             this.operationLogClient.saveUserOperationLog(31, "其它文件", "影像资料", json);
 

+ 13 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -1189,9 +1189,11 @@ public class InformationWriteQueryController extends BladeController {
                         JSONObject json = new JSONObject();
                         json.put("operationObjIds", Func.toStrList(task.getFormDataId()));
                         json.put("operationObjName", title);
+                        json.put("projectId", projectId);
+                        json.put("contractId", contractId);
 
                         //保存操作记录
-                        this.operationLogClient.saveUserOperationLog(6, "资料管理", "工序资料", json);
+                        this.operationLogClient.saveUserOperationLog(6, "资料填报", "工序资料", json);
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -1343,6 +1345,8 @@ public class InformationWriteQueryController extends BladeController {
                     JSONObject json = new JSONObject();
                     json.put("operationObjIds", Func.toStrList(startTaskVO.getIds()));
                     json.put("operationObjName", title);
+                    json.put("projectId", startTaskVO.getProjectId());
+                    json.put("contractId", startTaskVO.getContractId());
 
                     this.operationLogClient.saveUserOperationLog(5, "资料管理", "工序资料", json);
                 } catch (Exception e) {
@@ -2621,6 +2625,8 @@ public class InformationWriteQueryController extends BladeController {
             JSONObject json = new JSONObject();
             json.put("operationObjIds", Func.toStrList(pKeyId.toString()));
             json.put("operationObjName", StringUtils.isNotEmpty(queries.getFullName()) ? queries.getFullName() : queries.getNodeName());
+            json.put("projectId", queries.getProjectId());
+            json.put("contractId", queries.getContractId());
 
             this.operationLogClient.saveUserOperationLog(3, "资料管理", "工序资料", json);
         } catch (Exception e) {
@@ -2758,6 +2764,8 @@ public class InformationWriteQueryController extends BladeController {
         JSONObject json = new JSONObject();
         json.put("operationObjIds", idArray);
         json.put("operationObjName", pathName.substring(1));
+        json.put("projectId", removeNode.getProjectId());
+        json.put("contractId", removeNode.getContractId());
         this.operationLogClient.saveUserOperationLog(4, "资料管理", "工序资料", json);
 
         //保存进回收站
@@ -3194,6 +3202,8 @@ public class InformationWriteQueryController extends BladeController {
                 JSONObject json = new JSONObject();
                 json.put("operationObjIds", JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class));
                 json.put("operationObjName", pathName.substring(1));
+                json.put("projectId", currentNode.getProjectId());
+                json.put("contractId", currentNode.getContractId());
                 //保存操作记录
                 this.operationLogClient.saveUserOperationLog(operationType, "资料管理", "工序资料", json);
 
@@ -3240,6 +3250,8 @@ public class InformationWriteQueryController extends BladeController {
                 JSONObject json = new JSONObject();
                 json.put("operationObjIds", JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class));
                 json.put("operationObjName", pathName.substring(1));
+                json.put("projectId", currentNode.getProjectId());
+                json.put("contractId", currentNode.getContractId());
                 //保存操作记录
                 this.operationLogClient.saveUserOperationLog(operationType, "资料管理", "工序资料", json);
 

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OperationLogClientImpl.java

@@ -39,6 +39,8 @@ public class OperationLogClientImpl implements OperationLogClient {
 
             //新增数据
             OperationLog newData = new OperationLog();
+            newData.setProjectId( json.getLong("projectId"));
+            newData.setContractId( json.getLong("contractId"));
             //操作模块
             newData.setOperationModule(operationModule);
             //操作内容

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/OperationLogMapper.xml

@@ -55,7 +55,7 @@
     <select id="getPage" resultType="org.springblade.business.entity.OperationLog">
         select *
         from u_operation_log uol where is_deleted = 0
-        and (SELECT contract_id from m_wbs_tree_contract WHERE p_key_id = SUBSTRING_INDEX(uol.business_id,",",1)) = #{vo.contractId}
+        and uol.project_id = #{vo.projectId} and uol.contract_id = #{vo.contractId}
         <if test="vo.operationModule != null and vo.operationModule != '' ">
              and operation_module = #{vo.operationModule}
         </if>

+ 2 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1164,6 +1164,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 json.put("operationObjIds", Func.toStrList(pkids));
                 json.put("operationObjName", wbsTreeContractByP.getNodeName() + "节点数据操作");
                 json.put("saveData", saveData.toString());
+                json.put("projectId", wbsTreeContract.getProjectId());
+                json.put("contractId", wbsTreeContract.getContractId());
 
                 //保存操作记录
                 this.operationLogClient.saveUserOperationLog(1, "资料填报", "工序填报页面", json);