123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.model.AmsContractOtherPrice;
- import com.steerinfo.dil.service.impl.AmsContractOtherPriceServiceImpl;
- 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.ApiModelProperty;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.math.BigDecimal;
- import java.util.List;
- import java.util.Map;
- /**
- * @Description:
- * @Author:HuJianGuo
- * @GreateTime:2021/9/13 19:57
- * @Version:V2.0
- */
- @RestController
- @RequestMapping("/${api.version}/amscontractotherprices")
- public class AmsContractOtherPriceController extends BaseRESTfulController {
- @Autowired
- AmsContractOtherPriceServiceImpl amsContractOtherPriceService;
- @Autowired
- ColumnDataUtil columnDataUtil;
- /**
- * 展示港口装卸费
- * @param mapValue
- * @param pageNum
- * @param pageSize
- * @param apiId
- * @return
- */
- @ApiModelProperty(value = "展示港口装卸费")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "144", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/getLoadUnloadPriceList")
- public RESTfulResult getLoadUnloadPriceList(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId) {
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = amsContractOtherPriceService.getLoadUnloadPriceList(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
- return success(data);
- }
- /**
- * 新增港口装卸费
- * @param amsContractOtherPrice
- * @return
- */
- @ApiModelProperty(value = "新增港口装卸费")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "amsContractOtherPrice", value = "运价实体", required = false, dataType = "AmsContractTrainPrice"),
- })
- @PostMapping("/addLoadUnloadPrice")
- public RESTfulResult addLoadUnloadPrice(@RequestBody AmsContractOtherPrice amsContractOtherPrice) {
- int result = amsContractOtherPriceService.insert(amsContractOtherPrice);
- return success(result);
- }
- /**
- * 逻辑删除港口装卸费
- * @param priceId
- * @return
- */
- @ApiModelProperty(value = "逻辑删除港口装卸费")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "priceId", value = "价格编号", required = false, dataType = "BigDecimal"),
- })
- @PostMapping("/deleteLoadUnloadPrice/{priceId}")
- public RESTfulResult deleteLoadUnloadPrice(@PathVariable("priceId") BigDecimal priceId) {
- int result = amsContractOtherPriceService.delete(priceId);
- return success(result);
- }
- /**
- * 修改港口装卸费
- * @param amsContractOtherPrice
- * @return
- */
- @ApiModelProperty(value = "修改港口装卸费")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "amsContractOtherPrice", value = "运价实体", required = false, dataType = "amsContractOtherPrice"),
- })
- @PostMapping("/updateLoadUnloadPrice")
- public RESTfulResult updateLoadUnloadPrice(@RequestBody AmsContractOtherPrice amsContractOtherPrice) {
- int result = amsContractOtherPriceService.updateByPrimaryKeySelective(amsContractOtherPrice);
- return success(result);
- }
- /**
- * 得到修改渲染
- * @param priceId
- * @return
- */
- @ApiModelProperty(value = "得到修改渲染")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "priceId", value = "价格编号", required = false, dataType = "BigDecimal"),
- })
- @PostMapping("/selectLoadUnloadPriceToUpdate/{priceId}")
- public RESTfulResult selectLoadUnloadPriceToUpdate(@PathVariable("priceId") BigDecimal priceId) {
- List<Map<String,Object>> result = amsContractOtherPriceService.selectLoadUnloadPriceToUpdate(priceId);
- return success(result);
- }
- }
|