AmsContractTruckPriceController.java 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.feign.ColumnDataFeign;
  3. import com.steerinfo.dil.feign.ESFeign;
  4. import com.steerinfo.dil.mapper.AmsContractTruckPriceMapper;
  5. import com.steerinfo.dil.model.AmsContractTransportPrice;
  6. import com.steerinfo.dil.service.IAmsContractTruckPriceService;
  7. import com.steerinfo.dil.util.BaseRESTfulController;
  8. import com.steerinfo.dil.util.ColumnDataUtil;
  9. import com.steerinfo.dil.util.DataChange;
  10. import com.steerinfo.dil.util.PageListAdd;
  11. import com.steerinfo.framework.controller.RESTfulResult;
  12. import com.steerinfo.framework.service.pagehelper.PageHelper;
  13. import io.swagger.annotations.ApiImplicitParam;
  14. import io.swagger.annotations.ApiImplicitParams;
  15. import io.swagger.annotations.ApiModelProperty;
  16. import io.swagger.annotations.ApiOperation;
  17. import org.springframework.beans.factory.annotation.Autowired;
  18. import org.springframework.web.bind.annotation.*;
  19. import java.math.BigDecimal;
  20. import java.text.ParseException;
  21. import java.text.SimpleDateFormat;
  22. import java.util.*;
  23. import java.util.stream.Collectors;
  24. /**
  25. * AmsContractTransportPrice RESTful接口:
  26. * @author generator
  27. * @version 1.0-SNAPSHORT 2021-09-06 07:10
  28. * 类描述
  29. * 修订历史:
  30. * 日期:2021-09-06
  31. * 作者:generator
  32. * 参考:
  33. * 描述:AmsContractTransportPrice RESTful接口
  34. * @see null
  35. * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  36. */
  37. @RestController
  38. @RequestMapping("/${api.version}/amscontracttruckprices")
  39. public class AmsContractTruckPriceController extends BaseRESTfulController {
  40. @Autowired
  41. IAmsContractTruckPriceService amsContractTruckPriceService;
  42. @Autowired
  43. ColumnDataFeign columnDataFeign;
  44. @Autowired
  45. ColumnDataUtil columnDataUtil;
  46. @Autowired
  47. ESFeign esFeign;
  48. @Autowired
  49. AmsContractTruckPriceMapper amsContractTruckPriceMapper;
  50. @ApiOperation(value="查询汽运单价信息")
  51. @ApiImplicitParams({
  52. @ApiImplicitParam(name = "apiId(109)", value = "表头", required = false, dataType = "Interger")
  53. })
  54. @PostMapping("/getAmsContractTransportPrice1")
  55. public RESTfulResult getAmsContractTransportPrice(@RequestBody(required=false) Map<String,Object> mapValue,
  56. Integer apiId,
  57. Integer pageNum,
  58. Integer pageSize,
  59. String con,
  60. Integer deleted){
  61. if(deleted != null) {
  62. mapValue.put("deleted", deleted);
  63. }
  64. if(con !=null){
  65. mapValue.put("con",con);
  66. }
  67. if(pageNum==null&&pageSize==null){
  68. }else {
  69. PageHelper.startPage(pageNum, pageSize);
  70. }
  71. List<Map<String, Object>> amsContractTransportPrice1 = amsContractTruckPriceService.getAmsContractTransportPrice(mapValue);
  72. //PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,amsContractTransportPrice1);
  73. List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
  74. int i=0;
  75. for (Map<String, Object> columnData : columnDataList) {
  76. //每个表头字段的过滤条件
  77. if(columnData.get("isFilter") == null || DataChange.dataToBigDecimal(columnData.get("isFilter")).intValue() == 1) {
  78. columnData.put("filters", setListMap(amsContractTransportPrice1, columnData.get("prop").toString()));
  79. if (i==0){
  80. columnData.put("min-width",62);
  81. }else if (i==1){
  82. columnData.put("min-width",69);
  83. }else if (i==3){
  84. columnData.put("min-width",130);
  85. }else if (i==4){
  86. columnData.put("min-width",138);
  87. }else if (i==5){
  88. columnData.put("min-width",82);
  89. }else if (i==6){
  90. columnData.put("min-width",154);
  91. }else if (i==7){
  92. columnData.put("min-width",324);
  93. }
  94. i++;
  95. }
  96. }
  97. PageListAdd pageList = new PageListAdd(amsContractTransportPrice1);
  98. pageList.setColumnData(columnDataList);
  99. return success(pageList);
  100. }
  101. @ApiOperation(value="删除单价信息")
  102. @PostMapping("/deleteSalelPrice")
  103. public RESTfulResult deleteSalelPrice(@RequestBody(required=false) Map<String,Object> mapValue){
  104. int i = amsContractTruckPriceService.deleteSalePrice(mapValue);
  105. if (i>0){
  106. return success("删除成功");
  107. }else{
  108. return failed("删除失败");
  109. }
  110. }
  111. @ApiModelProperty(value = "更新卸货地址")
  112. @PostMapping("/updateaddressDeliveryAddress")
  113. public RESTfulResult updateaddressDeliveryAddress(@RequestBody(required = false) Map<String,Object> mapValue) {
  114. int i = amsContractTruckPriceService.updateaddressDeliveryAddress(mapValue);
  115. if (i>0){
  116. return success("更新卸货地址成功");
  117. }else {
  118. return failed("更新卸货地址失败");
  119. }
  120. }
  121. @ApiModelProperty(value = "更新单价")
  122. @PostMapping("/updatePriceValue")
  123. public RESTfulResult updatePriceValue(@RequestBody(required = false) Map<String,Object> mapValue) {
  124. int i = amsContractTruckPriceService.updatePriceValue(mapValue);
  125. if (i>0){
  126. return success("更新单价成功");
  127. }else {
  128. return failed("更新单价失败");
  129. }
  130. }
  131. @ApiModelProperty(value = "查询承运商")
  132. @PostMapping("/getCarrierListByAddress")
  133. public RESTfulResult getCarrierListByAddress(@RequestBody(required = false) Map<String,Object> mapValue){
  134. List<Map<String, Object>> carrierListByAddress = amsContractTruckPriceService.getCarrierListByAddress(mapValue);
  135. return success(carrierListByAddress);
  136. }
  137. @ApiModelProperty(value = "修改承运商")
  138. @PostMapping("/updateCarrierName")
  139. public RESTfulResult updateCarrierName(@RequestBody(required = false) Map<String,Object> mapValue) throws ParseException {
  140. int i = amsContractTruckPriceService.updateCarrierName(mapValue);
  141. if (i>0){
  142. return success("修改承运商成功");
  143. }else {
  144. return failed("修改承运商失败");
  145. }
  146. }
  147. @ApiModelProperty(value = "模糊查询承运商")
  148. @PostMapping("/getCarrierListByPrice")
  149. public RESTfulResult getCarrierListByPrice(@RequestBody(required = false) Map<String,Object> mapValue) {
  150. String index = (String) mapValue.get("index");
  151. if(index != null){
  152. if(index.length() == 0){
  153. index = null;
  154. }else {
  155. index = "%" + index + "%";
  156. }
  157. }
  158. mapValue.put("index",index);
  159. /*Integer pageNum = (Integer) mapValue.get("pageNum");
  160. Integer pageSize = (Integer) mapValue.get("pageSize");
  161. if (pageNum==null){
  162. mapValue.put("pageNum",1);
  163. }
  164. if (pageSize==null){
  165. mapValue.put("pageSize",10);
  166. }*/
  167. List<Map<String, Object>> carrierListByPrice = amsContractTruckPriceService.getCarrierListByPrice(mapValue);
  168. return success(carrierListByPrice);
  169. }
  170. @ApiOperation(value="查询汽运单价信息")
  171. @ApiImplicitParams({
  172. @ApiImplicitParam(name = "apiId(519)", value = "表头", required = false, dataType = "Interger")
  173. })
  174. @PostMapping("/getAmsContractTransportPriceForDetail")
  175. public RESTfulResult getAmsContractTransportPriceForDetail(@RequestBody(required=false) Map<String,Object> mapValue,
  176. Integer apiId,
  177. Integer pageNum,
  178. Integer pageSize,
  179. String con,String userId) throws ParseException {
  180. if (con != null && !con.equals("undefined")) {
  181. mapValue.put("con","%" + con + "%");
  182. }
  183. if (userId != null && !userId.equals("undefined")) {
  184. //查询承运商ID
  185. String carrierName1 = amsContractTruckPriceService.getCarrierNameForDetail(userId);
  186. mapValue.put("carrierName1","%" + carrierName1 + "%");
  187. }
  188. //1.先查询出收货地址的所有收货ID
  189. List<Map<String, Object>> receiveAddress = amsContractTruckPriceService.getReceiveAddressId(mapValue);
  190. //2.查询出该收货所有的单价信息
  191. List<Map<String, Object>> saleOrderList = amsContractTruckPriceService.getAmsContractTransportPriceForDetail(mapValue);
  192. //3.遍历查询出最近的单价信息
  193. List<Map<String,Object>> salePriceList=new LinkedList<>();
  194. //格式化
  195. SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
  196. //获取数据的订单时间
  197. Date orderTime = simpleDateFormat.parse((String) mapValue.get("orderTime"));
  198. //最近的留下
  199. for (Map<String, Object> address : receiveAddress) {
  200. String address1 = (String) address.get("address");
  201. //BigDecimal placeId = bigDecimal;
  202. Map<String,Object> map1=new HashMap<>();
  203. int flag=0;
  204. for (Map<String, Object> stringObjectMap : saleOrderList) {
  205. String address2 = (String) stringObjectMap.get("address");
  206. //单价的执行日期
  207. Date priceDate = (Date) stringObjectMap.get("priceDate");
  208. String format = simpleDateFormat.format(priceDate);
  209. Date parse = simpleDateFormat.parse(format);
  210. //Date parse1 = simpleDateFormat.parse("2022-12-10")
  211. if (parse.before(orderTime)||parse.equals(orderTime)){
  212. if (address2.equals(address1)){
  213. flag=1;
  214. if (map1.size()==0){
  215. map1.putAll(stringObjectMap);
  216. }else{
  217. //比较日期(如果日期在存入的日期之后,则存入该日期)
  218. Date priceDate1 = (Date) map1.get("priceDate");
  219. String format1 = simpleDateFormat.format(priceDate1);
  220. Date parse1 = simpleDateFormat.parse(format1);
  221. if (parse.after(parse1)){
  222. map1.clear();
  223. map1.putAll(stringObjectMap);
  224. }
  225. }
  226. }
  227. }
  228. }
  229. if (flag==1){
  230. salePriceList.add(map1);
  231. }
  232. }
  233. return success(salePriceList);
  234. }
  235. @ApiOperation(value="查询内转汽运单价信息")
  236. @ApiImplicitParams({
  237. @ApiImplicitParam(name = "apiId(109)", value = "表头", required = false, dataType = "Interger")
  238. })
  239. @PostMapping("/getInwardContractPrice")
  240. public RESTfulResult getInwardContractPrice(@RequestBody(required=false) Map<String,Object> mapValue,
  241. Integer apiId,
  242. Integer pageNum,
  243. Integer pageSize,
  244. Integer deleted,
  245. String con){
  246. if(deleted != null) {
  247. mapValue.put("deleted", deleted);
  248. }
  249. if (con != null && !con.equals("undefined")) {
  250. mapValue.put("con","%" + con + "%");
  251. }
  252. PageHelper.startPage(pageNum,pageSize);
  253. if ("materialNames".equals(mapValue.get("orderField"))){
  254. mapValue.put("orderField",null);
  255. }
  256. List<Map<String, Object>> amsContractTransportPrice1 = amsContractTruckPriceService.getInwardContractPrice(mapValue);
  257. if (mapValue.get("materialNames")!=null && !"".equals(mapValue.get("materialNames"))) {
  258. String materialNames = mapValue.get("materialNames").toString();
  259. List<Map<String, Object>> amsContractTransportPrice2=new ArrayList<>();
  260. amsContractTransportPrice1.forEach(map->{
  261. if (map.get("materialNames")!=null && !"".equals(map.get("materialNames"))) {
  262. if (materialNames.equals("["+map.get("materialNames")+"]")) {
  263. amsContractTransportPrice2.add(map);
  264. }
  265. }
  266. });
  267. amsContractTransportPrice1=amsContractTransportPrice2;
  268. }
  269. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,amsContractTransportPrice1);
  270. return success(pageList);
  271. }
  272. /**
  273. * 新增汽运单价
  274. * @param mapValue
  275. * @return
  276. */
  277. @ApiOperation(value="新增汽运单价")
  278. @ApiImplicitParams({
  279. @ApiImplicitParam(name = "amsContractTransportPrice", value = "销售订单对象", required = false, dataType = "AmsContractTransportPrice")
  280. })
  281. @PostMapping(value = "/addAmsContractTransportPrice1")
  282. public RESTfulResult addAmsContractTransportPrice(@RequestBody(required = false) Map<String,Object> mapValue){
  283. int i = amsContractTruckPriceService.addAmsContractTransportPrice(mapValue);
  284. return success(i);
  285. }
  286. /**
  287. * 新增内转汽运单价
  288. * @param mapValue
  289. * @return
  290. */
  291. @ApiOperation(value="新增内转汽运单价")
  292. @ApiImplicitParams({
  293. @ApiImplicitParam(name = "amsContractTransportPrice", value = "销售订单对象", required = false, dataType = "AmsContractTransportPrice")
  294. })
  295. @PostMapping(value = "/insertInwardPrice")
  296. public RESTfulResult insertInwardPrice(@RequestBody(required = false) Map<String,Object> mapValue){
  297. int i = amsContractTruckPriceService.insertInwardPrice(mapValue);
  298. return success(i);
  299. }
  300. /**
  301. * 通过主键删除汽运单价
  302. * @param priceId
  303. * @return
  304. */
  305. @ApiOperation(value="通过主键删除汽运单价")
  306. @ApiImplicitParams({
  307. @ApiImplicitParam(name = "priceId", value = "主键Id", required = false, dataType = "java.math.BigDecimal")
  308. })
  309. @PostMapping(value = "/deleteAmsContractTransportPrice1")
  310. public RESTfulResult deleteAmsContractTransportPrice(BigDecimal priceId){
  311. int i = amsContractTruckPriceService.deleteAmsContractTransportPrice(priceId);
  312. return success(i);
  313. }
  314. /**
  315. * 通过主键渲染汽运单价信息
  316. * @param priceId
  317. * @return
  318. */
  319. @ApiOperation(value="通过主键渲染汽运单价信息")
  320. @ApiImplicitParams({
  321. @ApiImplicitParam(name = "priceId", value = "主键Id", required = false, dataType = "java.math.BigDecimal")
  322. })
  323. @PostMapping(value = "/getAmsContractTransportPriceByPriceId1")
  324. public RESTfulResult getAmsContractTransportPriceByPriceId(@RequestParam BigDecimal priceId){
  325. List<Map<String, Object>> maps = amsContractTruckPriceService.selectByPriceId(priceId);
  326. return success(maps);
  327. }
  328. /**
  329. * 通过主键修改汽运单价
  330. * @param amsContractTransportPrice
  331. * @return
  332. */
  333. @ApiOperation(value="通过主键修改汽运单价")
  334. @ApiImplicitParams({
  335. @ApiImplicitParam(name = "amsContractTransportPrice", value = "销售订单对象", required = false, dataType = "AmsContractTransportPrice")
  336. })
  337. @PostMapping(value = "/updateAmsContractTransportPrice1")
  338. public RESTfulResult updateAmsContractTransportPrice(@RequestParam AmsContractTransportPrice amsContractTransportPrice){
  339. int i = amsContractTruckPriceService.updateAmsContractTransportPrice(amsContractTransportPrice);
  340. return success(i);
  341. }
  342. /**
  343. * 油价联动导致运价变动,批量修改运价
  344. * @param
  345. * @return
  346. */
  347. @ApiOperation(value="油价联动导致运价变动,批量修改运价")
  348. @ApiImplicitParams({
  349. })
  350. @PostMapping(value = "/batchUpdateTransportPriceByOilPrice1")
  351. public RESTfulResult batchUpdateTransportPriceByOilPrice(@RequestBody Map<String,Object> map) throws ParseException {
  352. int i = amsContractTruckPriceService.batchUpdateTransportPriceByOilPrice(map);
  353. return success(i);
  354. }
  355. /**
  356. * 获取承运商名称
  357. * @param
  358. * @return
  359. */
  360. @ApiOperation(value="获取承运商名称")
  361. @ApiImplicitParams({
  362. })
  363. @GetMapping(value = "/getCarrierName")
  364. public RESTfulResult getCarrierName(){
  365. return success(amsContractTruckPriceService.getCarrierName());
  366. }
  367. /**
  368. * 获取线路编号
  369. * @param
  370. * @return
  371. */
  372. @ApiOperation(value="获取线路编号")
  373. @ApiImplicitParams({
  374. })
  375. @GetMapping(value = "/getLineNo")
  376. public RESTfulResult getLineNo(){
  377. return success(amsContractTruckPriceService.getLineNo());
  378. }
  379. /**
  380. * 获取运力编号
  381. * @param
  382. * @return
  383. */
  384. @ApiOperation(value="获取运力编号")
  385. @ApiImplicitParams({
  386. })
  387. @GetMapping(value = "/getCapacityNumber")
  388. public RESTfulResult getCapacityNumber(){
  389. return success(amsContractTruckPriceService.getCapacityNumber());
  390. }
  391. /**
  392. * 获取收货地址
  393. * @param
  394. * @return
  395. */
  396. @ApiOperation(value="获取收货地址")
  397. @ApiImplicitParams({
  398. @ApiImplicitParam(name = "apiId" ,value = "255")
  399. })
  400. @PostMapping (value = "/getAddressDeliveryAddress")
  401. public RESTfulResult getAddressDeliveryAddress(@RequestBody(required=false) Map<String,Object> mapValue,
  402. Integer apiId,
  403. Integer pageNum,
  404. Integer pageSize,
  405. String con){
  406. if (con != null && !con.equals("undefined")) {
  407. mapValue.put("con","%" + con + "%");
  408. }
  409. //不分页筛选数据
  410. PageHelper.startPage(pageNum,pageSize);
  411. //分页数据
  412. List<Map<String, Object>> saleOrderList = amsContractTruckPriceService.getAddressDeliveryAddress(mapValue);
  413. List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
  414. int i=0;
  415. for (Map<String, Object> columnData : columnDataList) {
  416. //每个表头字段的过滤条件
  417. columnData.put("filters", setListMap(saleOrderList, columnData.get("prop").toString()));
  418. if (i==0){
  419. columnData.put("min-width","78px");
  420. }else if (i==2){
  421. columnData.put("min-width","94px");
  422. }
  423. i++;
  424. }
  425. PageListAdd pageList = new PageListAdd(saleOrderList);
  426. pageList.setColumnData(columnDataList);
  427. //PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,saleOrderList);
  428. return success(pageList);
  429. }
  430. private Set<Map<String, Object>> setListMap(List<Map<String, Object>> list, String name) {
  431. Set<Map<String, Object>> setString = new HashSet<>();
  432. for (Map<String, Object> map : list) {//遍历每条数据
  433. Map<String, Object> map1 = new HashMap<>();
  434. //map.get(name)获取每条数据中对应表头字段的数据
  435. map1.put("text", map.get(name));
  436. if (map.get(name) != null) {
  437. map1.put("value", map.get(name));
  438. setString.add(map1);
  439. }
  440. }
  441. return setString;
  442. }
  443. /**
  444. * 获取货物类型
  445. * @param
  446. * @return
  447. */
  448. @ApiOperation(value="获取货物类型")
  449. @ApiImplicitParams({
  450. })
  451. @GetMapping(value = "/getCargoName")
  452. public RESTfulResult getCargoName(){
  453. return success(amsContractTruckPriceService.getCargoName());
  454. }
  455. /**
  456. * 获取油品名称
  457. * @param
  458. * @return
  459. */
  460. @ApiOperation(value="获取油品名称")
  461. @ApiImplicitParams({
  462. })
  463. @GetMapping(value = "/getOilTypeName")
  464. public RESTfulResult getOilTypeName(){
  465. return success(amsContractTruckPriceService.getOilTypeName());
  466. }
  467. @ApiModelProperty(value = "边输边查具体地址")
  468. @PostMapping("/getRealAddressByLike")
  469. public RESTfulResult getRealAddressByLike(@RequestParam Integer addressId,@RequestParam String index){
  470. if (index != null ) {
  471. if (index.length() == 0 || index.equals("undefined")) {
  472. index = null;
  473. }
  474. else {
  475. index = "%" + index + "%";
  476. }
  477. }
  478. Map<String,Object> map = new HashMap<>();
  479. map.put("addressId",addressId);
  480. map.put("index",index);
  481. List<Map<String,Object>> mapList = amsContractTruckPriceService.getRealAddressByLike(map);
  482. return success(mapList);
  483. }
  484. @ApiOperation("通过物资,车型,承运起止范围匹配运输单价")
  485. @PostMapping("/getInwardPriceBy")
  486. public Map<String,Object> getInwardPriceBy(@RequestBody(required = false) Map<String,Object> mapvalue){
  487. //接受结算是内转计重还是计时还是计数
  488. String settleMentType = (String) mapvalue.get("requirementType");
  489. String insertUpdateRemark = (String) mapvalue.get("insertUpdateRemark");
  490. BigDecimal type = null;
  491. if("计重".equals(settleMentType)){
  492. if(insertUpdateRemark!=null && !"".equals(insertUpdateRemark) && insertUpdateRemark.contains("计时且过计量")){
  493. //计重且计时,走计时流程
  494. type = new BigDecimal(5);
  495. }else{
  496. //在单价表里内转计重是2
  497. type = new BigDecimal(2);
  498. }
  499. }else if("计时".equals(settleMentType)){
  500. //在单价表里内转计时是5
  501. type = new BigDecimal(5);
  502. }else if("计次".equals(settleMentType)){
  503. //在单价表里内转计时是6
  504. type = new BigDecimal(6);
  505. }
  506. List<Map<String,Object>> mapList=new LinkedList<>();
  507. try{
  508. mapvalue.put("type",type);
  509. mapList=mapList = amsContractTruckPriceService.selectInwardPrice(mapvalue);
  510. }catch (Exception e){
  511. System.out.println("e"+e.getMessage());
  512. }
  513. if(mapList.size()!=0){
  514. return mapList.get(0);
  515. }
  516. else{
  517. return null;
  518. }
  519. }
  520. @ApiOperation(value = "承运起止范围与装货点")
  521. @PostMapping("/getRangePoint")
  522. public RESTfulResult getRangePoint(@RequestBody(required = false)Map<String,Object>mapValue,
  523. Integer apiId,
  524. Integer pageNum,
  525. Integer pageSize,
  526. String con){
  527. if (con != null && !con.equals("undefined")) {
  528. mapValue.put("con","%" + con + "%");
  529. }
  530. //不分页筛选数据
  531. PageHelper.startPage(pageNum,pageSize);
  532. //分页数据
  533. List<Map<String, Object>> rangePointList = amsContractTruckPriceService.getRangePoint(mapValue);
  534. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,rangePointList);
  535. return success(pageList);
  536. }
  537. @ApiOperation(value = "插入承运起止范围与装货点")
  538. @PostMapping("/insertLineNodePoint")
  539. public RESTfulResult insertLineNodePoint(@RequestBody(required = false)Map<String,Object>map){
  540. return success(amsContractTruckPriceService.insertLineNodePoint(map));
  541. }
  542. @ApiOperation("根据汽运ID修改单价")
  543. @PostMapping("updatePriceById")
  544. public RESTfulResult updatePriceById(@RequestBody(required = false) Map<String,Object> map) {
  545. //
  546. int i = amsContractTruckPriceService.updatePriceById(map);
  547. return success(i);
  548. }
  549. @ApiOperation(value = "查询出收货地址ID")
  550. @PostMapping("/queryPlaceId")
  551. public BigDecimal queryPlaceId(@RequestBody(required = false) BigDecimal bigDecimal){
  552. List<Map<String, Object>> maps = amsContractTruckPriceMapper.selectByPriceId(bigDecimal);
  553. BigDecimal b=BigDecimal.ZERO;
  554. for (Map<String, Object> map : maps) {
  555. b = (BigDecimal) map.get("PLACE_ID");
  556. }
  557. return b;
  558. }
  559. @ApiOperation(value="修改内转汽运单价")
  560. @PostMapping("/updateTransPrice")
  561. public RESTfulResult updateTransPrice(@RequestBody(required=false) Map<String,Object> map){
  562. int i = amsContractTruckPriceService.updatePriceByPriceId(map);
  563. return success(i);
  564. }
  565. @ApiOperation(value="查询物资")
  566. @PostMapping("/getwz")
  567. public RESTfulResult getwz(@RequestBody(required=false) Map<String,Object> map){
  568. List<Map<String, Object>> i = amsContractTruckPriceService.getwz(map);
  569. return success(i);
  570. }
  571. @ApiOperation(value="查询联动公式数据")
  572. @PostMapping("/getcargonameId")
  573. public RESTfulResult getcargonameId(@RequestBody(required=false) Map<String,Object> map){
  574. Map<String, Object> i = amsContractTruckPriceService.getcargonameId(map);
  575. return success(i);
  576. }
  577. }