StatisticalReportController.java 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  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 org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.PostMapping;
  14. import org.springframework.web.bind.annotation.RequestBody;
  15. import org.springframework.web.bind.annotation.RequestMapping;
  16. import org.springframework.web.bind.annotation.RestController;
  17. import java.math.BigDecimal;
  18. import java.text.SimpleDateFormat;
  19. import java.util.*;
  20. /**
  21. * @ author :TXF
  22. * @ time :2021/12/14 18:05
  23. */
  24. @RestController
  25. @RequestMapping("/${api.version}/statisticalReport")
  26. public class StatisticalReportController extends BaseRESTfulController {
  27. @Autowired
  28. StatisticalReportImpl statisticalReportService;
  29. @Autowired
  30. ColumnDataUtil columnDataUtil;
  31. private final SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
  32. private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  33. @ApiOperation(value="查询辅料燃料统计报表")
  34. @ApiImplicitParams({
  35. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  36. @ApiImplicitParam(name = "apiId(220)", value = "动态表头", required = false, dataType = "Integer"),
  37. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  38. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  39. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  40. })
  41. @PostMapping("/getRLFLReport")
  42. public RESTfulResult getRLFLReport(@RequestBody(required=false) Map<String,Object> mapValue,
  43. Integer apiId,
  44. Integer pageNum,
  45. Integer pageSize,
  46. String startTime,
  47. String endTime,
  48. Integer orderType,
  49. String con
  50. ){
  51. mapValue.put("orderTypee", orderType);
  52. if (con!=null && !"null".equals(con) && !"".equals(con)){
  53. mapValue.put("con",con);
  54. }
  55. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  56. PageHelper.startPage(pageNum, pageSize);
  57. //分页数据
  58. List<Map<String, Object>> report = statisticalReportService.getRLFLReport(mapValue);
  59. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,report);
  60. return success(pageList);
  61. }
  62. @ApiOperation(value="查询销售统计报表")
  63. @ApiImplicitParams({
  64. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  65. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  66. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  67. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  68. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  69. })
  70. @PostMapping("/getAllSaleReport")
  71. public RESTfulResult getAllSaleReport(@RequestBody(required=false) Map<String,Object> mapValue,
  72. Integer apiId,
  73. Integer pageNum,
  74. Integer pageSize,
  75. String startTime,
  76. String endTime,
  77. String carrierSsoId,
  78. Integer orderType,
  79. Integer shipperId,
  80. String receiveName,
  81. String materialName,
  82. String wareHouse
  83. ){
  84. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  85. if(carrierSsoId != null){
  86. if(!"null".equals(carrierSsoId)){
  87. mapValue.put("carrierSsoId", carrierSsoId);
  88. }
  89. }
  90. if (receiveName != null && !"null".equals(receiveName)) {
  91. mapValue.put("receivName","%" + receiveName + "%");
  92. }
  93. if (materialName != null && !"".equals(materialName) && !"null".equals(materialName)) {
  94. mapValue.put("remark","%" + materialName + "%");
  95. }
  96. if (wareHouse != null && !"".equals(wareHouse) && !"null".equals(wareHouse)) {
  97. mapValue.put("wareHouse","%" + wareHouse + "%");
  98. }
  99. mapValue.put("orderTypee",orderType);
  100. mapValue.put("shipperId",shipperId);
  101. PageHelper.startPage(pageNum, pageSize);
  102. //分页数据
  103. List<Map<String, Object>> report = statisticalReportService.getAllSaleReport(mapValue);
  104. PageListAdd pageList = columnDataUtil.tableColumnData5(apiId, null, report);
  105. return success(pageList);
  106. }
  107. @ApiOperation(value="查询销售统计报表筛选过后的总净重")
  108. @ApiImplicitParams({
  109. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  110. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  111. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  112. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  113. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  114. })
  115. @PostMapping("/getAllSaleReportTotal")
  116. public RESTfulResult getAllSaleReportTotal(@RequestBody(required=false) Map<String,Object> mapValue,
  117. String startTime,
  118. String endTime,
  119. String carrierSsoId
  120. ){
  121. if(carrierSsoId != null){
  122. if(!"null".equals(carrierSsoId)){
  123. mapValue.put("carrierSsoId", carrierSsoId);
  124. }
  125. }
  126. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  127. List<Map<String, Object>> allReport = statisticalReportService.getAllSaleReportNum(mapValue);
  128. //获取销售统计报表筛选过后的总净重
  129. BigDecimal AllResultNetWeight = new BigDecimal(0);
  130. for (Map<String, Object> stringObjectMap : allReport) {
  131. if(stringObjectMap.get("resultNetWeight")!=null) {
  132. AllResultNetWeight = AllResultNetWeight.add(new BigDecimal(stringObjectMap.get("resultNetWeight").toString()));
  133. }
  134. }
  135. return success(AllResultNetWeight);
  136. }
  137. @ApiOperation(value="查询零星物资进厂统计报表")
  138. @ApiImplicitParams({
  139. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  140. @ApiImplicitParam(name = "apiId(424)", value = "动态表头", required = false, dataType = "Integer"),
  141. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  142. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  143. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  144. })
  145. @PostMapping("/getSporadicSuppliesReport1")
  146. public RESTfulResult getSporadicSuppliesReport1(@RequestBody(required=false) Map<String,Object> mapValue,
  147. Integer apiId,
  148. Integer pageNum,
  149. Integer pageSize,
  150. String startTime,
  151. String endTime,
  152. String carrierSsoId,
  153. String userId, String userIds, String con, Integer orderType
  154. ){
  155. if(carrierSsoId != null) {
  156. if (!"null".equals(carrierSsoId)) {
  157. mapValue.put("carrierSsoId", carrierSsoId);
  158. }
  159. }
  160. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  161. if (userId!=null){
  162. mapValue.put("userId",userId);
  163. }
  164. if (orderType!=null){
  165. mapValue.put("orderType",orderType);
  166. }
  167. if (userIds!=null){
  168. mapValue.put("userIds",userIds);
  169. }
  170. if (con!=null&&!"null".equals(con)){
  171. mapValue.put("con","%"+con+"%");
  172. }
  173. PageHelper.startPage(pageNum, pageSize);
  174. //分页数据
  175. List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport1(mapValue);
  176. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  177. return success(pageList);
  178. }
  179. @ApiOperation(value="查询零星物资出厂统计报表")
  180. @ApiImplicitParams({
  181. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  182. @ApiImplicitParam(name = "apiId(425)", value = "动态表头", required = false, dataType = "Integer"),
  183. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  184. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  185. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  186. })
  187. @PostMapping("/getSporadicSuppliesReport2")
  188. public RESTfulResult getSporadicSuppliesReport2(@RequestBody(required=false) Map<String,Object> mapValue,
  189. Integer apiId,
  190. Integer pageNum,
  191. Integer pageSize,
  192. String startTime,
  193. String endTime,
  194. String carrierSsoId,
  195. String userId,
  196. String userIds,
  197. String con,
  198. Integer orderType
  199. ){
  200. if(carrierSsoId != null){
  201. if(!"null".equals(carrierSsoId)){
  202. mapValue.put("carrierSsoId", carrierSsoId);
  203. }
  204. }
  205. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  206. if (con!=null&&!"null".equals(con)){
  207. mapValue.put("con","%"+con+"%");
  208. }
  209. if (userId!=null){
  210. mapValue.put("userId",userId);
  211. }
  212. if (orderType!=null){
  213. mapValue.put("orderType",orderType);
  214. }
  215. if (userIds!=null){
  216. mapValue.put("userIds",userIds);
  217. }
  218. PageHelper.startPage(pageNum, pageSize);
  219. //分页数据
  220. List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport2(mapValue);
  221. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  222. return success(pageList);
  223. }
  224. @ApiOperation(value="查询采购内转统计报表")
  225. @ApiImplicitParams({
  226. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  227. @ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
  228. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  229. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  230. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  231. })
  232. @PostMapping("/getPurInwardReport")
  233. public RESTfulResult getPurInwardReport(@RequestBody(required=false) Map<String,Object> mapValue,
  234. Integer apiId,
  235. Integer pageNum,
  236. Integer pageSize,
  237. String startTime,
  238. String endTime
  239. ){
  240. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  241. PageHelper.startPage(pageNum, pageSize);
  242. //分页数据
  243. List<Map<String, Object>> report = statisticalReportService.getPurInwardReport(mapValue);
  244. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  245. return success(pageList);
  246. }
  247. @ApiOperation(value="查询零星内转统计报表")
  248. @ApiImplicitParams({
  249. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  250. @ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
  251. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  252. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  253. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  254. })
  255. @PostMapping("/getLXInwardReport")
  256. public RESTfulResult getLXInwardReport(@RequestBody(required=false) Map<String,Object> mapValue,
  257. Integer apiId,
  258. Integer pageNum,
  259. Integer pageSize,
  260. String startTime,
  261. String endTime,
  262. String con
  263. ){
  264. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  265. if(con != null && !"null".equals(con)){
  266. mapValue.put("con","%" + con + "%");
  267. }
  268. PageHelper.startPage(pageNum, pageSize);
  269. //分页数据
  270. List<Map<String, Object>> report = statisticalReportService.getLXInwardReport(mapValue);
  271. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  272. return success(pageList);
  273. }
  274. @ApiOperation(value="查询内转统计报表")
  275. @ApiImplicitParams({
  276. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  277. @ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
  278. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  279. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  280. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  281. })
  282. @PostMapping("/getInwardReport")
  283. public RESTfulResult getInwardReport(@RequestBody(required=false) Map<String,Object> mapValue,
  284. Integer apiId,
  285. Integer pageNum,
  286. Integer pageSize,
  287. String startTime,
  288. String endTime
  289. ){
  290. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  291. PageHelper.startPage(pageNum, pageSize);
  292. //分页数据
  293. List<Map<String, Object>> report = statisticalReportService.getInwardReport(mapValue);
  294. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  295. return success(pageList);
  296. }
  297. @ApiOperation(value="查询该组织机构下的销售统计报表")
  298. @ApiImplicitParams({
  299. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  300. @ApiImplicitParam(name = "apiId", value = "486", required = false, dataType = "Integer"),
  301. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  302. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  303. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  304. })
  305. @PostMapping("/getSaleOrderList")
  306. public RESTfulResult getSaleOrderList(@RequestBody(required=false) Map<String,Object> mapValue,
  307. Integer apiId,
  308. Integer pageNum,
  309. Integer pageSize,
  310. String startTime,
  311. String endTime,
  312. String orgCode,
  313. String isPage,
  314. String index
  315. ){
  316. if (orgCode!=null&&!"null".equals(orgCode)){
  317. mapValue.put("orgCode",orgCode);
  318. }
  319. if (index!=null&&!"null".equals(index)){
  320. mapValue.put("index",index);
  321. }
  322. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  323. if("yes".equals(isPage)){
  324. return success(statisticalReportService.getSaleOrderList(mapValue));
  325. }
  326. PageHelper.startPage(pageNum, pageSize);
  327. //分页数据
  328. List<Map<String, Object>> report = statisticalReportService.getSaleOrderList(mapValue);
  329. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  330. return success(pageList);
  331. }
  332. @ApiOperation(value="查询该组织机构下的采购统计报表")
  333. @ApiImplicitParams({
  334. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  335. @ApiImplicitParam(name = "apiId", value = "486", required = false, dataType = "Integer"),
  336. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  337. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  338. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  339. })
  340. @PostMapping("/getPurchaseOrderList")
  341. public RESTfulResult getPurchaseOrderList(@RequestBody(required=false) Map<String,Object> mapValue,
  342. Integer apiId,
  343. Integer pageNum,
  344. Integer pageSize,
  345. String startTime,
  346. String endTime,
  347. String orgCode,
  348. String isPage,
  349. String index
  350. ){
  351. if (orgCode!=null&&!"null".equals(orgCode)){
  352. mapValue.put("orgCode",orgCode);
  353. }
  354. if (index!=null&&!"null".equals(index)){
  355. mapValue.put("index",index);
  356. }
  357. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  358. if ("yes".equals(isPage)){
  359. return success(statisticalReportService.getPurchaseOrderList(mapValue));
  360. }
  361. PageHelper.startPage(pageNum, pageSize);
  362. //分页数据
  363. List<Map<String, Object>> report = statisticalReportService.getPurchaseOrderList(mapValue);
  364. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  365. return success(pageList);
  366. }
  367. @ApiOperation(value="查询该组织机构下的内转统计报表")
  368. @ApiImplicitParams({
  369. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  370. @ApiImplicitParam(name = "apiId", value = "s", required = false, dataType = "Integer"),
  371. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  372. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  373. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  374. })
  375. @PostMapping("/getPurchaseInwardList")
  376. public RESTfulResult getInwardList(@RequestBody(required=false) Map<String,Object> mapValue,
  377. Integer apiId,
  378. Integer pageNum,
  379. Integer pageSize,
  380. String startTime,
  381. String endTime,
  382. String orgCode,
  383. String isPage,
  384. String index
  385. ){
  386. if (index!=null&&!"null".equals(index)){
  387. mapValue.put("index",index);
  388. }
  389. if (orgCode!=null&&!"null".equals(orgCode)){
  390. mapValue.put("orgCode",orgCode);
  391. }
  392. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  393. if ("yes".equals(isPage)){
  394. return success(statisticalReportService.getPurchaseInwardList(mapValue));
  395. }
  396. PageHelper.startPage(pageNum, pageSize);
  397. //分页数据
  398. List<Map<String, Object>> report = statisticalReportService.getPurchaseInwardList(mapValue);
  399. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  400. return success(pageList);
  401. }
  402. @ApiOperation(value="查询该组织机构下的厂外进厂内转")
  403. @ApiImplicitParams({
  404. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  405. @ApiImplicitParam(name = "apiId", value = "s", required = false, dataType = "Integer"),
  406. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  407. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  408. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  409. })
  410. @PostMapping("/getOutFactoryInwardList")
  411. public RESTfulResult getOutFactoryInwardList(@RequestBody(required=false) Map<String,Object> mapValue,
  412. Integer apiId,
  413. Integer pageNum,
  414. Integer pageSize,
  415. String startTime,
  416. String endTime,
  417. String orgCode,
  418. String isPage,
  419. String index
  420. ){
  421. if (index!=null&&!"null".equals(index)){
  422. mapValue.put("index",index);
  423. }
  424. if (orgCode!=null&&!"null".equals(orgCode)){
  425. mapValue.put("orgCode",orgCode);
  426. }
  427. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  428. if ("yes".equals(isPage)){
  429. return success(statisticalReportService.getOutFactoryInwardList(mapValue));
  430. }
  431. PageHelper.startPage(pageNum, pageSize);
  432. //分页数据
  433. List<Map<String, Object>> report = statisticalReportService.getOutFactoryInwardList(mapValue);
  434. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  435. return success(pageList);
  436. }
  437. @ApiOperation(value="查询该组织机构下的内转统计报表")
  438. @ApiImplicitParams({
  439. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  440. @ApiImplicitParam(name = "apiId", value = "s", required = false, dataType = "Integer"),
  441. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  442. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  443. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  444. })
  445. @PostMapping("/getInwardInFactory")
  446. public RESTfulResult getInwardInFactory(@RequestBody(required=false) Map<String,Object> mapValue,
  447. Integer apiId,
  448. Integer pageNum,
  449. Integer pageSize,
  450. String startTime,
  451. String endTime,
  452. String orgCode,
  453. String isPage,
  454. String index
  455. ){
  456. if (index!=null&&!"null".equals(index)){
  457. mapValue.put("index",index);
  458. }
  459. if (orgCode!=null&&!"null".equals(orgCode)){
  460. mapValue.put("orgCode",orgCode);
  461. }
  462. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  463. if ("yes".equals(isPage)){
  464. return success(statisticalReportService.getInwardInFactory(mapValue));
  465. }
  466. PageHelper.startPage(pageNum, pageSize);
  467. //分页数据
  468. List<Map<String, Object>> report = statisticalReportService.getInwardInFactory(mapValue);
  469. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  470. return success(pageList);
  471. }
  472. @ApiOperation(value="查询拼装车统计报表")
  473. @ApiImplicitParams({
  474. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  475. @ApiImplicitParam(name = "apiId", value = "477", required = false, dataType = "Integer"),
  476. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  477. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  478. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  479. })
  480. @PostMapping("/getInwardReportForAssemble")
  481. public RESTfulResult getInwardReportForAssemble(@RequestBody(required=false) Map<String,Object> mapValue,
  482. Integer apiId,
  483. Integer pageNum,
  484. Integer pageSize,
  485. String startTime,
  486. String endTime, BigDecimal orderType, String index, String isPage,String orgCode
  487. ){
  488. if (index!=null&&!"null".equals(index)){
  489. mapValue.put("index",index);
  490. }
  491. if (orgCode!=null&&!"null".equals(orgCode)){
  492. mapValue.put("orgCode",orgCode);
  493. }
  494. if (orderType!=null&&!"null".equals(orderType)){
  495. mapValue.put("orderTypee",orderType);
  496. }
  497. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  498. if ("yes".equals(isPage)){
  499. return success(statisticalReportService.getInwardReportForAssemble(mapValue));
  500. }
  501. PageHelper.startPage(pageNum, pageSize);
  502. //分页数据
  503. List<Map<String, Object>> report = statisticalReportService.getInwardReportForAssemble(mapValue);
  504. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  505. return success(pageList);
  506. }
  507. @ApiOperation(value="装机展示明细")
  508. @ApiImplicitParams({
  509. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  510. @ApiImplicitParam(name = "apiId", value = "477", required = false, dataType = "Integer"),
  511. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  512. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  513. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  514. })
  515. @PostMapping("/getLoaderForResultDetail")
  516. public RESTfulResult getLoaderForResultDetail(@RequestBody(required=false) Map<String,Object> mapValue,
  517. Integer apiId,
  518. Integer pageNum,
  519. Integer pageSize,
  520. String startTime,
  521. String endTime,
  522. String con
  523. ){
  524. if (con != null && !"undefined".equals(con)) {
  525. mapValue.put("con",con);
  526. }
  527. DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
  528. PageHelper.startPage(pageNum, pageSize);
  529. //分页数据
  530. List<Map<String, Object>> report = statisticalReportService.getLoaderForResultDetail(mapValue);
  531. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  532. return success(pageList);
  533. }
  534. @ApiOperation("对内转车辆装货点进行统计")
  535. @PostMapping("/getLoading")
  536. public RESTfulResult getLoading(@RequestBody(required=false) Map<String,Object> mapValue,
  537. Integer apiId,
  538. Integer pageNum,
  539. Integer pageSize,
  540. String startTime,
  541. String endTime){
  542. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  543. PageHelper.startPage(pageNum, pageSize);
  544. //分页数据
  545. List<Map<String, Object>> report = statisticalReportService.getLoading(mapValue);
  546. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  547. return success(pageList);
  548. }
  549. @ApiOperation("装载机所装车辆重量统计报表")
  550. @PostMapping("/getLoaderResult")
  551. public RESTfulResult getLoaderResult(@RequestBody(required=false) Map<String,Object> mapValue,
  552. Integer apiId,//apiId:463
  553. Integer pageNum,
  554. Integer pageSize,
  555. String startTime,
  556. String endTime){
  557. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
  558. PageHelper.startPage(pageNum, pageSize);
  559. //分页数据
  560. List<Map<String, Object>> report = statisticalReportService.getLoaderResult(mapValue);
  561. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  562. return success(pageList);
  563. }
  564. @ApiOperation("对内转车辆装卸货点进行统计")
  565. @PostMapping("/getUnLoading")
  566. public RESTfulResult getUnLoading(@RequestBody(required=false) Map<String,Object> mapValue,
  567. Integer apiId,
  568. Integer pageNum,
  569. Integer pageSize,
  570. String startTime,
  571. String endTime){
  572. DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDate);//根据时间段查询数据
  573. PageHelper.startPage(pageNum, pageSize);
  574. //分页数据
  575. List<Map<String, Object>> report = statisticalReportService.getUnLoading(mapValue);
  576. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
  577. return success(pageList);
  578. }
  579. //保卫部随机抽查车牌号查看所有信息
  580. @ApiOperation("保卫部随机抽查车牌号查看所有信息")
  581. @PostMapping("/getCapacityByDefend")
  582. public RESTfulResult getCapacityByDefend(@RequestBody(required = false) Map<String,Object> map,
  583. Integer apiId,
  584. Integer pageNum,
  585. Integer pageSize,
  586. String startTime,
  587. String endTime,
  588. String con,
  589. String yes){
  590. if (con != null && !"null".equals(con)) {
  591. map.put("con",con);
  592. }
  593. DataChange.queryDataByDateTime(startTime ,endTime, map, sdfDateTime);//根据时间段查询数据
  594. if(yes != null && !"null".equals(yes)){
  595. return success(statisticalReportService.getCapacityByDefend(map));
  596. }
  597. PageHelper.startPage(pageNum, pageSize);
  598. List<Map<String, Object>> report = statisticalReportService.getCapacityByDefend(map);
  599. PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
  600. return success(pageList);
  601. }
  602. @ApiOperation(value="查询销售统计报表")
  603. @ApiImplicitParams({
  604. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  605. @ApiImplicitParam(name = "apiId(423)", value = "动态表头", required = false, dataType = "Integer"),
  606. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  607. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  608. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  609. })
  610. @PostMapping("/getSaleSteelReport")
  611. public RESTfulResult getSaleSteelReport(@RequestBody(required=false) Map<String,Object> map,
  612. String startTime,
  613. String endTime,
  614. String carrierSsoId,
  615. String receiveName,
  616. String materialName,
  617. String specification,
  618. String remark,
  619. String capacityNo,
  620. String carrierName,
  621. String consigneeName,
  622. String saler
  623. ){
  624. DataChange.queryDataByDateTimeYestDay(startTime, endTime, map, sdfDateTime);//根据时间段查询数据
  625. if(carrierSsoId != null){
  626. if(!"null".equals(carrierSsoId) && carrierSsoId != null){
  627. map.put("carrierSsoId", carrierSsoId);
  628. }
  629. }
  630. if (receiveName != null && !"null".equals(receiveName)) {
  631. map.put("receivName","%" + receiveName + "%");
  632. }
  633. if (remark != null && !"".equals(remark) && !"null".equals(remark)) {
  634. map.put("remark","%" + remark + "%");
  635. }
  636. if (capacityNo != null && !"".equals(capacityNo) && !"null".equals(capacityNo)) {
  637. map.put("capacityNum","%" + capacityNo + "%");
  638. }
  639. if (carrierName != null && !"".equals(carrierName) && !"null".equals(carrierName)) {
  640. map.put("carrierNames","%" + carrierName + "%");
  641. }
  642. if (consigneeName != null && !"".equals(consigneeName) && !"null".equals(consigneeName)) {
  643. map.put("consigneeNames","%" + consigneeName + "%");
  644. }
  645. if (saler != null && !"".equals(saler) && !"null".equals(saler)) {
  646. map.put("salers",saler);
  647. }
  648. //分页数据
  649. List<Map<String, Object>> report = statisticalReportService.getSaleSteelReport(map);
  650. return success(report);
  651. }
  652. }