feat: 根据企标编号找到企标计划的标准类型字段
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
|||||||
|
package com.jero.modules.activiti.process.common.controller;
|
||||||
|
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.common.aspect.annotation.Translation;
|
||||||
|
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Mzaxd
|
||||||
|
* @Date: 2023/11/21 14:27
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "企标通用流程接口")
|
||||||
|
@RequestMapping("/process/common")
|
||||||
|
public class ESProcessCommonController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ActFlowCommonService actFlowCommonService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据企标编号获取企标计划的标准类型字段
|
||||||
|
*
|
||||||
|
* @param standardNo
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "根据企标编号获取企标计划的标准类型字段")
|
||||||
|
@ApiOperation(value="根据企标编号获取企标计划的标准类型字段", notes="根据企标编号获取企标计划的标准类型字段")
|
||||||
|
@GetMapping("/getStandType")
|
||||||
|
@Translation
|
||||||
|
public Result<?> getStandType(@RequestParam("standardNo") @ApiParam("企标编号") String standardNo) {
|
||||||
|
return Result.OK(actFlowCommonService.getStandTypeByStandNo(standardNo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.jero.modules.activiti.process.common.entity;
|
||||||
|
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Mzaxd
|
||||||
|
* @Date: 2023/11/21 14:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class StandTypeVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("企标计划-标准类型")
|
||||||
|
@Dict(dicCode = "esp_standard_type")
|
||||||
|
private String standardType;
|
||||||
|
|
||||||
|
}
|
||||||
+17
@@ -9,8 +9,11 @@ import com.jero.modules.activiti.enums.CommitFlagEnum;
|
|||||||
import com.jero.modules.activiti.enums.FinishFlagEnum;
|
import com.jero.modules.activiti.enums.FinishFlagEnum;
|
||||||
import com.jero.modules.activiti.mapper.ProcessNodeMapper;
|
import com.jero.modules.activiti.mapper.ProcessNodeMapper;
|
||||||
import com.jero.modules.activiti.process.common.entity.CommonVO;
|
import com.jero.modules.activiti.process.common.entity.CommonVO;
|
||||||
|
import com.jero.modules.activiti.process.common.entity.StandTypeVO;
|
||||||
import com.jero.modules.activiti.service.ProcessAllService;
|
import com.jero.modules.activiti.service.ProcessAllService;
|
||||||
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
||||||
|
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
|
||||||
|
import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.activiti.engine.RepositoryService;
|
import org.activiti.engine.RepositoryService;
|
||||||
import org.activiti.engine.RuntimeService;
|
import org.activiti.engine.RuntimeService;
|
||||||
@@ -54,6 +57,9 @@ public class ActFlowCommonService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ProcessNodeMapper processNodeMapper;
|
private ProcessNodeMapper processNodeMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EnterpriseStandardPlanService espService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动流程实例
|
* 启动流程实例
|
||||||
*/
|
*/
|
||||||
@@ -305,4 +311,15 @@ public class ActFlowCommonService {
|
|||||||
process.setPrcType(prcType);
|
process.setPrcType(prcType);
|
||||||
processAllService.updateById(process);
|
processAllService.updateById(process);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StandTypeVO getStandTypeByStandNo(String standardNo) {
|
||||||
|
LambdaUpdateWrapper<EnterpriseStandardPlan> espWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
espWrapper.eq(EnterpriseStandardPlan::getNewEnStandardNo, standardNo);
|
||||||
|
EnterpriseStandardPlan one = espService.getOne(espWrapper);
|
||||||
|
StandTypeVO standTypeVO = new StandTypeVO();
|
||||||
|
if (one != null) {
|
||||||
|
standTypeVO.setStandardType(one.getStandardType());
|
||||||
|
}
|
||||||
|
return standTypeVO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user