bug修复
This commit is contained in:
parent
6654ebe59f
commit
2b480cb2de
@ -1,27 +1,22 @@
|
||||
package com.zhgd.xmgl.modules.goulipkpm.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.entity.GouliPkpmConfig;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.service.IGouliPkpmConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.service.IGouliPkpmConfigService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -36,104 +31,110 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Slf4j
|
||||
@Api(tags = "构力pkpm-配置信息表相关Api")
|
||||
public class GouliPkpmConfigController {
|
||||
@Autowired
|
||||
private IGouliPkpmConfigService gouliPkpmConfigService;
|
||||
@Autowired
|
||||
private IGouliPkpmConfigService gouliPkpmConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询构力pkpm-配置信息表信息", notes = "分页列表查询构力pkpm-配置信息表信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<GouliPkpmConfig>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmConfigService.queryPageList(paramMap));
|
||||
}
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询构力pkpm-配置信息表信息", notes = "分页列表查询构力pkpm-配置信息表信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<GouliPkpmConfig>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmConfigService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询构力pkpm-配置信息表信息", notes = "列表查询构力pkpm-配置信息表信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<GouliPkpmConfig>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmConfigService.queryList(paramMap));
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询构力pkpm-配置信息表信息", notes = "列表查询构力pkpm-配置信息表信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<GouliPkpmConfig>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmConfigService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param gouliPkpmConfig
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加构力pkpm-配置信息表信息", notes = "添加构力pkpm-配置信息表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<GouliPkpmConfig> add(@RequestBody @Validate GouliPkpmConfig gouliPkpmConfig) {
|
||||
gouliPkpmConfigService.add(gouliPkpmConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param gouliPkpmConfig
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加构力pkpm-配置信息表信息", notes = "添加构力pkpm-配置信息表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<GouliPkpmConfig> add(@RequestBody @Validate GouliPkpmConfig gouliPkpmConfig) {
|
||||
gouliPkpmConfigService.add(gouliPkpmConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param gouliPkpmConfig
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑构力pkpm-配置信息表信息", notes = "编辑构力pkpm-配置信息表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<GouliPkpmConfig> edit(@RequestBody GouliPkpmConfig gouliPkpmConfig) {
|
||||
gouliPkpmConfigService.edit(gouliPkpmConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param gouliPkpmConfig
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑构力pkpm-配置信息表信息", notes = "编辑构力pkpm-配置信息表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<GouliPkpmConfig> edit(@RequestBody GouliPkpmConfig gouliPkpmConfig) {
|
||||
gouliPkpmConfigService.edit(gouliPkpmConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除构力pkpm-配置信息表信息", notes = "删除构力pkpm-配置信息表信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "构力pkpm-配置信息表ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<GouliPkpmConfig> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<GouliPkpmConfig> result = new Result<GouliPkpmConfig>();
|
||||
GouliPkpmConfig gouliPkpmConfig = gouliPkpmConfigService.getById(id);
|
||||
if (gouliPkpmConfig == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = gouliPkpmConfigService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除构力pkpm-配置信息表信息", notes = "删除构力pkpm-配置信息表信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "构力pkpm-配置信息表ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<GouliPkpmConfig> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<GouliPkpmConfig> result = new Result<GouliPkpmConfig>();
|
||||
GouliPkpmConfig gouliPkpmConfig = gouliPkpmConfigService.getById(id);
|
||||
if (gouliPkpmConfig == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = gouliPkpmConfigService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询构力pkpm-配置信息表信息", notes = "通过id查询构力pkpm-配置信息表信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "构力pkpm-配置信息表ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<GouliPkpmConfig> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<GouliPkpmConfig> result = new Result<GouliPkpmConfig>();
|
||||
GouliPkpmConfig gouliPkpmConfig = gouliPkpmConfigService.getById(id);
|
||||
if (gouliPkpmConfig == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(gouliPkpmConfig);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询构力pkpm-配置信息表信息", notes = "通过id查询构力pkpm-配置信息表信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "构力pkpm-配置信息表ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<GouliPkpmConfig> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<GouliPkpmConfig> result = new Result<GouliPkpmConfig>();
|
||||
GouliPkpmConfig gouliPkpmConfig = gouliPkpmConfigService.getById(id);
|
||||
if (gouliPkpmConfig == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(gouliPkpmConfig);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询构力pkpm-配置信息表信息", notes = "查询构力pkpm-配置信息表信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String")
|
||||
@GetMapping(value = "/getConfigByProjectSn")
|
||||
public Result<GouliPkpmConfig> getConfigByProjectSn(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmConfigService.getConfigByProjectSn(paramMap));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,27 +1,22 @@
|
||||
package com.zhgd.xmgl.modules.goulipkpm.controller;
|
||||
|
||||
import cn.hutool.http.Header;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.entity.GouliPkpmModel;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.service.IGouliPkpmModelService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -36,104 +31,122 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Slf4j
|
||||
@Api(tags = "构力pkpm-模型相关Api")
|
||||
public class GouliPkpmModelController {
|
||||
@Autowired
|
||||
private IGouliPkpmModelService gouliPkpmModelService;
|
||||
@Autowired
|
||||
private IGouliPkpmModelService gouliPkpmModelService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询构力pkpm-模型信息", notes = "分页列表查询构力pkpm-模型信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<GouliPkpmModel>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmModelService.queryPageList(paramMap));
|
||||
}
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询构力pkpm-模型信息", notes = "分页列表查询构力pkpm-模型信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<GouliPkpmModel>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmModelService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询构力pkpm-模型信息", notes = "列表查询构力pkpm-模型信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<GouliPkpmModel>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmModelService.queryList(paramMap));
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询构力pkpm-模型信息", notes = "列表查询构力pkpm-模型信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<GouliPkpmModel>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmModelService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param gouliPkpmModel
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加构力pkpm-模型信息", notes = "添加构力pkpm-模型信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<GouliPkpmModel> add(@RequestBody @Validate GouliPkpmModel gouliPkpmModel) {
|
||||
gouliPkpmModelService.add(gouliPkpmModel);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param gouliPkpmModel
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加构力pkpm-模型信息", notes = "添加构力pkpm-模型信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<GouliPkpmModel> add(@RequestBody @Validate GouliPkpmModel gouliPkpmModel) {
|
||||
gouliPkpmModelService.add(gouliPkpmModel);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param gouliPkpmModel
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑构力pkpm-模型信息", notes = "编辑构力pkpm-模型信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<GouliPkpmModel> edit(@RequestBody GouliPkpmModel gouliPkpmModel) {
|
||||
gouliPkpmModelService.edit(gouliPkpmModel);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param gouliPkpmModel
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑构力pkpm-模型信息", notes = "编辑构力pkpm-模型信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<GouliPkpmModel> edit(@RequestBody GouliPkpmModel gouliPkpmModel) {
|
||||
gouliPkpmModelService.edit(gouliPkpmModel);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除构力pkpm-模型信息", notes = "删除构力pkpm-模型信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "构力pkpm-模型ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<GouliPkpmModel> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<GouliPkpmModel> result = new Result<GouliPkpmModel>();
|
||||
GouliPkpmModel gouliPkpmModel = gouliPkpmModelService.getById(id);
|
||||
if (gouliPkpmModel == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = gouliPkpmModelService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除构力pkpm-模型信息", notes = "删除构力pkpm-模型信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "构力pkpm-模型ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<GouliPkpmModel> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<GouliPkpmModel> result = new Result<GouliPkpmModel>();
|
||||
GouliPkpmModel gouliPkpmModel = gouliPkpmModelService.getById(id);
|
||||
if (gouliPkpmModel == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = gouliPkpmModelService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询构力pkpm-模型信息", notes = "通过id查询构力pkpm-模型信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "构力pkpm-模型ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<GouliPkpmModel> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<GouliPkpmModel> result = new Result<GouliPkpmModel>();
|
||||
GouliPkpmModel gouliPkpmModel = gouliPkpmModelService.getById(id);
|
||||
if (gouliPkpmModel == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(gouliPkpmModel);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询构力pkpm-模型信息", notes = "通过id查询构力pkpm-模型信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "构力pkpm-模型ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<GouliPkpmModel> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<GouliPkpmModel> result = new Result<GouliPkpmModel>();
|
||||
GouliPkpmModel gouliPkpmModel = gouliPkpmModelService.getById(id);
|
||||
if (gouliPkpmModel == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(gouliPkpmModel);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取bim的token", notes = "获取bim的token", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String")
|
||||
@GetMapping(value = "/getBimTokenByProjectSn")
|
||||
public Result<Object> getBimTokenByProjectSn(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(gouliPkpmModelService.getBimTokenByProjectSn(paramMap));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "设置成主模型", notes = "设置成主模型", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "urn", value = "文件标识", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/setEnableMainModel")
|
||||
public Result setEnableMainModel(@RequestBody @ApiIgnore GouliPkpmModel gouliPkpmModel) {
|
||||
gouliPkpmModelService.setEnableMainModel(gouliPkpmModel);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
package com.zhgd.xmgl.modules.goulipkpm.service;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.entity.GouliPkpmConfig;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class GouliPkpmService {
|
||||
/**
|
||||
* 获取token
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getToken(GouliPkpmConfig config) {
|
||||
String url = "https://api.cloud.pkpm.cn/bimserver/auth/oauth/token";
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("grant_type", "client_credentials");
|
||||
map.put("client_id", config.getClientId());
|
||||
map.put("client_secret", config.getClientSecret());
|
||||
log.info("url:{},body:{}", url, JSON.toJSONString(map));
|
||||
String rs = HttpUtil.post(url, map);
|
||||
log.info("rs:{}", rs);
|
||||
return JSON.parseObject(rs).getString("access_token");
|
||||
}
|
||||
|
||||
}
|
||||
@ -22,4 +22,6 @@ public interface IGouliPkpmConfigService extends IService<GouliPkpmConfig> {
|
||||
void add(GouliPkpmConfig gouliPkpmConfig);
|
||||
|
||||
void edit(GouliPkpmConfig gouliPkpmConfig);
|
||||
|
||||
GouliPkpmConfig getConfigByProjectSn(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -22,4 +22,8 @@ public interface IGouliPkpmModelService extends IService<GouliPkpmModel> {
|
||||
void add(GouliPkpmModel gouliPkpmModel);
|
||||
|
||||
void edit(GouliPkpmModel gouliPkpmModel);
|
||||
|
||||
String getBimTokenByProjectSn(HashMap<String, Object> paramMap);
|
||||
|
||||
void setEnableMainModel(GouliPkpmModel gouliPkpmModel);
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.zhgd.xmgl.modules.goulipkpm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.entity.GouliPkpmConfig;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.mapper.GouliPkpmConfigMapper;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.service.IGouliPkpmConfigService;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -66,4 +68,10 @@ public class GouliPkpmConfigServiceImpl extends ServiceImpl<GouliPkpmConfigMappe
|
||||
public void edit(GouliPkpmConfig gouliPkpmConfig) {
|
||||
baseMapper.updateById(gouliPkpmConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GouliPkpmConfig getConfigByProjectSn(HashMap<String, Object> paramMap) {
|
||||
return gouliPkpmConfigMapper.selectOne(new LambdaQueryWrapper<GouliPkpmConfig>()
|
||||
.eq(GouliPkpmConfig::getProjectSn, MapUtils.getString(paramMap, "projectSn")));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,23 +1,31 @@
|
||||
package com.zhgd.xmgl.modules.goulipkpm.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.goulipkpm.entity.GouliPkpmModel;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.mapper.GouliPkpmModelMapper;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.service.IGouliPkpmModelService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.redis.lock.RedisRepository;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.entity.GouliPkpmConfig;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.entity.GouliPkpmModel;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.mapper.GouliPkpmConfigMapper;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.mapper.GouliPkpmModelMapper;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.service.GouliPkpmService;
|
||||
import com.zhgd.xmgl.modules.goulipkpm.service.IGouliPkpmModelService;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 构力pkpm-模型
|
||||
* @author: pds
|
||||
@ -29,6 +37,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
public class GouliPkpmModelServiceImpl extends ServiceImpl<GouliPkpmModelMapper, GouliPkpmModel> implements IGouliPkpmModelService {
|
||||
@Autowired
|
||||
private GouliPkpmModelMapper gouliPkpmModelMapper;
|
||||
@Autowired
|
||||
private GouliPkpmConfigMapper gouliPkpmConfigMapper;
|
||||
@Autowired
|
||||
private GouliPkpmService gouliPkpmService;
|
||||
@Autowired
|
||||
RedisRepository redisRepository;
|
||||
|
||||
@Override
|
||||
public IPage<GouliPkpmModel> queryPageList(HashMap<String, Object> paramMap) {
|
||||
@ -66,4 +80,27 @@ public class GouliPkpmModelServiceImpl extends ServiceImpl<GouliPkpmModelMapper,
|
||||
public void edit(GouliPkpmModel gouliPkpmModel) {
|
||||
baseMapper.updateById(gouliPkpmModel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBimTokenByProjectSn(HashMap<String, Object> paramMap) {
|
||||
String projectSn = MapUtils.getString(paramMap, "projectSn");
|
||||
GouliPkpmConfig config = gouliPkpmConfigMapper.selectOne(new LambdaQueryWrapper<GouliPkpmConfig>()
|
||||
.eq(GouliPkpmConfig::getProjectSn, projectSn));
|
||||
if (config == null || StrUtil.isBlank(config.getClientId()) || StrUtil.isBlank(config.getClientSecret())) {
|
||||
throw new OpenAlertException("平台上尚未配置信息");
|
||||
}
|
||||
return gouliPkpmService.getToken(config);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnableMainModel(GouliPkpmModel gouliPkpmModel) {
|
||||
gouliPkpmModelMapper.update(null, new LambdaUpdateWrapper<GouliPkpmModel>()
|
||||
.set(GouliPkpmModel::getIsEnable, 0)
|
||||
.eq(GouliPkpmModel::getProjectSn, gouliPkpmModel.getProjectSn()));
|
||||
gouliPkpmModelMapper.update(null, new LambdaUpdateWrapper<GouliPkpmModel>()
|
||||
.set(GouliPkpmModel::getIsEnable, 1)
|
||||
.eq(GouliPkpmModel::getProjectSn, gouliPkpmModel.getProjectSn())
|
||||
.eq(GouliPkpmModel::getUrn, gouliPkpmModel.getUrn())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,7 +207,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
||||
|
||||
@Override
|
||||
public ProjectInfoExtVo getProjectInfoBySn(Map<String, Object> map) {
|
||||
ProjectInfoExtVo info = redisRepository.getOrSetEx("projectInfoBySn:" + map.get("projectSn"), (() -> projectMapper.getProjectInfoBySn(map)));
|
||||
String projectSn = MapUtils.getString(map, "projectSn");
|
||||
if (StringUtils.isBlank(projectSn)) {
|
||||
return null;
|
||||
}
|
||||
ProjectInfoExtVo info = redisRepository.getOrSetEx("projectInfoBySn:" + projectSn, (() -> projectMapper.getProjectInfoBySn(map)));
|
||||
if (info == null) {
|
||||
throw new NullPointerException(" 当前查询条件结果不存在!");
|
||||
}
|
||||
|
||||
@ -1,40 +1,23 @@
|
||||
package com.zhgd.xmgl.modules.smartbeamfield.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeamToProcess;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.CountDurationVo;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldBeamToProcessService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldBeamToProcessService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -49,114 +32,110 @@ import com.alibaba.fastjson.JSON;
|
||||
@Slf4j
|
||||
@Api(tags = "智慧梁场-制梁进度(梁下面的工序)相关Api")
|
||||
public class SmartBeamFieldBeamToProcessController {
|
||||
@Autowired
|
||||
private ISmartBeamFieldBeamToProcessService smartBeamFieldBeamToProcessService;
|
||||
@Autowired
|
||||
private ISmartBeamFieldBeamToProcessService smartBeamFieldBeamToProcessService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询智慧梁场-梁和工序中间表信息", notes = "分页列表查询智慧梁场-梁和工序中间表信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<SmartBeamFieldBeamToProcess>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartBeamFieldBeamToProcessService.queryPageList(paramMap));
|
||||
}
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询智慧梁场-梁和工序中间表信息", notes = "分页列表查询智慧梁场-梁和工序中间表信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<SmartBeamFieldBeamToProcess>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartBeamFieldBeamToProcessService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询智慧梁场-梁和工序中间表信息", notes = "列表查询智慧梁场-梁和工序中间表信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SmartBeamFieldBeamToProcess>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartBeamFieldBeamToProcessService.queryList(paramMap));
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询智慧梁场-梁和工序中间表信息", notes = "列表查询智慧梁场-梁和工序中间表信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SmartBeamFieldBeamToProcess>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartBeamFieldBeamToProcessService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param smartBeamFieldBeamToProcess
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加智慧梁场-梁和工序中间表信息", notes = "添加智慧梁场-梁和工序中间表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<SmartBeamFieldBeamToProcess> add(@RequestBody @Validate SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess) {
|
||||
smartBeamFieldBeamToProcessService.add(smartBeamFieldBeamToProcess);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param smartBeamFieldBeamToProcess
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加智慧梁场-梁和工序中间表信息", notes = "添加智慧梁场-梁和工序中间表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<SmartBeamFieldBeamToProcess> add(@RequestBody @Validate SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess) {
|
||||
smartBeamFieldBeamToProcessService.add(smartBeamFieldBeamToProcess);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param smartBeamFieldBeamToProcess
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑智慧梁场-梁和工序中间表信息", notes = "编辑智慧梁场-梁和工序中间表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<SmartBeamFieldBeamToProcess> edit(@RequestBody SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess) {
|
||||
smartBeamFieldBeamToProcessService.edit(smartBeamFieldBeamToProcess);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param smartBeamFieldBeamToProcess
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑智慧梁场-梁和工序中间表信息", notes = "编辑智慧梁场-梁和工序中间表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<SmartBeamFieldBeamToProcess> edit(@RequestBody SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess) {
|
||||
smartBeamFieldBeamToProcessService.edit(smartBeamFieldBeamToProcess);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除智慧梁场-梁和工序中间表信息", notes = "删除智慧梁场-梁和工序中间表信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "智慧梁场-梁和工序中间表ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<SmartBeamFieldBeamToProcess> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<SmartBeamFieldBeamToProcess> result = new Result<SmartBeamFieldBeamToProcess>();
|
||||
SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess = smartBeamFieldBeamToProcessService.getById(id);
|
||||
if (smartBeamFieldBeamToProcess == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = smartBeamFieldBeamToProcessService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除智慧梁场-梁和工序中间表信息", notes = "删除智慧梁场-梁和工序中间表信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "智慧梁场-梁和工序中间表ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<SmartBeamFieldBeamToProcess> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<SmartBeamFieldBeamToProcess> result = new Result<SmartBeamFieldBeamToProcess>();
|
||||
SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess = smartBeamFieldBeamToProcessService.getById(id);
|
||||
if (smartBeamFieldBeamToProcess == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = smartBeamFieldBeamToProcessService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询智慧梁场-梁和工序中间表信息", notes = "通过id查询智慧梁场-梁和工序中间表信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "智慧梁场-梁和工序中间表ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<SmartBeamFieldBeamToProcess> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<SmartBeamFieldBeamToProcess> result = new Result<SmartBeamFieldBeamToProcess>();
|
||||
SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess = smartBeamFieldBeamToProcessService.getById(id);
|
||||
if (smartBeamFieldBeamToProcess == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(smartBeamFieldBeamToProcess);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询制梁进度列表", notes = "查询制梁进度列表", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "smartBeamFieldBeamId", value = "智慧梁场-梁id", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "smartBeamFieldMakeBeamPedestalId", value = "智慧梁场-制梁台座id", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/getMakeBeamProcess")
|
||||
public Result<List<SmartBeamFieldBeamToProcess>> getMakeBeamProcess(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartBeamFieldBeamToProcessService.getMakeBeamProcess(paramMap));
|
||||
}
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询智慧梁场-梁和工序中间表信息", notes = "通过id查询智慧梁场-梁和工序中间表信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "智慧梁场-梁和工序中间表ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<SmartBeamFieldBeamToProcess> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<SmartBeamFieldBeamToProcess> result = new Result<SmartBeamFieldBeamToProcess>();
|
||||
SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess = smartBeamFieldBeamToProcessService.getById(id);
|
||||
if (smartBeamFieldBeamToProcess == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(smartBeamFieldBeamToProcess);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "统计时长", notes = "统计时长", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "smartBeamFieldBeamId", value = "智慧梁场-梁id", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/countDuration")
|
||||
public Result<CountDurationVo> countDuration(@RequestParam String smartBeamFieldBeamId) {
|
||||
return Result.success(smartBeamFieldBeamToProcessService.countDuration(smartBeamFieldBeamId));
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ public class SmartBeamFieldBeam implements Serializable {
|
||||
*/
|
||||
@Excel(name = "是否占用该生产线", width = 15)
|
||||
@ApiModelProperty(value = "是否占用该生产线")
|
||||
private java.lang.Integer useProductionLine;
|
||||
private java.lang.Boolean useProductionLine;
|
||||
/**
|
||||
* 梁号
|
||||
*/
|
||||
|
||||
@ -67,4 +67,7 @@ public class SmartBeamFieldProductionLine implements Serializable {
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "智慧梁场-制梁台座列表(查询用)")
|
||||
List<SmartBeamFieldMakeBeamPedestal> makeBeamPedestals;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "是否占用该生产线")
|
||||
private java.lang.Boolean useProductionLine;
|
||||
}
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package com.zhgd.xmgl.modules.smartbeamfield.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CountDurationVo {
|
||||
@ApiModelProperty("计划时长(s)")
|
||||
private Integer planDuration;
|
||||
@ApiModelProperty("实际时长(s)")
|
||||
private Integer actualDuration;
|
||||
@ApiModelProperty("计划时长(中文名称)")
|
||||
private String planDurationName;
|
||||
@ApiModelProperty("实际时长(中文名称)")
|
||||
private String actualDurationName;
|
||||
|
||||
}
|
||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeamToProcess;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.CountDurationVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -23,4 +24,6 @@ public interface SmartBeamFieldBeamToProcessMapper extends BaseMapper<SmartBeamF
|
||||
IPage<SmartBeamFieldBeamToProcess> queryList(Page<SmartBeamFieldBeamToProcess> page, @Param(Constants.WRAPPER) QueryWrapper<SmartBeamFieldBeamToProcess> queryWrapper);
|
||||
|
||||
List<SmartBeamFieldBeamToProcess> queryList(@Param(Constants.WRAPPER) QueryWrapper<SmartBeamFieldBeamToProcess> queryWrapper);
|
||||
|
||||
CountDurationVo countDuration(String smartBeamFieldBeamId);
|
||||
}
|
||||
|
||||
@ -1,17 +1,28 @@
|
||||
package com.zhgd.xmgl.modules.smartbeamfield.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldProductionLine;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 智慧梁场-生产线
|
||||
* @author: pds
|
||||
* @date: 2023-12-05
|
||||
* @date: 2023-12-05
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface SmartBeamFieldProductionLineMapper extends BaseMapper<SmartBeamFieldProductionLine> {
|
||||
|
||||
SmartBeamFieldProductionLine queryById(String id);
|
||||
|
||||
IPage<SmartBeamFieldProductionLine> queryList(Page<SmartBeamFieldProductionLine> page, @Param(Constants.WRAPPER) QueryWrapper<SmartBeamFieldProductionLine> queryWrapper);
|
||||
|
||||
List<SmartBeamFieldProductionLine> queryList(@Param(Constants.WRAPPER) QueryWrapper<SmartBeamFieldProductionLine> queryWrapper);
|
||||
}
|
||||
|
||||
@ -2,15 +2,17 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper">
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam">
|
||||
select sbfb.*,bp.save_beam_pedestal_sn from smart_beam_field_beam sbfb
|
||||
select sbfb.*, bp.save_beam_pedestal_sn, sbfbs.bridge_section_name
|
||||
from smart_beam_field_beam sbfb
|
||||
join smart_beam_field_bridge_section sbfbs on sbfbs.id = sbfb.smart_beam_field_bridge_section_id
|
||||
left join smart_beam_field_beam_to_save_beam_pedestal pb on pb.smart_beam_field_beam_id = sbfb.id and
|
||||
pb.is_save_beam=1
|
||||
pb.is_save_beam = 1
|
||||
left join smart_beam_field_save_beam_pedestal bp on bp.id = pb.smart_beam_field_save_beam_pedestal_id
|
||||
where sbfb.id=#{id}
|
||||
where sbfb.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam">
|
||||
select sbfb.*,sbfbs.bridge_section_name
|
||||
select sbfb.*, sbfbs.bridge_section_name
|
||||
from smart_beam_field_beam sbfb
|
||||
join smart_beam_field_bridge_section sbfbs on sbfb.smart_beam_field_bridge_section_id = sbfbs.id
|
||||
${ew.customSqlSegment}
|
||||
|
||||
@ -4,14 +4,21 @@
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeamToProcess">
|
||||
select sbfbtp.*
|
||||
from smart_beam_field_beam_to_process sbfbtp
|
||||
join smart_beam_field_make_beam_pedestal_to_process sbfmbptp on sbfbtp.smart_beam_field_make_beam_pedestal_id =
|
||||
join smart_beam_field_make_beam_pedestal_to_process sbfmbptp
|
||||
on sbfbtp.smart_beam_field_make_beam_pedestal_id =
|
||||
sbfmbptp.smart_beam_field_make_beam_pedestal_id
|
||||
and sbfbtp.id = sbfmbptp.smart_beam_field_process_id
|
||||
and sbfbtp.smart_beam_field_process_id = sbfmbptp.smart_beam_field_process_id
|
||||
join smart_beam_field_beam sbfb on sbfbtp.smart_beam_field_beam_id = sbfb.id
|
||||
join smart_beam_field_production_line_to_make_beam_pedestal sbfpltmbp on
|
||||
sbfbtp.smart_beam_field_make_beam_pedestal_id = sbfpltmbp.smart_beam_field_make_beam_pedestal_id
|
||||
and sbfpltmbp.smart_beam_field_production_line_id=sbfb.smart_beam_field_production_line_id
|
||||
and sbfpltmbp.smart_beam_field_production_line_id = sbfb.smart_beam_field_production_line_id
|
||||
${ew.customSqlSegment}
|
||||
order by sbfpltmbp.process_sort,sbfbtp.id
|
||||
order by sbfpltmbp.process_sort, sbfbtp.id
|
||||
</select>
|
||||
<select id="countDuration" resultType="com.zhgd.xmgl.modules.smartbeamfield.entity.vo.CountDurationVo">
|
||||
select ifnull(TIMESTAMPDIFF(SECOND, planned_start_time, planned_end_time),0) planDuration,
|
||||
ifnull(TIMESTAMPDIFF(SECOND, actual_start_time, actual_end_time),0) actualDuration
|
||||
from smart_beam_field_beam_to_process
|
||||
where smart_beam_field_beam_id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -29,4 +29,12 @@
|
||||
group by bp.id
|
||||
order by sbfpl.id desc, mb.process_sort
|
||||
</select>
|
||||
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldProductionLine">
|
||||
select sbfpl.*,if(sbfb.id is not null ,1,0) use_production_line
|
||||
from smart_beam_field_production_line sbfpl
|
||||
left join smart_beam_field_beam sbfb on sbfpl.id = sbfb.smart_beam_field_production_line_id and
|
||||
sbfb.use_production_line=1
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.smartbeamfield.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeamToProcess;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.CountDurationVo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -23,5 +24,5 @@ public interface ISmartBeamFieldBeamToProcessService extends IService<SmartBeamF
|
||||
|
||||
void edit(SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess);
|
||||
|
||||
List<SmartBeamFieldBeamToProcess> getMakeBeamProcess(HashMap<String, Object> paramMap);
|
||||
CountDurationVo countDuration(String smartBeamFieldBeamId);
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ public class SmartBeamFieldBeamServiceImpl extends ServiceImpl<SmartBeamFieldBea
|
||||
}
|
||||
SmartBeamFieldBeam smartBeamFieldBeam = new SmartBeamFieldBeam();
|
||||
smartBeamFieldBeam.setId(smartBeamFieldBeamId);
|
||||
smartBeamFieldBeam.setUseProductionLine(1);
|
||||
smartBeamFieldBeam.setUseProductionLine(true);
|
||||
smartBeamFieldBeam.setSmartBeamFieldProductionLineId(smartBeamFieldProductionLineId);
|
||||
baseMapper.updateById(smartBeamFieldBeam);
|
||||
|
||||
|
||||
@ -11,11 +11,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeamToProcess;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.CountDurationVo;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamToProcessMapper;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldBeamToProcessService;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import com.zhgd.xmgl.util.TimeUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -101,12 +103,11 @@ public class SmartBeamFieldBeamToProcessServiceImpl extends ServiceImpl<SmartBea
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SmartBeamFieldBeamToProcess> getMakeBeamProcess(HashMap<String, Object> paramMap) {
|
||||
String smartBeamFieldBeamId = MapUtils.getString(paramMap, "smartBeamFieldBeamId");
|
||||
String smartBeamFieldMakeBeamPedestalId = MapUtils.getString(paramMap, "smartBeamFieldMakeBeamPedestalId");
|
||||
return smartBeamFieldBeamToProcessMapper.selectList(new LambdaQueryWrapper<SmartBeamFieldBeamToProcess>()
|
||||
.eq(StrUtil.isNotBlank(smartBeamFieldBeamId), SmartBeamFieldBeamToProcess::getSmartBeamFieldBeamId, smartBeamFieldBeamId)
|
||||
.eq(StrUtil.isNotBlank(smartBeamFieldMakeBeamPedestalId), SmartBeamFieldBeamToProcess::getSmartBeamFieldMakeBeamPedestalId, smartBeamFieldMakeBeamPedestalId)
|
||||
);
|
||||
public CountDurationVo countDuration(String smartBeamFieldBeamId) {
|
||||
CountDurationVo vo = baseMapper.countDuration(smartBeamFieldBeamId);
|
||||
vo.setActualDurationName(TimeUtil.toHourMinSecond(vo.getActualDuration()));
|
||||
vo.setPlanDurationName(TimeUtil.toHourMinSecond(vo.getPlanDuration()));
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ public class SmartBeamFieldProductionLineServiceImpl extends ServiceImpl<SmartBe
|
||||
public IPage<SmartBeamFieldProductionLine> queryPageList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<SmartBeamFieldProductionLine> queryWrapper = getQueryWrapper(paramMap);
|
||||
Page<SmartBeamFieldProductionLine> page = PageUtil.getPage(paramMap);
|
||||
IPage<SmartBeamFieldProductionLine> pageList = this.page(page, queryWrapper);
|
||||
IPage<SmartBeamFieldProductionLine> pageList = baseMapper.queryList(page, queryWrapper);
|
||||
pageList.setRecords(dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
@ -54,11 +54,11 @@ public class SmartBeamFieldProductionLineServiceImpl extends ServiceImpl<SmartBe
|
||||
@Override
|
||||
public List<SmartBeamFieldProductionLine> queryList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<SmartBeamFieldProductionLine> queryWrapper = getQueryWrapper(paramMap);
|
||||
return dealList(this.list(queryWrapper));
|
||||
return dealList(baseMapper.queryList(queryWrapper));
|
||||
}
|
||||
|
||||
private QueryWrapper<SmartBeamFieldProductionLine> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
String alias = "";
|
||||
String alias = "sbfpl.";
|
||||
QueryWrapper<SmartBeamFieldProductionLine> queryWrapper = QueryGenerator.initPageQueryWrapper(SmartBeamFieldProductionLine.class, paramMap, alias);
|
||||
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(SmartBeamFieldProductionLine::getId));
|
||||
return queryWrapper;
|
||||
|
||||
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo;
|
||||
import com.zhgd.xmgl.modules.weight.entity.bo.WeighingTypeStatisticBo;
|
||||
import com.zhgd.xmgl.modules.weight.entity.vo.PullListVo;
|
||||
import com.zhgd.xmgl.modules.weight.entity.vo.WeighingTypeStatisticVo;
|
||||
import com.zhgd.xmgl.modules.weight.enums.WeighingTypeEnum;
|
||||
import com.zhgd.xmgl.modules.weight.service.IWeighBookVehicleInfoService;
|
||||
@ -16,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
@ -182,4 +184,14 @@ public class WeighBookVehicleInfoController {
|
||||
public Result<WeighingTypeStatisticVo> getWeighingTypeStatistic(@RequestParam HashMap<String, Object> map) {
|
||||
return Result.success(weighBookVehicleInfoService.getWeighingTypeStatistic(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "拉取过磅预约车辆数据列表(大于等于200条)", notes = "拉取过磅预约车辆数据列表(大于等于200条)", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "beginTimestamp", value = "开始时间", paramType = "query", required = true, dataType = "Integer")
|
||||
})
|
||||
@GetMapping(value = "pull/list")
|
||||
public Result<PullListVo> pullList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(weighBookVehicleInfoService.pullList(paramMap));
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
package com.zhgd.xmgl.modules.weight.entity.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PullListVo {
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private java.util.Date beginTimestamp;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "最大时间")
|
||||
private java.util.Date maxTimestamp;
|
||||
private Integer pageSize;
|
||||
|
||||
private List<WeighBookVehicleInfo> list;
|
||||
|
||||
}
|
||||
@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@ -20,7 +21,10 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface WeighBookVehicleInfoMapper extends BaseMapper<WeighBookVehicleInfo> {
|
||||
|
||||
@Deprecated
|
||||
IPage<WeighBookVehicleInfo> getByLastPullTime(@Param("p") HashMap<String, String> map, Page<WeighBookVehicleInfo> page);
|
||||
|
||||
List<WeighingTypeStatisticBo> getWeighingTypeStatistic(HashMap<String, Object> map);
|
||||
|
||||
ArrayList<WeighBookVehicleInfo> pullList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -18,4 +18,12 @@
|
||||
</if>
|
||||
GROUP BY vi.weighing_type
|
||||
</select>
|
||||
|
||||
<select id="pullList" resultType="com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo">
|
||||
select *
|
||||
from (select * from weigh_book_vehicle_info order by update_time) vi
|
||||
where vi.project_sn = #{projectSn}
|
||||
and vi.update_time <![CDATA[>]]> #{beginTimestamp}
|
||||
limit 0,200
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -5,6 +5,7 @@ import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.weight.entity.bo.WeighingTypeStatisticBo;
|
||||
import com.zhgd.xmgl.modules.weight.entity.vo.PullListVo;
|
||||
import com.zhgd.xmgl.modules.weight.entity.vo.WeighingTypeStatisticVo;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@ -22,4 +23,6 @@ public interface IWeighBookVehicleInfoService extends IService<WeighBookVehicleI
|
||||
Result<IPage<WeighBookVehicleInfo>> queryPageList(WeighBookVehicleInfo weighBookVehicleInfo, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
WeighingTypeStatisticVo getWeighingTypeStatistic(HashMap<String, Object> map);
|
||||
|
||||
PullListVo pullList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.weight.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo;
|
||||
import com.zhgd.xmgl.modules.weight.entity.bo.WeighingTypeStatisticBo;
|
||||
import com.zhgd.xmgl.modules.weight.entity.vo.PullListVo;
|
||||
import com.zhgd.xmgl.modules.weight.entity.vo.WeighingTypeStatisticVo;
|
||||
import com.zhgd.xmgl.modules.weight.enums.WeighingTypeEnum;
|
||||
import com.zhgd.xmgl.modules.weight.mapper.WeighBookVehicleInfoMapper;
|
||||
@ -48,7 +50,7 @@ public class WeighBookVehicleInfoServiceImpl extends ServiceImpl<WeighBookVehicl
|
||||
.like(StringUtils.isNotBlank(weighBookVehicleInfo.getLicensePlate()), WeighBookVehicleInfo::getLicensePlate, weighBookVehicleInfo.getLicensePlate())
|
||||
.orderByDesc(WeighBookVehicleInfo::getAddDateTime);
|
||||
IPage<WeighBookVehicleInfo> pageList;
|
||||
Page<WeighBookVehicleInfo> page = new Page<WeighBookVehicleInfo>(pageNo, pageSize);
|
||||
Page<WeighBookVehicleInfo> page = new Page<>(pageNo, pageSize);
|
||||
if (StringUtils.isNotBlank(lastPullTime)) {
|
||||
DateTime dateTime = DateUtil.parse(lastPullTime);
|
||||
queryWrapper.ge(WeighBookVehicleInfo::getAddDateTime, dateTime);
|
||||
@ -93,4 +95,27 @@ public class WeighBookVehicleInfoServiceImpl extends ServiceImpl<WeighBookVehicl
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PullListVo pullList(HashMap<String, Object> paramMap) {
|
||||
ArrayList<WeighBookVehicleInfo> list = weighBookVehicleInfoMapper.pullList(paramMap);
|
||||
PullListVo pullListVo = new PullListVo();
|
||||
pullListVo.setBeginTimestamp(DateUtil.parseDateTime(MapUtils.getString(paramMap, "beginTimestamp")));
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
pullListVo.setMaxTimestamp(pullListVo.getBeginTimestamp());
|
||||
pullListVo.setPageSize(0);
|
||||
return pullListVo;
|
||||
}
|
||||
WeighBookVehicleInfo weighBookVehicleInfo = list.get(list.size() - 1);
|
||||
pullListVo.setMaxTimestamp(weighBookVehicleInfo.getUpdateTime());
|
||||
//补充最后相同时间的数据
|
||||
List<WeighBookVehicleInfo> weighBookVehicleInfos = weighBookVehicleInfoMapper.selectList(new LambdaQueryWrapper<WeighBookVehicleInfo>()
|
||||
.eq(WeighBookVehicleInfo::getUpdateTime, DateUtil.formatDateTime(weighBookVehicleInfo.getUpdateTime()))
|
||||
.ne(WeighBookVehicleInfo::getId, weighBookVehicleInfo.getId())
|
||||
);
|
||||
list.addAll(weighBookVehicleInfos);
|
||||
pullListVo.setList(list);
|
||||
pullListVo.setPageSize(list.size());
|
||||
return pullListVo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -261,6 +261,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers("/xmgl/smartBeamFieldMakeBeamPedestal/getMakeBeamRecordList").permitAll()
|
||||
.antMatchers("/xmgl/project/saveProjectExtendInfo").permitAll()
|
||||
.antMatchers("/xmgl/project/getProjectExtendInfo").permitAll()
|
||||
.antMatchers("/xmgl/gouliPkpm/getTokenByCode").permitAll()
|
||||
.antMatchers("/xmgl/weight/weighBookVehicleInfo/pull/list").permitAll()
|
||||
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
|
||||
.anyRequest().authenticated() // 剩下所有的验证都需要验证
|
||||
.and()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user