Commit 263a2354 authored by zhangyingbin's avatar zhangyingbin

修改流程bug

parent 30576b9f
......@@ -215,9 +215,8 @@ public class ProjectController extends BaseController {
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "项目审核", notes = "项目审核")
@PostMapping(value = "/processProject")
public ResponseModel<String> processProject(String sequenceNbr,@RequestBody JSONObject json){
String option = json.getString(XJConstant.PROCESS_PROJECT_STATE);
@GetMapping(value = "/processProject")
public ResponseModel<String> processProject(String sequenceNbr,String option){
Project project = projectServiceImpl.getById(sequenceNbr);
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(project));
jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"审核不通过");
......
......@@ -177,7 +177,7 @@ public class OrgServiceImpl {
if(ValidationUtil.isEmpty(code)){
c = 0001;
}else{
c = Integer.parseInt(code)+1;
c = Integer.parseInt(code.substring(code.indexOf("-"),code.length() - 1))+1;
}
String welderCode = OrgEnum.焊工.getKey() +"-"+ c;
......@@ -290,11 +290,10 @@ public class OrgServiceImpl {
* 查询当前登录单位下的人员列表
* @return
*/
@BusinessIdentify
public List<OrgUsr> getCharge(){
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(OrgUsr :: getAmosOrgId,String.valueOf(getReginParams().getCompany().getSequenceNbr()));
LambdaQueryWrapper<OrgUsr> personWrapper = new LambdaQueryWrapper<>();
personWrapper.eq(OrgUsr::getParentId,orgUsrServiceImpl.getOne(wrapper).getSequenceNbr())
personWrapper.eq(OrgUsr::getParentId,String.valueOf(getReginParams().getBusinessInfo().getCompanySequenceNbr()))
.eq(OrgUsr :: getBizOrgType,OrgEnum.普通人员.getKey());
return orgUsrServiceImpl.list(personWrapper);
}
......
......@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl;
import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
......@@ -60,9 +59,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
WorkflowExcuteServiceImpl workflowExcuteService;
@Autowired
WorkflowFeignService workflowFeignService;
@Autowired
InstallNoticeMsgServiceImpl installNoticeMsgService;
@Autowired
......@@ -122,18 +118,15 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
@Override
public void execute(String instanceId,Object objectd, String option){
JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(objectd));
JSONObject jsonObject = workflowFeignService.getTask(instanceId);
AjaxResult ajaxResult = Workflow.taskClient.getTask(instanceId);
JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
ProjectInitiation projectInitiation = new ProjectInitiation();
projectInitiation.setInstanceId(instanceId);
projectInitiation.setContext(JSON.toJSONString(objectd));
JSONObject dataObject = jsonObject.getJSONObject("data");
projectInitiation.setTaskId(dataObject.getString("id"));
projectInitiation.setTaskName(dataObject.getString("name"));
if (ProjectInitiationEnum.平台审核.getName().equals(dataObject.getString("name"))) {
if (true) {
option = "1";
}
}
if(ProjectInitiationEnum.监检员审核.getName().equals(dataObject.getString("name"))){
......@@ -189,10 +182,11 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
* @return
*/
public String getFlowTaskName(String instanceId){
JSONObject jsonObject = workflowFeignService.getTask(instanceId);
AjaxResult ajaxResult = Workflow.taskClient.getTask(instanceId);
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
String taskName = "流程结束!";
try {
taskName=jsonObject.getJSONObject("data").getString("name");
taskName=jsonObject.getString("name");
}catch (Exception e) {}
return taskName;
}
......@@ -201,7 +195,8 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
LambdaQueryWrapper<Project> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Project::getInstanceId,instanceId);
Project project = projectService.getOne(wrapper);
project.setStatus(ProjectInitiationEnum.getCodeByNameMap.get(getFlowTaskName(instanceId)));
// project.setStatus(ProjectInitiationEnum.getCodeByNameMap.get(getFlowTaskName(instanceId)));
project.setStatus(getFlowTaskName(instanceId));
projectService.updateById(project);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment