123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.feign.ESFeign;
- import com.steerinfo.dil.model.RmsWarehouse;
- import com.steerinfo.dil.service.impl.RmsPortStorageYardService;
- import com.steerinfo.dil.util.BaseRESTfulController;
- import com.steerinfo.dil.util.ColumnDataUtil;
- import com.steerinfo.dil.util.PageListAdd;
- import com.steerinfo.framework.controller.RESTfulResult;
- import com.steerinfo.framework.service.pagehelper.PageHelper;
- import io.swagger.annotations.ApiImplicitParam;
- import io.swagger.annotations.ApiImplicitParams;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.math.BigDecimal;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- /**
- * @author luobang
- * @create 2021-11-15 15:14
- */
- @RestController
- @RequestMapping("/${api.version}/rmsPortYard")
- public class RmsPortStorageYard extends BaseRESTfulController {
- @Autowired
- RmsPortStorageYardService rmsPortStorageYardService;
- @Autowired
- ColumnDataUtil columnDataUtil;
- @Autowired
- ESFeign esFeign;
- //港存堆场增删改查
- /**
- * 新增港存堆场
- * @param
- * @return
- */
- @PostMapping("/insertPortYard")
- public RESTfulResult insertPortYard(@RequestBody(required = true) RmsWarehouse rmsWarehouse){
- Integer integer = rmsPortStorageYardService.insertPortYard(rmsWarehouse);
- if (
- integer!=1
- ){
- return failed();
- }
- else{
- return success();
- }
- }
- /**
- * 修改港存堆场
- * @param
- * @return
- */
- @PostMapping("/editPortYard")
- public RESTfulResult editPortYard(@RequestBody(required = true)RmsWarehouse rmsWarehouse){
- Integer integer = rmsPortStorageYardService.updatePortYard(rmsWarehouse);
- if (
- integer!=1
- ){
- return failed();
- }
- else{
- return success();
- }
- }
- /**
- * 删除港口
- * @param
- * @return
- */
- @PostMapping("/deletePortYard/{warehouseId}")
- public RESTfulResult deletePort(@PathVariable("warehouseId") BigDecimal warehouseId){
- Integer integer = rmsPortStorageYardService.deletePortYard(warehouseId);
- if (
- integer!=1
- ){
- return failed();
- }
- else{
- return success();
- }
- }
- @ApiOperation(value="展示港存堆场信息", notes="分页查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "196", required = false, dataType = "BigDecimal"),
- })
- @PostMapping(value = "/getPortYard")
- public RESTfulResult getPortYard(@RequestBody(required = false) Map<String,Object> mapVal,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String con){
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = rmsPortStorageYardService.getPortYard(mapVal);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
- return success(data);
- }
- }
|