1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051 |
- 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.DataChange;
- import com.steerinfo.dil.util.PageListAdd;
- import com.steerinfo.framework.controller.RESTfulResult;
- import com.steerinfo.framework.service.pagehelper.PageHelper;
- import io.swagger.annotations.*;
- import io.swagger.models.auth.In;
- import oracle.jdbc.proxy.annotation.Post;
- import org.apache.ibatis.annotations.Param;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.scheduling.annotation.Scheduled;
- 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 org.springframework.web.bind.annotation.*;
- import java.io.IOException;
- import java.math.BigDecimal;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- /**
- * @ author :TXF
- * @ time :2021/10/19 18:06
- * 通用接口
- */
- @RequestMapping("${api.version}/uc")
- @RestController
- public class UniversalController extends BaseRESTfulController {
- @Autowired
- UniversalServiceImpl universalService;
- @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 = universalService.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 = "247", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/querySupplierByLike")
- public RESTfulResult querySupplierByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index","%" + index + "%");
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.querySupplierByLike(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId,columnList);
- return success(data);
- }
- @ApiModelProperty(value = "查询所有发货单位")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "247", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/queryAllSupplierByLike")
- public RESTfulResult queryAllSupplierByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index","%" + index + "%");
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.queryAllSupplierByLike(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "通过物资ID查询该物资的发货单位信息")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "247", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/getSupplierMesByMaterialId")
- public RESTfulResult getSupplierMesByMaterialId(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index, String materialId) {
- if(mapValue == null)
- mapValue = new HashMap<>();
- if(!"null".equals(materialId))
- mapValue.put("materialId",materialId);
- if(index != null){
- mapValue.put("index","%" + index + "%");
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.getSupplierMesByMaterialId(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiOperation(value="查询所有运力信息")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(248)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- })
- @PostMapping("/getAllCapacityByCarrierLike")
- public RESTfulResult getAllCapacityByCarrierLike(@RequestBody(required=false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- String carrierSsoId,
- String index,
- String con,
- String indexText
- ){
- if(mapValue == null){
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index", index);
- }
- if (con != null&& !con.equals("undefined")){
- mapValue.put("con",con);
- }
- if (indexText != null&& !indexText.equals("undefined")){
- mapValue.put("indexText",indexText);
- }
- if (carrierSsoId != null && carrierSsoId.equals("undefined")) {
- carrierSsoId = null;
- }
- if (carrierSsoId != null) {
- BigDecimal carrierId = universalMapper.getCarrierIdBySSO(carrierSsoId);
- mapValue.put("carrierId",carrierId);
- }
- //不分页筛选数据
- PageHelper.startPage(pageNum,pageSize);
- //分页数据
- List<Map<String, Object>> capacity = universalMapper.getAllCapacityByCarrierLike(mapValue);
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, capacity);
- return success(pageList);
- }
- @ApiOperation(value="查询运力类型")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(248)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- })
- @PostMapping("/getCapacityType")
- public RESTfulResult getCapacityType(@RequestBody(required=false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- String index
- ){
- if(mapValue == null){
- mapValue = new HashMap<>();
- }
- if(index != null&&!index.equals("null")){
- mapValue.put("index", index);
- }
- //不分页筛选数据
- PageHelper.startPage(pageNum,pageSize);
- //分页数据
- List<Map<String, Object>> capacity = universalMapper.getCapacityType(mapValue);
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, capacity);
- return success(pageList);
- }
- @ApiOperation(value="通过订单ID查询订单下所有物资")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(395)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- })
- @PostMapping("/getMaterialMesByOrderId")
- public RESTfulResult getMaterialMesByOrderId(@RequestBody(required=false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- String orderId
- ){
- if(mapValue == null){
- mapValue = new HashMap<>();
- }
- if(orderId != null){
- mapValue.put("orderId", orderId);
- }
- //不分页筛选数据
- PageHelper.startPage(pageNum,pageSize);
- //分页数据
- List<Map<String, Object>> capacity = universalMapper.getMaterialMesByOrderId(mapValue);
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, capacity);
- return success(pageList);
- }
- @ApiModelProperty(value = "边输边查发货单位")
- @PostMapping("/getSupplierMesByLike")
- public RESTfulResult getSupplierMesByLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getSupplierMesByLike(index == null ? "" : index);
- return success(list);
- }
- @ApiModelProperty(value = "船名边输边查")
- @PostMapping("/getShipNameMesByLike")
- public RESTfulResult getShipNameMesByLike(@RequestParam("index") String index,Integer materialId) {
- Map<String, Object> map = new HashMap<>();
- if(materialId != null){
- map.put("materialId",materialId);
- }
- if(index != null){
- map.put("index","%" + index + "%");
- }
- List<Map<String,Object>>list = universalMapper.getShipNameMesByLike(map);
- return success(list);
- }
- @ApiModelProperty(value = "边输边查用车单位")
- @PostMapping("/getRequireUnitName")
- public RESTfulResult getRequireUnitName(@RequestParam("index") String index) {
- List<Map<String,Object>>list = universalMapper.getRequireUnitName(index == null ? "" : "%" + index + "%");
- return success(list);
- }
- @ApiModelProperty(value = "边输边查收货单位")
- @PostMapping("/getConsigneeByLike")
- public RESTfulResult getConsigneeByLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getConsigneeByLike(index == null ? "" : index);
- return success(list);
- }
- @ApiModelProperty(value = "通过订单ID查询订单下物资信息")
- @PostMapping("/getOrderMaterialMesByOrderId/{orderId}")
- public RESTfulResult getMaterialMesByOrderId(@PathVariable("orderId") Integer orderId){
- List<Map<String, Object>> mes = universalMapper.getOrderMaterialMesByOrderId(new BigDecimal(orderId));
- return success(mes);
- }
- @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("/queryAPOMaterialByLike")
- public RESTfulResult queryAPOMaterialByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index,
- Integer supplierId) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null && !"".equals(index) &&!"null".equals(index)){
- mapValue.put("index", index);
- }
- if(supplierId != null){
- mapValue.put("supplierId", supplierId);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.queryAPOMaterialByLike(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "模糊查询卸货点")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "374", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/getUnloadingMesByLike")
- public RESTfulResult getUnloadingMesByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- Integer type,
- String index) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(type != null){
- mapValue.put("type", type);
- }
- if(index != null){
- mapValue.put("index", index);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.getUnloadingMesByLike(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @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) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index", index);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.queryMaterialByLike(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @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("/queryBatchByLike")
- public RESTfulResult queryBatchByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index", index);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.getBatchAndOrderMes(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "模糊查询批次")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "502", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/selectPurchaseOrderForShip")
- public RESTfulResult selectPurchaseOrderForShip(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index", index);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.selectPurchaseOrderForShip(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "查询存在装船作业并且尚未计算水运费的批次")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "502", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/findBatchHavingLoad")
- public RESTfulResult findBatchHavingLoad(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index){
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index", index);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.findBatchHavingLoad(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "边输边查承运商")
- @PostMapping("/getCarrierMesByLike")
- public RESTfulResult getCarrierMesByLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getCarrierMesByLike(index == null ? "" : index);
- return success(list);
- }
- @ApiModelProperty(value = "模糊查询收货单位")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "396", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/queryConsigneeByLike")
- public RESTfulResult queryConsigneeByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index", index);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.queryConsigneeByLike(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "模糊查询物资信息")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "395", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/selectAllMaterialName")
- public RESTfulResult selectAllMaterialName(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index", index);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.selectAllMaterialName(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "返回sha1加密字符串")
- @RequestMapping(value = "/sha1DigestUtils", method = {RequestMethod.GET,RequestMethod.POST})
- public String sha1DigestUtils(String text){
- return universalService.sha1DigestUtils(text);
- }
- @ApiModelProperty(value = "查装货卸货点")
- @PostMapping("/selectUnloadingPoint")
- public List<Map<String, Object>> selectUnloadingPoint() {
- return universalMapper.selectUnloadingPoint();
- }
- @ApiModelProperty(value = "模糊查询承运商")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "412", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/getCarrierListByLike")
- public RESTfulResult getCarrierListByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- String index) {
- if(index != null){
- if(index.length() == 0){
- index = null;
- }else {
- index = "%" + index + "%";
- }
- }
- if (mapValue == null) {
- mapValue = new HashMap<>();
- }
- mapValue.put("index",index);
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.getCarrierListByLike(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "所有门岗下拉框")
- @GetMapping("/getAllGatepost")
- public List<Map<String,Object>> getAllGatepost(){
- return universalMapper.getAllGatepost();
- }
- //通过承运商id获取userId
- @PostMapping("/getUserIdByCarrierId")
- public String getUserIdByCarrierId(@RequestBody Map<String,Object> map){
- //获取承运商id
- Integer carrierId =(Integer) map.get("carrierId");
- return universalMapper.getUserIdbyCarrierId(carrierId);
- }
- @ApiModelProperty(value = "已经在sso权限模块承运商下拉框")
- @GetMapping("/getAllCarrierIdForSso")
- public List<Map<String,Object>> getAllCarrierIdForSso(){
- return universalMapper.getAllCarrierIdForSso();
- }
- @ApiModelProperty(value = "模糊查询收货单位")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "apiId", value = "418", required = false, dataType = "BigDecimal")
- })
- @PostMapping("/getConsigneeListByLike")
- public RESTfulResult getConsigneeListByLike(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- String index) {
- if(index != null){
- if(index.length() == 0){
- index = null;
- }else {
- index = "%" + index + "%";
- }
- }
- if (mapValue == null) {
- mapValue = new HashMap<>();
- }
- mapValue.put("index",index);
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.getConsigneeListByLike(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiOperation("通过运输订单id查询销售订单审核状态")
- @PostMapping("/getSaleOrderStatus")
- public Integer getSaleOrderStatus(@RequestParam Integer orderId) {
- Integer saleStatus = universalMapper.getSaleOrderStatus(new BigDecimal(orderId));
- return saleStatus;
- }
- @ApiOperation("查询所有的汽车衡")
- @GetMapping("/getAllCalculateMes")
- public List<Map<String, Object>> getAllCalculateMes() {
- return universalMapper.getAllCalculateMes();
- }
- @ApiOperation("查询所有的焦炭子类")
- @GetMapping("/getAllMaterialCoke")
- public List<Map<String, Object>> getAllMaterialCoke() {
- return universalMapper.getAllMaterialCoke();
- }
- @ApiModelProperty(value = "边输边查车牌号")
- @PostMapping("/getCapacityByLike")
- public RESTfulResult getCapacityByLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getCapacityByLike(index == null ? "" : index);
- return success(list);
- }
- @ApiModelProperty(value = "边输边查批次")
- @GetMapping("/getBatchByLike")
- public RESTfulResult getBatchByLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getBatchByLike(index == null ? "" : index);
- return success(list);
- }
- @ApiModelProperty(value = "根据运力id查询所有承运商(下拉框)")
- @GetMapping("/getCarrierByCapacityId")
- public RESTfulResult getCarrierByCapacityId(@RequestParam("capacityId") Integer capacityId) {
- List<Map<String, Object>> list = universalMapper.getCarrierByCapacityId(new BigDecimal(capacityId));
- return success(list);
- }
- @ApiModelProperty(value = "根据收货客户查询承运商")
- @PostMapping("/getCarrierByConsignee")
- public RESTfulResult getCarrierByConsignee(@RequestBody Map<String,Object> mapValue) {
- Map<String, Object> map = universalService.getCarrierByConsignee(mapValue);
- return success(map);
- }
- @ApiModelProperty(value = "确认车牌号与承运商关系是否存在")
- @PostMapping("/isInCapacityCarrier")
- public RESTfulResult isInCapacityCarrier(@RequestBody Map<String,Object> mapValue) {
- Map<String,Object> map = universalService.isInCapacityCarrier(mapValue);
- BigDecimal capacityId = (BigDecimal) map.get("capacityId");
- BigDecimal capacityCarrierId = (BigDecimal) map.get("capacityCarrierId");
- if (capacityId == null) {
- return failed();
- }
- if (capacityCarrierId == null) {
- return failed(capacityId);
- }
- return success(map);
- }
- @ApiModelProperty(value = "得到所有油价联动计费公式(apiId:444)")
- @PostMapping("/getOilFormula")
- public RESTfulResult getOilFormula(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- if (mapValue == null) {
- mapValue = new HashMap<>();
- }
- mapValue.put("con", "%执行运价公式");
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.getOilFormula(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiModelProperty(value = "获得港口下拉框")
- @GetMapping("/getPortId")
- public RESTfulResult getPortId() {
- return success(universalService.getPortId());
- }
- @ApiModelProperty(value = "获取车牌号边输边查")
- @GetMapping("/getCapacityNumber")
- public RESTfulResult getCapacityNumber(String index) {
- if(index.length() < 3){
- return failed();
- }
- return success(universalService.getCapacityNumber(index));
- }
- @ApiModelProperty(value = "获得订单号及订单号下面物资")
- @GetMapping("/getOrderNumber")
- public RESTfulResult getOrderNumber(String capacityId) {
- return success(universalService.getOrderNumber(capacityId));
- }
- @ApiModelProperty(value = "根据订单查询物资")
- @GetMapping("/getMaterialIdByOrderId")
- public RESTfulResult getMaterialIdByOrderId(Integer orderId) {
- return success(universalService.getMaterialIdByOrderId(orderId));
- }
- @ApiOperation(value = "修改路段顺序号")
- @PostMapping("/updateLineSqe")
- public RESTfulResult updateLineSqe(@RequestBody Map<String,Object> map) {
- int i = universalMapper.updateLineSqe(map);
- return success(i);
- }
- @ApiModelProperty(value = "边输边查物资")
- @GetMapping("/getMaterialByLike")
- public RESTfulResult getMaterialByLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getMaterialByLike(index == null ? "" : index);
- return success(list);
- }
- @ApiOperation(value="通过一个carrierSsoId获得承运商对象")
- @GetMapping("/getRmsCarrierByCarrierSsoId")
- public RESTfulResult getRmsCarrierByCarrierSsoId(String carrierSsoId){
- Map<String,Object> carrier= universalMapper.getRmsCarrierByCarrierSsoId(carrierSsoId);
- if (carrier==null){
- failed();
- }
- return success(carrier);
- }
- @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("/getSteelMaterial")
- public RESTfulResult getSteelMaterial(@RequestBody(required = false) Map<String, Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String materialNameText,
- String materialSpecificationText,
- String materialModelText) {
- if (mapValue == null) {
- mapValue = new HashMap<>();
- }
- if (materialNameText != null && !materialNameText.equals("undefined") && !materialNameText.equals("null") && materialNameText != "" && !"".equals(materialNameText)) {
- mapValue.put("materialNameText", materialNameText);
- }
- if (materialSpecificationText != null && !materialSpecificationText.equals("undefined") && !materialSpecificationText.equals("null") && materialSpecificationText != "" && !"".equals(materialSpecificationText)) {
- mapValue.put("materialSpecificationText", materialSpecificationText);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.getSteelMaterial(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiOperation(value="得到所有省份")
- @PostMapping("/getAllProvince")
- public RESTfulResult getAllProvince(){
- List<Map<String,Object>> provinceList = universalMapper.getAllProvince();
- return success(provinceList);
- }
- @ApiOperation(value="根据省份得到下面的地级市")
- @PostMapping("/getDistrictByProvince")
- public RESTfulResult getDistrictByProvince(@RequestParam String addressProvince){
- List<Map<String,Object>> districtList = universalMapper.getDistrictByProvince(addressProvince);
- return success(districtList);
- }
- @ApiOperation(value="根据地级市得到下面的区/县")
- @PostMapping("/getTownByDistrict")
- public RESTfulResult getTownByDistrict(@RequestParam String addressDistrict){
- List<Map<String,Object>> townList = universalMapper.getTownByDistrict(addressDistrict);
- return success(townList);
- }
- @ApiOperation(value="根据省市县得到下面的详细地址")
- @PostMapping("/getPlaceByAllAddress")
- public RESTfulResult getPlaceByAllAddress(@RequestBody Map<String,Object> mapValue){
- List<Map<String,Object>> townList = universalMapper.getPlaceByAllAddress(mapValue);
- return success(townList);
- }
- @ApiOperation(value="获得销售员下拉框")
- @GetMapping("/getSalerList")
- public RESTfulResult getSalerList(){
- List<Map<String,Object>> salerList= universalMapper.getSalerList();
- return success(salerList);
- }
- @ApiOperation(value="通过收货客户匹配销售组")
- @PostMapping("/getSaleArea")
- public RESTfulResult getSaleArea(@RequestParam Integer receiveId) {
- String saleArea = universalMapper.getSaleArea(new BigDecimal(receiveId));
- return success(saleArea);
- }
- @ApiOperation(value = "质保书前端展示")
- @PostMapping("/getWarranty")
- public RESTfulResult getWarranty(@RequestParam("orderNumber") String orderNumber) {
- //List<String> list = universalService.getWarrantyAndPrint(orderNumber);
- List<String> list= universalService.getWarranty(orderNumber);
- if(list.get(0).equals("-1")){
- return failed(-1,"质保书正在紧张制作中,请耐心等待!");
- }else if(list.get(0).equals("-2")){
- return failed(-2,"该车还未装货");
- }
- return success(list);
- }
- @ApiOperation(value = "查询待分解计划数量")
- @PostMapping("/getPlanCount")
- public Integer getPlanCount(){
- return universalMapper.getPlanCount();
- }
- @ApiOperation(value = "查询承运起止地点下拉框")
- @GetMapping("/getTransRange")
- public RESTfulResult getTransRange(){
- return success(universalMapper.getTransRange());
- }
- // //测试质保书回显
- // @PostMapping("/getTest")
- // public RESTfulResult getTest(@RequestBody Map<String,Object> map){
- // List<String> list = universalService.getTest(map);
- // if(list.get(0).equals("0")){
- // return failed("质保书正在紧张制作中,请耐心等待!");
- // }
- // return success(list);
- // }
- @ApiOperation(value = "收货地址下匹配不到任何承运商")
- @GetMapping("/getNoListCarrier")
- public RESTfulResult getNoListCarrier() {
- return success(universalMapper.getNoListCarrier());
- }
- @ApiOperation(value = "查询承运起止地点下拉框")
- @GetMapping("/getNotReceiveOrderQuantity")
- public Integer getNotReceiveOrderQuantity(@RequestParam("capacityNumber") String capacityNumber){
- return universalMapper.getNotReceiveOrderQuantity(capacityNumber);
- }
- @ApiOperation(value = "西南水泥独用下拉框")
- @GetMapping("/getXiNanCarrier")
- public RESTfulResult getXiNanCarrier() {
- return success(universalMapper.getXiNanCarrier());
- }
- @ApiModelProperty(value = "边输边查发站到站")
- @GetMapping("/getArrivalByLike")
- public RESTfulResult getArrivalByLike(@RequestParam("index") String index){
- List <Map<String,Object>> list = universalMapper.getArrivalByLike(index == null ? "" : index);
- return success(list);
- }
- @ApiModelProperty(value = "司机APP订单小红点")
- @GetMapping("/getOrderNum")
- public int getOrderNum(@RequestParam("capacityNumber") String capacityNumber){
- return universalMapper.getOrderNum(capacityNumber);
- }
- @ApiModelProperty(value = "补录计量实绩")
- @PostMapping("/recordingWeightResult")
- public int recordingWeightResult(@RequestBody(required = false)List<Map<String,Object>>mapList){
- try {
- return universalService.recordingWeightResult(mapList);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return 1;
- }
- @ApiModelProperty(value = "获取仓库月台")
- @GetMapping("/getSteelWarehouse")
- public List<Map<String, Object>> getSteelWarehouse(){
- return universalMapper.getSteelWarehouse();
- }
- @ApiOperation(value = "查询运力联系方式")
- @GetMapping("/getCapacityTel")
- public Map<String,Object>getCapacityTel(BigDecimal capacityId){
- return universalMapper.getCapacityTel(capacityId);
- }
- @ApiModelProperty(value = "边输边查收货客户")
- @PostMapping("/getConsigneeMesByLike")
- public RESTfulResult getConsigneeMesByLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getConsigneeMesByLike(index == null ? "" : index);
- return success(list);
- }
- //根据收货客户userId,查询收货客户信息
- @ApiOperation(value = "根据userId查询收货客户信息")
- @GetMapping("/getConsigneeByuserid")
- public Map<String,Object>getConsigneeByuserid(String userId){
- return universalMapper.getConsigneeByuserid(userId);
- }
- //根据销售订单ID修改销售订单状态为上报
- @PostMapping("/updateSaleOrderStatusById")
- @ApiOperation(value = "根据销售订单id修改状态为未上报")
- public RESTfulResult updateSaleOrderStatusById(BigDecimal saleOrderId){
- return success(universalMapper.updateSaleOrderStatusById(saleOrderId));
- }
- //根据销售订单ID修改销售订单状态为上报
- @PostMapping("/updateDriverTel")
- @ApiOperation(value = "修改司机电话号码")
- public RESTfulResult updateDriverTel(@RequestBody Map<String,Object> map){
- return success(universalMapper.updateDriverTel(map));
- }
- @GetMapping("/getQueueCount")
- public RESTfulResult getQueueCount(){
- return success(universalMapper.getQueueCount());
- }
- @ApiModelProperty(value = "下拉下单客户的历史使用过的地址")
- @PostMapping("/getReceiverAllPlaceUsed")
- public RESTfulResult getReceiverAllPlaceUsed(@RequestParam Integer receiveId) {
- List<Map<String, Object>> list = universalMapper.getReceiverAllPlaceUsed(receiveId);
- return success(list);
- }
- @ApiModelProperty(value = "边输边查片区")
- @PostMapping("/getSaleAreaByLike")
- public RESTfulResult getSaleAreaByLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getSaleAreaByLike(index == null ? "" : "%" + index + "%");
- return success(list);
- }
- @ApiModelProperty(value = "判断收货客户是否绑定片区")
- @PostMapping("/isReceiveHaveArea")
- public RESTfulResult isReceiveHaveArea(@RequestParam Integer receiveId) {
- BigDecimal areaId = universalMapper.isReceiveHaveArea(receiveId);
- if (areaId == null) {
- return failed("该下单客户未绑定销售片区!!!");
- }
- return success(areaId);
- }
- @ApiModelProperty(value = "下单客户绑定片区")
- @PostMapping("/bandSaleArea")
- public RESTfulResult bandSaleArea(@RequestBody Map<String,Object> map) {
- int result = universalMapper.bandSaleArea(map);
- return success(result);
- }
- @ApiOperation(value = "查询厂内钢材车辆作业总数")
- @GetMapping("/getSteelOrderNum")
- public RESTfulResult getSteelOrderNum(){
- int i = universalMapper.getSteelOrderNum();
- return success(i);
- }
- @ApiModelProperty(value = "边输边查收货地址")
- @PostMapping("/getPlaceAndAddress")
- public RESTfulResult getPlaceAndAddress(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getPlaceAndAddress(index == null ? "" : index);
- return success(list);
- }
- @ApiModelProperty(value = "边输边查物资名称")
- @PostMapping("/getMaterialNameLike")
- public RESTfulResult getMaterialNameLike(@RequestParam("index") String index) {
- List<Map<String, Object>> list = universalMapper.getMaterialNameLike(index == null ? null : "%" + index + "%");
- return success(list);
- }
- @ApiModelProperty(value = "边输边查物资规格型号")
- @PostMapping("/getSpecificationModelLike")
- public RESTfulResult getSpecificationModelLike(@RequestBody Map<String,Object> map) {
- List<Map<String, Object>> list = universalMapper.getSpecificationModelLike(map);
- return success(list);
- }
- @ApiOperation(value = "内转计重承运合同物资")
- @PostMapping("/getInwardWeightMaterial")
- public RESTfulResult getInwardWeightMaterial(@RequestBody(required = false) Map<String,Object> mapValue,
- Integer pageNum,
- Integer pageSize,
- Integer apiId,
- String index) {
- if(mapValue == null) {
- mapValue = new HashMap<>();
- }
- if(index != null){
- mapValue.put("index", index);
- }
- PageHelper.startPage(pageNum, pageSize);
- //分页查询数据
- List<Map<String, Object>> columnList = universalMapper.getInwardWeightMaterial(mapValue);
- PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
- return success(data);
- }
- @ApiOperation(value = "内转异地库查询发站")
- @GetMapping("/getInwardSendStation")
- public RESTfulResult getInwardSendStation(){
- return success(universalMapper.getInwardSendStation());
- }
- @ApiOperation(value = "获取入库实绩")
- @PostMapping("/getInwardInboundResult")
- public RESTfulResult getInwardInboundResult(@RequestBody Map<String,Object> map){
- List<Map<String,Object>> mapList = universalMapper.getInwardInboundResult(map);
- //遍历数组去查物资数据
- for(Map<String,Object>map1:mapList){
- BigDecimal orderId = DataChange.dataToBigDecimal(map1.get("orderId"));
- List<Map<String,Object>> materialList = universalMapper.getMaterialList(map1);
- for (Map<String,Object>materialMap:materialList){
- BigDecimal materialId = DataChange.dataToBigDecimal(materialMap.get("materialId"));
- //根据运输订单ID和物资ID去查询炉号
- List<Map<String, Object>> luHaoNumberList = universalMapper.getLuhaoNum(orderId,materialId);
- StringBuilder sb = new StringBuilder();
- for (Map<String, Object> luHaoMap : luHaoNumberList) {
- sb.append(luHaoMap.get("materialFurnaceNumber"));
- sb.append("-");
- sb.append(luHaoMap.get("materialNum"));
- sb.append("/");
- }
- if(luHaoNumberList.size() > 0){
- sb.deleteCharAt(sb.length() - 1);
- materialMap.put("luhao",sb.toString());
- }
- }
- map1.put("materialList",materialList);
- }
- return success(mapList);
- }
- }
|