Răsfoiți Sursa

日志相关

huangjn 2 ani în urmă
părinte
comite
b568cb95e4

+ 53 - 16
blade-service/blade-business/src/main/java/org/springblade/business/controller/ContractLogController.java

@@ -69,6 +69,27 @@ public class ContractLogController extends BladeController {
 
 	private final NewIOSSClient newIOSSClient;
 
+	/**
+	 * 单个废除(填报页)
+	 */
+	@PostMapping("/oneAbolish")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = " 单个废除(填报页)")
+	@ApiImplicitParams({
+			@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true),
+			@ApiImplicitParam(name = "nodePrimaryKeyId", value = "当前操作的日志类型ID,即左侧列表的节点primaryKeyId", required = true),
+			@ApiImplicitParam(name = "recordTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd", required = true)
+	})
+	public R<Boolean> oneAbolish(@RequestParam String nodePrimaryKeyId, @RequestParam String recordTime, @RequestParam String contractId){
+		//查询数据
+		ContractLog log = this.contractLogService.getOne(Wrappers.<ContractLog>lambdaQuery().eq(ContractLog::getWbsNodeId, nodePrimaryKeyId).eq(ContractLog::getRecordTime, recordTime).eq(ContractLog::getContractId, contractId));
+		if(log != null){
+			//调用批量废除接口
+			return this.batchAbolish(log.getId().toString());
+		}
+		return R.data(300, false, "废除失败");
+	}
+
 	/**
 	 * 获取当前资料的任务状态
 	 */
@@ -76,7 +97,7 @@ public class ContractLogController extends BladeController {
 	@ApiOperationSupport(order = 9)
 	@ApiOperation(value = "获取当前资料的任务状态")
 	@ApiImplicitParams({
-			@ApiImplicitParam(name = "startTaskVO", value = "流程参数", required = true),
+			@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true),
 			@ApiImplicitParam(name = "nodePrimaryKeyId", value = "当前操作的日志类型ID,即左侧列表的节点primaryKeyId", required = true),
 			@ApiImplicitParam(name = "recordTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd", required = true)
 	})
@@ -121,21 +142,37 @@ public class ContractLogController extends BladeController {
 			@ApiImplicitParam(name = "nodePrimaryKeyId", value = "当前操作的日志类型ID,即左侧列表的节点primaryKeyId", required = true),
 			@ApiImplicitParam(name = "recordTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd", required = true)
 	})
-    public R<Boolean> startTaskTheLog(@RequestBody StartTaskVO startTaskVO, @RequestParam String nodePrimaryKeyId, @RequestParam String recordTime){
-        if(StringUtils.isEmpty(startTaskVO.getIds())){
-            if(StringUtils.isEmpty(nodePrimaryKeyId) && StringUtils.isEmpty(recordTime)){
-                return R.fail("未找到业务数据");
-            }
-            //如果ids为空,说明是填报页上报,那么需要根据 nodePrimaryKeyId 和 recordTime 获取当前用户的填写记录
-            ContractLog log = this.contractLogService.getOne(Wrappers.<ContractLog>lambdaQuery().eq(ContractLog::getWbsNodeId, nodePrimaryKeyId)
-					.eq(ContractLog::getRecordTime, recordTime).eq(ContractLog::getContractId, startTaskVO.getContractId())
-					.eq(ContractLog::getCreateUser, AuthUtil.getUserId()));
-            if(log == null){
-                return R.fail("未找到业务数据");
-            }
-            startTaskVO.setIds(String.valueOf(log.getId()));
-        }
-        return this.batchTask(startTaskVO);
+    public R<Boolean> startTaskTheLog(@RequestBody JSONObject json){
+
+		if(json != null){
+			StartTaskVO startTaskVO = JSONObject.parseObject(JSONObject.toJSONString(json), StartTaskVO.class);
+
+			String nodePrimaryKeyId = "", recordTime = "";
+			if(json.containsKey("nodePrimaryKeyId")){
+				nodePrimaryKeyId = json.getString("nodePrimaryKeyId");
+			}
+			if(json.containsKey("recordTime")){
+				recordTime = json.getString("recordTime");
+			}
+
+			if(StringUtils.isEmpty(startTaskVO.getIds())){
+				if(StringUtils.isEmpty(nodePrimaryKeyId) && StringUtils.isEmpty(recordTime)){
+					return R.fail("未找到业务数据");
+				}
+				//如果ids为空,说明是填报页上报,那么需要根据 nodePrimaryKeyId 和 recordTime 获取当前用户的填写记录
+				ContractLog log = this.contractLogService.getOne(Wrappers.<ContractLog>lambdaQuery().eq(ContractLog::getWbsNodeId, nodePrimaryKeyId)
+						.eq(ContractLog::getRecordTime, recordTime).eq(ContractLog::getContractId, startTaskVO.getContractId())
+						.eq(ContractLog::getCreateUser, AuthUtil.getUserId()));
+				if(log == null){
+					return R.fail("未找到业务数据");
+				}
+				startTaskVO.setIds(String.valueOf(log.getId()));
+			}
+			return this.batchTask(startTaskVO);
+
+		}
+
+        return R.data(300, false, "上报失败");
     }
 
 	/**

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

@@ -3,7 +3,6 @@ package org.springblade.business.controller;
 import io.swagger.annotations.Api;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.*;
-import org.springblade.business.service.IFirstInformationService;
 import org.springblade.core.boot.ctrl.BladeController;
 
 /**
@@ -18,7 +17,4 @@ import org.springblade.core.boot.ctrl.BladeController;
 @Api(value = "首件信息记录表", tags = "首件信息记录表接口")
 public class FirstInformationController extends BladeController {
 
-	private final IFirstInformationService firstInformationService;
-
-	
 }