|
@@ -9,9 +9,9 @@ import com.ozs.common.core.domain.AjaxResult;
|
|
|
import com.ozs.common.utils.StringUtils;
|
|
|
import com.ozs.common.utils.file.FileUtils;
|
|
|
import com.ozs.common.utils.poi.ExcelUtil;
|
|
|
-import com.ozs.service.entity.BaseLineManagement;
|
|
|
-import com.ozs.service.entity.vo.BaseLineManagementVo;
|
|
|
-import com.ozs.service.service.BaseLineManagementService;
|
|
|
+import com.ozs.service.entity.BaseRailwayManagement;
|
|
|
+import com.ozs.service.entity.vo.BaseRailwayManagementVo;
|
|
|
+import com.ozs.service.service.BaseRailwayManagementService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.http.MediaType;
|
|
@@ -40,29 +40,29 @@ import java.util.List;
|
|
|
* @since 2023-02-17
|
|
|
*/
|
|
|
@RestController
|
|
|
-@RequestMapping("/service/baseLineManagement")
|
|
|
+@RequestMapping("/service/baseRailwayManagement")
|
|
|
@Slf4j
|
|
|
-public class BaseLineManagementController extends BaseController {
|
|
|
+public class BaseRailwayManagementController extends BaseController {
|
|
|
@Resource
|
|
|
- BaseLineManagementService baseLineManagementService;
|
|
|
+ BaseRailwayManagementService baseRailwayManagementService;
|
|
|
|
|
|
/**
|
|
|
* 线路台账管理分页
|
|
|
*
|
|
|
- * @param baseLineManagementVo
|
|
|
+ * @param baseRailwayManagementVo
|
|
|
* @return
|
|
|
*/
|
|
|
@ApiOperation(value = "线路台账管理分页")
|
|
|
@PostMapping("/list")
|
|
|
- public AjaxResult selectBaseLineManagement(@RequestBody BaseLineManagementVo baseLineManagementVo) {
|
|
|
- LambdaQueryWrapper<BaseLineManagement> lw = new LambdaQueryWrapper<BaseLineManagement>();
|
|
|
- if (!StringUtils.isBlank(baseLineManagementVo.getLineName())) {
|
|
|
- lw.eq(BaseLineManagement::getLineName, baseLineManagementVo.getLineName());
|
|
|
+ public AjaxResult selectBaseLineManagement(@RequestBody BaseRailwayManagementVo baseRailwayManagementVo) {
|
|
|
+ LambdaQueryWrapper<BaseRailwayManagement> lw = new LambdaQueryWrapper<BaseRailwayManagement>();
|
|
|
+ if (!StringUtils.isBlank(baseRailwayManagementVo.getRailwayName())) {
|
|
|
+ lw.eq(BaseRailwayManagement::getRailwayName, baseRailwayManagementVo.getRailwayName());
|
|
|
}
|
|
|
- if (!ObjectUtils.isEmpty(baseLineManagementVo.getLineType())) {
|
|
|
- lw.like(BaseLineManagement::getLineType, "%" + baseLineManagementVo.getLineType() + "%");
|
|
|
+ if (!ObjectUtils.isEmpty(baseRailwayManagementVo.getRailwayType())) {
|
|
|
+ lw.like(BaseRailwayManagement::getRailwayType, "%" + baseRailwayManagementVo.getRailwayType() + "%");
|
|
|
}
|
|
|
- IPage<BaseLineManagement> page = baseLineManagementService.page(new Page<BaseLineManagement>(baseLineManagementVo.getPageNum(), baseLineManagementVo.getPageSize()), lw);
|
|
|
+ IPage<BaseRailwayManagement> page = baseRailwayManagementService.page(new Page<BaseRailwayManagement>(baseRailwayManagementVo.getPageNum(), baseRailwayManagementVo.getPageSize()), lw);
|
|
|
return AjaxResult.success(page);
|
|
|
}
|
|
|
|
|
@@ -75,7 +75,7 @@ public class BaseLineManagementController extends BaseController {
|
|
|
@DeleteMapping("/{lineIds}")
|
|
|
@ApiOperation("删除线路台账信息")
|
|
|
public AjaxResult removeLineManagement(@PathVariable List<Long> lineIds) {
|
|
|
- if (baseLineManagementService.removeByIds(lineIds)) {
|
|
|
+ if (baseRailwayManagementService.removeByIds(lineIds)) {
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
return AjaxResult.error();
|
|
@@ -84,14 +84,14 @@ public class BaseLineManagementController extends BaseController {
|
|
|
/**
|
|
|
* 新增线路台账信息
|
|
|
*
|
|
|
- * @param baseLineManagement
|
|
|
+ * @param baseRailwayManagement
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/saveLineManagement")
|
|
|
@ApiOperation("新增线路台账信息")
|
|
|
- public AjaxResult saveLineManagement(@RequestBody BaseLineManagement baseLineManagement) {
|
|
|
- baseLineManagement.setCreateBy(getUsername());
|
|
|
- if (baseLineManagementService.save(baseLineManagement)) {
|
|
|
+ public AjaxResult saveLineManagement(@RequestBody BaseRailwayManagement baseRailwayManagement) {
|
|
|
+ baseRailwayManagement.setCreateBy(getUsername());
|
|
|
+ if (baseRailwayManagementService.save(baseRailwayManagement)) {
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
return AjaxResult.error();
|
|
@@ -100,14 +100,14 @@ public class BaseLineManagementController extends BaseController {
|
|
|
/**
|
|
|
* 修改线路台账信息
|
|
|
*
|
|
|
- * @param baseLineManagement
|
|
|
+ * @param baseRailwayManagement
|
|
|
* @return
|
|
|
*/
|
|
|
@PutMapping("/editLineManagement")
|
|
|
@ApiOperation("修改线路台账信息")
|
|
|
- public AjaxResult editLineManagement(@RequestBody BaseLineManagement baseLineManagement) {
|
|
|
- baseLineManagement.setUpdateBy(getUsername());
|
|
|
- if (baseLineManagementService.updateById(baseLineManagement)) {
|
|
|
+ public AjaxResult editLineManagement(@RequestBody BaseRailwayManagement baseRailwayManagement) {
|
|
|
+ baseRailwayManagement.setUpdateBy(getUsername());
|
|
|
+ if (baseRailwayManagementService.updateById(baseRailwayManagement)) {
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
return AjaxResult.error();
|
|
@@ -116,7 +116,7 @@ public class BaseLineManagementController extends BaseController {
|
|
|
@GetMapping(value = "/{lineId}")
|
|
|
@ApiOperation("根据台账ID获取详细信息")
|
|
|
public AjaxResult getInfo(@PathVariable Long lineId) {
|
|
|
- return AjaxResult.success(baseLineManagementService.getById(lineId));
|
|
|
+ return AjaxResult.success(baseRailwayManagementService.getById(lineId));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -130,9 +130,9 @@ public class BaseLineManagementController extends BaseController {
|
|
|
@ApiOperation("线路台账导入")
|
|
|
@PostMapping("/importBaseLineManagement")
|
|
|
public AjaxResult importBaseLineManagement(MultipartFile file, boolean updateSupport) throws Exception {
|
|
|
- ExcelUtil<BaseLineManagement> util = new ExcelUtil<BaseLineManagement>(BaseLineManagement.class);
|
|
|
- List<BaseLineManagement> AccountManageList = util.importExcel(file.getInputStream());
|
|
|
- String message = baseLineManagementService.importBaseLineManagement(AccountManageList, updateSupport);
|
|
|
+ ExcelUtil<BaseRailwayManagement> util = new ExcelUtil<BaseRailwayManagement>(BaseRailwayManagement.class);
|
|
|
+ List<BaseRailwayManagement> AccountManageList = util.importExcel(file.getInputStream());
|
|
|
+ String message = baseRailwayManagementService.importBaseLineManagement(AccountManageList, updateSupport);
|
|
|
return AjaxResult.success(message);
|
|
|
}
|
|
|
|
|
@@ -143,16 +143,16 @@ public class BaseLineManagementController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation("导出线路台账")
|
|
|
@PostMapping("/exportBaseLineManagement")
|
|
|
- public void exportBaseLineManagement(HttpServletResponse response, @RequestBody BaseLineManagementVo baseLineManagementVo) {
|
|
|
- LambdaQueryWrapper<BaseLineManagement> lw = new LambdaQueryWrapper<BaseLineManagement>();
|
|
|
- if (!StringUtils.isBlank(baseLineManagementVo.getLineName())) {
|
|
|
- lw.eq(BaseLineManagement::getLineName, baseLineManagementVo.getLineName());
|
|
|
+ public void exportBaseLineManagement(HttpServletResponse response, @RequestBody BaseRailwayManagementVo baseRailwayManagementVo) {
|
|
|
+ LambdaQueryWrapper<BaseRailwayManagement> lw = new LambdaQueryWrapper<BaseRailwayManagement>();
|
|
|
+ if (!StringUtils.isBlank(baseRailwayManagementVo.getRailwayName())) {
|
|
|
+ lw.eq(BaseRailwayManagement::getRailwayName, baseRailwayManagementVo.getRailwayName());
|
|
|
}
|
|
|
- if (!ObjectUtils.isEmpty(baseLineManagementVo.getLineType())) {
|
|
|
- lw.like(BaseLineManagement::getLineType, "%" + baseLineManagementVo.getLineType() + "%");
|
|
|
+ if (!ObjectUtils.isEmpty(baseRailwayManagementVo.getRailwayType())) {
|
|
|
+ lw.like(BaseRailwayManagement::getRailwayType, "%" + baseRailwayManagementVo.getRailwayType() + "%");
|
|
|
}
|
|
|
- List<BaseLineManagement> list = baseLineManagementService.list(lw);
|
|
|
- ExcelUtil<BaseLineManagement> util = new ExcelUtil<>(BaseLineManagement.class);
|
|
|
+ List<BaseRailwayManagement> list = baseRailwayManagementService.list(lw);
|
|
|
+ ExcelUtil<BaseRailwayManagement> util = new ExcelUtil<>(BaseRailwayManagement.class);
|
|
|
util.exportExcel(response, list, "线路台账数据");
|
|
|
}
|
|
|
|