package com.steerinfo.dil.controller; import com.steerinfo.dil.service.IWmshGridMaterialService; import com.steerinfo.dil.util.ColumnDataUtil; import com.steerinfo.dil.util.PageListAdd; import com.steerinfo.framework.controller.BaseRESTfulController; 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.ApiModelProperty; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; import java.util.Map; /** * WmshGridMaterial RESTful接口: * @author generator * @version 1.0-SNAPSHORT 2021-10-09 07:25 * 类描述 * 修订历史: * 日期:2021-10-09 * 作者:generator * 参考: * 描述:WmshGridMaterial RESTful接口 * @see null * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved. */ @RestController @RequestMapping("/${api.version}/wmshgridmaterials") public class WmshGridMaterialController extends BaseRESTfulController { @Autowired IWmshGridMaterialService wmshGridMaterialService; @Autowired ColumnDataUtil columnDataUtil; /** * 展示下游港口港存库库存列表 * @param mapVal * @param pageNum * @param pageSize * @param apiId * @return */ @ApiOperation(value="展示下游港口港存库库存列表", notes="分页查询") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "apiId", value = "158", required = false, dataType = "BigDecimal"), }) @PostMapping(value = "/getUnloadPortStockList") public RESTfulResult getUnloadPortStockList(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId){ PageHelper.startPage(pageNum, pageSize); //分页查询数据 List> columnList = wmshGridMaterialService.getUnloadPortStockList(mapVal); PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList); return success(data); } /** * 展示万州港港存库库存列表 * @param mapVal * @param pageNum * @param pageSize * @param apiId * @return */ @ApiOperation(value="展示万州港港存库库存列表", notes="分页查询") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "apiId", value = "158", required = false, dataType = "BigDecimal"), }) @PostMapping(value = "/getLoadPortStockList") public RESTfulResult getLoadPortStockList(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, String con){ if (con!=null&&!"".equals(con)){ mapVal.put("con",con); } PageHelper.startPage(pageNum, pageSize); //分页查询数据 List> columnList = wmshGridMaterialService.getLoadPortStockList(mapVal); PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList); return success(data); } @ApiOperation(value="船舶动态表展示库存吨位", notes="分页查询") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "apiId", value = "158", required = false, dataType = "BigDecimal"), }) @PostMapping(value = "/gePortStockList") public RESTfulResult gePortStockList(@RequestBody(required = false) Map mapVal ){ List> columnList = wmshGridMaterialService.getLoadPortStockList(mapVal); return success(columnList); } /** * 展示万州港港存库库存列表 * @param mapVal * @param pageNum * @param pageSize * @param apiId * @return */ @ApiOperation(value="展示万州港当前物资实时库存", notes="分页查询") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "apiId", value = "158", required = false, dataType = "BigDecimal"), }) @PostMapping(value = "/getLoadPortStockByMaterialName") public RESTfulResult getLoadPortStockByMaterialName(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, String con){ if (con!=null&&!"".equals(con)){ mapVal.put("con",con); } PageHelper.startPage(pageNum, pageSize); //分页查询数据 List> columnList = wmshGridMaterialService.getLoadPortStockByMaterialName(mapVal); PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList); return success(data); } /** * 展示万州港港存库库存列表 * @param mapVal * @param pageNum * @param pageSize * @param apiId * @return */ @ApiOperation(value="展示港存库出库", notes="分页查询") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"), @ApiImplicitParam(name = "apiId", value = "494", required = false, dataType = "BigDecimal"), }) @PostMapping(value = "/getUnLockPortStock") public RESTfulResult getUnLockPortStock(@RequestBody(required = false) Map mapVal, Integer pageNum, Integer pageSize, Integer apiId, String con){ if (con!=null&&!"".equals(con)){ mapVal.put("con",con); } PageHelper.startPage(pageNum, pageSize); //分页查询数据 List> columnList = wmshGridMaterialService.getUnLockPortStock(mapVal); PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList); return success(data); } //清场 @ApiModelProperty(value = "清场远程调用") @ApiImplicitParams({ @ApiImplicitParam(name = "amsContractBreach", value = "违约规则实体", required = false, dataType = "AmsContractBreach"), }) @PostMapping("/clearWmshGridMaterial") public RESTfulResult clearWmshGridMaterial(@RequestBody Map map) { int result = wmshGridMaterialService.clearWmshGridMaterial(map); return success(result); } }