|
|
@@ -2,9 +2,13 @@ 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.framework.controller.RESTfulResult;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
@@ -13,14 +17,16 @@ 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.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.concurrent.Callable;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+import com.steerinfo.dil.util.DataChange;
|
|
|
+import org.springframework.web.multipart.MultipartRequest;
|
|
|
|
|
|
/**
|
|
|
* @author luobang
|
|
|
@@ -32,6 +38,16 @@ import java.util.concurrent.Callable;
|
|
|
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"),
|
|
|
@@ -41,15 +57,16 @@ public class TMSController extends BaseRESTfulController {
|
|
|
})
|
|
|
@PostMapping(value = "/getcomprehensiveresults")
|
|
|
public Map<String, Object> getecomprehensiveresultslist(@RequestBody(required = false) Map<String, Object> map, Integer apiId,
|
|
|
- Integer pageNum,
|
|
|
- Integer pageSize) {
|
|
|
+ Integer pageNum,
|
|
|
+ Integer pageSize) {
|
|
|
return tmsFeign.getAmsSalaryContracList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
|
|
|
}
|
|
|
- @ApiOperation(value="新增车辆实绩")
|
|
|
+
|
|
|
+ @ApiOperation(value = "新增车辆实绩")
|
|
|
@ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
|
|
|
- @LogAround(foreignKeys = {"resultId"},foreignKeyTypes = {"计算公式"})
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计算公式"})
|
|
|
@PostMapping("/addcomprehensiveresults")
|
|
|
- public Map<String, Object> insertcomprehensiveresults(@RequestBody(required = false) Map<String, Object> map) throws ParseException {
|
|
|
+ public Map<String, Object> insertcomprehensiveresults(@RequestBody(required = false) Map<String, Object> map) throws ParseException {
|
|
|
if (!map.isEmpty()) {
|
|
|
if (!map.get("resultTime").toString().isEmpty()) {
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
@@ -57,48 +74,48 @@ public class TMSController extends BaseRESTfulController {
|
|
|
map.put("resultTime", resultTime);
|
|
|
}
|
|
|
}
|
|
|
- map.put("insertUsername", map.get("userName").toString());
|
|
|
- return tmsFeign.insertAmsSalaryContrac(map);
|
|
|
+ map.put("insertUsername", map.get("userName").toString());
|
|
|
+ return tmsFeign.insertAmsSalaryContrac(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="车辆实绩删除")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计算公式"})
|
|
|
+ public Map<String, Object> comprehensiveresultsLogicDelete(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.logicdeleteAmsSaalryContrac(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="修改车辆实绩")
|
|
|
+ @ApiOperation(value = "修改车辆实绩")
|
|
|
@ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
|
|
|
@PutMapping(value = "/comprehensiveresultsupadete/{id}")
|
|
|
- @LogAround(foreignKeys = {"resultId"},foreignKeyTypes = {"计算公式"})
|
|
|
- public Map<String, Object> comprehensiveresultsUpdate(@PathVariable BigDecimal id,@RequestBody(required = false) Map<String, Object> map){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计算公式"})
|
|
|
+ public Map<String, Object> comprehensiveresultsUpdate(@PathVariable BigDecimal id, @RequestBody(required = false) Map<String, Object> map) {
|
|
|
map.put("updateUsername", map.get("userName").toString());
|
|
|
- return tmsFeign.updateAmsSalaryContrac(id,map);
|
|
|
+ return tmsFeign.updateAmsSalaryContrac(id, map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="派发运输订单")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
|
|
|
+ public Map<String, Object> dispatchOrder(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.dispatchOrder(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="更改运输订单状态")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
|
|
|
+ public Map<String, Object> changeTransOrder(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.changeTransOrder(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="司机接收运单")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
|
|
|
+ public Map<String, Object> receiptOrder(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.receiptOrder(map);
|
|
|
}
|
|
|
|
|
|
@@ -108,134 +125,161 @@ public class TMSController extends BaseRESTfulController {
|
|
|
Integer apiId,
|
|
|
Integer pageNum,
|
|
|
Integer pageSize) {
|
|
|
- return tmsFeign.getTransOrderList(map ==null ? new HashMap<>() : map, apiId, pageNum, pageSize);
|
|
|
+ return tmsFeign.getTransOrderList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="查询运输订单所有运输实绩")
|
|
|
+ @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){
|
|
|
+ public Map<String, Object> getTransResult(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.getTransResult(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="同步进厂")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"进厂实绩"})
|
|
|
+ public Map<String, Object> syncEnfactoryResult(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.syncEnfactoryResult(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="同步出厂")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"出厂实绩"})
|
|
|
+ public Map<String, Object> syncOutfactoryResult(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.syncOutfactoryResult(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="同步计量")
|
|
|
+ @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){
|
|
|
+ @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>")
|
|
|
+ @RequestLimit()
|
|
|
+ @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="销售派发运输订单")
|
|
|
+ @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 = "修改计时")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
|
|
|
+ public Map<String, Object> saleDispatchOrder(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.saleDispatchOrder(map);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查询销售运输订单")
|
|
|
@PostMapping("/getSaleTransOrderList")
|
|
|
public Map<String, Object> getSaleTransOrderList(@RequestBody(required = false) Map<String, Object> map,
|
|
|
- Integer apiId,
|
|
|
- Integer pageNum,
|
|
|
- Integer pageSize) {
|
|
|
+ Integer apiId,
|
|
|
+ Integer pageNum,
|
|
|
+ Integer pageSize) {
|
|
|
return tmsFeign.getSaleTransOrderList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
|
|
|
}
|
|
|
- @ApiOperation(value="同步质检")
|
|
|
+
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"质检实绩"})
|
|
|
+ public Map<String, Object> syncQualityResult(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.syncQualityResult(map);
|
|
|
}
|
|
|
- @ApiOperation(value="签到")
|
|
|
+
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"签到实绩"})
|
|
|
+ public Map<String, Object> signIn(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.signIn(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="换车头")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"换车头实绩"})
|
|
|
+ public Map<String, Object> replaceFront(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.replaceFront(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="装货")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"装货实绩"})
|
|
|
+ public Map<String, Object> load(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.load(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="装货修改")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"装货实绩"})
|
|
|
+ public Map<String, Object> loadUpd(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.loadUpd(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="卸货")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"卸货实绩"})
|
|
|
+ public Map<String, Object> unload(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.unload(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="卸货修改")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"卸货实绩"})
|
|
|
+ public Map<String, Object> unloadUpd(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.unloadUpd(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="抵达")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"抵达实绩"})
|
|
|
+ public Map<String, Object> arrival(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.arrival(map);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="签收")
|
|
|
+ @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){
|
|
|
+ @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"签收实绩"})
|
|
|
+ public Map<String, Object> receipt(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.receipt(map);
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="查询厂内车辆数")
|
|
|
+ @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);
|
|
|
+ public Map<String, Object> getCountEnfactory(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
+ return tmsFeign.getCountEnfactory(map == null ? new HashMap<>() : map);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查询签到")
|
|
|
@@ -244,7 +288,7 @@ public class TMSController extends BaseRESTfulController {
|
|
|
Integer apiId,
|
|
|
Integer pageNum,
|
|
|
Integer pageSize) {
|
|
|
- return tmsFeign.getSignInResultList(map ==null ? new HashMap<>() : map, apiId, pageNum, pageSize);
|
|
|
+ return tmsFeign.getSignInResultList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查询换车头")
|
|
|
@@ -253,25 +297,26 @@ public class TMSController extends BaseRESTfulController {
|
|
|
Integer apiId,
|
|
|
Integer pageNum,
|
|
|
Integer pageSize) {
|
|
|
- return tmsFeign.getReplaceFrontResultList(map ==null ? new HashMap<>() : map, apiId, pageNum, 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);
|
|
|
+ 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);
|
|
|
+ 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 = "查询装货")
|
|
|
@@ -280,60 +325,149 @@ public class TMSController extends BaseRESTfulController {
|
|
|
Integer apiId,
|
|
|
Integer pageNum,
|
|
|
Integer pageSize) {
|
|
|
- return tmsFeign.getLoadResultList(map ==null ? new HashMap<>() : map, apiId, pageNum, 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);
|
|
|
+ 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);
|
|
|
+ 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);
|
|
|
+ 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);
|
|
|
+ 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);
|
|
|
+ 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 orderType,
|
|
|
+ String userId,
|
|
|
+ String userName) throws Exception {
|
|
|
+ File excel = ExcelToolUtils.multipartFileToFile(file);
|
|
|
+ FileInputStream is = null;
|
|
|
+ String fileName = excel.getName();
|
|
|
+ // 解决fileName兼容性问题
|
|
|
+ int lastindex = fileName.lastIndexOf("\\");
|
|
|
+ fileName = fileName.substring(lastindex + 1);
|
|
|
+ if (fileName != null && fileName.length() > 0) {
|
|
|
+ is = new FileInputStream(excel);
|
|
|
+ }
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ //获取Excel中包含的对象数组
|
|
|
+ List<Map<String, Object>> list = ExcelToolUtils.getExcelList(is, fileName, 0);
|
|
|
+ List<String> capacityIds = new ArrayList<>();
|
|
|
+ for (Map<String, Object> item : list) {
|
|
|
+ capacityIds.add(item.get("车号").toString());
|
|
|
}
|
|
|
+ map.put("list", list);
|
|
|
+ //校验当前excel是否已经导过
|
|
|
+ if (universalMapper.checkTrainOrder(map) > 0) {
|
|
|
+ throw new Exception("存在24小时内的重复运单!不允许重复导入!");
|
|
|
+ }
|
|
|
+ //统计通知单的重量车数和车牌号
|
|
|
+ Set<String> capacitySet = new HashSet<>();//车牌号
|
|
|
+ for (Map<String, Object> item : list) {
|
|
|
+ //通知单统计
|
|
|
+ String requirementNumber = item.get("通知单号").toString();
|
|
|
+ if (map.get("requirementNumber") != null) {
|
|
|
+ if (map.get("requirementNumber").equals(requirementNumber)) {
|
|
|
+ //已存在,修改
|
|
|
+ BigDecimal weight = DataChange.dataToBigDecimal(map.get("weight"));
|
|
|
+ BigDecimal truckNumber = DataChange.dataToBigDecimal(map.get("truckNumber"));
|
|
|
+ weight = weight.add(DataChange.dataToBigDecimal(item.get("净重")));
|
|
|
+ truckNumber = truckNumber.add(new BigDecimal(1));
|
|
|
+ map.put("weight", weight);
|
|
|
+ map.put("truckNumber", truckNumber);
|
|
|
+ } else {
|
|
|
+ throw new Exception("同一个Excel文件中只允许有一个采购订单号!");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //不存在,新增
|
|
|
+ BigDecimal weight = DataChange.dataToBigDecimal(item.get("净重"));
|
|
|
+ BigDecimal truckNumber = new BigDecimal(1);
|
|
|
+ map.put("requirementNumber", requirementNumber);
|
|
|
+ map.put("weight", weight);
|
|
|
+ map.put("truckNumber", truckNumber);
|
|
|
+ }
|
|
|
+ //车牌号去重
|
|
|
+ capacitySet.add(item.get("车号").toString());
|
|
|
+ }
|
|
|
+ //新增火车运力资源
|
|
|
+ String[] capacities = capacitySet.toArray(new String[0]);//车牌号
|
|
|
+ if (capacities.length != list.size()) {
|
|
|
+ throw new Exception("车号不允许重复!");
|
|
|
+ } else {
|
|
|
+ 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();
|
|
|
+ }
|
|
|
+ //新增AMS及TMS
|
|
|
+ map.put("userId",userId);
|
|
|
+ map.put("userName",userName);
|
|
|
+ map.put("orderType",orderType);
|
|
|
+ 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="更改销售运输订单状态")
|
|
|
+ @ApiOperation(value = "更改销售运输订单状态")
|
|
|
@ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
|
|
|
@PostMapping(value = "/changeSaleTransOrder")
|
|
|
- @LogAround(foreignKeys = {"transOrderId"},foreignKeyTypes = {"销售运输订单"})
|
|
|
+ @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"销售运输订单"})
|
|
|
public Map<String, Object> changeSaleTransOrder(@RequestBody(required = false) Map<String, Object> map) {
|
|
|
return tmsFeign.changeSaleTransOrder(map);
|
|
|
}
|