| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.annotaion.LogAround;
- import com.steerinfo.dil.annotaion.RequestLimit;
- import com.steerinfo.dil.feign.AmsFeign;
- import com.steerinfo.dil.feign.RmsFeign;
- import com.steerinfo.dil.feign.TmsFeign;
- import com.steerinfo.dil.mapper.UniversalMapper;
- import com.steerinfo.dil.util.BaseRESTfulController;
- import com.steerinfo.dil.util.ExcelToolUtils;
- import com.steerinfo.dil.util.Util;
- import com.steerinfo.framework.controller.RESTfulResult;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiImplicitParam;
- import io.swagger.annotations.ApiImplicitParams;
- import io.swagger.annotations.ApiOperation;
- import oracle.jdbc.proxy.annotation.Post;
- import org.apache.commons.io.FilenameUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.web.multipart.MultipartFile;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.FileOutputStream;
- import java.io.OutputStreamWriter;
- import java.math.BigDecimal;
- import java.text.DateFormat;
- import java.text.ParseException;
- import java.text.SimpleDateFormat;
- import java.util.*;
- import java.util.stream.Collectors;
- import com.steerinfo.dil.util.DataChange;
- import org.springframework.web.multipart.MultipartRequest;
- /**
- * @author luobang
- * @create 2021-09-17 14:11
- */
- @RestController
- @RequestMapping("${api.version}/tms")
- public class TMSController extends BaseRESTfulController {
- @Autowired
- private TmsFeign tmsFeign;
- @Autowired
- private AmsFeign amsFeign;
- @Autowired
- private RmsFeign rmsFeign;
- @Autowired
- private UniversalMapper universalMapper;
- @ApiOperation(value = "车辆实绩")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "map", value = "参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- })
- @PostMapping(value = "/getcomprehensiveresults")
- public Map<String, Object> getecomprehensiveresultslist(@RequestBody(required = false) Map<String, Object> map, Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getAmsSalaryContracList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "新增车辆实绩")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计算公式"})
- @PostMapping("/addcomprehensiveresults")
- public Map<String, Object> insertcomprehensiveresults(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.addComprehensiveResult(map);
- }
- @ApiOperation(value = "车辆实绩删除")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PutMapping(value = "/comprehensiveresultslogicdelete")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计算公式"})
- public Map<String, Object> comprehensiveresultsLogicDelete(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.logicdeleteAmsSaalryContrac(map);
- }
- @ApiOperation(value = "修改车辆实绩")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/comprehensiveresultsupadete")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计算公式"})
- public Map<String, Object> comprehensiveresultsUpdate(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.updateAmsSalaryContrac(map);
- }
- @ApiOperation(value = "修改车辆实绩")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/tmscomprehensiveresults/batchUpdate")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计算公式"})
- public Map<String, Object> tmscomprehensiveresultsBatchUpdate(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.tmscomprehensiveresultsBatchUpdate((List)map.get("list"));
- }
- @ApiOperation(value = "派发运输订单")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/dispatchOrder")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> dispatchOrder(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.dispatchOrder(map);
- }
- @ApiOperation(value = "批量派发运输订单")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/batchDispatch")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> batchDispatch(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.batchDispatch(map);
- }
- @ApiOperation(value = "批量派发运输订单")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/batchDispatchSc")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> batchDispatchSc(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.batchDispatchSc(map);
- }
- @ApiOperation(value = "修改运输订单")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/updateTransOrder")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> updateTransOrder(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.updateTransOrder(map);
- }
- @ApiOperation(value = "合并运输订单")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/mergeTransOrder")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> mergeTransOrder(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.mergeTransOrder(map);
- }
- @ApiOperation(value = "更改运输订单状态")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/changeTransOrder")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> changeTransOrder(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.changeTransOrder(map);
- }
- @ApiOperation(value = "司机接收运单")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/receiptOrder")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> receiptOrder(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.receiptOrder(map);
- }
- @ApiOperation(value = "查询运输订单")
- @PostMapping("/getTransOrderList")
- public Map<String, Object> getTransOrderList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getTransOrderList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询运输订单所有运输实绩")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/getTransResult")
- public Map<String, Object> getTransResult(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.getTransResult(map);
- }
- @ApiOperation(value = "同步进厂")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/syncEnfactoryResult")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"进厂实绩"})
- public Map<String, Object> syncEnfactoryResult(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.syncEnfactoryResult(map);
- }
- @ApiOperation(value = "同步出厂")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/syncOutfactoryResult")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"出厂实绩"})
- public Map<String, Object> syncOutfactoryResult(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.syncOutfactoryResult(map);
- }
- @ApiOperation(value = "同步计量")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/syncWeightResult")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计量实绩"})
- public Map<String, Object> syncWeightResult(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.syncWeightResult(map);
- }
- @ApiOperation(value="计时")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/startend")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计时"})
- public Map<String, Object> start(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.startend(map);
- }
- @ApiOperation(value="计时")
- @PostMapping(value = "/updCountResult")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"计次"})
- public Map<String, Object> updCountResult(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.updCountResult(map);
- }
- @ApiOperation(value="审批计时")
- @PostMapping(value = "/approveTimeResult")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"计次"})
- public Map<String, Object> approveTimeResult(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.approveTimeResult(map);
- }
- @ApiOperation(value="计时复报")
- @PostMapping(value = "/resendTimeResult")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"计次"})
- public Map<String, Object> resendTimeResult(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.resendTimeResult(map);
- }
- @ApiOperation(value = "查询计时")
- @PostMapping("/tmstimingresultsList")
- public Map<String, Object> tmstimingresultsList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.tmstimingresultsList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询计时")
- @PostMapping("/getOrderTimeList")
- public Map<String, Object> getOrderTimeList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getOrderTimeList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询计时")
- @PostMapping("/getTimeList")
- public Map<String, Object> getOrderTimeList(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.getTimeList(map);
- }
- @ApiOperation(value = "修改计时")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/tmstimingresultsUpdate")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"修改计时"})
- public Map<String, Object> tmstimingresultsUpdate(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.tmstimingresultsUpdate(map);
- }
- @ApiOperation(value = "销售派发运输订单")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/saleDispatchOrder")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> saleDispatchOrder(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.saleDispatchOrder(map);
- }
- @ApiOperation(value = "批量销售派发运输订单")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/saleDispatchOrderList")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String, Object> saleDispatchOrderList(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.saleDispatchOrderList(map);
- }
- @ApiOperation(value = "查询销售运输订单")
- @PostMapping("/getSaleTransOrderList")
- public Map<String, Object> getSaleTransOrderList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getSaleTransOrderList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "同步质检")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/syncQualityResult")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"质检实绩"})
- public Map<String, Object> syncQualityResult(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.syncQualityResult(map);
- }
- @ApiOperation(value = "签到")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/signIn")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"签到实绩"})
- public Map<String, Object> signIn(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.signIn(map);
- }
- @ApiOperation(value = "换车头")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/replaceFront")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"换车头实绩"})
- public Map<String, Object> replaceFront(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.replaceFront(map);
- }
- @ApiOperation(value = "装货")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/load")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"装货实绩"})
- public Map<String, Object> load(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.load(map);
- }
- @ApiOperation(value = "装货修改")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/loadUpd")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"装货实绩"})
- public Map<String, Object> loadUpd(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.loadUpd(map);
- }
- @ApiOperation(value = "卸货")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/unload")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"卸货实绩"})
- public Map<String, Object> unload(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.unload(map);
- }
- @ApiOperation(value = "卸货修改")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/unloadUpd")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"卸货实绩"})
- public Map<String, Object> unloadUpd(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.unloadUpd(map);
- }
- @ApiOperation(value = "抵达")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/arrival")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"抵达实绩"})
- public Map<String, Object> arrival(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.arrival(map);
- }
- @ApiOperation(value = "签收")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/receipt")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"签收实绩"})
- public Map<String, Object> receipt(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.receipt(map);
- }
- @ApiOperation(value = "查询厂内车辆数")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/getCountEnfactory")
- public Map<String, Object> getCountEnfactory(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.getCountEnfactory(map == null ? new HashMap<>() : map);
- }
- @ApiOperation(value = "查询签到")
- @PostMapping("/getSignInResultList")
- public Map<String, Object> getSignInResultList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getSignInResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询换车头")
- @PostMapping("/getReplaceFrontResultList")
- public Map<String, Object> getReplaceFrontResultList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getReplaceFrontResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询进厂")
- @PostMapping("/getEnfactoryResultList")
- public Map<String, Object> getEnfactoryResultList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getEnfactoryResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询出厂")
- @PostMapping("/getOutfactoryResultList")
- public Map<String, Object> getTmsOutfactoryResultList
- (@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getOutfactoryResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询装货")
- @PostMapping("/getLoadResultList")
- public Map<String, Object> getLoadResultList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getLoadResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询卸货")
- @PostMapping("/getUnloadResultList")
- public Map<String, Object> getUnloadResultList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getUnloadResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询计量")
- @PostMapping("/getWeightResultList")
- public Map<String, Object> getWeightResultList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getWeightResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询质检")
- @PostMapping("/getQualityResultList")
- public Map<String, Object> getQualityResult(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getQualityResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询抵达")
- @PostMapping("/getArrivalResultList")
- public Map<String, Object> getArrivalResultList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getArrivalResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询签收")
- @PostMapping("/getReceiptResultList")
- public Map<String, Object> getReceiptResultList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getReceiptResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "采购火运装货作业")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/purchaseTrainLoad")
- // @LogAround(foreignKeys = {"resultId"},foreignKeyTypes = {"装货实绩"})
- public Map<String, Object> purchaseTrainLoad(@RequestBody MultipartFile file,
- String businessType,
- String userId,
- String userName) throws Exception {
- Map<String, Object> map = new HashMap<>();
- //获取Excel中包含的对象数组
- List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
- map.put("list", list);
- //统计通知单的重量车数和车牌号
- Set<String> capacitySet = new HashSet<>();//车牌号
- List<String> requirementList = new ArrayList<>();
- String loadDate = null;
- for (Map<String, Object> item : list) {
- //校验行
- if(item.get("通知单号")==null || item.get("通知单号").equals("")
- || item.get("车号")==null || item.get("车号").equals("")
- || item.get("发站")==null || item.get("发站").equals("")
- || item.get("到站")==null || item.get("到站").equals("")
- || item.get("装车日期")==null || item.get("装车日期").equals("")){
- throw new Exception("单元格数据异常(通知单号/车号/装车日期/发站/到站),请检查模板或数据是否正确!");
- }
- BigDecimal tareWeight = DataChange.dataToBigDecimal(item.get("皮重"));
- BigDecimal grossWeight = DataChange.dataToBigDecimal(item.get("毛重"));
- BigDecimal netWeight = DataChange.dataToBigDecimal(item.get("净重"));
- if(tareWeight.compareTo(BigDecimal.ZERO) > 0 && grossWeight.compareTo(BigDecimal.ZERO) > 0){
- item.put("净重", grossWeight.subtract(tareWeight));
- }else if(netWeight.compareTo(BigDecimal.ZERO) > 0){
- item.put("净重", netWeight);
- }else {
- throw new Exception("单元格数据异常:净重/皮重/毛重,请检查模板或数据是否正确!");
- }
- //通知单统计
- String requirementNumber = item.get("通知单号").toString();
- if (map.get(requirementNumber) != null) {
- //已存在,修改
- Map<String,Object> requirementMap =(Map<String, Object>) map.get(requirementNumber);
- BigDecimal weight = DataChange.dataToBigDecimal(requirementMap.get("weight"));
- BigDecimal truckNumber = DataChange.dataToBigDecimal(requirementMap.get("truckNumber"));
- String loadTime = requirementMap.get("loadTime").toString();
- List<Map<String,Object>> trainList = (ArrayList) requirementMap.get("trainList");
- weight = weight.add(DataChange.dataToBigDecimal(item.get("净重")));
- truckNumber = truckNumber.add(new BigDecimal(1));
- trainList.add(item);
- requirementMap.put("weight", weight);
- requirementMap.put("truckNumber", truckNumber);
- requirementMap.put("trainList",trainList);
- if(!loadTime.equals(item.get("装车日期").toString())){
- throw new Exception("同一个Excel只允许一批车辆,请检查装车日期!");
- }
- } else {
- //不存在,新增
- Map<String,Object> requirementMap = new HashMap<>();
- List<Map<String,Object>> trainList = new ArrayList<>();
- trainList.add(item);
- BigDecimal weight = DataChange.dataToBigDecimal(item.get("净重"));
- BigDecimal truckNumber = new BigDecimal(1);
- String loadTime = item.get("装车日期").toString();
- if(loadDate == null){
- loadDate = loadTime;
- map.put("loadDate",loadDate);
- }else if(!loadDate.equals(loadTime)){
- throw new Exception("同一个Excel只允许一批车辆,请检查装车日期!");
- }
- requirementMap.put("requirementNumber", requirementNumber);
- requirementMap.put("weight", weight);
- requirementMap.put("truckNumber", truckNumber);
- requirementMap.put("loadTime",loadTime);
- requirementMap.put("trainList",trainList);
- requirementMap.put("userId",userId);
- requirementMap.put("userName",userName);
- requirementMap.put("businessType",businessType);
- requirementList.add(requirementNumber);
- map.put(requirementNumber, requirementMap);
- }
- //车牌号去重
- capacitySet.add(item.get("车号").toString());
- }
- //校验当前excel是否已经导入过
- if (universalMapper.countTrainLoad(map) > 0) {
- throw new Exception("存在重复的装车信息!不允许重复导入!");
- }
- //新增火车运力资源
- String[] capacities = capacitySet.toArray(new String[0]);//车牌号
- try{
- new Runnable() {
- @Override
- public void run() {
- Map<String, Object> capacityMap = new HashMap<>();
- capacityMap.put("capacities", capacities);
- capacityMap.put("userId", userId);
- capacityMap.put("userName", userName);
- rmsFeign.batchInsertCapacityTrain(capacityMap);
- }
- }.run();
- }catch (Exception e){e.printStackTrace();}
- //新增AMS及TMS
- map.put("userId",userId);
- map.put("userName",userName);
- map.put("businessType",businessType);
- map.put("requirementList",requirementList);
- return tmsFeign.purchaseTrainLoad(map);
- }
- @ApiOperation(value = "查询采购火运装货")
- @PostMapping("/purchaseTrainLoadList")
- public Map<String, Object> purchaseTrainLoadList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.purchaseTrainLoadList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询采购火运装货报表")
- @PostMapping("/purchaseTrainLoadReport")
- public Map<String, Object> purchaseTrainLoadReport(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.purchaseTrainLoadReport(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "修改火运装车")
- @PostMapping("/updateTrainLoad")
- public Map<String, Object> updateTrainLoad(@RequestBody(required = false) Map<String, Object> map){
- return tmsFeign.updateTrainLoad(map);
- }
- @ApiOperation(value = "删除火运装车", notes = "删除火运装车")
- @PostMapping(value = "/deleteTrainLoad")
- @LogAround(foreignKeys = {"transOrderId"},foreignKeyTypes = {"运输订单"})
- public Map<String, Object> deleteTrainLoad(@RequestBody(required = false) Map<String ,Object> map) {
- return tmsFeign.deleteTrainLoad(map);
- }
- @ApiOperation(value = "修改火运装车序号")
- @PostMapping("/updateTrainLoadSeq")
- public Map<String, Object> updateTrainLoadSeq(@RequestBody(required = false) Map<String, Object> map){
- return tmsFeign.updateTrainLoadSeq(map);
- }
- @ApiOperation(value = "采购火运计量作业")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/purchaseTrainWeight")
- // @LogAround(foreignKeys = {"resultId"},foreignKeyTypes = {"计量实绩"})
- public Map<String, Object> purchaseTrainWeight(@RequestBody MultipartFile file,
- String businessType,
- String userId,
- String userName) throws Exception {
- Map<String, Object> map = new HashMap<>();
- //获取Excel中包含的对象数组
- List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
- map.put("list", list);
- Set<String> capacitySet = new HashSet<>();//车牌号
- String weightTime = null;
- for (Map<String, Object> item : list) {
- //校验行
- if(item.get("通知单号")==null || item.get("通知单号").equals("")
- || item.get("车号")==null || item.get("车号").equals("")
- || item.get("计量日期")==null || item.get("计量日期").equals("")
- || item.get("皮重")==null || item.get("皮重").equals("")
- || item.get("毛重")==null || item.get("毛重").equals("")
- || item.get("磅单号")==null || item.get("磅单号").equals("")){
- throw new Exception("单元格数据异常(通知单号/车号/计量日期/净重/皮重/毛重/磅单号),请检查模板或数据是否正确!");
- }
- item.put("净重", DataChange.dataToBigDecimal(item.get("毛重")).subtract(DataChange.dataToBigDecimal(item.get("皮重"))));
- //校验数据
- // if(weightTime == null){
- // weightTime = item.get("计量日期").toString();
- // }else if(!weightTime.equals(item.get("计量日期").toString())){
- // throw new Exception("同一个Excel只允许一批车辆,请检查计量日期!");
- // }
- //车牌号去重
- capacitySet.add(item.get("车号").toString());
- }
- String[] capacities = capacitySet.toArray(new String[0]);//车牌号
- if (capacities.length != list.size()) {
- throw new Exception("车号不允许重复!");
- }
- map.put("userId",userId);
- map.put("userName",userName);
- map.put("businessType",businessType);
- //获取火车运单及计量详情
- List<Map<String,Object>> orderListAll = universalMapper.findTrainWeight(map);
- if (orderListAll.size() <= 0) {
- throw new Exception("未查询到装车信息,请先上传装车作业!");
- }
- List<String> requireList = new ArrayList<>();
- for(Map<String,Object> order : orderListAll){
- if(order.get("unloadResultId") != null){
- throw new Exception(order.get("capacityId")+"已卸车,不允许再上传计量!");
- }
- String requireNumber = order.get("requireNumber").toString();
- Map<String,Object> requirementMap =(Map<String, Object>) map.get(requireNumber);
- if(requirementMap!=null){
- List<Map<String,Object>> orderList = (ArrayList) requirementMap.get("orderList");
- orderList.add(order);
- BigDecimal weight = DataChange.dataToBigDecimal(requirementMap.get("weight"));
- requirementMap.put("weight",weight.add(DataChange.dataToBigDecimal(order.get("netWeight"))));
- requirementMap.put("orderList",orderList);
- }else{
- requirementMap = new HashMap<>();
- List<Map<String,Object>> orderList = new ArrayList<>();
- orderList.add(order);
- BigDecimal weight = DataChange.dataToBigDecimal(order.get("netWeight"));
- requirementMap.put("transPlanId",order.get("transPlanId"));
- requirementMap.put("materialId",order.get("materialId"));
- requirementMap.put("weight",weight);
- requirementMap.put("weightTime",weightTime);
- requirementMap.put("userId",userId);
- requirementMap.put("userName",userName);
- requirementMap.put("orderList",orderList);
- requireList.add(requireNumber);
- }
- map.put(requireNumber,requirementMap);
- }
- Map<String,Object> result = null;
- for(String requireNumber : requireList){
- Map<String,Object> requirementMap =(Map<String, Object>) map.get(requireNumber);
- List<Map<String,Object>> orderList = (ArrayList) requirementMap.get("orderList");
- if(universalMapper.countTransOrder(requirementMap) != orderList.size()){
- throw new Exception("计量车数与装车车数不一致!");
- }
- result = tmsFeign.purchaseTrainWeight(requirementMap);
- if (!"succeed".equals(result.get("status"))) {
- throw new Exception("计量上传失败:" + result.get("message"));
- }
- }
- return result;
- }
- @ApiOperation(value = "查询采购火运计量")
- @PostMapping("/purchaseTrainWeightList")
- public Map<String, Object> purchaseTrainWeightList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.purchaseTrainWeightList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "采购火运卸车作业")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/purchaseTrainUnload")
- // @LogAround(foreignKeys = {"resultId"},foreignKeyTypes = {"计量实绩"})
- public Map<String, Object> purchaseTrainUnload(@RequestBody MultipartFile file,
- String businessType,
- String userId,
- String userName) throws Exception {
- Map<String, Object> map = new HashMap<>();
- //获取Excel中包含的对象数组
- List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
- map.put("list", list);
- Set<String> capacitySet = new HashSet<>();//车牌号
- String unloadTime = null;
- for (Map<String, Object> item : list) {
- //校验行
- if(item.get("通知单号")==null || item.get("通知单号").equals("")
- || item.get("车号")==null || item.get("车号").equals("")
- || item.get("卸车日期")==null || item.get("卸车日期").equals("")){
- throw new Exception("单元格数据异常(通知单号/车号/卸车日期),请检查模板或数据是否正确!");
- }
- if(item.get("净重") == null || item.get("净重").equals("")){
- //净重为空
- if(item.get("毛重") != null && !item.get("毛重").equals("")
- && item.get("皮重") != null && !item.get("皮重").equals("")){
- item.put("净重", DataChange.dataToBigDecimal(item.get("毛重")).subtract(DataChange.dataToBigDecimal(item.get("皮重"))));
- }else{
- throw new Exception("单元格数据异常(净重),请检查模板或数据是否正确!");
- }
- }
- if(item.get("毛重") == null || item.get("毛重").equals("")){
- //毛重为空
- if(item.get("净重") != null && !item.get("净重").equals("")
- && item.get("皮重") != null && !item.get("皮重").equals("")){
- item.put("毛重", DataChange.dataToBigDecimal(item.get("净重")).add(DataChange.dataToBigDecimal(item.get("皮重"))));
- }else{
- throw new Exception("单元格数据异常(毛重),请检查模板或数据是否正确!");
- }
- }
- if(item.get("皮重") == null || item.get("皮重").equals("")){
- //毛重为空
- if(item.get("净重") != null && !item.get("净重").equals("")
- && item.get("毛重") != null && !item.get("毛重").equals("")){
- item.put("皮重", DataChange.dataToBigDecimal(item.get("毛重")).subtract(DataChange.dataToBigDecimal(item.get("净重"))));
- }else{
- throw new Exception("单元格数据异常(皮重),请检查模板或数据是否正确!");
- }
- }
- //校验数据
- // if(unloadTime == null){
- // unloadTime = item.get("卸车日期").toString();
- // }else if(!unloadTime.equals(item.get("卸车日期").toString())){
- // throw new Exception("同一个Excel只允许一批车辆,请检查卸车日期!");
- // }
- //车牌号去重
- System.out.println(item.get("车号").toString());
- Boolean b = capacitySet.add(item.get("车号").toString());
- System.out.println(b);
- }
- String[] capacities = capacitySet.toArray(new String[0]);//车牌号
- if (capacities.length != list.size()) {
- throw new Exception("车号不允许重复!");
- }
- map.put("userId",userId);
- map.put("userName",userName);
- map.put("businessType",businessType);
- //获取火车运单及计量详情
- List<Map<String,Object>> orderListAll = universalMapper.findTrainUnload(map);
- if (orderListAll.size() <= 0) {
- throw new Exception("未查询到装车信息,请先上传装车作业!");
- }
- List<String> requireList = new ArrayList<>();
- for(Map<String,Object> order : orderListAll){
- if(order.get("unloadResultId") != null){
- throw new Exception(order.get("capacityId")+"已卸车,不允许再上传!");
- }
- String requireNumber = order.get("requireNumber").toString();
- Map<String,Object> requirementMap =(Map<String, Object>) map.get(requireNumber);
- if(requirementMap!=null){
- List<Map<String,Object>> orderList = (ArrayList) requirementMap.get("orderList");
- orderList.add(order);
- requirementMap.put("orderList",orderList);
- }else{
- requirementMap = new HashMap<>();
- List<Map<String,Object>> orderList = new ArrayList<>();
- orderList.add(order);
- requirementMap.put("transPlanId",order.get("transPlanId"));
- requirementMap.put("materialId",order.get("materialId"));
- requirementMap.put("unloadPointId",order.get("unloadPointId"));
- requirementMap.put("unloadTime",unloadTime);
- requirementMap.put("userId",userId);
- requirementMap.put("userName",userName);
- requirementMap.put("orderList",orderList);
- requirementMap.put("requirementSerialNumber",requireNumber);
- requireList.add(requireNumber);
- }
- map.put(requireNumber,requirementMap);
- }
- Map<String,Object> result = null;
- for(String requireNumber : requireList){
- Map<String,Object> requirementMap =(Map<String, Object>) map.get(requireNumber);
- List<Map<String,Object>> orderList = (ArrayList) requirementMap.get("orderList");
- // if(universalMapper.countTransOrder(requirementMap) != orderList.size()){
- // throw new Exception("卸车车数与装车车数不一致!");
- // }
- result = tmsFeign.purchaseTrainUnload(requirementMap);
- if (!"succeed".equals(result.get("status"))) {
- throw new Exception("上传失败:" + result.get("message"));
- }
- }
- return result;
- }
- @ApiOperation(value = "查询采购火运卸车")
- @PostMapping("/purchaseTrainUnloadList")
- public Map<String, Object> purchaseTrainUnloadList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.purchaseTrainUnloadList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "更改销售运输订单状态")
- @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
- @PostMapping(value = "/changeSaleTransOrder")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"销售运输订单"})
- public Map<String, Object> changeSaleTransOrder(@RequestBody(required = false) Map<String, Object> map) {
- return tmsFeign.changeSaleTransOrder(map);
- }
- @ApiOperation(value = "查询司机运输汇总")
- @PostMapping("/getDriverTotalResult")
- public Map<String, Object> getDriverTotalResult(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getDriverTotalResult(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询车辆运输汇总")
- @PostMapping("/getCapacityTotalResult")
- public Map<String, Object> getCapacityTotalResult(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getCapacityTotalResult(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation("生产物流-调度任务新增")
- @PostMapping("/dispatchTask")
- Map<String,Object> dispatchTask(@RequestBody Map<String,Object> map) {
- return tmsFeign.dispatchTask(map);
- }
- @ApiOperation("获取销售派车单信息")
- @PostMapping("/getDlivDirnoSeqList/{id}")
- public RESTfulResult getDlivDirnoSeqList(@PathVariable("id") String id) {
- return tmsFeign.getDlivDirnoSeqList(id);
- }
- @ApiOperation("修改销售派车单信息")
- @PostMapping("/updateDlivDirnoSeq")
- @LogAround(foreignKeys = {"planChildId"}, foreignKeyTypes = {"修改销售运单"})
- public RESTfulResult updateDlivDirnoSeq(@RequestBody Map<String,Object> map) {
- return tmsFeign.updateDlivDirnoSeq(map);
- }
- @ApiOperation("查询销售派车单装车信息")
- @PostMapping("/selectDlivDirnoSeqDetails")
- public RESTfulResult selectDlivDirnoSeqDetails(@RequestBody Map<String,Object> map) {
- return tmsFeign.selectDlivDirnoSeqDetails(map);
- }
- @ApiOperation("查询订单厂内轨迹")
- @PostMapping("/getPathByOrder")
- public RESTfulResult getPathByOrder(@RequestBody Map<String,Object> map) {
- return tmsFeign.getPathByOrder(map);
- }
- @ApiOperation("上传定位,更新路径")
- @PostMapping("/uploadLocation")
- public RESTfulResult uploadLocation(@RequestBody Map<String,Object> map) {
- return tmsFeign.uploadLocation(map);
- }
- @ApiOperation("实收吨数")
- @PostMapping("/updateWeight")
- public RESTfulResult updateWeight(@RequestBody Map<String,Object> map) {
- return tmsFeign.updateWeight(map);
- }
- @ApiOperation("checkWeightResult")
- @PostMapping("/checkWeightResult")
- @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计量实绩"})
- public Map<String,Object> checkWeightResult(@RequestBody Map<String,Object> map) {
- return tmsFeign.checkWeightResult(map);
- }
- @ApiOperation(value = "发运通知单直接派车", notes = "发运通知单直接派车")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
- })
- @PostMapping(value = "/saleDispatchList")
- public RESTfulResult saleDispatchList(@RequestBody Map<String, Object> map) {
- return tmsFeign.saleDispatchList(map);
- }
- @ApiOperation("多拼派车")
- @PostMapping("/saleDispatchDuoPin")
- RESTfulResult saleDispatchDuoPin(@RequestBody Map<String,Object> map) {return tmsFeign.saleDispatchDuoPin(map);}
- @ApiOperation("同步生产实绩")
- @PostMapping("/syncProductionResult")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"调拨实绩"})
- RESTfulResult syncProductionResult(@RequestBody Map<String,Object> map) {
- return tmsFeign.syncProductionResult(map);
- }
- @ApiOperation("获取司机日工作量")
- @PostMapping("/getDriverDayJobForApp")
- RESTfulResult getDriverDayJobForApp(@RequestBody Map<String,Object> map,Integer apiId) {
- return tmsFeign.getDriverDayJobForApp(map,apiId);
- }
- @ApiOperation(value = "确认出库", notes = "确认出库")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
- })
- @PostMapping(value = "/outBound")
- public RESTfulResult outBound(@RequestBody Map<String, Object> map) {
- return tmsFeign.outBound(map);
- }
- @ApiOperation(value = "撤销出库", notes = "撤销出库")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
- })
- @PostMapping(value = "/revokeOutBound")
- public RESTfulResult revokeOutBound(@RequestBody Map<String, Object> map) {
- return tmsFeign.revokeOutBound(map);
- }
- @ApiOperation(value = "查询车辆登记单信息")
- @PostMapping("/likeTransitOrders")
- public Map<String, Object> likeTransitOrders(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.likeTransitOrders(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "新增车辆登记单信息")
- @PostMapping("/insertTmsTransitOrder")
- public Map<String,Object> insertTmsTransitOrder(@RequestBody Map<String,Object> map) {
- return tmsFeign.insertTmsTransitOrder(map);
- }
- @ApiOperation("导入通行登记单")
- @PostMapping("/importTrasitOrder")
- public Map<String, Object> importTrasitOrder(@RequestBody MultipartFile file,
- String userId,
- String userName) throws Exception {
- Map<String, Object> map = new HashMap<>();
- //获取Excel中包含的对象数组
- List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
- map.put("list", list);
- for (Map<String, Object> item : list) {
- //校验行
- if (item.get("车牌号") == null || item.get("通行卡类型") == null || item.get("开始时间") == null || item.get("结束时间") == null) {
- throw new Exception("单元格数据异常,请检查模板或数据是否正确!");
- }
- }
- map.put("userId", userId);
- map.put("userName", userName);
- return tmsFeign.importTrasitOrder(map);
- }
- @ApiOperation(value = "查询请车批车")
- @PostMapping("/getPleaseApproveList")
- public Map<String, Object> getPleaseApproveList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.getPleaseApproveList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @PostMapping("/addPleaseApprove")
- public Map<String,Object> addPleaseApprove(@RequestBody Map<String,Object> map) {
- return tmsFeign.addPleaseApprove(map);
- }
- @PostMapping("/updPleaseApprove")
- public Map<String,Object> updPleaseApprove(@RequestBody Map<String,Object> map) {
- return tmsFeign.updPleaseApprove(map);
- }
- @PostMapping("/delPleaseApprove")
- public Map<String,Object> delPleaseApprove(@RequestBody Map<String,Object> map) {
- return tmsFeign.delPleaseApprove(map);
- }
- @PostMapping("/gatepostTransitManager")
- public Map<String,Object> gatepostTransitManager(@RequestBody Map<String,Object> map) {
- return tmsFeign.gatepostTransitManager(map);
- }
- @ApiOperation("导入宏瑞综合实绩")
- @PostMapping("/importComprehensiveResult")
- public Map<String, Object> importComprehensiveResult(@RequestBody MultipartFile file,
- String userId,
- String userName,
- String resultType) throws Exception {
- Map<String, Object> map = new HashMap<>();
- if (file.isEmpty()) {
- return new HashMap<>();
- }
- // 获取源文件名称
- String originalFilename = file.getOriginalFilename();
- // 获取源文件后缀名
- String extension = "." + FilenameUtils.getExtension(originalFilename);
- // 定义新路径
- String newPath = "/data/file/result/";
- String newName = userName + "-" + originalFilename+ Util.RandomCreate(8) + ".xlsx";
- File dataFile = new File(newPath);
- if (!dataFile.exists()) {
- dataFile.mkdirs();
- }
- FileOutputStream fileOutputStream = new FileOutputStream(newPath + newName);
- fileOutputStream.write(file.getBytes());
- fileOutputStream.flush();
- fileOutputStream.close();
- List<Map<String, Object>> list = new ArrayList<>();
- //获取Excel中包含的对象数组
- if ("维保".equals(resultType)) {
- List<String> excelHeads = Arrays.asList("车属单位","车型","车号","大号","维修时间","维修内容","维修","电器","钣焊","补胎","其它","工时合计","配件费用","外修费用","总合计");
- list = ExcelToolUtils.getExcelList(file,2,excelHeads);
- }else{
- list = ExcelToolUtils.getExcelList(file, 0);
- }
- map.put("list", list);
- map.put("userId", userId);
- map.put("userName", userName);
- map.put("resultType", resultType);
- map.put("filePath",newPath + newName);
- return tmsFeign.importComprehensiveResult(map);
- }
- @ApiOperation(value = "火运大宗销售订单 删除销售运输订单")
- @PostMapping("/changeTransOrderH")
- public Map<String,Object> changeTransOrderH(@RequestBody Map<String,Object> map) {
- return tmsFeign.changeTransOrderH(map);
- }
- @ApiOperation(value = "火运出库后修改车号")
- @PostMapping("/updateCarNo")
- public Map<String,Object> updateCarNo(@RequestBody Map<String,Object> map) {
- return tmsFeign.updateCarNo(map);
- }
- @ApiOperation(value = "查询排队网格信息")
- @PostMapping("/likeQueueGrid")
- public Map<String, Object> likeQueueGrid(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.likeQueueGrid(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "查询排队实绩信息")
- @PostMapping("/likeQueueResult")
- public Map<String, Object> likeQueueResult(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.likeQueueResult(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "处理排队网格数据")
- @PostMapping("/disposeQueueGrid")
- public Map<String,Object> disposeQueueGrid(@RequestBody Map<String,Object> map) {
- return tmsFeign.disposeQueueGrid(map);
- }
- @ApiOperation(value = "获取网格数据")
- @PostMapping("/getGridAllData")
- public Map<String,Object> getGridAllData(@RequestBody Map<String,Object> map) {
- return tmsFeign.getGridAllData(map);
- }
- @ApiOperation(value = "处理排队实绩数据")
- @PostMapping("/disposeQueueResult")
- public Map<String,Object> disposeQueueResult(@RequestBody Map<String,Object> map) {
- return tmsFeign.disposeQueueResult(map);
- }
- @ApiOperation(value = "禁用/启用运输订单")
- @PostMapping("/banTransOrder")
- @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
- public Map<String,Object> banTransOrder(@RequestBody Map<String,Object> map) {
- return tmsFeign.banTransOrder(map);
- }
- @ApiOperation(value = "查询销售火运装货报表")
- @PostMapping("/loadingOperation")
- public Map<String, Object> loadingOperation(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.loadingOperation(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation(value = "修改火运装车列序号")
- @PostMapping("/updateTrainOrderSeq")
- public Map<String,Object> updateTrainOrderSeq(@RequestBody Map<String,Object> map) {
- return tmsFeign.updateTrainOrderSeq(map);
- }
- @ApiOperation(value = "查询销售火运装货报表明细")
- @PostMapping("/purchaseTrainsOrderList")
- public Map<String, Object> purchaseTrainsOrderList(@RequestBody(required = false) Map<String, Object> map,
- Integer apiId,
- Integer pageNum,
- Integer pageSize) {
- return tmsFeign.purchaseTrainsOrderList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
- }
- @ApiOperation("吊装信息")
- @PostMapping("/disposeHandling")
- public Map<String,Object> disposeHandling(@RequestBody Map<String,Object> map) {
- return tmsFeign.disposeHandling(map);
- }
- @ApiOperation("同步报表数据")
- @PostMapping("/getgenerateOperateDaily")
- public Map<String,Object> generateOperateDaily(@RequestBody Map<String,Object> map) {
- return tmsFeign.getgenerateOperateDaily(map);
- }
- @ApiOperation(value = "保存WMS传递的内转出库数据", notes = "保存WMS传递的内转出库数据")
- @PostMapping(value = "/preserveMoveListIn")
- public RESTfulResult preserveMoveListIn(@RequestBody Map<String, Object> mapList) {
- return tmsFeign.preserveMoveListIn(mapList);
- }
- @ApiOperation(value = "保存WMS传递的内转入库数据", notes = "保存WMS传递的内转入库数据")
- @PostMapping(value = "/preserveMoveListOut")
- public RESTfulResult preserveMoveListOut(@RequestBody Map<String, Object> mapList) {
- return tmsFeign.preserveMoveListOut(mapList);
- }
- @ApiOperation(value = "保存WMS传递的内转撤销入库数据", notes = "保存WMS传递的内转撤销入库数据")
- @PostMapping(value = "/preserveMoveListRevokeOut")
- public RESTfulResult preserveMoveListRevokeOut(@RequestBody Map<String, Object> mapList) {
- return tmsFeign.preserveMoveListRevokeOut(mapList);
- }
- @ApiOperation(value = "保存WMS传递的内转撤销出库数据", notes = "保存WMS传递的内撤销转出库数据")
- @PostMapping(value = "/preserveMoveListRevokeIn")
- public RESTfulResult preserveMoveListRevokeIn(@RequestBody Map<String, Object> mapList) {
- return tmsFeign.preserveMoveListRevokeIn(mapList);
- }
- @ApiOperation(value = "保存WMS传递的内转撤销出库数据", notes = "保存WMS传递的内撤销转出库数据")
- @PostMapping(value = "/modifyChange")
- public RESTfulResult modifyChange(@RequestBody Map<String, Object> params) {
- return tmsFeign.modifyChange(params);
- }
- @ApiOperation(value = "针对签到过期的计时单子重新赋权", notes = "针对签到过期的计时单子重新赋权")
- @PostMapping(value = "/resartStartTimming")
- public RESTfulResult resartStartTimming(@RequestBody Map<String, Object> params) {
- return tmsFeign.resartStartTimming(params);
- }
- }
|