|
@@ -11,10 +11,12 @@ import io.swagger.annotations.ApiOperation;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.springblade.business.entity.ContractLog;
|
|
import org.springblade.business.entity.ContractLog;
|
|
|
|
+import org.springblade.business.entity.ContractLogWbs;
|
|
import org.springblade.business.entity.Task;
|
|
import org.springblade.business.entity.Task;
|
|
import org.springblade.business.feign.MessageWarningClient;
|
|
import org.springblade.business.feign.MessageWarningClient;
|
|
import org.springblade.business.feign.OperationLogClient;
|
|
import org.springblade.business.feign.OperationLogClient;
|
|
import org.springblade.business.feign.TaskClient;
|
|
import org.springblade.business.feign.TaskClient;
|
|
|
|
+import org.springblade.business.service.IContractLogWbsService;
|
|
import org.springblade.business.vo.*;
|
|
import org.springblade.business.vo.*;
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.api.R;
|
|
@@ -26,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
|
|
import org.springblade.business.service.IContractLogService;
|
|
import org.springblade.business.service.IContractLogService;
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -44,6 +47,8 @@ public class ContractLogController extends BladeController {
|
|
|
|
|
|
private final IContractLogService contractLogService;
|
|
private final IContractLogService contractLogService;
|
|
|
|
|
|
|
|
+ private final IContractLogWbsService contractLogWbsService;
|
|
|
|
+
|
|
private final WbsTreeContractClient wbsTreeContractClient;
|
|
private final WbsTreeContractClient wbsTreeContractClient;
|
|
|
|
|
|
private final TaskClient taskClient;
|
|
private final TaskClient taskClient;
|
|
@@ -52,11 +57,52 @@ public class ContractLogController extends BladeController {
|
|
|
|
|
|
private final MessageWarningClient messageWarningClient;
|
|
private final MessageWarningClient messageWarningClient;
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取当前日志资料关联的工序节点信息
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/queryCurrentLogSelectProcessList")
|
|
|
|
+ @ApiOperationSupport(order = 7)
|
|
|
|
+ @ApiOperation(value = "获取当前日志资料关联的工序节点信息")
|
|
|
|
+ @ApiImplicitParams(
|
|
|
|
+ {
|
|
|
|
+ @ApiImplicitParam(name = "theLogId", value = "日志记录的id,可能为空"),
|
|
|
|
+ @ApiImplicitParam(name = "nodePrimaryKeyId", value = "当前操作的日志类型ID,即左侧列表的节点primaryKeyId"),
|
|
|
|
+ @ApiImplicitParam(name = "recordTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd")
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ public R<List<JSONObject>> querySelectProcessList(String theLogId, String nodePrimaryKeyId, String recordTime){
|
|
|
|
+ List<JSONObject> jsonResult = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isEmpty(theLogId)){
|
|
|
|
+ ContractLog log = this.contractLogService.getOne(Wrappers.<ContractLog>lambdaQuery()
|
|
|
|
+ .eq(ContractLog::getWbsNodeId, nodePrimaryKeyId)
|
|
|
|
+ .eq(ContractLog::getRecordTime, recordTime).eq(ContractLog::getCreateUser, AuthUtil.getUserId()));
|
|
|
|
+ if(log == null){
|
|
|
|
+ return R.fail("未找到数据");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ theLogId = String.valueOf(log.getId());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<ContractLogWbs> result = this.contractLogWbsService.list(Wrappers.<ContractLogWbs>lambdaQuery().eq(ContractLogWbs::getContractLogId, theLogId));
|
|
|
|
+ if(result != null && result.size() > 0){
|
|
|
|
+ result.forEach(logWbs -> {
|
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
|
+ json.put("primaryKeyId", logWbs.getTreePrimaryKeyId());
|
|
|
|
+ json.put("path", logWbs.getTitle());
|
|
|
|
+
|
|
|
|
+ jsonResult.add(json);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return R.data(jsonResult);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取合同段当前日志节点下的填报日期记录
|
|
* 获取合同段当前日志节点下的填报日期记录
|
|
*/
|
|
*/
|
|
@PostMapping("/getSubmitLogDateList")
|
|
@PostMapping("/getSubmitLogDateList")
|
|
- @ApiOperationSupport(order = 4)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 6)
|
|
@ApiOperation(value = "获取合同段当前日志节点下的填报日期记录")
|
|
@ApiOperation(value = "获取合同段当前日志节点下的填报日期记录")
|
|
public R<List<String>> getSubmitLogDateList(@RequestParam String contractId, @RequestParam String primaryKeyId){
|
|
public R<List<String>> getSubmitLogDateList(@RequestParam String contractId, @RequestParam String primaryKeyId){
|
|
return R.data(this.contractLogService.getSubmitLogDateList(contractId, primaryKeyId));
|
|
return R.data(this.contractLogService.getSubmitLogDateList(contractId, primaryKeyId));
|