StatisticalReportController.java 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.service.impl.StatisticalReportImpl;
  3. import com.steerinfo.dil.util.BaseRESTfulController;
  4. import com.steerinfo.dil.util.ColumnDataUtil;
  5. import com.steerinfo.dil.util.DataChange;
  6. import com.steerinfo.dil.util.PageListAdd;
  7. import com.steerinfo.framework.controller.RESTfulResult;
  8. import com.steerinfo.framework.service.pagehelper.PageHelper;
  9. import io.swagger.annotations.ApiImplicitParam;
  10. import io.swagger.annotations.ApiImplicitParams;
  11. import io.swagger.annotations.ApiOperation;
  12. import oracle.jdbc.proxy.annotation.Post;
  13. import org.springframework.beans.factory.annotation.Autowired;
  14. import org.springframework.web.bind.annotation.*;
  15. import java.math.BigDecimal;
  16. import java.text.SimpleDateFormat;
  17. import java.util.*;
  18. /**
  19. * @ author :TXF
  20. * @ time :2021/12/14 18:05
  21. */
  22. @RestController
  23. @RequestMapping("/${api.version}/statisticalReport")
  24. public class StatisticalReportController extends BaseRESTfulController {
  25. @Autowired
  26. StatisticalReportImpl statisticalReportService;
  27. @Autowired
  28. ColumnDataUtil columnDataUtil;
  29. private final SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
  30. private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  31. @ApiOperation(value="查询辅料燃料统计报表")
  32. @ApiImplicitParams({
  33. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  34. @ApiImplicitParam(name = "apiId(220)", value = "动态表头", required = false, dataType = "Integer"),
  35. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  36. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  37. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  38. })
  39. @PostMapping("/getRLFLReport")
  40. public RESTfulResult getRLFLReport(@RequestBody(required=false) Map<String,Object> mapValue,
  41. Integer apiId,
  42. Integer pageNum,
  43. Integer pageSize,
  44. String startTime,
  45. String endTime,
  46. Integer orderType,
  47. String con
  48. ){
  49. mapValue.put("orderTypee", orderType);
  50. if (con!=null && !"null".equals(con) && !"".equals(con)){
  51. mapValue.put("con",con);
  52. }
  53. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  54. PageHelper.startPage(pageNum, pageSize);
  55. //分页数据
  56. List<Map<String, Object>> report = statisticalReportService.getRLFLReport(mapValue);
  57. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,report);
  58. return success(pageList);
  59. }
  60. @ApiOperation(value="查询销售统计报表")
  61. @ApiImplicitParams({
  62. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  63. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  64. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  65. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  66. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  67. })
  68. @PostMapping("/getAllSaleReport")
  69. public RESTfulResult getAllSaleReport(@RequestBody(required=false) Map<String,Object> mapValue,
  70. Integer apiId,
  71. Integer pageNum,
  72. Integer pageSize,
  73. String startTime,
  74. String endTime,
  75. String carrierSsoId,
  76. Integer orderType,
  77. Integer shipperId,
  78. String receiveName,
  79. String materialName,
  80. String wareHouse
  81. ){
  82. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  83. if(carrierSsoId != null){
  84. if(!"null".equals(carrierSsoId)){
  85. mapValue.put("carrierSsoId", carrierSsoId);
  86. }
  87. }
  88. if (receiveName != null && !"null".equals(receiveName)) {
  89. mapValue.put("receivName","%" + receiveName + "%");
  90. }
  91. if (materialName != null && !"".equals(materialName) && !"null".equals(materialName)) {
  92. mapValue.put("remark","%" + materialName + "%");
  93. }
  94. if (wareHouse != null && !"".equals(wareHouse) && !"null".equals(wareHouse)) {
  95. mapValue.put("wareHouse","%" + wareHouse + "%");
  96. }
  97. mapValue.put("orderTypee",orderType);
  98. mapValue.put("shipperId",shipperId);
  99. if(orderType==1 && mapValue.get("orderField")==null){
  100. //如果没有使用排序且查询的表格类型为销售钢材内部专用表格,默认规格排序
  101. mapValue.put("orderField","materialCode");
  102. mapValue.put("orderType","desc");
  103. }
  104. PageHelper.startPage(pageNum, pageSize);
  105. //分页数据
  106. List<Map<String, Object>> report = statisticalReportService.getAllSaleReport(mapValue);
  107. PageListAdd pageList = columnDataUtil.tableColumnData5(apiId, null, report);
  108. return success(pageList);
  109. }
  110. @ApiOperation(value="查询销售统计报表")
  111. @ApiImplicitParams({
  112. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  113. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  114. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  115. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  116. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  117. })
  118. @PostMapping("/getAllSaleReportNew")
  119. public RESTfulResult getAllSaleReportNew(@RequestBody(required=false) Map<String,Object> mapValue,
  120. Integer apiId,
  121. Integer pageNum,
  122. Integer pageSize,
  123. String startTime,
  124. String endTime,
  125. String carrierSsoId,
  126. Integer orderType,
  127. Integer shipperId,
  128. String receiveName,
  129. String materialName,
  130. String wareHouse
  131. ){
  132. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  133. if(carrierSsoId != null){
  134. if(!"null".equals(carrierSsoId)){
  135. mapValue.put("carrierSsoId", carrierSsoId);
  136. }
  137. }
  138. if (receiveName != null && !"null".equals(receiveName)) {
  139. mapValue.put("receivName","%" + receiveName + "%");
  140. }
  141. if (materialName != null && !"".equals(materialName) && !"null".equals(materialName)) {
  142. mapValue.put("remark","%" + materialName + "%");
  143. }
  144. if (wareHouse != null && !"".equals(wareHouse) && !"null".equals(wareHouse)) {
  145. mapValue.put("wareHouse","%" + wareHouse + "%");
  146. }
  147. mapValue.put("orderTypee",orderType);
  148. mapValue.put("shipperId",shipperId);
  149. if(orderType==1 && mapValue.get("orderField")==null){
  150. //如果没有使用排序且查询的表格类型为销售钢材内部专用表格,默认规格排序
  151. mapValue.put("orderField","materialCode");
  152. mapValue.put("orderType","desc");
  153. }
  154. PageHelper.startPage(pageNum, pageSize);
  155. //分页数据
  156. List<Map<String, Object>> report = statisticalReportService.getAllSaleReport(mapValue);
  157. PageListAdd pageList = columnDataUtil.tableColumnData5(apiId, null, report);
  158. return success(pageList);
  159. }
  160. @ApiOperation(value="查询销售统计报表筛选过后的总净重")
  161. @ApiImplicitParams({
  162. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  163. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  164. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  165. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  166. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  167. })
  168. @PostMapping("/getAllSaleReportTotal")
  169. public RESTfulResult getAllSaleReportTotal(@RequestBody(required=false) Map<String,Object> mapValue,
  170. String startTime,
  171. String endTime,
  172. String carrierSsoId
  173. ){
  174. if(carrierSsoId != null){
  175. if(!"null".equals(carrierSsoId)){
  176. mapValue.put("carrierSsoId", carrierSsoId);
  177. }
  178. }
  179. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  180. List<Map<String, Object>> allReport = statisticalReportService.getAllSaleReportNum(mapValue);
  181. //获取销售统计报表筛选过后的总净重
  182. BigDecimal AllResultNetWeight = new BigDecimal(0);
  183. for (Map<String, Object> stringObjectMap : allReport) {
  184. if(stringObjectMap.get("resultNetWeight")!=null) {
  185. AllResultNetWeight = AllResultNetWeight.add(new BigDecimal(stringObjectMap.get("resultNetWeight").toString()));
  186. }
  187. }
  188. return success(AllResultNetWeight);
  189. }
  190. @ApiOperation(value="查询零星物资进厂统计报表")
  191. @ApiImplicitParams({
  192. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  193. @ApiImplicitParam(name = "apiId(424)", value = "动态表头", required = false, dataType = "Integer"),
  194. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  195. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  196. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  197. })
  198. @PostMapping("/getSporadicSuppliesReport1")
  199. public RESTfulResult getSporadicSuppliesReport1(@RequestBody(required=false) Map<String,Object> mapValue,
  200. Integer apiId,
  201. Integer pageNum,
  202. Integer pageSize,
  203. String startTime,
  204. String endTime,
  205. String carrierSsoId,
  206. String userId, String userIds, String con, Integer orderType
  207. ){
  208. if(carrierSsoId != null) {
  209. if (!"null".equals(carrierSsoId)) {
  210. mapValue.put("carrierSsoId", carrierSsoId);
  211. }
  212. }
  213. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  214. if (userId!=null){
  215. mapValue.put("userId",userId);
  216. }
  217. if (orderType!=null){
  218. mapValue.put("orderType",orderType);
  219. }
  220. if (userIds!=null){
  221. mapValue.put("userIds",userIds);
  222. }
  223. if (con!=null&&!"null".equals(con)){
  224. mapValue.put("con","%"+con+"%");
  225. }
  226. PageHelper.startPage(pageNum, pageSize);
  227. //分页数据
  228. List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport1(mapValue);
  229. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  230. return success(pageList);
  231. }
  232. @ApiOperation(value="查询零星物资出厂统计报表")
  233. @ApiImplicitParams({
  234. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  235. @ApiImplicitParam(name = "apiId(425)", value = "动态表头", required = false, dataType = "Integer"),
  236. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  237. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  238. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  239. })
  240. @PostMapping("/getSporadicSuppliesReport2")
  241. public RESTfulResult getSporadicSuppliesReport2(@RequestBody(required=false) Map<String,Object> mapValue,
  242. Integer apiId,
  243. Integer pageNum,
  244. Integer pageSize,
  245. String startTime,
  246. String endTime,
  247. String carrierSsoId,
  248. String userId,
  249. String userIds,
  250. String con,
  251. Integer orderType
  252. ){
  253. if(carrierSsoId != null){
  254. if(!"null".equals(carrierSsoId)){
  255. mapValue.put("carrierSsoId", carrierSsoId);
  256. }
  257. }
  258. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  259. if (con!=null&&!"null".equals(con)){
  260. mapValue.put("con","%"+con+"%");
  261. }
  262. if (userId!=null){
  263. mapValue.put("userId",userId);
  264. }
  265. if (orderType!=null){
  266. mapValue.put("orderType",orderType);
  267. }
  268. if (userIds!=null){
  269. mapValue.put("userIds",userIds);
  270. }
  271. PageHelper.startPage(pageNum, pageSize);
  272. //分页数据
  273. List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport2(mapValue);
  274. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  275. return success(pageList);
  276. }
  277. @ApiOperation(value="查询采购内转统计报表")
  278. @ApiImplicitParams({
  279. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  280. @ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
  281. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  282. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  283. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  284. })
  285. @PostMapping("/getPurInwardReport")
  286. public RESTfulResult getPurInwardReport(@RequestBody(required=false) Map<String,Object> mapValue,
  287. Integer apiId,
  288. Integer pageNum,
  289. Integer pageSize,
  290. String startTime,
  291. String endTime
  292. ){
  293. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  294. PageHelper.startPage(pageNum, pageSize);
  295. //分页数据
  296. List<Map<String, Object>> report = statisticalReportService.getPurInwardReport(mapValue);
  297. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  298. return success(pageList);
  299. }
  300. @ApiOperation(value="查询零星内转统计报表")
  301. @ApiImplicitParams({
  302. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  303. @ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
  304. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  305. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  306. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  307. })
  308. @PostMapping("/getLXInwardReport")
  309. public RESTfulResult getLXInwardReport(@RequestBody(required=false) Map<String,Object> mapValue,
  310. Integer apiId,
  311. Integer pageNum,
  312. Integer pageSize,
  313. String startTime,
  314. String endTime,
  315. String con
  316. ){
  317. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  318. if(con != null && !"null".equals(con)){
  319. mapValue.put("con","%" + con + "%");
  320. }
  321. PageHelper.startPage(pageNum, pageSize);
  322. //分页数据
  323. List<Map<String, Object>> report = statisticalReportService.getLXInwardReport(mapValue);
  324. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  325. return success(pageList);
  326. }
  327. @ApiOperation(value="查询内转统计报表")
  328. @ApiImplicitParams({
  329. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  330. @ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
  331. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  332. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  333. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  334. })
  335. @PostMapping("/getInwardReport")
  336. public RESTfulResult getInwardReport(@RequestBody(required=false) Map<String,Object> mapValue,
  337. Integer apiId,
  338. Integer pageNum,
  339. Integer pageSize,
  340. String startTime,
  341. String endTime
  342. ){
  343. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  344. PageHelper.startPage(pageNum, pageSize);
  345. //分页数据
  346. List<Map<String, Object>> report = statisticalReportService.getInwardReport(mapValue);
  347. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  348. return success(pageList);
  349. }
  350. @ApiOperation(value="查询该组织机构下的销售统计报表")
  351. @ApiImplicitParams({
  352. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  353. @ApiImplicitParam(name = "apiId", value = "486", required = false, dataType = "Integer"),
  354. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  355. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  356. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  357. })
  358. @PostMapping("/getSaleOrderList")
  359. public RESTfulResult getSaleOrderList(@RequestBody(required=false) Map<String,Object> mapValue,
  360. Integer apiId,
  361. Integer pageNum,
  362. Integer pageSize,
  363. String startTime,
  364. String endTime,
  365. String orgCode,
  366. String isPage,
  367. String index
  368. ){
  369. if (orgCode!=null&&!"null".equals(orgCode)){
  370. mapValue.put("orgCode",orgCode);
  371. }
  372. if (index!=null&&!"null".equals(index)){
  373. mapValue.put("index",index);
  374. }
  375. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  376. if("yes".equals(isPage)){
  377. return success(statisticalReportService.getSaleOrderList(mapValue));
  378. }
  379. PageHelper.startPage(pageNum, pageSize);
  380. //分页数据
  381. List<Map<String, Object>> report = statisticalReportService.getSaleOrderList(mapValue);
  382. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  383. return success(pageList);
  384. }
  385. @ApiOperation(value="查询该组织机构下的采购统计报表")
  386. @ApiImplicitParams({
  387. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  388. @ApiImplicitParam(name = "apiId", value = "486", required = false, dataType = "Integer"),
  389. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  390. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  391. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  392. })
  393. @PostMapping("/getPurchaseOrderList")
  394. public RESTfulResult getPurchaseOrderList(@RequestBody(required=false) Map<String,Object> mapValue,
  395. Integer apiId,
  396. Integer pageNum,
  397. Integer pageSize,
  398. String startTime,
  399. String endTime,
  400. String orgCode,
  401. String isPage,
  402. String index
  403. ){
  404. if (orgCode!=null&&!"null".equals(orgCode)){
  405. mapValue.put("orgCode",orgCode);
  406. }
  407. if (index!=null&&!"null".equals(index)){
  408. mapValue.put("index",index);
  409. }
  410. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  411. if ("yes".equals(isPage)){
  412. return success(statisticalReportService.getPurchaseOrderList(mapValue));
  413. }
  414. PageHelper.startPage(pageNum, pageSize);
  415. //分页数据
  416. List<Map<String, Object>> report = statisticalReportService.getPurchaseOrderList(mapValue);
  417. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  418. return success(pageList);
  419. }
  420. @ApiOperation(value="查询该组织机构下的采购内转统计报表")
  421. @ApiImplicitParams({
  422. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  423. @ApiImplicitParam(name = "apiId", value = "s", required = false, dataType = "Integer"),
  424. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  425. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  426. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  427. })
  428. @PostMapping("/getPurchaseInwardList")
  429. public RESTfulResult getInwardList(@RequestBody(required=false) Map<String,Object> mapValue,
  430. Integer apiId,
  431. Integer pageNum,
  432. Integer pageSize,
  433. String startTime,
  434. String endTime,
  435. String orgCode,
  436. String isPage,
  437. String index
  438. ){
  439. if (index!=null&&!"null".equals(index)){
  440. mapValue.put("index",index);
  441. }
  442. if (orgCode!=null&&!"null".equals(orgCode)){
  443. mapValue.put("orgCode",orgCode);
  444. }
  445. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  446. if ("yes".equals(isPage)){
  447. return success(statisticalReportService.getPurchaseInwardList(mapValue));
  448. }
  449. PageHelper.startPage(pageNum, pageSize);
  450. //分页数据
  451. List<Map<String, Object>> report = statisticalReportService.getPurchaseInwardList(mapValue);
  452. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  453. return success(pageList);
  454. }
  455. @ApiOperation(value="查询该组织机构下的厂外进厂内转")
  456. @ApiImplicitParams({
  457. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  458. @ApiImplicitParam(name = "apiId", value = "s", required = false, dataType = "Integer"),
  459. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  460. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  461. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  462. })
  463. @PostMapping("/getOutFactoryInwardList")
  464. public RESTfulResult getOutFactoryInwardList(@RequestBody(required=false) Map<String,Object> mapValue,
  465. Integer apiId,
  466. Integer pageNum,
  467. Integer pageSize,
  468. String startTime,
  469. String endTime,
  470. String orgCode,
  471. String isPage,
  472. String index
  473. ){
  474. if (index!=null&&!"null".equals(index)){
  475. mapValue.put("index",index);
  476. }
  477. if (orgCode!=null&&!"null".equals(orgCode)){
  478. mapValue.put("orgCode",orgCode);
  479. }
  480. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  481. if ("yes".equals(isPage)){
  482. return success(statisticalReportService.getOutFactoryInwardList(mapValue));
  483. }
  484. PageHelper.startPage(pageNum, pageSize);
  485. //分页数据
  486. List<Map<String, Object>> report = statisticalReportService.getOutFactoryInwardList(mapValue);
  487. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  488. return success(pageList);
  489. }
  490. @ApiOperation(value="查询该组织机构下的内转统计报表")
  491. @ApiImplicitParams({
  492. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  493. @ApiImplicitParam(name = "apiId", value = "s", required = false, dataType = "Integer"),
  494. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  495. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  496. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  497. })
  498. @PostMapping("/getInwardInFactory")
  499. public RESTfulResult getInwardInFactory(@RequestBody(required=false) Map<String,Object> mapValue,
  500. Integer apiId,
  501. Integer pageNum,
  502. Integer pageSize,
  503. String startTime,
  504. String endTime,
  505. String orgCode,
  506. String isPage,
  507. String index
  508. ){
  509. if (index!=null&&!"null".equals(index)){
  510. mapValue.put("index",index);
  511. }
  512. if (orgCode!=null&&!"null".equals(orgCode)){
  513. mapValue.put("orgCode",orgCode);
  514. }
  515. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  516. if ("yes".equals(isPage)){
  517. return success(statisticalReportService.getInwardInFactory(mapValue));
  518. }
  519. PageHelper.startPage(pageNum, pageSize);
  520. //分页数据
  521. List<Map<String, Object>> report = statisticalReportService.getInwardInFactory(mapValue);
  522. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  523. return success(pageList);
  524. }
  525. @ApiOperation(value="查询拼装车统计报表")
  526. @ApiImplicitParams({
  527. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  528. @ApiImplicitParam(name = "apiId", value = "477", required = false, dataType = "Integer"),
  529. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  530. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  531. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  532. })
  533. @PostMapping("/getInwardReportForAssemble")
  534. public RESTfulResult getInwardReportForAssemble(@RequestBody(required=false) Map<String,Object> mapValue,
  535. Integer apiId,
  536. Integer pageNum,
  537. Integer pageSize,
  538. String startTime,
  539. String endTime, BigDecimal orderType, String index, String isPage,String orgCode
  540. ){
  541. if (index!=null&&!"null".equals(index)){
  542. mapValue.put("index",index);
  543. }
  544. if (orgCode!=null&&!"null".equals(orgCode)){
  545. mapValue.put("orgCode",orgCode);
  546. }
  547. if (orderType!=null&&!"null".equals(orderType)){
  548. mapValue.put("orderTypee",orderType);
  549. }
  550. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  551. if ("yes".equals(isPage)){
  552. return success(statisticalReportService.getInwardReportForAssemble(mapValue));
  553. }
  554. PageHelper.startPage(pageNum, pageSize);
  555. //分页数据
  556. List<Map<String, Object>> report = statisticalReportService.getInwardReportForAssemble(mapValue);
  557. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  558. return success(pageList);
  559. }
  560. @ApiOperation(value="装机展示明细")
  561. @ApiImplicitParams({
  562. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  563. @ApiImplicitParam(name = "apiId", value = "477", required = false, dataType = "Integer"),
  564. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  565. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  566. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  567. })
  568. @PostMapping("/getLoaderForResultDetail")
  569. public RESTfulResult getLoaderForResultDetail(@RequestBody(required=false) Map<String,Object> mapValue,
  570. Integer apiId,
  571. Integer pageNum,
  572. Integer pageSize,
  573. String startTime,
  574. String endTime,
  575. String con,
  576. String isPage
  577. ){
  578. if (con != null && !"undefined".equals(con)) {
  579. mapValue.put("con",con);
  580. }
  581. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  582. if(isPage != null && !"".equals(isPage)){
  583. List<Map<String, Object>> report = statisticalReportService.getLoaderForResultDetail(mapValue);
  584. return success(report);
  585. }
  586. PageHelper.startPage(pageNum, pageSize);
  587. //分页数据
  588. List<Map<String, Object>> report = statisticalReportService.getLoaderForResultDetail(mapValue);
  589. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  590. return success(pageList);
  591. }
  592. @ApiOperation("对内转车辆装货点进行统计")
  593. @PostMapping("/getLoading")
  594. public RESTfulResult getLoading(@RequestBody(required=false) Map<String,Object> mapValue,
  595. Integer apiId,
  596. Integer pageNum,
  597. Integer pageSize,
  598. String startTime,
  599. String endTime){
  600. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  601. PageHelper.startPage(pageNum, pageSize);
  602. //分页数据
  603. List<Map<String, Object>> report = statisticalReportService.getLoading(mapValue);
  604. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  605. return success(pageList);
  606. }
  607. @ApiOperation("装载机所装车辆重量统计报表")
  608. @PostMapping("/getLoaderResult")
  609. public RESTfulResult getLoaderResult(@RequestBody(required=false) Map<String,Object> mapValue,
  610. Integer apiId,//apiId:463
  611. Integer pageNum,
  612. Integer pageSize,
  613. String startTime,
  614. String endTime){
  615. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  616. PageHelper.startPage(pageNum, pageSize);
  617. //分页数据
  618. List<Map<String, Object>> report = statisticalReportService.getLoaderResult(mapValue);
  619. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  620. return success(pageList);
  621. }
  622. @ApiOperation("对内转车辆装卸货点进行统计")
  623. @PostMapping("/getUnLoading")
  624. public RESTfulResult getUnLoading(@RequestBody(required=false) Map<String,Object> mapValue,
  625. Integer apiId,
  626. Integer pageNum,
  627. Integer pageSize,
  628. String startTime,
  629. String endTime){
  630. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  631. PageHelper.startPage(pageNum, pageSize);
  632. //分页数据
  633. List<Map<String, Object>> report = statisticalReportService.getUnLoading(mapValue);
  634. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  635. return success(pageList);
  636. }
  637. //保卫部随机抽查车牌号查看所有信息
  638. @ApiOperation("保卫部随机抽查车牌号查看所有信息")
  639. @PostMapping("/getCapacityByDefend")
  640. public RESTfulResult getCapacityByDefend(@RequestBody(required = false) Map<String,Object> map,
  641. Integer apiId,
  642. Integer pageNum,
  643. Integer pageSize,
  644. String startTime,
  645. String endTime,
  646. String con,
  647. String yes){
  648. if (con != null && !"null".equals(con)) {
  649. map.put("con",con);
  650. }
  651. DataChange.queryDataByDateTime(startTime ,endTime, map, sdfDateTime);//根据时间段查询数据
  652. if(yes != null && !"null".equals(yes)){
  653. return success(statisticalReportService.getCapacityByDefend(map));
  654. }
  655. PageHelper.startPage(pageNum, pageSize);
  656. List<Map<String, Object>> report = statisticalReportService.getCapacityByDefend(map);
  657. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  658. return success(pageList);
  659. }
  660. @ApiOperation(value="查询销售统计报表")
  661. @ApiImplicitParams({
  662. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  663. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  664. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  665. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  666. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  667. })
  668. @PostMapping("/getSaleSteelReport")
  669. public RESTfulResult getSaleSteelReport(@RequestBody(required=false) Map<String,Object> map,
  670. String startTime,
  671. String endTime,
  672. String carrierSsoId,
  673. String receiveName,
  674. String materialName,
  675. String specification,
  676. String remark,
  677. String capacityNo,
  678. String carrierName,
  679. String consigneeName,
  680. String saler,
  681. String easPrimaryId
  682. ){
  683. DataChange.queryDataByDateTimeYestDay(startTime, endTime, map, sdfDateTime);//根据时间段查询数据
  684. if(carrierSsoId != null){
  685. if(!"null".equals(carrierSsoId) && carrierSsoId != null){
  686. map.put("carrierSsoId", carrierSsoId);
  687. }
  688. }
  689. if (receiveName != null && !"null".equals(receiveName)) {
  690. map.put("receivName","%" + receiveName + "%");
  691. }
  692. if (remark != null && !"".equals(remark) && !"null".equals(remark)) {
  693. map.put("remark","%" + remark + "%");
  694. }
  695. if (capacityNo != null && !"".equals(capacityNo) && !"null".equals(capacityNo)) {
  696. map.put("capacityNum","%" + capacityNo + "%");
  697. }
  698. if (carrierName != null && !"".equals(carrierName) && !"null".equals(carrierName)) {
  699. map.put("carrierNames","%" + carrierName + "%");
  700. }
  701. if (consigneeName != null && !"".equals(consigneeName) && !"null".equals(consigneeName)) {
  702. map.put("consigneeNames","%" + consigneeName + "%");
  703. }
  704. if (saler != null && !"".equals(saler) && !"null".equals(saler)) {
  705. map.put("salers",saler);
  706. }
  707. if (easPrimaryId != null && !"".equals(easPrimaryId) && !"null".equals(easPrimaryId)) {
  708. map.put("easPrimaryId",easPrimaryId);
  709. }
  710. //分页数据
  711. List<Map<String, Object>> report = statisticalReportService.getSaleSteelReport(map);
  712. for (Map<String, Object> stringObjectMap : report) {
  713. String shippingAddressIds = (String) stringObjectMap.get("shippingAddressIds");
  714. String capacityNumbers= (String) stringObjectMap.get("capacityNumbers");
  715. //确认是否有多个收货单位
  716. if (shippingAddressIds !=null && !("".equals(shippingAddressIds))){
  717. String[] split = shippingAddressIds.split(",");
  718. String address="";
  719. int i=0;
  720. for (String s : split) {
  721. i++;
  722. String getaddress = statisticalReportService.getaddress(DataChange.dataToBigDecimal(s));
  723. if (i==1){
  724. address+="旧地址:"+getaddress+",";
  725. }else if (i==2){
  726. address+="新地址:"+getaddress;
  727. }
  728. }
  729. stringObjectMap.put("addressPlace",address);
  730. }
  731. //确认是否有多个车牌号
  732. if (capacityNumbers!=null &&!("".equals(capacityNumbers))){
  733. String[] split = capacityNumbers.split(",");
  734. String capacityNumber="";
  735. int flag=0;
  736. for (String s : split) {
  737. flag++;
  738. String s1 = statisticalReportService.getcapacityNumber(DataChange.dataToBigDecimal(s));
  739. if (flag==1){
  740. capacityNumber+="旧车号:"+s1+",";
  741. }else if (flag==2){
  742. capacityNumber+="新车号:"+s1;
  743. break;
  744. }
  745. }
  746. stringObjectMap.put("capacityNo",capacityNumber);
  747. }
  748. /*try{
  749. BigDecimal orderId = (BigDecimal) stringObjectMap.get("orderId");
  750. if (orderId !=null){
  751. String status = statisticalReportService.getStatus(orderId);
  752. if (!(" ".equals(status))){
  753. stringObjectMap.put("orderStatus",status);
  754. }
  755. }
  756. }catch (Exception e){
  757. e.printStackTrace();
  758. }*/
  759. }
  760. return success(report);
  761. }
  762. @ApiOperation(value="查询销售统计报表")
  763. @ApiImplicitParams({
  764. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  765. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  766. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  767. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  768. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  769. })
  770. @PostMapping("/getSaleSteelReportNew")
  771. public RESTfulResult getSaleSteelReportNew(@RequestBody(required=false) Map<String,Object> map,
  772. String startTime,
  773. String endTime,
  774. String carrierSsoId,
  775. String receiveName,
  776. String materialName,
  777. String specification,
  778. String remark,
  779. String capacityNo,
  780. String carrierName,
  781. String consigneeName,
  782. String saler,
  783. String easPrimaryId
  784. ){
  785. DataChange.queryDataByDateTimeYestDay(startTime, endTime, map, sdfDateTime);//根据时间段查询数据
  786. if(carrierSsoId != null){
  787. if(!"null".equals(carrierSsoId) && carrierSsoId != null){
  788. map.put("carrierSsoId", carrierSsoId);
  789. }
  790. }
  791. if (receiveName != null && !"null".equals(receiveName)) {
  792. map.put("receivName","%" + receiveName + "%");
  793. }
  794. if (remark != null && !"".equals(remark) && !"null".equals(remark)) {
  795. map.put("remark","%" + remark + "%");
  796. }
  797. if (capacityNo != null && !"".equals(capacityNo) && !"null".equals(capacityNo)) {
  798. map.put("capacityNum","%" + capacityNo + "%");
  799. }
  800. if (carrierName != null && !"".equals(carrierName) && !"null".equals(carrierName)) {
  801. map.put("carrierNames","%" + carrierName + "%");
  802. }
  803. if (consigneeName != null && !"".equals(consigneeName) && !"null".equals(consigneeName)) {
  804. map.put("consigneeNames","%" + consigneeName + "%");
  805. }
  806. if (saler != null && !"".equals(saler) && !"null".equals(saler)) {
  807. map.put("salers",saler);
  808. }
  809. if (easPrimaryId != null && !"".equals(easPrimaryId) && !"null".equals(easPrimaryId)) {
  810. map.put("easPrimaryId",easPrimaryId);
  811. }
  812. //分页数据
  813. List<Map<String, Object>> report = statisticalReportService.getSaleSteelReportNew(map);
  814. for (Map<String, Object> stringObjectMap : report) {
  815. String shippingAddressIds = (String) stringObjectMap.get("shippingAddressIds");
  816. String capacityNumbers= (String) stringObjectMap.get("capacityNumbers");
  817. //确认是否有多个收货单位
  818. if (shippingAddressIds !=null && !("".equals(shippingAddressIds))){
  819. String[] split = shippingAddressIds.split(",");
  820. String address="";
  821. int i=0;
  822. for (String s : split) {
  823. i++;
  824. String getaddress = statisticalReportService.getaddress(DataChange.dataToBigDecimal(s));
  825. if (i==1){
  826. address+="旧地址:"+getaddress+",";
  827. }else if (i==2){
  828. address+="新地址:"+getaddress;
  829. }
  830. }
  831. stringObjectMap.put("addressPlace",address);
  832. }
  833. //确认是否有多个车牌号
  834. if (capacityNumbers!=null &&!("".equals(capacityNumbers))){
  835. String[] split = capacityNumbers.split(",");
  836. String capacityNumber="";
  837. int flag=0;
  838. for (String s : split) {
  839. flag++;
  840. String s1 = statisticalReportService.getcapacityNumber(DataChange.dataToBigDecimal(s));
  841. if (flag==1){
  842. capacityNumber+="旧车号:"+s1+",";
  843. }else if (flag==2){
  844. capacityNumber+="新车号:"+s1;
  845. break;
  846. }
  847. }
  848. stringObjectMap.put("capacityNo",capacityNumber);
  849. }
  850. /*try{
  851. BigDecimal orderId = (BigDecimal) stringObjectMap.get("orderId");
  852. if (orderId !=null){
  853. String status = statisticalReportService.getStatus(orderId);
  854. if (!(" ".equals(status))){
  855. stringObjectMap.put("orderStatus",status);
  856. }
  857. }
  858. }catch (Exception e){
  859. e.printStackTrace();
  860. }*/
  861. }
  862. return success(report);
  863. }
  864. @ApiOperation(value="查询销售统计报表")
  865. @ApiImplicitParams({
  866. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  867. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  868. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  869. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  870. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  871. })
  872. @PostMapping("/getInwardSaleSteelReport")
  873. public RESTfulResult getInwardSaleSteelReport(@RequestBody(required=false) Map<String,Object> map,
  874. String startTime,
  875. String endTime,
  876. String carrierSsoId,
  877. String receiveName,
  878. String materialName,
  879. String specification,
  880. String remark,
  881. String capacityNo,
  882. String carrierName,
  883. String consigneeName,
  884. String saler
  885. ){
  886. DataChange.queryDataByDateTimeYestDay(startTime, endTime, map, sdfDateTime);//根据时间段查询数据
  887. if(carrierSsoId != null){
  888. if(!"null".equals(carrierSsoId) && carrierSsoId != null){
  889. map.put("carrierSsoId", carrierSsoId);
  890. }
  891. }
  892. if (receiveName != null && !"null".equals(receiveName)) {
  893. map.put("receivName","%" + receiveName + "%");
  894. }
  895. if (remark != null && !"".equals(remark) && !"null".equals(remark)) {
  896. map.put("remark","%" + remark + "%");
  897. }
  898. if (capacityNo != null && !"".equals(capacityNo) && !"null".equals(capacityNo)) {
  899. map.put("capacityNum","%" + capacityNo + "%");
  900. }
  901. if (carrierName != null && !"".equals(carrierName) && !"null".equals(carrierName)) {
  902. map.put("carrierNames","%" + carrierName + "%");
  903. }
  904. if (consigneeName != null && !"".equals(consigneeName) && !"null".equals(consigneeName)) {
  905. map.put("consigneeNames","%" + consigneeName + "%");
  906. }
  907. if (saler != null && !"".equals(saler) && !"null".equals(saler)) {
  908. map.put("salers",saler);
  909. }
  910. //分页数据
  911. List<Map<String, Object>> report = statisticalReportService.getInwardSaleSteelReport(map);
  912. return success(report);
  913. }
  914. @ApiOperation(value="查询销售钢材派单报表")
  915. @ApiImplicitParams({
  916. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  917. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  918. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  919. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  920. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  921. })
  922. @PostMapping("/getInwardSaleSteelOrder")
  923. public RESTfulResult getInwardSaleSteelOrder(@RequestBody(required=false) Map<String,Object> map,
  924. String startTime,
  925. String endTime,
  926. String remark,
  927. String capacityNo,
  928. String consigneeName
  929. ){
  930. DataChange.queryDataByDateTimeYestDay(startTime, endTime, map, sdfDateTime);//根据时间段查询数据
  931. if (remark != null && !"".equals(remark) && !"null".equals(remark)) {
  932. map.put("remark","%" + remark + "%");
  933. }
  934. if (capacityNo != null && !"".equals(capacityNo) && !"null".equals(capacityNo)) {
  935. map.put("capacityNum","%" + capacityNo + "%");
  936. }
  937. if (consigneeName != null && !"".equals(consigneeName) && !"null".equals(consigneeName)) {
  938. map.put("consigneeNames","%" + consigneeName + "%");
  939. }
  940. //分页数据
  941. List<Map<String, Object>> report = statisticalReportService.getInwardSaleSteelOrder(map);
  942. return success(report);
  943. }
  944. @ApiOperation(value="根据车序号查询销售订单状态")
  945. @PostMapping("/getSteelReportDetailsBySmId")
  946. public RESTfulResult getSteelReportDetailsBySmId(@RequestParam BigDecimal saleOrderMaterialId){
  947. return success(statisticalReportService.getSteelReportDetailsBySmId(saleOrderMaterialId));
  948. }
  949. @ApiOperation(value = "待装钢材报表数据")
  950. @PostMapping("loadingSaleSteelReport")
  951. public RESTfulResult loadingSaleSteelReport(@RequestBody(required=false) Map<String,Object> map,
  952. String startTime,
  953. String endTime,
  954. String carrierSsoId,
  955. String receiveName,
  956. String remark,
  957. String capacityNo,
  958. String carrierName,
  959. String consigneeName,
  960. String saler,
  961. String easPrimaryId){
  962. DataChange.queryDataByDateTimeYestDay(startTime, endTime, map, sdfDateTime);//根据时间段查询数据
  963. if(carrierSsoId != null){
  964. if(!"null".equals(carrierSsoId) && carrierSsoId != null){
  965. map.put("carrierSsoId", carrierSsoId);
  966. }
  967. }
  968. if (receiveName != null && !"null".equals(receiveName)) {
  969. map.put("receivName","%" + receiveName + "%");
  970. }
  971. if (remark != null && !"".equals(remark) && !"null".equals(remark)) {
  972. map.put("remark","%" + remark + "%");
  973. }
  974. if (capacityNo != null && !"".equals(capacityNo) && !"null".equals(capacityNo)) {
  975. map.put("capacityNum","%" + capacityNo + "%");
  976. }
  977. if (carrierName != null && !"".equals(carrierName) && !"null".equals(carrierName)) {
  978. map.put("carrierNames","%" + carrierName + "%");
  979. }
  980. if (consigneeName != null && !"".equals(consigneeName) && !"null".equals(consigneeName)) {
  981. map.put("consigneeNames","%" + consigneeName + "%");
  982. }
  983. if (saler != null && !"".equals(saler) && !"null".equals(saler)) {
  984. map.put("salers",saler);
  985. }
  986. if (easPrimaryId != null && !"".equals(easPrimaryId) && !"null".equals(easPrimaryId)) {
  987. map.put("easPrimaryId",easPrimaryId);
  988. }
  989. //分页数据
  990. List<Map<String, Object>> report = statisticalReportService.loadingSaleSteelReport(map);
  991. return success(report);
  992. }
  993. }