Commit 59fe1185 authored by zhangyingbin's avatar zhangyingbin

修改监检部门、监检员选择接口

parent 2cab9ce5
......@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModel;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import io.swagger.models.Model;
import org.springframework.beans.BeanUtils;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -31,6 +31,7 @@ import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.lang.reflect.InvocationTargetException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -249,7 +250,8 @@ public class ProjectController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "Post", value = "项目审核", notes = "项目审核")
@PostMapping(value = "/processProject")
public ResponseModel<String> processProject(@RequestParam("sequenceNbr") String sequenceNbr,String option,@RequestBody JSONObject json){
public ResponseModel<String> processProject(@RequestParam("sequenceNbr") String sequenceNbr,String option,@RequestBody JSONObject j){
JSONObject json = j.getJSONObject("fileInfo");
Project project = projectServiceImpl.getById(sequenceNbr);
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(project));
jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"审核通过");
......@@ -262,7 +264,6 @@ public class ProjectController extends BaseController {
jsonObject.put(XJConstant.INS_DEP,map.get("name"));
jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"监检员待审核");
} else if (!ValidationUtil.isEmpty(insDepId)) {
Map map = orgServiceImpl.getdetialInfo(insDepId);
jsonObject.put(XJConstant.INS_DEPID,map.get("sequenceNbr"));
jsonObject.put(XJConstant.INS_DEP,map.get("name"));
......@@ -335,8 +336,17 @@ public class ProjectController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "通过sequenceNbr查询项目详情", notes = "通过sequenceNbr查询项目详情")
@GetMapping(value = "/getDetail")
public ResponseModel<ProjectDto> getDetail(Long sequenceNbr){
return ResponseHelper.buildResponse(projectServiceImpl.getDetail(sequenceNbr));
public ResponseModel<JSONObject> getDetail(Long sequenceNbr){
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(projectServiceImpl.getInformationDetail(sequenceNbr)));
try {
jsonObject.putAll(BeanUtils.describe(projectServiceImpl.getDetail(sequenceNbr)));
} catch (Exception e) {
e.printStackTrace();
}
JSONObject jo = new JSONObject();
jo.put("projectInfo",projectServiceImpl.selectById(sequenceNbr));
jo.put("fileInfo",jsonObject);
return ResponseHelper.buildResponse(jo);
}
......
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