123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.mapper.UniversalMapper;
- import com.steerinfo.dil.service.impl.UniversalServiceImpl;
- 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.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;
- @RequestMapping("${api.version}/uc")
- @RestController
- public class UniversalController extends BaseRESTfulController {
- @Autowired
- UniversalServiceImpl selfServiceMachineService;
- @Autowired
- UniversalMapper universalMapper;
- @Autowired
- ColumnDataUtil columnDataUtil;
- @ApiOperation(value="查询数据打印提货单接口")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "运输订单号", required = false, dataType = "Map"),
- })
- @PostMapping("/printTHD")
- public RESTfulResult printTiHuoDan(@RequestBody(required=false) Map<String, Object> mapValue){
- Map<String, Object> tiHuoDan = selfServiceMachineService.printTiHuoDan((String) mapValue.get("orderNumber"));
- return success(tiHuoDan);
- }
- @ApiModelProperty(value = "模糊查询物资")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/queryMaterialByLike")
- public RESTfulResult queryMaterialByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index) {
- index = index + "%";
- List<Map<String, Object>> list = universalMapper.queryMaterialByLike(index);
- PageHelper.startPage(pageNum, pageSize);
-
- List<Map<String, Object>> columnList = universalMapper.queryMaterialByLike(index);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
- return success(data);
- }
- }
|