金林湾bug修复
This commit is contained in:
parent
ff55e03b4c
commit
cb849b8e1d
@ -20,9 +20,10 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title: Controller
|
* @Title: Controller
|
||||||
* @Description: 项目配置
|
* @Description: 项目配置
|
||||||
* @author: pds
|
* @author: pds
|
||||||
@ -39,6 +40,7 @@ public class ProjectConfigController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
*
|
||||||
* @param projectConfig
|
* @param projectConfig
|
||||||
* @param pageNo
|
* @param pageNo
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
@ -48,8 +50,8 @@ public class ProjectConfigController {
|
|||||||
@ApiOperation(value = "分页列表查询项目配置信息", notes = "分页列表查询项目配置信息", httpMethod = "GET")
|
@ApiOperation(value = "分页列表查询项目配置信息", notes = "分页列表查询项目配置信息", httpMethod = "GET")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<ProjectConfig>> queryPageList(ProjectConfig projectConfig,
|
public Result<IPage<ProjectConfig>> queryPageList(ProjectConfig projectConfig,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Result<IPage<ProjectConfig>> result = new Result<IPage<ProjectConfig>>();
|
Result<IPage<ProjectConfig>> result = new Result<IPage<ProjectConfig>>();
|
||||||
QueryWrapper<ProjectConfig> queryWrapper = QueryGenerator.initQueryWrapper(projectConfig, req.getParameterMap());
|
QueryWrapper<ProjectConfig> queryWrapper = QueryGenerator.initQueryWrapper(projectConfig, req.getParameterMap());
|
||||||
@ -63,11 +65,12 @@ public class ProjectConfigController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
|
*
|
||||||
* @param projectConfig
|
* @param projectConfig
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@OperLog(operModul = "项目管理",operType = "编辑项目配置",operDesc = "编辑项目配置")
|
@OperLog(operModul = "项目管理", operType = "编辑项目配置", operDesc = "编辑项目配置")
|
||||||
@ApiOperation(value = "编辑项目配置信息", notes = "编辑项目配置信息" , httpMethod="POST")
|
@ApiOperation(value = "编辑项目配置信息", notes = "编辑项目配置信息", httpMethod = "POST")
|
||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
public Result<ProjectConfig> edit(@RequestBody ProjectConfig projectConfig) {
|
public Result<ProjectConfig> edit(@RequestBody ProjectConfig projectConfig) {
|
||||||
projectConfigService.editProjectConfig(projectConfig);
|
projectConfigService.editProjectConfig(projectConfig);
|
||||||
@ -76,21 +79,22 @@ public class ProjectConfigController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@OperLog(operModul = "项目管理",operType = "删除项目配置",operDesc = "删除项目配置")
|
@OperLog(operModul = "项目管理", operType = "删除项目配置", operDesc = "删除项目配置")
|
||||||
@ApiOperation(value = "删除项目配置信息", notes = "删除项目配置信息" , httpMethod="POST")
|
@ApiOperation(value = "删除项目配置信息", notes = "删除项目配置信息", httpMethod = "POST")
|
||||||
@ApiImplicitParam(name = "id", value = "项目配置ID", paramType = "query", required = true, dataType = "Integer")
|
@ApiImplicitParam(name = "id", value = "项目配置ID", paramType = "query", required = true, dataType = "Integer")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<ProjectConfig> delete(@RequestBody Map<String,Object> map) {
|
public Result<ProjectConfig> delete(@RequestBody Map<String, Object> map) {
|
||||||
Result<ProjectConfig> result = new Result<ProjectConfig>();
|
Result<ProjectConfig> result = new Result<ProjectConfig>();
|
||||||
ProjectConfig projectConfig = projectConfigService.getById(MapUtils.getString(map,"id"));
|
ProjectConfig projectConfig = projectConfigService.getById(MapUtils.getString(map, "id"));
|
||||||
if(projectConfig==null) {
|
if (projectConfig == null) {
|
||||||
result.error500(MessageUtil.get("notFindErr"));
|
result.error500(MessageUtil.get("notFindErr"));
|
||||||
}else {
|
} else {
|
||||||
boolean ok = projectConfigService.removeById(MapUtils.getString(map,"id"));
|
boolean ok = projectConfigService.removeById(MapUtils.getString(map, "id"));
|
||||||
if(ok) {
|
if (ok) {
|
||||||
result.successMsg(MessageUtil.get("deleteSucess"));
|
result.successMsg(MessageUtil.get("deleteSucess"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,32 +105,39 @@ public class ProjectConfigController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "通过id查询项目配置信息", notes = "通过id查询项目配置信息" , httpMethod="POST")
|
@ApiOperation(value = "通过id查询项目配置信息", notes = "通过id查询项目配置信息", httpMethod = "POST")
|
||||||
@ApiImplicitParam(name = "id", value = "项目配置ID", paramType = "query", required = true, dataType = "Integer")
|
@ApiImplicitParam(name = "id", value = "项目配置ID", paramType = "query", required = true, dataType = "Integer")
|
||||||
@PostMapping(value = "/queryById")
|
@PostMapping(value = "/queryById")
|
||||||
public Result<ProjectConfig> queryById(@RequestBody Map<String,Object> map) {
|
public Result<ProjectConfig> queryById(@RequestBody Map<String, Object> map) {
|
||||||
Result<ProjectConfig> result = new Result<ProjectConfig>();
|
Result<ProjectConfig> result = new Result<ProjectConfig>();
|
||||||
ProjectConfig projectConfig = projectConfigService.getById(MapUtils.getString(map,"id"));
|
ProjectConfig projectConfig = projectConfigService.getById(MapUtils.getString(map, "id"));
|
||||||
if(projectConfig==null) {
|
if (projectConfig == null) {
|
||||||
result.error500(MessageUtil.get("notFindErr"));
|
result.error500(MessageUtil.get("notFindErr"));
|
||||||
}else {
|
} else {
|
||||||
result.setResult(projectConfig);
|
result.setResult(projectConfig);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "通过项目sn查询项目配置", notes = "通过项目sn查询项目配置", httpMethod="POST")
|
@ApiOperation(value = "通过项目sn查询项目配置", notes = "通过项目sn查询项目配置", httpMethod = "POST")
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String")
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String")
|
||||||
@PostMapping(value = "/getProjectConfigList")
|
@PostMapping(value = "/getProjectConfigList")
|
||||||
public Result<List<ProjectConfig>> getProjectConfigList(@RequestBody Map<String,Object> map) {
|
public Result<List<ProjectConfig>> getProjectConfigList(@RequestBody Map<String, Object> map) {
|
||||||
Result<List<ProjectConfig>> result = new Result<List<ProjectConfig>>();
|
Result<List<ProjectConfig>> result = new Result<List<ProjectConfig>>();
|
||||||
QueryWrapper<ProjectConfig> queryWrapper=new QueryWrapper<>();
|
QueryWrapper<ProjectConfig> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(ProjectConfig::getProjectSn, MapUtils.getString(map,"projectSn"));
|
queryWrapper.lambda().eq(ProjectConfig::getProjectSn, MapUtils.getString(map, "projectSn"));
|
||||||
List<ProjectConfig> list=projectConfigService.list(queryWrapper);
|
List<ProjectConfig> list = projectConfigService.list(queryWrapper);
|
||||||
|
for (ProjectConfig projectConfig : list) {
|
||||||
|
if (!Objects.equals(projectConfig.getPositionType(), 1)) {
|
||||||
|
projectConfig.setPositionType(1);
|
||||||
|
projectConfigService.updateById(projectConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
result.setResult(list);
|
result.setResult(list);
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user