UniversalController.java 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.mapper.UniversalMapper;
  3. import com.steerinfo.dil.service.impl.UniversalServiceImpl;
  4. import com.steerinfo.dil.util.BaseRESTfulController;
  5. import com.steerinfo.dil.util.ColumnDataUtil;
  6. import com.steerinfo.dil.util.DataChange;
  7. import com.steerinfo.dil.util.PageListAdd;
  8. import com.steerinfo.framework.controller.RESTfulResult;
  9. import com.steerinfo.framework.service.pagehelper.PageHelper;
  10. import com.zaxxer.hikari.util.FastList;
  11. import io.swagger.annotations.*;
  12. import io.swagger.models.auth.In;
  13. import javassist.expr.NewArray;
  14. import oracle.jdbc.proxy.annotation.Post;
  15. import org.apache.commons.lang.time.FastDateFormat;
  16. import org.apache.ibatis.annotations.Param;
  17. import org.springframework.beans.factory.annotation.Autowired;
  18. import org.springframework.scheduling.annotation.Scheduled;
  19. import org.springframework.web.bind.annotation.PostMapping;
  20. import org.springframework.web.bind.annotation.RequestBody;
  21. import org.springframework.web.bind.annotation.RequestMapping;
  22. import org.springframework.web.bind.annotation.RestController;
  23. import org.springframework.web.bind.annotation.*;
  24. import java.io.IOException;
  25. import java.math.BigDecimal;
  26. import java.util.ArrayList;
  27. import java.util.HashMap;
  28. import java.util.List;
  29. import java.util.Map;
  30. /**
  31. * @ author :TXF
  32. * @ time :2021/10/19 18:06
  33. * 通用接口
  34. */
  35. @RequestMapping("${api.version}/uc")
  36. @RestController
  37. public class UniversalController extends BaseRESTfulController {
  38. @Autowired
  39. UniversalServiceImpl universalService;
  40. @Autowired
  41. UniversalMapper universalMapper;
  42. @Autowired
  43. ColumnDataUtil columnDataUtil;
  44. @ApiOperation(value="查询数据打印提货单接口")
  45. @ApiImplicitParams({
  46. @ApiImplicitParam(name = "mapValue", value = "运输订单号", required = false, dataType = "Map"),
  47. })
  48. @PostMapping("/printTHD")
  49. public RESTfulResult printTiHuoDan(@RequestBody(required=false) Map<String, Object> mapValue){
  50. Map<String, Object> tiHuoDan = universalService.printTiHuoDan((String) mapValue.get("orderNumber"));
  51. return success(tiHuoDan);
  52. }
  53. @ApiModelProperty(value = "模糊查询发货单位")
  54. @ApiImplicitParams({
  55. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  56. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  57. @ApiImplicitParam(name = "apiId", value = "247", required = false, dataType = "BigDecimal")
  58. })
  59. @PostMapping("/querySupplierByLike")
  60. public RESTfulResult querySupplierByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  61. Integer pageNum,
  62. Integer pageSize,
  63. Integer apiId,
  64. String index) {
  65. if(mapValue == null) {
  66. mapValue = new HashMap<>();
  67. }
  68. if(index != null){
  69. mapValue.put("index","%" + index + "%");
  70. }
  71. PageHelper.startPage(pageNum, pageSize);
  72. //分页查询数据
  73. List<Map<String, Object>> columnList = universalMapper.querySupplierByLike(mapValue);
  74. PageListAdd data = columnDataUtil.tableColumnData(apiId,columnList);
  75. return success(data);
  76. }
  77. @ApiModelProperty(value = "查询所有发货单位")
  78. @ApiImplicitParams({
  79. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  80. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  81. @ApiImplicitParam(name = "apiId", value = "247", required = false, dataType = "BigDecimal")
  82. })
  83. @PostMapping("/queryAllSupplierByLike")
  84. public RESTfulResult queryAllSupplierByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  85. Integer pageNum,
  86. Integer pageSize,
  87. Integer apiId,
  88. String index) {
  89. if(mapValue == null) {
  90. mapValue = new HashMap<>();
  91. }
  92. if(index != null){
  93. mapValue.put("index","%" + index + "%");
  94. }
  95. PageHelper.startPage(pageNum, pageSize);
  96. //分页查询数据
  97. List<Map<String, Object>> columnList = universalMapper.queryAllSupplierByLike(mapValue);
  98. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  99. return success(data);
  100. }
  101. @ApiModelProperty(value = "通过物资ID查询该物资的发货单位信息")
  102. @ApiImplicitParams({
  103. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  104. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  105. @ApiImplicitParam(name = "apiId", value = "247", required = false, dataType = "BigDecimal")
  106. })
  107. @PostMapping("/getSupplierMesByMaterialId")
  108. public RESTfulResult getSupplierMesByMaterialId(@RequestBody(required = false) Map<String,Object> mapValue,
  109. Integer pageNum,
  110. Integer pageSize,
  111. Integer apiId,
  112. String index, String materialId) {
  113. if(mapValue == null)
  114. mapValue = new HashMap<>();
  115. if(!"null".equals(materialId))
  116. mapValue.put("materialId",materialId);
  117. if(index != null){
  118. mapValue.put("index","%" + index + "%");
  119. }
  120. PageHelper.startPage(pageNum, pageSize);
  121. //分页查询数据
  122. List<Map<String, Object>> columnList = universalMapper.getSupplierMesByMaterialId(mapValue);
  123. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  124. return success(data);
  125. }
  126. @ApiOperation(value="查询所有运力信息")
  127. @ApiImplicitParams({
  128. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  129. @ApiImplicitParam(name = "apiId(248)", value = "动态表头", required = false, dataType = "Integer"),
  130. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  131. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  132. })
  133. @PostMapping("/getAllCapacityByCarrierLike")
  134. public RESTfulResult getAllCapacityByCarrierLike(@RequestBody(required=false) Map<String,Object> mapValue,
  135. Integer apiId,
  136. Integer pageNum,
  137. Integer pageSize,
  138. String carrierSsoId,
  139. String index,
  140. String con,
  141. String indexText
  142. ){
  143. if(mapValue == null){
  144. mapValue = new HashMap<>();
  145. }
  146. if(index != null){
  147. mapValue.put("index", index);
  148. }
  149. if (con != null&& !con.equals("undefined")){
  150. mapValue.put("con",con);
  151. }
  152. if (indexText != null&& !indexText.equals("undefined")){
  153. mapValue.put("indexText",indexText);
  154. }
  155. if (carrierSsoId != null && carrierSsoId.equals("undefined")) {
  156. carrierSsoId = null;
  157. }
  158. if (carrierSsoId != null) {
  159. BigDecimal carrierId = universalMapper.getCarrierIdBySSO(carrierSsoId);
  160. mapValue.put("carrierId",carrierId);
  161. }
  162. //不分页筛选数据
  163. PageHelper.startPage(pageNum,pageSize);
  164. //分页数据
  165. List<Map<String, Object>> capacity = universalMapper.getAllCapacityByCarrierLike(mapValue);
  166. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, capacity);
  167. return success(pageList);
  168. }
  169. @ApiOperation(value="查询运力类型")
  170. @ApiImplicitParams({
  171. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  172. @ApiImplicitParam(name = "apiId(248)", value = "动态表头", required = false, dataType = "Integer"),
  173. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  174. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  175. })
  176. @PostMapping("/getCapacityType")
  177. public RESTfulResult getCapacityType(@RequestBody(required=false) Map<String,Object> mapValue,
  178. Integer apiId,
  179. Integer pageNum,
  180. Integer pageSize,
  181. String index
  182. ){
  183. if(mapValue == null){
  184. mapValue = new HashMap<>();
  185. }
  186. if(index != null&&!index.equals("null")){
  187. mapValue.put("index", index);
  188. }
  189. //不分页筛选数据
  190. PageHelper.startPage(pageNum,pageSize);
  191. //分页数据
  192. List<Map<String, Object>> capacity = universalMapper.getCapacityType(mapValue);
  193. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, capacity);
  194. return success(pageList);
  195. }
  196. @ApiOperation(value="通过订单ID查询订单下所有物资")
  197. @ApiImplicitParams({
  198. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  199. @ApiImplicitParam(name = "apiId(395)", value = "动态表头", required = false, dataType = "Integer"),
  200. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  201. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  202. })
  203. @PostMapping("/getMaterialMesByOrderId")
  204. public RESTfulResult getMaterialMesByOrderId(@RequestBody(required=false) Map<String,Object> mapValue,
  205. Integer apiId,
  206. Integer pageNum,
  207. Integer pageSize,
  208. String orderId
  209. ){
  210. if(mapValue == null){
  211. mapValue = new HashMap<>();
  212. }
  213. if(orderId != null){
  214. mapValue.put("orderId", orderId);
  215. }
  216. //不分页筛选数据
  217. PageHelper.startPage(pageNum,pageSize);
  218. //分页数据
  219. List<Map<String, Object>> capacity = universalMapper.getMaterialMesByOrderId(mapValue);
  220. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, capacity);
  221. return success(pageList);
  222. }
  223. @ApiModelProperty(value = "边输边查发货单位")
  224. @PostMapping("/getSupplierMesByLike")
  225. public RESTfulResult getSupplierMesByLike(@RequestParam("index") String index) {
  226. List<Map<String, Object>> list = universalMapper.getSupplierMesByLike(index == null ? "" : index);
  227. return success(list);
  228. }
  229. @ApiModelProperty(value = "船名边输边查")
  230. @PostMapping("/getShipNameMesByLike")
  231. public RESTfulResult getShipNameMesByLike(@RequestParam("index") String index,Integer materialId) {
  232. Map<String, Object> map = new HashMap<>();
  233. if(materialId != null){
  234. map.put("materialId",materialId);
  235. }
  236. if(index != null){
  237. map.put("index","%" + index + "%");
  238. }
  239. List<Map<String,Object>>list = universalMapper.getShipNameMesByLike(map);
  240. return success(list);
  241. }
  242. @ApiModelProperty(value = "边输边查用车单位")
  243. @PostMapping("/getRequireUnitName")
  244. public RESTfulResult getRequireUnitName(@RequestParam("index") String index) {
  245. List<Map<String,Object>>list = universalMapper.getRequireUnitName(index == null ? "" : "%" + index + "%");
  246. return success(list);
  247. }
  248. @ApiModelProperty(value = "边输边查收货单位")
  249. @PostMapping("/getConsigneeByLike")
  250. public RESTfulResult getConsigneeByLike(@RequestParam("index") String index) {
  251. List<Map<String, Object>> list = universalMapper.getConsigneeByLike(index == null ? "" : index);
  252. return success(list);
  253. }
  254. @ApiModelProperty(value = "历史收货单位")
  255. @PostMapping("/getConsigneeHistory")
  256. public RESTfulResult getConsigneeHistory() {
  257. List<Map<String, Object>> list = universalMapper.getConsigneeHistory();
  258. return success(list);
  259. }
  260. @ApiModelProperty(value = "通过订单ID查询订单下物资信息")
  261. @PostMapping("/getOrderMaterialMesByOrderId/{orderId}")
  262. public RESTfulResult getMaterialMesByOrderId(@PathVariable("orderId") Integer orderId){
  263. List<Map<String, Object>> mes = universalMapper.getOrderMaterialMesByOrderId(new BigDecimal(orderId));
  264. return success(mes);
  265. }
  266. @ApiModelProperty(value = "模糊查询物资")
  267. @ApiImplicitParams({
  268. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  269. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  270. @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
  271. })
  272. @PostMapping("/queryAPOMaterialByLike")
  273. public RESTfulResult queryAPOMaterialByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  274. Integer pageNum,
  275. Integer pageSize,
  276. Integer apiId,
  277. String index,
  278. Integer supplierId) {
  279. if(mapValue == null) {
  280. mapValue = new HashMap<>();
  281. }
  282. if(index != null && !"".equals(index) &&!"null".equals(index)){
  283. mapValue.put("index", index);
  284. }
  285. if(supplierId != null){
  286. mapValue.put("supplierId", supplierId);
  287. }
  288. PageHelper.startPage(pageNum, pageSize);
  289. //分页查询数据
  290. List<Map<String, Object>> columnList = universalMapper.queryAPOMaterialByLike(mapValue);
  291. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  292. return success(data);
  293. }
  294. @ApiModelProperty(value = "模糊查询卸货点")
  295. @ApiImplicitParams({
  296. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  297. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  298. @ApiImplicitParam(name = "apiId", value = "374", required = false, dataType = "BigDecimal")
  299. })
  300. @PostMapping("/getUnloadingMesByLike")
  301. public RESTfulResult getUnloadingMesByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  302. Integer pageNum,
  303. Integer pageSize,
  304. Integer apiId,
  305. Integer type,
  306. String index) {
  307. if(mapValue == null) {
  308. mapValue = new HashMap<>();
  309. }
  310. if(type != null){
  311. mapValue.put("type", type);
  312. }
  313. if(index != null && !"".equals(index) && !"null".equals(index)){
  314. mapValue.put("index", index);
  315. }
  316. PageHelper.startPage(pageNum, pageSize);
  317. //分页查询数据
  318. List<Map<String, Object>> columnList = universalMapper.getUnloadingMesByLike(mapValue);
  319. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  320. return success(data);
  321. }
  322. @ApiModelProperty(value = "模糊查询物资")
  323. @ApiImplicitParams({
  324. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  325. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  326. @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
  327. })
  328. @PostMapping("/queryMaterialByLike")
  329. public RESTfulResult queryMaterialByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  330. Integer pageNum,
  331. Integer pageSize,
  332. Integer apiId,
  333. String index) {
  334. if(mapValue == null) {
  335. mapValue = new HashMap<>();
  336. }
  337. if(index != null){
  338. mapValue.put("index", index);
  339. }
  340. PageHelper.startPage(pageNum, pageSize);
  341. //分页查询数据
  342. List<Map<String, Object>> columnList = universalMapper.queryMaterialByLike(mapValue);
  343. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  344. return success(data);
  345. }
  346. @ApiModelProperty(value = "模糊查询批次")
  347. @ApiImplicitParams({
  348. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  349. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  350. @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
  351. })
  352. @PostMapping("/queryBatchByLike")
  353. public RESTfulResult queryBatchByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  354. Integer pageNum,
  355. Integer pageSize,
  356. Integer apiId,
  357. String index) {
  358. if(mapValue == null) {
  359. mapValue = new HashMap<>();
  360. }
  361. if(index != null){
  362. mapValue.put("index", index);
  363. }
  364. PageHelper.startPage(pageNum, pageSize);
  365. //分页查询数据
  366. List<Map<String, Object>> columnList = universalMapper.getBatchAndOrderMes(mapValue);
  367. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  368. return success(data);
  369. }
  370. @ApiModelProperty(value = "模糊查询批次")
  371. @ApiImplicitParams({
  372. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  373. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  374. @ApiImplicitParam(name = "apiId", value = "502", required = false, dataType = "BigDecimal")
  375. })
  376. @PostMapping("/selectPurchaseOrderForShip")
  377. public RESTfulResult selectPurchaseOrderForShip(@RequestBody(required = false) Map<String,Object> mapValue,
  378. Integer pageNum,
  379. Integer pageSize,
  380. Integer apiId,
  381. String index) {
  382. if(mapValue == null) {
  383. mapValue = new HashMap<>();
  384. }
  385. if(index != null){
  386. mapValue.put("index", index);
  387. }
  388. PageHelper.startPage(pageNum, pageSize);
  389. //分页查询数据
  390. List<Map<String, Object>> columnList = universalMapper.selectPurchaseOrderForShip(mapValue);
  391. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  392. return success(data);
  393. }
  394. @ApiModelProperty(value = "二程船结算用:查询发货通知的已下发批次")
  395. @ApiImplicitParams({
  396. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  397. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  398. @ApiImplicitParam(name = "apiId", value = "502", required = false, dataType = "BigDecimal")
  399. })
  400. @PostMapping("/getBatchOfNotice")
  401. public RESTfulResult getBatchOfNotice(@RequestBody(required = false) Map<String,Object> mapValue,
  402. Integer pageNum,
  403. Integer pageSize,
  404. Integer apiId,
  405. String index) {
  406. if(mapValue == null) {
  407. mapValue = new HashMap<>();
  408. }
  409. if(index != null){
  410. mapValue.put("index", index);
  411. }
  412. PageHelper.startPage(pageNum, pageSize);
  413. //分页查询数据
  414. List<Map<String, Object>> columnList = universalMapper.getBatchOfNotice(mapValue);
  415. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  416. return success(data);
  417. }
  418. @ApiModelProperty(value = "查询存在装船作业并且尚未计算水运费的批次")
  419. @ApiImplicitParams({
  420. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  421. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  422. @ApiImplicitParam(name = "apiId", value = "502", required = false, dataType = "BigDecimal")
  423. })
  424. @PostMapping("/findBatchHavingLoad")
  425. public RESTfulResult findBatchHavingLoad(@RequestBody(required = false) Map<String,Object> mapValue,
  426. Integer pageNum,
  427. Integer pageSize,
  428. Integer apiId,
  429. String index){
  430. if(mapValue == null) {
  431. mapValue = new HashMap<>();
  432. }
  433. if(index != null){
  434. mapValue.put("index", index);
  435. }
  436. PageHelper.startPage(pageNum, pageSize);
  437. //分页查询数据
  438. List<Map<String, Object>> columnList = universalMapper.findBatchHavingLoad(mapValue);
  439. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  440. return success(data);
  441. }
  442. @ApiModelProperty(value = "边输边查承运商")
  443. @PostMapping("/getCarrierMesByLike")
  444. public RESTfulResult getCarrierMesByLike(@RequestParam("index") String index) {
  445. List<Map<String, Object>> list = universalMapper.getCarrierMesByLike(index == null ? "" : index);
  446. return success(list);
  447. }
  448. @ApiModelProperty(value = "模糊查询收货单位")
  449. @ApiImplicitParams({
  450. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  451. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  452. @ApiImplicitParam(name = "apiId", value = "396", required = false, dataType = "BigDecimal")
  453. })
  454. @PostMapping("/queryConsigneeByLike")
  455. public RESTfulResult queryConsigneeByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  456. Integer pageNum,
  457. Integer pageSize,
  458. Integer apiId,
  459. String index) {
  460. if(mapValue == null) {
  461. mapValue = new HashMap<>();
  462. }
  463. if(index != null){
  464. mapValue.put("index", index);
  465. }
  466. PageHelper.startPage(pageNum, pageSize);
  467. //分页查询数据
  468. List<Map<String, Object>> columnList = universalMapper.queryConsigneeByLike(mapValue);
  469. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  470. return success(data);
  471. }
  472. @ApiModelProperty(value = "模糊查询物资信息")
  473. @ApiImplicitParams({
  474. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  475. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  476. @ApiImplicitParam(name = "apiId", value = "395", required = false, dataType = "BigDecimal")
  477. })
  478. @PostMapping("/selectAllMaterialName")
  479. public RESTfulResult selectAllMaterialName(@RequestBody(required = false) Map<String,Object> mapValue,
  480. Integer pageNum,
  481. Integer pageSize,
  482. Integer apiId,
  483. String index) {
  484. if(mapValue == null) {
  485. mapValue = new HashMap<>();
  486. }
  487. if(index != null && !"".equals(index) && !"null".equals(index)){
  488. mapValue.put("index", index);
  489. }
  490. PageHelper.startPage(pageNum, pageSize);
  491. //分页查询数据
  492. List<Map<String, Object>> columnList = universalMapper.selectAllMaterialName(mapValue);
  493. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  494. return success(data);
  495. }
  496. @ApiModelProperty(value = "返回sha1加密字符串")
  497. @RequestMapping(value = "/sha1DigestUtils", method = {RequestMethod.GET,RequestMethod.POST})
  498. public String sha1DigestUtils(String text){
  499. return universalService.sha1DigestUtils(text);
  500. }
  501. @ApiModelProperty(value = "查装货卸货点")
  502. @PostMapping("/selectUnloadingPoint")
  503. public List<Map<String, Object>> selectUnloadingPoint(String index) {
  504. String index1 = null;
  505. if(index != null && !"null".equals(index) && !"".equals(index)){
  506. index1 = "%" + index + "%";
  507. }
  508. return universalMapper.selectUnloadingPoint(index1);
  509. }
  510. @ApiModelProperty(value = "模糊查询承运商")
  511. @ApiImplicitParams({
  512. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  513. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  514. @ApiImplicitParam(name = "apiId", value = "412", required = false, dataType = "BigDecimal")
  515. })
  516. @PostMapping("/getCarrierListByLike")
  517. public RESTfulResult getCarrierListByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  518. Integer apiId,
  519. Integer pageNum,
  520. Integer pageSize,
  521. String index) {
  522. if(index != null){
  523. if(index.length() == 0){
  524. index = null;
  525. }else {
  526. index = "%" + index + "%";
  527. }
  528. }
  529. if (mapValue == null) {
  530. mapValue = new HashMap<>();
  531. }
  532. mapValue.put("index",index);
  533. PageHelper.startPage(pageNum, pageSize);
  534. //分页查询数据
  535. List<Map<String, Object>> columnList = universalMapper.getCarrierListByLike(mapValue);
  536. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  537. return success(data);
  538. }
  539. @ApiModelProperty(value = "所有门岗下拉框")
  540. @GetMapping("/getAllGatepost")
  541. public List<Map<String,Object>> getAllGatepost(){
  542. return universalMapper.getAllGatepost();
  543. }
  544. //通过承运商id获取userId
  545. @PostMapping("/getUserIdByCarrierId")
  546. public String getUserIdByCarrierId(@RequestBody Map<String,Object> map){
  547. //获取承运商id
  548. Integer carrierId =(Integer) map.get("carrierId");
  549. return universalMapper.getUserIdbyCarrierId(carrierId);
  550. }
  551. @ApiModelProperty(value = "已经在sso权限模块承运商下拉框")
  552. @GetMapping("/getAllCarrierIdForSso")
  553. public List<Map<String,Object>> getAllCarrierIdForSso(){
  554. return universalMapper.getAllCarrierIdForSso();
  555. }
  556. @ApiModelProperty(value = "模糊查询收货单位")
  557. @ApiImplicitParams({
  558. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  559. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  560. @ApiImplicitParam(name = "apiId", value = "418", required = false, dataType = "BigDecimal")
  561. })
  562. @PostMapping("/getConsigneeListByLike")
  563. public RESTfulResult getConsigneeListByLike(@RequestBody(required = false) Map<String,Object> mapValue,
  564. Integer apiId,
  565. Integer pageNum,
  566. Integer pageSize,
  567. String index) {
  568. if(index != null){
  569. if(index.length() == 0){
  570. index = null;
  571. }else {
  572. index = "%" + index + "%";
  573. }
  574. }
  575. if (mapValue == null) {
  576. mapValue = new HashMap<>();
  577. }
  578. mapValue.put("index",index);
  579. PageHelper.startPage(pageNum, pageSize);
  580. //分页查询数据
  581. List<Map<String, Object>> columnList = universalMapper.getConsigneeListByLike(mapValue);
  582. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  583. return success(data);
  584. }
  585. @ApiOperation("通过运输订单id查询销售订单审核状态")
  586. @PostMapping("/getSaleOrderStatus")
  587. public Integer getSaleOrderStatus(@RequestParam Integer orderId) {
  588. Integer saleStatus = universalMapper.getSaleOrderStatus(new BigDecimal(orderId));
  589. return saleStatus;
  590. }
  591. @ApiOperation("查询所有的汽车衡")
  592. @GetMapping("/getAllCalculateMes")
  593. public List<Map<String, Object>> getAllCalculateMes() {
  594. return universalMapper.getAllCalculateMes();
  595. }
  596. @ApiOperation("查询所有的焦炭子类")
  597. @GetMapping("/getAllMaterialCoke")
  598. public List<Map<String, Object>> getAllMaterialCoke() {
  599. return universalMapper.getAllMaterialCoke();
  600. }
  601. @ApiModelProperty(value = "边输边查车牌号")
  602. @PostMapping("/getCapacityByLike")
  603. public RESTfulResult getCapacityByLike(@RequestParam("index") String index) {
  604. List<Map<String, Object>> list = universalMapper.getCapacityByLike(index == null ? "" : index);
  605. return success(list);
  606. }
  607. @ApiModelProperty(value = "边输边查批次")
  608. @GetMapping("/getBatchByLike")
  609. public RESTfulResult getBatchByLike(@RequestParam("index") String index) {
  610. List<Map<String, Object>> list = universalMapper.getBatchByLike(index == null ? "" : index);
  611. return success(list);
  612. }
  613. @ApiModelProperty(value = "根据运力id查询所有承运商(下拉框)")
  614. @GetMapping("/getCarrierByCapacityId")
  615. public RESTfulResult getCarrierByCapacityId(@RequestParam("capacityId") Integer capacityId) {
  616. List<Map<String, Object>> list = universalMapper.getCarrierByCapacityId(new BigDecimal(capacityId));
  617. return success(list);
  618. }
  619. @ApiModelProperty(value = "根据收货客户查询承运商")
  620. @PostMapping("/getCarrierByConsignee")
  621. public RESTfulResult getCarrierByConsignee(@RequestBody Map<String,Object> mapValue) {
  622. Map<String, Object> map = universalService.getCarrierByConsignee(mapValue);
  623. return success(map);
  624. }
  625. @ApiModelProperty(value = "确认车牌号与承运商关系是否存在")
  626. @PostMapping("/isInCapacityCarrier")
  627. public RESTfulResult isInCapacityCarrier(@RequestBody Map<String,Object> mapValue) {
  628. Map<String,Object> map = universalService.isInCapacityCarrier(mapValue);
  629. BigDecimal capacityId = (BigDecimal) map.get("capacityId");
  630. BigDecimal capacityCarrierId = (BigDecimal) map.get("capacityCarrierId");
  631. if (capacityId == null) {
  632. return failed();
  633. }
  634. if (capacityCarrierId == null) {
  635. return failed(capacityId);
  636. }
  637. return success(map);
  638. }
  639. @ApiModelProperty(value = "得到所有油价联动计费公式(apiId:444)")
  640. @PostMapping("/getOilFormula")
  641. public RESTfulResult getOilFormula(@RequestBody(required = false) Map<String,Object> mapValue,
  642. Integer apiId,
  643. Integer pageNum,
  644. Integer pageSize,
  645. String con) {
  646. if (mapValue == null) {
  647. mapValue = new HashMap<>();
  648. }
  649. mapValue.put("con", con);
  650. PageHelper.startPage(pageNum, pageSize);
  651. //分页查询数据
  652. List<Map<String, Object>> columnList = universalMapper.getOilFormula(mapValue);
  653. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  654. return success(data);
  655. }
  656. @ApiModelProperty(value = "获得港口下拉框")
  657. @GetMapping("/getPortId")
  658. public RESTfulResult getPortId() {
  659. return success(universalService.getPortId());
  660. }
  661. @ApiModelProperty(value = "获取车牌号边输边查")
  662. @GetMapping("/getCapacityNumber")
  663. public RESTfulResult getCapacityNumber(String index) {
  664. if(index.length() < 3){
  665. return failed();
  666. }
  667. return success(universalService.getCapacityNumber(index));
  668. }
  669. @ApiModelProperty(value = "获得订单号及订单号下面物资")
  670. @GetMapping("/getOrderNumber")
  671. public RESTfulResult getOrderNumber(String capacityId) {
  672. return success(universalService.getOrderNumber(capacityId));
  673. }
  674. @ApiModelProperty(value = "根据订单查询物资")
  675. @GetMapping("/getMaterialIdByOrderId")
  676. public RESTfulResult getMaterialIdByOrderId(Integer orderId) {
  677. return success(universalService.getMaterialIdByOrderId(orderId));
  678. }
  679. @ApiOperation(value = "修改路段顺序号")
  680. @PostMapping("/updateLineSqe")
  681. public RESTfulResult updateLineSqe(@RequestBody Map<String,Object> map) {
  682. int i = universalMapper.updateLineSqe(map);
  683. return success(i);
  684. }
  685. @ApiModelProperty(value = "边输边查物资")
  686. @GetMapping("/getMaterialByLike")
  687. public RESTfulResult getMaterialByLike(@RequestParam("index") String index) {
  688. List<Map<String, Object>> list = universalMapper.getMaterialByLike(index == null ? "" : index);
  689. return success(list);
  690. }
  691. @ApiOperation(value="通过一个carrierSsoId获得承运商对象")
  692. @GetMapping("/getRmsCarrierByCarrierSsoId")
  693. public RESTfulResult getRmsCarrierByCarrierSsoId(String carrierSsoId){
  694. Map<String,Object> carrier= universalMapper.getRmsCarrierByCarrierSsoId(carrierSsoId);
  695. if (carrier==null){
  696. failed();
  697. }
  698. return success(carrier);
  699. }
  700. @ApiModelProperty(value = "模糊查询钢材物资")
  701. @ApiImplicitParams({
  702. @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
  703. @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
  704. @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
  705. })
  706. @PostMapping("/getSteelMaterial")
  707. public RESTfulResult getSteelMaterial(@RequestBody(required = false) Map<String, Object> mapValue,
  708. Integer pageNum,
  709. Integer pageSize,
  710. Integer apiId,
  711. String materialNameText,
  712. String materialSpecificationText,
  713. String materialModelText) {
  714. if (mapValue == null) {
  715. mapValue = new HashMap<>();
  716. }
  717. if (materialNameText != null && !materialNameText.equals("undefined") && !materialNameText.equals("null") && materialNameText != "" && !"".equals(materialNameText)) {
  718. mapValue.put("materialNameText", materialNameText);
  719. }
  720. if (materialSpecificationText != null && !materialSpecificationText.equals("undefined") && !materialSpecificationText.equals("null") && materialSpecificationText != "" && !"".equals(materialSpecificationText)) {
  721. mapValue.put("materialSpecificationText", materialSpecificationText);
  722. }
  723. PageHelper.startPage(pageNum, pageSize);
  724. //分页查询数据
  725. List<Map<String, Object>> columnList = universalMapper.getSteelMaterial(mapValue);
  726. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  727. return success(data);
  728. }
  729. @ApiOperation(value="得到所有省份")
  730. @PostMapping("/getAllProvince")
  731. public RESTfulResult getAllProvince(){
  732. List<Map<String,Object>> provinceList = universalMapper.getAllProvince();
  733. return success(provinceList);
  734. }
  735. @ApiOperation(value="根据省份得到下面的地级市")
  736. @PostMapping("/getDistrictByProvince")
  737. public RESTfulResult getDistrictByProvince(@RequestParam String addressProvince){
  738. List<Map<String,Object>> districtList = universalMapper.getDistrictByProvince(addressProvince);
  739. return success(districtList);
  740. }
  741. @ApiOperation(value="根据地级市得到下面的区/县")
  742. @PostMapping("/getTownByDistrict")
  743. public RESTfulResult getTownByDistrict(@RequestParam String addressDistrict){
  744. List<Map<String,Object>> townList = universalMapper.getTownByDistrict(addressDistrict);
  745. return success(townList);
  746. }
  747. @ApiOperation(value="根据省市县得到下面的详细地址")
  748. @PostMapping("/getPlaceByAllAddress")
  749. public RESTfulResult getPlaceByAllAddress(@RequestBody Map<String,Object> mapValue){
  750. List<Map<String,Object>> townList = universalMapper.getPlaceByAllAddress(mapValue);
  751. return success(townList);
  752. }
  753. @ApiOperation(value="获得销售员下拉框")
  754. @GetMapping("/getSalerList")
  755. public RESTfulResult getSalerList(){
  756. List<Map<String,Object>> salerList= universalMapper.getSalerList();
  757. return success(salerList);
  758. }
  759. @ApiOperation(value="通过收货客户匹配销售组")
  760. @PostMapping("/getSaleArea")
  761. public RESTfulResult getSaleArea(@RequestParam Integer receiveId) {
  762. String saleArea = universalMapper.getSaleArea(new BigDecimal(receiveId));
  763. return success(saleArea);
  764. }
  765. @ApiOperation(value = "质保书前端展示")
  766. @PostMapping("/getWarranty")
  767. public RESTfulResult getWarranty(@RequestParam("orderNumber") String orderNumber) {
  768. //List<String> list = universalService.getWarrantyAndPrint(orderNumber);
  769. List<String> list= universalService.getWarranty(orderNumber);
  770. if(list.get(0).equals("-1")){
  771. return failed(-1,"质保书正在紧张制作中,请耐心等待!");
  772. }else if(list.get(0).equals("-2")){
  773. return failed(-2,"该车还未装货");
  774. }
  775. return success(list);
  776. }
  777. @ApiOperation(value = "查询待分解计划数量")
  778. @PostMapping("/getPlanCount")
  779. public Integer getPlanCount(){
  780. return universalMapper.getPlanCount();
  781. }
  782. @ApiOperation(value = "查询承运起止地点下拉框")
  783. @GetMapping("/getTransRange")
  784. public RESTfulResult getTransRange(){
  785. return success(universalMapper.getTransRange());
  786. }
  787. // //测试质保书回显
  788. // @PostMapping("/getTest")
  789. // public RESTfulResult getTest(@RequestBody Map<String,Object> map){
  790. // List<String> list = universalService.getTest(map);
  791. // if(list.get(0).equals("0")){
  792. // return failed("质保书正在紧张制作中,请耐心等待!");
  793. // }
  794. // return success(list);
  795. // }
  796. @ApiOperation(value = "收货地址下匹配不到任何承运商")
  797. @GetMapping("/getNoListCarrier")
  798. public RESTfulResult getNoListCarrier() {
  799. return success(universalMapper.getNoListCarrier());
  800. }
  801. @ApiOperation(value = "查询承运起止地点下拉框")
  802. @GetMapping("/getNotReceiveOrderQuantity")
  803. public Integer getNotReceiveOrderQuantity(@RequestParam("capacityNumber") String capacityNumber){
  804. return universalMapper.getNotReceiveOrderQuantity(capacityNumber);
  805. }
  806. @ApiOperation(value = "西南水泥独用下拉框")
  807. @GetMapping("/getXiNanCarrier")
  808. public RESTfulResult getXiNanCarrier() {
  809. return success(universalMapper.getXiNanCarrier());
  810. }
  811. @ApiModelProperty(value = "边输边查发站到站")
  812. @GetMapping("/getArrivalByLike")
  813. public RESTfulResult getArrivalByLike(@RequestParam("index") String index){
  814. List <Map<String,Object>> list = universalMapper.getArrivalByLike(index == null ? "" : index);
  815. return success(list);
  816. }
  817. @ApiModelProperty(value = "司机APP订单小红点")
  818. @GetMapping("/getOrderNum")
  819. public int getOrderNum(@RequestParam("capacityNumber") String capacityNumber){
  820. return universalMapper.getOrderNum(capacityNumber);
  821. }
  822. @ApiModelProperty(value = "补录计量实绩")
  823. @PostMapping("/recordingWeightResult")
  824. public int recordingWeightResult(@RequestBody(required = false)List<Map<String,Object>>mapList){
  825. try {
  826. return universalService.recordingWeightResult(mapList);
  827. } catch (IOException e) {
  828. e.printStackTrace();
  829. }
  830. return 1;
  831. }
  832. @ApiOperation("删除计量实绩")
  833. @PostMapping("/linkageDeleteTransportOrder")
  834. public int linkageDeleteTransportOrder(@RequestBody(required = false)List<Map<String,Object>>mapList,
  835. @RequestBody(required = false)Map<String,Object> map){
  836. try {
  837. if(mapList == null && map != null) {
  838. List<Map<String,Object>> list = new ArrayList<>();
  839. list.add(map);
  840. return universalService.linkageDeleteTransportOrder(list);
  841. }
  842. return universalService.linkageDeleteTransportOrder(mapList);
  843. } catch (IOException e) {
  844. e.printStackTrace();
  845. }
  846. return 1;
  847. }
  848. @ApiOperation("删除计量实绩")
  849. @PostMapping("/linkageDeleteTransportOrder1")
  850. public int linkageDeleteTransportOrder(
  851. @RequestBody(required = false)Map<String,Object> map){
  852. try {
  853. if( map != null) {
  854. List<Map<String,Object>> list = new ArrayList<>();
  855. list.add(map);
  856. return universalService.linkageDeleteTransportOrder(list);
  857. }
  858. //return universalService.linkageDeleteTransportOrder(mapList);
  859. } catch (IOException e) {
  860. e.printStackTrace();
  861. }
  862. return 1;
  863. }
  864. @ApiModelProperty(value = "获取仓库月台")
  865. @GetMapping("/getSteelWarehouse")
  866. public List<Map<String, Object>> getSteelWarehouse(){
  867. return universalMapper.getSteelWarehouse();
  868. }
  869. @ApiOperation(value = "查询运力联系方式")
  870. @GetMapping("/getCapacityTel")
  871. public Map<String,Object>getCapacityTel(BigDecimal capacityId){
  872. return universalMapper.getCapacityTel(capacityId);
  873. }
  874. @ApiModelProperty(value = "边输边查收货客户")
  875. @PostMapping("/getConsigneeMesByLike")
  876. public RESTfulResult getConsigneeMesByLike(@RequestParam("index") String index) {
  877. List<Map<String, Object>> list = universalMapper.getConsigneeMesByLike(index == null ? "" : index);
  878. return success(list);
  879. }
  880. //根据收货客户userId,查询收货客户信息
  881. @ApiOperation(value = "根据userId查询收货客户信息")
  882. @GetMapping("/getConsigneeByuserid")
  883. public Map<String,Object>getConsigneeByuserid(String userId){
  884. return universalMapper.getConsigneeByuserid(userId);
  885. }
  886. //根据销售订单ID修改销售订单状态为上报
  887. @PostMapping("/updateSaleOrderStatusById")
  888. @ApiOperation(value = "根据销售订单id修改状态为未上报")
  889. public RESTfulResult updateSaleOrderStatusById(BigDecimal saleOrderId){
  890. return success(universalMapper.updateSaleOrderStatusById(saleOrderId));
  891. }
  892. //根据销售订单ID修改销售订单状态为上报
  893. @PostMapping("/updateDriverTel")
  894. @ApiOperation(value = "修改司机电话号码")
  895. public RESTfulResult updateDriverTel(@RequestBody Map<String,Object> map){
  896. try {
  897. int orderId = (int) map.get("orderId");
  898. String driverTel = (String) map.get("driverTel");
  899. //根据运输id去查找出运力ID更新司机电话
  900. universalMapper.updateCapacityDriverTel(orderId,driverTel);
  901. }catch (Exception e){
  902. e.printStackTrace();
  903. }
  904. return success(universalMapper.updateDriverTel(map));
  905. }
  906. @GetMapping("/getQueueCount")
  907. public RESTfulResult getQueueCount(){
  908. return success(universalMapper.getQueueCount());
  909. }
  910. @ApiModelProperty(value = "下拉下单客户的历史使用过的地址")
  911. @PostMapping("/getReceiverAllPlaceUsed")
  912. public RESTfulResult getReceiverAllPlaceUsed(@RequestParam Integer receiveId) {
  913. List<Map<String, Object>> list = universalMapper.getReceiverAllPlaceUsed(receiveId);
  914. return success(list);
  915. }
  916. @ApiModelProperty(value = "边输边查片区")
  917. @PostMapping("/getSaleAreaByLike")
  918. public RESTfulResult getSaleAreaByLike(@RequestParam("index") String index) {
  919. List<Map<String, Object>> list = universalMapper.getSaleAreaByLike(index == null ? "" : "%" + index + "%");
  920. return success(list);
  921. }
  922. @ApiModelProperty(value = "判断收货客户是否绑定片区")
  923. @PostMapping("/isReceiveHaveArea")
  924. public RESTfulResult isReceiveHaveArea(@RequestParam Integer receiveId) {
  925. BigDecimal areaId = universalMapper.isReceiveHaveArea(receiveId);
  926. if (areaId == null) {
  927. return failed("该下单客户未绑定销售片区!!!");
  928. }
  929. return success(areaId);
  930. }
  931. @ApiModelProperty(value = "下单客户绑定片区")
  932. @PostMapping("/bandSaleArea")
  933. public RESTfulResult bandSaleArea(@RequestBody Map<String,Object> map) {
  934. int result = universalMapper.bandSaleArea(map);
  935. return success(result);
  936. }
  937. @ApiOperation(value = "查询厂内钢材车辆作业总数")
  938. @GetMapping("/getSteelOrderNum")
  939. public RESTfulResult getSteelOrderNum(){
  940. int i = universalMapper.getSteelOrderNum();
  941. return success(i);
  942. }
  943. @ApiModelProperty(value = "边输边查收货地址")
  944. @PostMapping("/getPlaceAndAddress")
  945. public RESTfulResult getPlaceAndAddress(@RequestParam("index") String index) {
  946. List<Map<String, Object>> list = universalMapper.getPlaceAndAddress(index == null ? "" : index);
  947. return success(list);
  948. }
  949. @ApiModelProperty(value = "边输边查物资名称")
  950. @PostMapping("/getMaterialNameLike")
  951. public RESTfulResult getMaterialNameLike(@RequestParam("index") String index) {
  952. List<Map<String, Object>> list = universalMapper.getMaterialNameLike(index == null ? null : "%" + index + "%");
  953. return success(list);
  954. }
  955. @ApiModelProperty(value = "边输边查仓库")
  956. @GetMapping("/getWareHouseNameLike")
  957. public RESTfulResult getWareHouseNameLike(@RequestParam("index") String index){
  958. List<Map<String, Object>> list = universalMapper.getWareHouseNameLike(index == null ? null : "%" + index + "%");
  959. return success(list);
  960. }
  961. @ApiModelProperty(value = "边输边查物资规格型号")
  962. @PostMapping("/getSpecificationModelLike")
  963. public RESTfulResult getSpecificationModelLike(@RequestBody Map<String,Object> map) {
  964. List<Map<String, Object>> list = universalMapper.getSpecificationModelLike(map);
  965. return success(list);
  966. }
  967. @ApiOperation(value = "内转计重承运合同物资")
  968. @PostMapping("/getInwardWeightMaterial")
  969. public RESTfulResult getInwardWeightMaterial(@RequestBody(required = false) Map<String,Object> mapValue,
  970. Integer pageNum,
  971. Integer pageSize,
  972. Integer apiId,
  973. String index) {
  974. if(mapValue == null) {
  975. mapValue = new HashMap<>();
  976. }
  977. if(index != null){
  978. mapValue.put("index", index);
  979. }
  980. PageHelper.startPage(pageNum, pageSize);
  981. //分页查询数据
  982. List<Map<String, Object>> columnList = universalMapper.getInwardWeightMaterial(mapValue);
  983. PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
  984. return success(data);
  985. }
  986. @ApiOperation(value = "内转异地库查询发站")
  987. @GetMapping("/getInwardSendStation")
  988. public RESTfulResult getInwardSendStation(){
  989. return success(universalMapper.getInwardSendStation());
  990. }
  991. @ApiOperation(value = "获取入库实绩")
  992. @PostMapping("/getInwardInboundResult")
  993. public RESTfulResult getInwardInboundResult(@RequestBody Map<String,Object> map){
  994. List<Map<String,Object>> mapList = universalMapper.getInwardInboundResult(map);
  995. //遍历数组去查物资数据
  996. for(Map<String,Object>map1:mapList){
  997. BigDecimal orderId = DataChange.dataToBigDecimal(map1.get("orderId"));
  998. List<Map<String,Object>> materialList = universalMapper.getMaterialList(map1);
  999. for (Map<String,Object>materialMap:materialList){
  1000. BigDecimal materialId = DataChange.dataToBigDecimal(materialMap.get("materialId"));
  1001. //根据运输订单ID和物资ID去查询炉号
  1002. List<Map<String, Object>> luHaoNumberList = universalMapper.getLuhaoNum(orderId,materialId);
  1003. StringBuilder sb = new StringBuilder();
  1004. for (Map<String, Object> luHaoMap : luHaoNumberList) {
  1005. sb.append(luHaoMap.get("materialFurnaceNumber"));
  1006. sb.append("-");
  1007. sb.append(luHaoMap.get("materialNum"));
  1008. sb.append("/");
  1009. }
  1010. if(luHaoNumberList.size() > 0){
  1011. sb.deleteCharAt(sb.length() - 1);
  1012. materialMap.put("luhao",sb.toString());
  1013. }
  1014. }
  1015. map1.put("materialList",materialList);
  1016. }
  1017. return success(mapList);
  1018. }
  1019. @ApiOperation(value = "查询派车状态")
  1020. @PostMapping("/getDispachSwitch")
  1021. public RESTfulResult getDispachSwitch(){
  1022. return success(universalMapper.getDispachSwitch());
  1023. }
  1024. @ApiOperation(value = "修改派车开关")
  1025. @PostMapping("/updateDispachSwitch")
  1026. public RESTfulResult updateDispachSwitch(@RequestBody Map<String,Object> map){
  1027. return success(universalMapper.updateDispachSwitch(map));
  1028. }
  1029. @ApiOperation("动态调整放行限制")
  1030. @GetMapping("/getReleaseFlag")
  1031. public String getReleaseFlag() {
  1032. return universalMapper.getReleaseFlag();
  1033. }
  1034. @ApiOperation("根据名称查询收货客户")
  1035. @PostMapping("/getConsigneeInfo")
  1036. public Map<String,Object> getConsigneeInfo(String consigneeName){
  1037. return universalMapper.getConsigneeInfo(consigneeName);
  1038. }
  1039. @ApiOperation("收货客户查询")
  1040. @PostMapping("/getColumnNoRoutList")
  1041. public List<String> getColumnNoRoutList(@RequestBody(required = false) Map<String,Object> map) {
  1042. return universalMapper.getColumnNoRoutList(map);
  1043. }
  1044. }