123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.model.AmsContractTransportPrice;
- import com.steerinfo.dil.service.impl.AmsContractTransportPriceServiceImpl;
- 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 io.swagger.annotations.ApiOperation;
- 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/3 9:06
- * @Version:V2.0
- */
- @RestController
- @RequestMapping("/${api.version}/amscontracttransportprice")
- public class AmsContractTransportPriceController extends BaseRESTfulController {
- @Autowired
- AmsContractTransportPriceServiceImpl amsContractTransportPriceService;
- @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 = "83", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/getShipPriceList")
- public RESTfulResult getShipPriceList(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId) {
- List<Map<String, Object>> list = amsContractTransportPriceService.getShipPriceList(mapValue);
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = amsContractTransportPriceService.getShipPriceList(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
- return success(data);
- }
- /**
- * 新增水运单价
- * @param amsContractTransportPrice
- * @return
- */
- @ApiModelProperty(value = "新增水运单价")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "amsContractTransportPrice", value = "运价实体", required = false, dataType = "AmsContractTransportPrice"),
- })
- @PostMapping("/addShipPrice")
- public RESTfulResult addShipPrice(@RequestBody AmsContractTransportPrice amsContractTransportPrice) {
- System.out.println(amsContractTransportPrice);
- int result = amsContractTransportPriceService.insertShip(amsContractTransportPrice);
- return success(result);
- }
- /**
- * 逻辑删除水运单价
- * @param priceId
- * @return
- */
- @ApiModelProperty(value = "逻辑删除水运单价")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "priceId", value = "价格编号", required = false, dataType = "BigDecimal"),
- })
- @PostMapping("/deleteShipPrice/{priceId}")
- public RESTfulResult deleteShipPrice(@PathVariable("priceId") BigDecimal priceId) {
- int result = amsContractTransportPriceService.delete(priceId);
- return success(result);
- }
- /**
- * 修改水运单价
- * @param amsContractTransportPrice
- * @return
- */
- @ApiModelProperty(value = "修改水运单价")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "amsContractTransportPrice", value = "运价实体", required = false, dataType = "AmsContractTransportPrice"),
- })
- @PostMapping("/updateShipPrice")
- public RESTfulResult updateShipPrice(@RequestBody AmsContractTransportPrice amsContractTransportPrice) {
- int result = amsContractTransportPriceService.updateByPrimaryKeySelective(amsContractTransportPrice);
- return success(result);
- }
- /**
- * 得到修改渲染
- * @param priceId
- * @return
- */
- @ApiModelProperty(value = "得到修改渲染")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "priceId", value = "价格编号", required = false, dataType = "BigDecimal"),
- })
- @PostMapping("/selectPriceToUpdate/{priceId}")
- public RESTfulResult selectPriceToUpdate(@PathVariable("priceId") BigDecimal priceId) {
- List<Map<String,Object>> result = amsContractTransportPriceService.selectPriceToUpdate(priceId);
- return success(result);
- }
- /**
- * 展示汽运单价
- * @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 = "139", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/getTruckPriceList")
- public RESTfulResult getTruckPriceList(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId) {
- List<Map<String, Object>> list = amsContractTransportPriceService.getAmsContractTransportPrice(mapValue);
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = amsContractTransportPriceService.getAmsContractTransportPrice(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
- return success(data);
- }
- /**
- * 展示汽运单价
- * @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 = "139", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/getSaleTruckPriceList")
- public RESTfulResult getSaleTruckPriceList(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId) {
- List<Map<String, Object>> list = amsContractTransportPriceService.getSaleTruckPriceList(mapValue);
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = amsContractTransportPriceService.getSaleTruckPriceList(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
- return success(data);
- }
- /**
- * 新增汽运单价
- * @param amsContractTransportPrice
- * @return
- */
- @ApiOperation(value="新增汽运单价")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "amsContractTransportPrice", value = "汽运单价对象", required = false, dataType = "AmsContractTransportPrice")
- })
- @PostMapping(value = "/addAmsContractTransportPrice")
- public RESTfulResult addAmsContractTransportPrice(@RequestBody(required = false) AmsContractTransportPrice amsContractTransportPrice){
- int i = amsContractTransportPriceService.insertTruck(amsContractTransportPrice);
- return success(i);
- }
- /**
- * 通过主键修改汽运单价
- * @param amsContractTransportPrice
- * @return
- */
- @ApiOperation(value="通过主键修改汽运单价")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "amsContractTransportPrice", value = "销售订单对象", required = false, dataType = "AmsContractTransportPrice")
- })
- @PostMapping(value = "/updateAmsContractTransportPrice")
- public RESTfulResult updateAmsContractTransportPrice(@RequestBody(required = false) AmsContractTransportPrice amsContractTransportPrice){
- int i = amsContractTransportPriceService.updateByPrimaryKeySelective(amsContractTransportPrice);
- return success(i);
- }
- /**
- * 油价联动导致运价变动,批量修改运价
- * @param
- * @return
- */
- @ApiOperation(value="油价联动导致运价变动,批量修改运价")
- @ApiImplicitParams({
- })
- @PostMapping(value = "/batchUpdateTransportPriceByOilPrice")
- public RESTfulResult batchUpdateTransportPriceByOilPrice(){
- int i = amsContractTransportPriceService.batchUpdateTransportPriceByOilPrice();
- return success(i);
- }
- /**
- * 获取收货地址
- * @param
- * @return
- */
- @ApiOperation(value="获取收货地址")
- @ApiImplicitParams({
- })
- @GetMapping(value = "/getAddressDeliveryAddress")
- public RESTfulResult getAddressDeliveryAddress(){
- return success(amsContractTransportPriceService.getAddressDeliveryAddress());
- }
- /**
- * 得到托运人id
- * @param
- * @return
- */
- @ApiModelProperty(value = "得到托运人id")
- @GetMapping("/getShipperId")
- public RESTfulResult getShipperId() {
- List<Map<String,Object>> result = amsContractTransportPriceService.getShipperId();
- return success(result);
- }
- /**
- * 得到承运商id
- * @param
- * @return
- */
- @ApiModelProperty(value = "得到承运商id")
- @GetMapping("/getCarrierId")
- public RESTfulResult getCarrierId() {
- List<Map<String,Object>> result = amsContractTransportPriceService.getCarrierId();
- return success(result);
- }
- /**
- * 得到船运运力id
- * @param
- * @return
- */
- @ApiModelProperty(value = "得到船运运力id")
- @GetMapping("/getCapacityId")
- public RESTfulResult getCapacityId() {
- List<Map<String,Object>> result = amsContractTransportPriceService.getCapacityId();
- return success(result);
- }
- /**
- * 得到汽运运力id
- * @param
- * @return
- */
- @ApiModelProperty(value = "得到汽运运力id")
- @GetMapping("/getTruckCapacityId")
- public RESTfulResult getTruckCapacityId() {
- List<Map<String,Object>> result = amsContractTransportPriceService.getTruckCapacityId();
- return success(result);
- }
- /**
- * 得到物资id
- * @param
- * @return
- */
- @ApiModelProperty(value = "得到物资id")
- @GetMapping("/getMaterialId")
- public RESTfulResult getMaterialId() {
- List<Map<String,Object>> result = amsContractTransportPriceService.getMaterialId();
- return success(result);
- }
- /**
- * 得到线路id
- * @param
- * @return
- */
- @ApiModelProperty(value = "得到线路id")
- @GetMapping("/getLineId")
- public RESTfulResult getLineId() {
- List<Map<String,Object>> result = amsContractTransportPriceService.getLineId();
- return success(result);
- }
- }
|