DataController.java 112 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083
  1. package com.trs.ggzyexchange.datacentercontroller;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  5. import com.baomidou.mybatisplus.core.toolkit.IdWorker;
  6. import com.trs.ggzyexchange.api.vo.Result;
  7. import com.trs.ggzyexchange.entity.*;
  8. import com.trs.ggzyexchange.entity.pagedata.*;
  9. import com.trs.ggzyexchange.enums.CommonConstant;
  10. import com.trs.ggzyexchange.service.*;
  11. import com.trs.ggzyexchange.utils.DateUtils;
  12. import com.trs.ggzyexchange.utils.RedisUtil;
  13. import lombok.extern.slf4j.Slf4j;
  14. import org.apache.commons.lang3.ObjectUtils;
  15. import org.apache.commons.lang3.time.DateFormatUtils;
  16. import org.springframework.beans.factory.annotation.Autowired;
  17. import org.springframework.format.annotation.DateTimeFormat;
  18. import org.springframework.web.bind.annotation.GetMapping;
  19. import org.springframework.web.bind.annotation.RequestMapping;
  20. import org.springframework.web.bind.annotation.RequestParam;
  21. import org.springframework.web.bind.annotation.RestController;
  22. import java.math.BigDecimal;
  23. import java.text.ParseException;
  24. import java.text.SimpleDateFormat;
  25. import java.time.LocalDate;
  26. import java.util.*;
  27. /*
  28. * 数据中心接口
  29. * */
  30. @Slf4j
  31. @RestController
  32. @RequestMapping("/data-controller")
  33. public class DataController {
  34. @Autowired
  35. private GcNoticeandfileService gcNoticeandfileService;
  36. @Autowired
  37. private AreaPlatformService areaPlatformService;
  38. @Autowired
  39. private GcPubContractService gcPubContractService;
  40. @Autowired
  41. private GcBidpublicityService gcBidpublicityService;
  42. @Autowired
  43. private ZtLegalinfoService ztLegalinfoService;
  44. @Autowired
  45. private TRegionService tRegionService;
  46. @Autowired
  47. private GcTenderprojectService gcTenderprojectService;
  48. @Autowired
  49. private ZrzyTdCedeNoticeService zrzyTdCedeNoticeService;
  50. @Autowired
  51. private CqSwIssueBulletinService cqSwIssueBulletinService;
  52. @Autowired
  53. private ZcPurchaseBulletinService zcPurchaseBulletinService;
  54. @Autowired
  55. private QtjyNoticeService qtjyNoticeService;
  56. @Autowired
  57. private ZcBidpublicityService zcBidpublicityService;
  58. @Autowired
  59. private ZrzyTdBidwinnoticeService zrzyTdBidwinnoticeService;
  60. @Autowired
  61. private CqSwBargainResultService cqSwBargainResultService;
  62. @Autowired
  63. private CqGqIssueBulletinService cqGqIssueBulletinService;
  64. @Autowired
  65. private CqGqBargainResultService cqGqBargainResultService;
  66. @Autowired
  67. private QtjyBidpublicityService qtjyBidpublicityService;
  68. @Autowired
  69. private ZcProjectService zcProjectService;
  70. @Autowired
  71. private ZrzyTdCedeInfoService zrzyTdCedeInfoService;
  72. @Autowired
  73. private ZrzyTkqProjectInfoService zrzyTkqProjectInfoService;
  74. @Autowired
  75. private ZrzyCkqProjectInfoService zrzyCkqProjectInfoService;
  76. @Autowired
  77. private ZrzyDkProjectService zrzyDkProjectService;
  78. @Autowired
  79. private ZrzyBgStockIndexService zrzyBgStockIndexService;
  80. @Autowired
  81. private ZrzyJyzbStockIndexService zrzyJyzbStockIndexService;
  82. @Autowired
  83. private QtjyTenderProjectService qtjyTenderProjectService;
  84. @Autowired
  85. private QtjyBidopenrecordService qtjyBidopenrecordService;
  86. @Autowired
  87. private ZcBidopenrecordService zcBidopenrecordService;
  88. @Autowired
  89. private GcProjectService gcProjectService;
  90. @Autowired
  91. private OtherTradeResultInfoService otherTradeResultInfoService;
  92. @Autowired
  93. private OtherTradePubInfoService otherTradePubInfoService;
  94. @Autowired
  95. private ZrzyTdCedeResultService zrzyTdCedeResultService;
  96. @Autowired
  97. private GcPackageService gcPackageService;
  98. @Autowired
  99. private ZrzyTkqBidwinnoticeService zrzyTkqBidwinnoticeService;
  100. @Autowired
  101. private ZrzyCkqBidwinnoticeService zrzyCkqBidwinnoticeService;
  102. @Autowired
  103. private ZrzyDkBinwinNoticeService zrzyDkBinwinNoticeService;
  104. @Autowired
  105. private ZrzyDkNoticeService zrzyDkNoticeService;
  106. @Autowired
  107. private ZrzyBgNoticeService zrzyBgNoticeService;
  108. @Autowired
  109. private ZrzyJyzbNoticeService zrzyJyzbNoticeService;
  110. @Autowired
  111. private ZrzyBgBidwinNoticeService zrzyBgBidwinNoticeService;
  112. @Autowired
  113. private ZrzyJyzbBidwinNoticeService zrzyJyzbBidwinNoticeService;
  114. @Autowired
  115. private ZrzyTkqNoticeService zrzyTkqNoticeService;
  116. @Autowired
  117. private ZrzyCkqNoticeService zrzyCkqNoticeService;
  118. @Autowired
  119. private JgFieldApplyService jgFieldApplyService;
  120. @Autowired
  121. private YcNoticeService ycNoticeService;
  122. @Autowired
  123. private RedisUtil redisUtil;
  124. @Autowired
  125. private DataEmploy dataEmploy;
  126. @GetMapping(value = "/listTotal")
  127. public Result<FirstPageData> queryPageListTotal() {
  128. FirstPageData firstPageData = null;
  129. Object firstPageDataObj = redisUtil.get(CommonConstant.LIST_TOTAL);
  130. if(!ObjectUtils.isEmpty(firstPageDataObj)){
  131. firstPageData = JSONObject.parseObject(firstPageDataObj.toString(),FirstPageData.class);
  132. return Result.OK(firstPageData);
  133. }else{
  134. firstPageData = new FirstPageData();
  135. }
  136. HomePageDataCenter homePageDataCenter = dataEmploy.queryHomePageDataCenter();
  137. TotalEntryData totalEntryData = homePageDataCenter.getTotalEntryData();
  138. //内蒙古自治区:121500004600236091
  139. /*
  140. * 总数
  141. * */
  142. DataStatistics dataStatistics = new DataStatistics();
  143. try {
  144. dataStatistics.setTotalData(totalEntryData.getTotal());
  145. dataStatistics.setAutonomousTotalData(totalEntryData.getTotalzzq());
  146. dataStatistics.setMengShiTotalData(totalEntryData.getTotalms());
  147. }catch (Exception e){
  148. e.printStackTrace();
  149. }
  150. TotalTransactionData totalTransactionData = homePageDataCenter.getTotalTransactionData();
  151. /*
  152. * 入场数据总量
  153. * */
  154. BusinessDataStatistics businessDataStatistics = new BusinessDataStatistics();
  155. try {
  156. businessDataStatistics.setBusinessTotalData(totalTransactionData.getTotal());
  157. businessDataStatistics.setBusinessAutonomousTotalData(totalTransactionData.getTotalzzq());
  158. businessDataStatistics.setBusinessMengShiTotalData(totalTransactionData.getTotalms());
  159. }catch (Exception e){
  160. e.printStackTrace();
  161. }
  162. /*
  163. *主体数量
  164. */
  165. TotalAmountTransactionData totalAmountTransactionData = homePageDataCenter.getTotalAmountTransactionData();
  166. SubDataStatistics subDataStatistics = new SubDataStatistics();
  167. try {
  168. subDataStatistics.setName(totalAmountTransactionData.getName());
  169. subDataStatistics.setIntraRegional(totalAmountTransactionData.getTotalzzq());
  170. subDataStatistics.setOutOfRegion(totalAmountTransactionData.getTotalms());
  171. }catch (Exception e){
  172. e.printStackTrace();
  173. }
  174. /*
  175. * 交易额总量
  176. * */
  177. QueryWrapper<GcBidpublicity> gcBidpublicityQueryWrapperSum = new QueryWrapper<GcBidpublicity>();
  178. gcBidpublicityQueryWrapperSum.select("sum( case when PRICE_UNIT = 0 then BID_AMOUNT when PRICE_UNIT = 1 then BID_AMOUNT*10000 else BID_AMOUNT end) as sumAll");
  179. GcBidpublicity gcBidpublicity = gcBidpublicityService.getOne(gcBidpublicityQueryWrapperSum);
  180. QueryWrapper<ZcBidpublicity> bidpublicityQueryWrapperSum = new QueryWrapper<ZcBidpublicity>();
  181. bidpublicityQueryWrapperSum.select("sum( case when PRICE_UNIT = 0 then WIN_BID_PRICE when PRICE_UNIT = 1 then WIN_BID_PRICE*10000 else WIN_BID_PRICE end) as sumAll");
  182. ZcBidpublicity zcBidpublicitySum = zcBidpublicityService.getOne(bidpublicityQueryWrapperSum);
  183. /*ZRZY_TD_BIDWINNOTICE*/
  184. QueryWrapper<ZrzyTdBidwinnotice> zrzyTdBidwinnoticeQuerySum = new QueryWrapper<ZrzyTdBidwinnotice>();
  185. zrzyTdBidwinnoticeQuerySum.select("sum( case when PRICE_UNIT = 0 then DEAL_PRICE when PRICE_UNIT = 1 then DEAL_PRICE*10000 else DEAL_PRICE end) as sumAll");
  186. ZrzyTdBidwinnotice zrzyTdBidwinnoticeSum = zrzyTdBidwinnoticeService.getOne(zrzyTdBidwinnoticeQuerySum);
  187. /*ZRZY_TKQ_BIDWINNOTICE*/
  188. QueryWrapper<ZrzyTkqBidwinnotice> zrzyTdBidwinnoticeQueryWrapperSum = new QueryWrapper<ZrzyTkqBidwinnotice>();
  189. zrzyTdBidwinnoticeQueryWrapperSum.select("sum(cast(QT_PUBLIC_PRICE as decimal(9,2)) * 10000) as sumAll ");
  190. ZrzyTkqBidwinnotice zrzyTkqBidwinnoticeSum = zrzyTkqBidwinnoticeService.getOne(zrzyTdBidwinnoticeQueryWrapperSum);
  191. /*ZRZY_CKQ_BIDWINNOTICE*/
  192. QueryWrapper<ZrzyCkqBidwinnotice> zrzyCkqBidwinnoticeQueryWrapperSum = new QueryWrapper<ZrzyCkqBidwinnotice>();
  193. zrzyCkqBidwinnoticeQueryWrapperSum.select("sum(cast(QT_PUBLIC_PRICE as decimal(9,2)) * 10000) as sumAll ");
  194. ZrzyCkqBidwinnotice zrzyCkqBidwinnoticeSum = zrzyCkqBidwinnoticeService.getOne(zrzyCkqBidwinnoticeQueryWrapperSum);
  195. /*ZRZY_DK_BIDWIN_NOTICE*/
  196. QueryWrapper<ZrzyDkBinwinNotice> zrzyDkBinwinNoticeQueryWrapperSum = new QueryWrapper<ZrzyDkBinwinNotice>();
  197. zrzyDkBinwinNoticeQueryWrapperSum.select("sum(cast(ZB_PRICE as decimal(9,2)) * 10000) as sumAll ");
  198. ZrzyDkBinwinNotice zrzyDkBinwinNoticeSum = zrzyDkBinwinNoticeService.getOne(zrzyDkBinwinNoticeQueryWrapperSum);
  199. /*ZRZY_BG_BIDWIN_NOTICE*/
  200. QueryWrapper<ZrzyBgBidwinNotice> zrzyBgBidwinNoticeQueryWrapperSum = new QueryWrapper<ZrzyBgBidwinNotice>();
  201. zrzyBgBidwinNoticeQueryWrapperSum.select("sum(cast(WIN_BID_PRICE as decimal(9,2)) * 10000) as sumAll ");
  202. ZrzyBgBidwinNotice zrzyBgBidwinNoticeSum = zrzyBgBidwinNoticeService.getOne(zrzyBgBidwinNoticeQueryWrapperSum);
  203. /*ZRZY_JYZB_BIDWIN_NOTICE*/
  204. QueryWrapper<ZrzyJyzbBidwinNotice> zrzyJyzbBidwinNoticeQueryWrapperSum = new QueryWrapper<ZrzyJyzbBidwinNotice>();
  205. zrzyJyzbBidwinNoticeQueryWrapperSum.select("sum(WIN_BID_PRICE) as sumAll");
  206. ZrzyJyzbBidwinNotice zrzyJyzbBidwinNoticeSum = zrzyJyzbBidwinNoticeService.getOne(zrzyJyzbBidwinNoticeQueryWrapperSum);
  207. /*CQ_SW_BARGAIN_RESULT*/
  208. QueryWrapper<CqSwBargainResult> cqSwBargainResultQueryWrapperSum = new QueryWrapper<CqSwBargainResult>();
  209. cqSwBargainResultQueryWrapperSum.select("sum( case when PRICE_UNIT = 0 then TRADE_VALUE when PRICE_UNIT = 1 then TRADE_VALUE*10000 else TRADE_VALUE end) as sumAll");
  210. CqSwBargainResult cqSwBargainResultSum = cqSwBargainResultService.getOne(cqSwBargainResultQueryWrapperSum);
  211. /*CQ_GQ_BARGAIN_RESULT*/
  212. QueryWrapper<CqGqBargainResult> cqGqBargainResultQueryWrapperSum = new QueryWrapper<CqGqBargainResult>();
  213. cqGqBargainResultQueryWrapperSum.select("sum( case when PRICE_UNIT = 0 then TRADE_VALUE when PRICE_UNIT = 1 then TRADE_VALUE*10000 else TRADE_VALUE end) as sumAll");
  214. CqGqBargainResult cqGqBargainResultSum = cqGqBargainResultService.getOne(cqGqBargainResultQueryWrapperSum);
  215. BigDecimal noticeSum = new BigDecimal(0);
  216. if(!ObjectUtils.isEmpty(gcBidpublicity)){
  217. String sumAllGcBidpublicity = gcBidpublicity.getSumAll();
  218. if(!ObjectUtils.isEmpty(sumAllGcBidpublicity) && sumAllGcBidpublicity != ""){
  219. noticeSum = noticeSum.add(new BigDecimal(sumAllGcBidpublicity));
  220. }
  221. }
  222. if(!ObjectUtils.isEmpty(zcBidpublicitySum)){
  223. String sumAllZcBidpublicitySum = zcBidpublicitySum.getSumAll();
  224. if(!ObjectUtils.isEmpty(sumAllZcBidpublicitySum) && sumAllZcBidpublicitySum != ""){
  225. noticeSum = noticeSum.add(new BigDecimal(sumAllZcBidpublicitySum));
  226. }
  227. }
  228. if(!ObjectUtils.isEmpty(zrzyTdBidwinnoticeSum)){
  229. String sumAllZrzyTdBidwinnoticeSum = zrzyTdBidwinnoticeSum.getSumAll();
  230. if(!ObjectUtils.isEmpty(sumAllZrzyTdBidwinnoticeSum) && sumAllZrzyTdBidwinnoticeSum != ""){
  231. noticeSum = noticeSum.add(new BigDecimal(sumAllZrzyTdBidwinnoticeSum));
  232. }
  233. }
  234. if(!ObjectUtils.isEmpty(zrzyTkqBidwinnoticeSum)){
  235. String sumAllZrzyTkqBidwinnoticeSum = zrzyTkqBidwinnoticeSum.getSumAll();
  236. if(!ObjectUtils.isEmpty(sumAllZrzyTkqBidwinnoticeSum) && sumAllZrzyTkqBidwinnoticeSum != ""){
  237. noticeSum = noticeSum.add(new BigDecimal(sumAllZrzyTkqBidwinnoticeSum));
  238. }
  239. }
  240. if(!ObjectUtils.isEmpty(zrzyCkqBidwinnoticeSum)){
  241. String sumAllZrzyCkqBidwinnoticeSum = zrzyCkqBidwinnoticeSum.getSumAll();
  242. if(!ObjectUtils.isEmpty(sumAllZrzyCkqBidwinnoticeSum) && sumAllZrzyCkqBidwinnoticeSum != ""){
  243. noticeSum = noticeSum.add(new BigDecimal(sumAllZrzyCkqBidwinnoticeSum));
  244. }
  245. }
  246. if(!ObjectUtils.isEmpty(zrzyDkBinwinNoticeSum)){
  247. String sumAllZrzyDkBinwinNoticeSum = zrzyDkBinwinNoticeSum.getSumAll();
  248. if(!ObjectUtils.isEmpty(sumAllZrzyDkBinwinNoticeSum) && sumAllZrzyDkBinwinNoticeSum != ""){
  249. noticeSum = noticeSum.add(new BigDecimal(sumAllZrzyDkBinwinNoticeSum));
  250. }
  251. }
  252. if(!ObjectUtils.isEmpty(zrzyBgBidwinNoticeSum)){
  253. String sumAllzrzyBgBidwinNoticeSum = zrzyBgBidwinNoticeSum.getSumAll();
  254. if(!ObjectUtils.isEmpty(sumAllzrzyBgBidwinNoticeSum) && sumAllzrzyBgBidwinNoticeSum != ""){
  255. noticeSum = noticeSum.add(new BigDecimal(sumAllzrzyBgBidwinNoticeSum));
  256. }
  257. }
  258. if(!ObjectUtils.isEmpty(zrzyJyzbBidwinNoticeSum)){
  259. String sumAllzrzyJyzbBidwinNoticeSum = zrzyJyzbBidwinNoticeSum.getSumAll();
  260. if(!ObjectUtils.isEmpty(sumAllzrzyJyzbBidwinNoticeSum) && sumAllzrzyJyzbBidwinNoticeSum != ""){
  261. noticeSum = noticeSum.add(new BigDecimal(sumAllzrzyJyzbBidwinNoticeSum));
  262. }
  263. }
  264. if(!ObjectUtils.isEmpty(cqSwBargainResultSum)){
  265. String sumAllcqSwBargainResultSum = cqSwBargainResultSum.getSumAll();
  266. if(!ObjectUtils.isEmpty(sumAllcqSwBargainResultSum) && sumAllcqSwBargainResultSum != ""){
  267. noticeSum = noticeSum.add(new BigDecimal(sumAllcqSwBargainResultSum));
  268. }
  269. }
  270. if(!ObjectUtils.isEmpty(cqGqBargainResultSum)){
  271. String sumAllcqGqBargainResultSum = cqGqBargainResultSum.getSumAll();
  272. if(!ObjectUtils.isEmpty(sumAllcqGqBargainResultSum) && sumAllcqGqBargainResultSum != ""){
  273. noticeSum = noticeSum.add(new BigDecimal(sumAllcqGqBargainResultSum));
  274. }
  275. }
  276. /*
  277. 交易额总数
  278. */
  279. firstPageData.setTotalTransactionVolume(noticeSum.toString());
  280. /*
  281. 成交宗数宗量
  282. */
  283. firstPageData.setTotalNumberTransactions(
  284. gcBidpublicityService.count()+
  285. zcBidpublicityService.count()+
  286. zrzyTdBidwinnoticeService.count()+
  287. zrzyTkqBidwinnoticeService.count()+
  288. zrzyCkqBidwinnoticeService.count()+
  289. zrzyDkBinwinNoticeService.count()+
  290. zrzyBgBidwinNoticeService.count()+
  291. zrzyJyzbBidwinNoticeService.count()+
  292. cqSwBargainResultService.count()+
  293. cqGqBargainResultService.count()
  294. );
  295. List<CityTradeData> cityTradeDataList = new ArrayList<CityTradeData>();
  296. //查询盟市列表
  297. QueryWrapper<TRegion> tRegionQueryWrapper = new QueryWrapper<TRegion>();
  298. tRegionQueryWrapper.eq("parent_code","150000");
  299. tRegionQueryWrapper.orderByAsc("order_num");
  300. List<TRegion> list = tRegionService.list(tRegionQueryWrapper);
  301. for (TRegion tRegion : list) {
  302. String code = tRegion.getCode();
  303. QueryWrapper<AreaPlatform> platformQueryWrapper = new QueryWrapper<AreaPlatform>();
  304. platformQueryWrapper.eq("AREA_CODE",code);
  305. AreaPlatform areaPlatform = areaPlatformService.getOne(platformQueryWrapper);
  306. if(!ObjectUtils.isEmpty(areaPlatform)){
  307. tRegion.setCode(tRegion.getCode().substring(0,4));
  308. tRegion.setCodePram(areaPlatform.getPlatformCode());
  309. CityTradeData cityTradeData = new CityTradeData();
  310. cityTradeData.setCityName(tRegion.getName());
  311. cityTradeData.setRegionCode(tRegion.getCode());
  312. cityTradeData.setPlatformCode(areaPlatform.getPlatformCode());
  313. String regionCode = areaPlatform.getAreaCode().substring(0,4);
  314. String platformCode = cityTradeData.getPlatformCode();
  315. Integer totalBusinessTotalDataCity = 0;
  316. QueryWrapper<GcBidpublicity> GcBidpublicityQueryWrapperIn = new QueryWrapper<GcBidpublicity>();
  317. GcBidpublicityQueryWrapperIn.eq("PLATFORM_CODE",platformCode);
  318. totalBusinessTotalDataCity = totalBusinessTotalDataCity + gcBidpublicityService.count(GcBidpublicityQueryWrapperIn);
  319. QueryWrapper<ZcBidpublicity> zcBidpublicityQueryWrapperIn = new QueryWrapper<ZcBidpublicity>();
  320. zcBidpublicityQueryWrapperIn.eq("PLATFORM_CODE",platformCode);
  321. totalBusinessTotalDataCity = totalBusinessTotalDataCity + zcBidpublicityService.count(zcBidpublicityQueryWrapperIn);
  322. QueryWrapper<ZrzyTdBidwinnotice> zrzyTdBidwinnoticeQueryWrapperIn = new QueryWrapper<ZrzyTdBidwinnotice>();
  323. zrzyTdBidwinnoticeQueryWrapperIn.likeRight("region_code",regionCode);
  324. totalBusinessTotalDataCity = totalBusinessTotalDataCity +zrzyTdBidwinnoticeService.count(zrzyTdBidwinnoticeQueryWrapperIn);
  325. QueryWrapper<ZrzyTkqBidwinnotice> zrzyTkqBidwinnoticeQueryWrapperIn = new QueryWrapper<ZrzyTkqBidwinnotice>();
  326. zrzyTkqBidwinnoticeQueryWrapperIn.likeRight("region_code",regionCode);
  327. totalBusinessTotalDataCity = totalBusinessTotalDataCity +zrzyTkqBidwinnoticeService.count(zrzyTkqBidwinnoticeQueryWrapperIn);
  328. QueryWrapper<ZrzyCkqBidwinnotice> zrzyCkqBidwinnoticeQueryWrapperIn = new QueryWrapper<ZrzyCkqBidwinnotice>();
  329. zrzyCkqBidwinnoticeQueryWrapperIn.likeRight("region_code",regionCode);
  330. totalBusinessTotalDataCity = totalBusinessTotalDataCity +zrzyCkqBidwinnoticeService.count(zrzyCkqBidwinnoticeQueryWrapperIn);
  331. QueryWrapper<ZrzyDkBinwinNotice> zrzyDkBinwinNoticeQueryWrapperIn = new QueryWrapper<ZrzyDkBinwinNotice>();
  332. zrzyDkBinwinNoticeQueryWrapperIn.likeRight("zone",regionCode);
  333. totalBusinessTotalDataCity = totalBusinessTotalDataCity +zrzyDkBinwinNoticeService.count(zrzyDkBinwinNoticeQueryWrapperIn);
  334. QueryWrapper<ZrzyBgBidwinNotice> zrzyBgBidwinNoticeQueryWrapperIn = new QueryWrapper<ZrzyBgBidwinNotice>();
  335. zrzyBgBidwinNoticeQueryWrapperIn.eq("PLATFORM_CODE",platformCode);
  336. totalBusinessTotalDataCity = totalBusinessTotalDataCity +zrzyBgBidwinNoticeService.countNoticeByRegionCode(regionCode);
  337. QueryWrapper<ZrzyJyzbBidwinNotice> zrzyJyzbBidwinNoticeQueryWrapperIn = new QueryWrapper<ZrzyJyzbBidwinNotice>();
  338. zrzyJyzbBidwinNoticeQueryWrapperIn.eq("PLATFORM_CODE",platformCode);
  339. totalBusinessTotalDataCity = totalBusinessTotalDataCity +zrzyJyzbBidwinNoticeService.countNoticeByRegionCode(regionCode);
  340. QueryWrapper<CqSwBargainResult> GcBidpublicityQueryWrapperSelfIn = new QueryWrapper<CqSwBargainResult>();
  341. GcBidpublicityQueryWrapperSelfIn.eq("PLATFORM_CODE",platformCode);
  342. totalBusinessTotalDataCity = totalBusinessTotalDataCity +cqSwBargainResultService.countByRegionCode(regionCode);
  343. QueryWrapper<CqGqBargainResult> cqGqBargainResultWrapperSelfIn = new QueryWrapper<CqGqBargainResult>();
  344. cqGqBargainResultWrapperSelfIn.likeRight("region_code",regionCode);
  345. totalBusinessTotalDataCity = totalBusinessTotalDataCity + cqGqBargainResultService.count(cqGqBargainResultWrapperSelfIn);
  346. cityTradeData.setBusinessTotalData(
  347. totalBusinessTotalDataCity
  348. );
  349. QueryWrapper<ZtLegalinfo> ztLegalinfoQueryWrapperIn = new QueryWrapper<ZtLegalinfo>();
  350. ztLegalinfoQueryWrapperIn.likeRight("REGION_CODE",regionCode);
  351. cityTradeData.setSubTotalData(ztLegalinfoService.count(ztLegalinfoQueryWrapperIn));
  352. QueryWrapper<GcBidpublicity> gcBidpublicityQueryWrapperSumInIn = new QueryWrapper<GcBidpublicity>();
  353. gcBidpublicityQueryWrapperSumInIn.select("sum( case when PRICE_UNIT = 0 then BID_AMOUNT when PRICE_UNIT = 1 then BID_AMOUNT*10000 else BID_AMOUNT end) as sumAll");
  354. gcBidpublicityQueryWrapperSumInIn.eq("PLATFORM_CODE",platformCode);
  355. GcBidpublicity gcBidpublicitySumInIn = gcBidpublicityService.getOne(gcBidpublicityQueryWrapperSumInIn);
  356. QueryWrapper<ZcBidpublicity> bidpublicityQueryWrapperSumInIn = new QueryWrapper<ZcBidpublicity>();
  357. bidpublicityQueryWrapperSumInIn.select("sum( case when PRICE_UNIT = 0 then WIN_BID_PRICE when PRICE_UNIT = 1 then WIN_BID_PRICE*10000 else WIN_BID_PRICE end) as sumAll");
  358. bidpublicityQueryWrapperSumInIn.eq("PLATFORM_CODE",platformCode);
  359. ZcBidpublicity zcBidpublicitySumInIn = zcBidpublicityService.getOne(bidpublicityQueryWrapperSumInIn);
  360. /*ZRZY_TD_BIDWINNOTICE*/
  361. QueryWrapper<ZrzyTdBidwinnotice> zrzyTdBidwinnoticeQuerySumInIn = new QueryWrapper<ZrzyTdBidwinnotice>();
  362. zrzyTdBidwinnoticeQuerySumInIn.select("sum( case when PRICE_UNIT = 0 then DEAL_PRICE when PRICE_UNIT = 1 then DEAL_PRICE*10000 else DEAL_PRICE end) as sumAll");
  363. zrzyTdBidwinnoticeQuerySumInIn.likeRight("region_code",regionCode);
  364. ZrzyTdBidwinnotice zrzyTdBidwinnoticeSumInIn = zrzyTdBidwinnoticeService.getOne(zrzyTdBidwinnoticeQuerySumInIn);
  365. /*ZRZY_TKQ_BIDWINNOTICE*/
  366. QueryWrapper<ZrzyTkqBidwinnotice> zrzyTdBidwinnoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyTkqBidwinnotice>();
  367. zrzyTdBidwinnoticeQueryWrapperSumInIn.select("sum(cast(QT_PUBLIC_PRICE as decimal(9,2)) * 10000) as sumAll");
  368. zrzyTdBidwinnoticeQueryWrapperSumInIn.likeRight("region_code",regionCode);
  369. ZrzyTkqBidwinnotice zrzyTkqBidwinnoticeSumInIn = zrzyTkqBidwinnoticeService.getOne(zrzyTdBidwinnoticeQueryWrapperSumInIn);
  370. /*ZRZY_CKQ_BIDWINNOTICE*/
  371. QueryWrapper<ZrzyCkqBidwinnotice> zrzyCkqBidwinnoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyCkqBidwinnotice>();
  372. zrzyCkqBidwinnoticeQueryWrapperSumInIn.select("sum(cast(QT_PUBLIC_PRICE as decimal(9,2)) * 10000) as sumAll");
  373. zrzyCkqBidwinnoticeQueryWrapperSumInIn.likeRight("region_code",regionCode);
  374. ZrzyCkqBidwinnotice zrzyCkqBidwinnoticeSumInIn = zrzyCkqBidwinnoticeService.getOne(zrzyCkqBidwinnoticeQueryWrapperSumInIn);
  375. /*ZRZY_DK_BINWIN_NOTICE*/
  376. QueryWrapper<ZrzyDkBinwinNotice> zrzyDkBinwinNoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyDkBinwinNotice>();
  377. zrzyDkBinwinNoticeQueryWrapperSumInIn.select("sum(cast(ZB_PRICE as decimal(9,2)) * 10000) as sumAll");
  378. zrzyDkBinwinNoticeQueryWrapperSumInIn.likeRight("zone",regionCode);
  379. ZrzyDkBinwinNotice zrzyDkBinwinNoticeSumInIn = zrzyDkBinwinNoticeService.getOne(zrzyDkBinwinNoticeQueryWrapperSumInIn);
  380. /*ZRZY_BG_BIDWIN_NOTICE*/
  381. ZrzyBgBidwinNotice zrzyBgBidwinNoticeSumInIn = zrzyBgBidwinNoticeService.getSumMoneyByRegionCode(regionCode);
  382. /*ZRZY_JYZB_BIDWIN_NOTICE*/
  383. ZrzyJyzbBidwinNotice zrzyJyzbBidwinNoticeSumInIn = zrzyJyzbBidwinNoticeService.getSumMoneyByRegionCode(regionCode);
  384. /*CQ_SW_BARGAIN_RESULT*/
  385. CqSwBargainResult cqSwBargainResultSumInIn = cqSwBargainResultService.getSumMoneyByRegionCode(regionCode);
  386. /*CQ_GQ_BARGAIN_RESULT*/
  387. QueryWrapper<CqGqBargainResult> cqGqBargainResultQueryWrapperSumInIn = new QueryWrapper<CqGqBargainResult>();
  388. cqGqBargainResultQueryWrapperSumInIn.select("sum( case when PRICE_UNIT = 0 then TRADE_VALUE when PRICE_UNIT = 1 then TRADE_VALUE*10000 else TRADE_VALUE end) as sumAll");
  389. cqGqBargainResultQueryWrapperSumInIn.likeRight("region_code",regionCode);
  390. CqGqBargainResult cqGqBargainResultSumInIn = cqGqBargainResultService.getOne(cqGqBargainResultQueryWrapperSumInIn);
  391. BigDecimal bigTotal = new BigDecimal(0);
  392. if(!ObjectUtils.isEmpty(gcBidpublicitySumInIn)){
  393. String sumAll = gcBidpublicitySumInIn.getSumAll();
  394. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  395. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  396. }
  397. }
  398. if(!ObjectUtils.isEmpty(zcBidpublicitySumInIn)){
  399. String sumAll = zcBidpublicitySumInIn.getSumAll();
  400. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  401. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  402. }
  403. }
  404. if(!ObjectUtils.isEmpty(zrzyTdBidwinnoticeSumInIn)){
  405. String sumAll = zrzyTdBidwinnoticeSumInIn.getSumAll();
  406. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  407. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  408. }
  409. }
  410. if(!ObjectUtils.isEmpty(zrzyTkqBidwinnoticeSumInIn)){
  411. String sumAll = zrzyTkqBidwinnoticeSumInIn.getSumAll();
  412. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  413. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  414. }
  415. }
  416. if(!ObjectUtils.isEmpty(zrzyCkqBidwinnoticeSumInIn)){
  417. String sumAll = zrzyCkqBidwinnoticeSumInIn.getSumAll();
  418. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  419. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  420. }
  421. }
  422. if(!ObjectUtils.isEmpty(zrzyDkBinwinNoticeSumInIn)){
  423. String sumAll = zrzyDkBinwinNoticeSumInIn.getSumAll();
  424. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  425. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  426. }
  427. }
  428. if(!ObjectUtils.isEmpty(zrzyBgBidwinNoticeSumInIn)){
  429. String sumAll = zrzyBgBidwinNoticeSumInIn.getSumAll();
  430. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  431. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  432. }
  433. }
  434. if(!ObjectUtils.isEmpty(zrzyJyzbBidwinNoticeSumInIn)){
  435. String sumAll = zrzyJyzbBidwinNoticeSumInIn.getSumAll();
  436. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  437. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  438. }
  439. }
  440. if(!ObjectUtils.isEmpty(cqSwBargainResultSumInIn)){
  441. String sumAll = cqSwBargainResultSumInIn.getSumAll();
  442. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  443. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  444. }
  445. }
  446. if(!ObjectUtils.isEmpty(cqGqBargainResultSumInIn)){
  447. String sumAll = cqGqBargainResultSumInIn.getSumAll();
  448. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  449. bigTotal = bigTotal.add(new BigDecimal(sumAll));
  450. }
  451. }
  452. cityTradeData.setTotalTransactionVolume(
  453. bigTotal.toString()
  454. );
  455. QueryWrapper<GcBidpublicity> gcBidpublicityQueryWrapperInCount = new QueryWrapper<GcBidpublicity>();
  456. gcBidpublicityQueryWrapperInCount.eq("PLATFORM_CODE",platformCode);
  457. int count = gcBidpublicityService.count(gcBidpublicityQueryWrapperInCount);
  458. if(!ObjectUtils.isEmpty(count)){
  459. cityTradeData.setTotalNumberTransactions(count);
  460. }
  461. cityTradeDataList.add(cityTradeData);
  462. }
  463. }
  464. firstPageData.setCityTradeDataList(cityTradeDataList);
  465. firstPageData.setSubDataStatistics(subDataStatistics);
  466. firstPageData.setBusinessDataStatistics(businessDataStatistics);
  467. firstPageData.setDataStatistics(dataStatistics);
  468. redisUtil.set(CommonConstant.LIST_TOTAL, JSONObject.toJSONString(firstPageData),CommonConstant.REDIS_SAVE_TIME);
  469. return Result.OK(firstPageData);
  470. }
  471. @GetMapping(value = "/quantityStatisticsDayList")
  472. public Result<QuantityStatisticsAll> getQuantityStatisticsDayList(){
  473. QuantityStatisticsAll quantityStatisticsAll = null;
  474. Object quantityStatisticsAllObj = redisUtil.get(CommonConstant.STATISTICS_DAY);
  475. if(!ObjectUtils.isEmpty(quantityStatisticsAllObj)){
  476. quantityStatisticsAll = JSONObject.parseObject(quantityStatisticsAllObj.toString(),QuantityStatisticsAll.class);
  477. return Result.OK(quantityStatisticsAll);
  478. }else{
  479. quantityStatisticsAll = new QuantityStatisticsAll();
  480. }
  481. Date startTimeOfCurrentDay = DateUtils.getStartTimeOfCurrentDay(new Date());
  482. Date endTimeOfCurrentDay = DateUtils.getEndTimeOfCurrentDay(new Date());
  483. ProjectAdmission projectAdmission = new ProjectAdmission();
  484. projectAdmission.setTotal(getGcProjectTotal(startTimeOfCurrentDay,endTimeOfCurrentDay));
  485. projectAdmission.setTitle("项目入场");
  486. quantityStatisticsAll.setProjectAdmission(projectAdmission);
  487. BidOpeningTimes bidOpeningTimes = new BidOpeningTimes();
  488. bidOpeningTimes.setTitle("开标场次");
  489. bidOpeningTimes.setTotal(getFieldApplyByTime(startTimeOfCurrentDay,endTimeOfCurrentDay));
  490. quantityStatisticsAll.setBidOpeningTimes(bidOpeningTimes);
  491. NumberOfTransactions numberOfTransactions = new NumberOfTransactions();
  492. numberOfTransactions.setTitle("成交宗数");
  493. numberOfTransactions.setTotal(getGcBidpublicityTotal(startTimeOfCurrentDay,endTimeOfCurrentDay));
  494. quantityStatisticsAll.setNumberOfTransactions(numberOfTransactions);
  495. AnnouncementRelease announcementRelease = new AnnouncementRelease();
  496. announcementRelease.setTitle("公告发布");
  497. announcementRelease.setTotal(getGcNoticeandfileTotalByNoticeSendTime(startTimeOfCurrentDay,endTimeOfCurrentDay));
  498. quantityStatisticsAll.setAnnouncementRelease(announcementRelease);
  499. redisUtil.set(CommonConstant.STATISTICS_DAY, JSONObject.toJSONString(quantityStatisticsAll),CommonConstant.REDIS_SAVE_TIME_TEN_MINUTES);
  500. return Result.OK(quantityStatisticsAll);
  501. }
  502. @GetMapping(value = "/quantityStatisticsMoonList")
  503. public Result<QuantityStatisticsAll> getQuantityStatisticsMoonList(){
  504. QuantityStatisticsAll quantityStatisticsAll = null;
  505. Object quantityStatisticsAllObj = redisUtil.get(CommonConstant.STATISTICS_MOON);
  506. if(!ObjectUtils.isEmpty(quantityStatisticsAllObj)){
  507. quantityStatisticsAll = JSONObject.parseObject(quantityStatisticsAllObj.toString(),QuantityStatisticsAll.class);
  508. return Result.OK(quantityStatisticsAll);
  509. }else{
  510. quantityStatisticsAll = new QuantityStatisticsAll();
  511. }
  512. Date startTimeOfCurrentMonth = DateUtils.getStartTimeOfCurrentMonth(new Date());
  513. Date endTimeOfCurrentMonth = DateUtils.getEndTimeOfCurrentMonth(new Date());
  514. ProjectAdmission projectAdmission = new ProjectAdmission();
  515. projectAdmission.setTotal(getGcProjectTotal(startTimeOfCurrentMonth,endTimeOfCurrentMonth));
  516. projectAdmission.setTitle("项目入场");
  517. quantityStatisticsAll.setProjectAdmission(projectAdmission);
  518. BidOpeningTimes bidOpeningTimes = new BidOpeningTimes();
  519. bidOpeningTimes.setTitle("开标场次");
  520. bidOpeningTimes.setTotal(getFieldApplyByTime(startTimeOfCurrentMonth,endTimeOfCurrentMonth));
  521. quantityStatisticsAll.setBidOpeningTimes(bidOpeningTimes);
  522. NumberOfTransactions numberOfTransactions = new NumberOfTransactions();
  523. numberOfTransactions.setTitle("成交宗数");
  524. numberOfTransactions.setTotal(getGcBidpublicityTotal(startTimeOfCurrentMonth,endTimeOfCurrentMonth));
  525. quantityStatisticsAll.setNumberOfTransactions(numberOfTransactions);
  526. AnnouncementRelease announcementRelease = new AnnouncementRelease();
  527. announcementRelease.setTitle("公告发布");
  528. announcementRelease.setTotal(getGcNoticeandfileTotalByNoticeSendTime(startTimeOfCurrentMonth,endTimeOfCurrentMonth));
  529. quantityStatisticsAll.setAnnouncementRelease(announcementRelease);
  530. redisUtil.set(CommonConstant.STATISTICS_MOON, JSONObject.toJSONString(quantityStatisticsAll),CommonConstant.REDIS_SAVE_TIME_TEN_MINUTES);
  531. return Result.OK(quantityStatisticsAll);
  532. }
  533. @GetMapping(value = "/quantityStatisticsYearList")
  534. public Result<QuantityStatisticsAll> getQuantityStatisticsYearList(){
  535. QuantityStatisticsAll quantityStatisticsAll = new QuantityStatisticsAll();
  536. Object quantityStatisticsAllObj = redisUtil.get(CommonConstant.STATISTICS_YEAR);
  537. if(!ObjectUtils.isEmpty(quantityStatisticsAllObj)){
  538. quantityStatisticsAll = JSONObject.parseObject(quantityStatisticsAllObj.toString(),QuantityStatisticsAll.class);
  539. return Result.OK(quantityStatisticsAll);
  540. }else{
  541. quantityStatisticsAll = new QuantityStatisticsAll();
  542. }
  543. Date startTimeOfCurrentYear = DateUtils.getStartTimeOfCurrentYear(new Date());
  544. Date endTimeOfCurrentYear = DateUtils.getEndTimeOfCurrentYear(new Date());
  545. ProjectAdmission projectAdmission = new ProjectAdmission();
  546. projectAdmission.setTotal(getGcProjectTotal(startTimeOfCurrentYear,endTimeOfCurrentYear));
  547. projectAdmission.setTitle("项目入场");
  548. quantityStatisticsAll.setProjectAdmission(projectAdmission);
  549. BidOpeningTimes bidOpeningTimes = new BidOpeningTimes();
  550. bidOpeningTimes.setTitle("开标场次");
  551. bidOpeningTimes.setTotal(getFieldApplyByTime(startTimeOfCurrentYear,endTimeOfCurrentYear));
  552. quantityStatisticsAll.setBidOpeningTimes(bidOpeningTimes);
  553. NumberOfTransactions numberOfTransactions = new NumberOfTransactions();
  554. numberOfTransactions.setTitle("成交宗数");
  555. numberOfTransactions.setTotal(getGcBidpublicityTotal(startTimeOfCurrentYear,endTimeOfCurrentYear));
  556. quantityStatisticsAll.setNumberOfTransactions(numberOfTransactions);
  557. AnnouncementRelease announcementRelease = new AnnouncementRelease();
  558. announcementRelease.setTitle("公告发布");
  559. announcementRelease.setTotal(getGcNoticeandfileTotalByNoticeSendTime(startTimeOfCurrentYear,endTimeOfCurrentYear));
  560. quantityStatisticsAll.setAnnouncementRelease(announcementRelease);
  561. redisUtil.set(CommonConstant.STATISTICS_YEAR, JSONObject.toJSONString(quantityStatisticsAll),CommonConstant.REDIS_SAVE_TIME_TEN_MINUTES);
  562. return Result.OK(quantityStatisticsAll);
  563. }
  564. /*数据中心-公告发布数量*/
  565. @GetMapping(value = "/publishingCategoryData")
  566. public Result<CategoryData> publishingCategoryData(
  567. @RequestParam(name="platformCode", defaultValue="121500004600236091") String platformCode,
  568. @RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate stratDate,
  569. @RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate endDate
  570. ) throws ParseException {
  571. try {
  572. String startTime = stratDate.toString()+" 00:00:00";
  573. String endTime = endDate.toString()+" 23:59:59";
  574. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  575. SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
  576. Date dateStart = sdf.parse(startTime); // 将字符串转换为日期
  577. Date dateEnd = sdf.parse(endTime); // 将字符串转换为日期
  578. AreaPlatform areaPlatform = null;
  579. //获取区域编码对应的国标编码
  580. try {
  581. QueryWrapper<AreaPlatform> platformQueryWrapper = new QueryWrapper<AreaPlatform>();
  582. platformQueryWrapper.eq("PLATFORM_CODE",platformCode);
  583. areaPlatform = areaPlatformService.getOne(platformQueryWrapper);
  584. if(ObjectUtils.isEmpty(areaPlatform)){
  585. return Result.error("传入参数错误");
  586. }
  587. }catch (Exception e){
  588. e.printStackTrace();
  589. return Result.error("传入参数错误");
  590. }
  591. String areaCode = areaPlatform.getAreaCode();
  592. String formatStartTime = simpleDateFormat.format(dateStart);
  593. String formatDateEnd = simpleDateFormat.format(dateEnd);
  594. log.info("开始时间格式转换:"+formatStartTime);
  595. log.info("结束时间格式转换:"+formatDateEnd);
  596. log.info("区域编码:"+platformCode);
  597. try {
  598. areaCode = areaCode.substring(0,4);
  599. log.info("区域国标编码:"+areaCode);
  600. }catch (Exception e){
  601. e.printStackTrace();
  602. areaCode = "";
  603. log.info("区域国标编码:"+areaCode);
  604. }
  605. String regionCode = areaCode;
  606. CategoryData categoryData = new CategoryData();
  607. CategoryDataGc categoryDataGc = new CategoryDataGc();
  608. /*
  609. * 工程建设-开始
  610. * */
  611. QueryWrapper<GcNoticeandfile> gcNoticeandfileQueryWrapper = new QueryWrapper<GcNoticeandfile>();
  612. gcNoticeandfileQueryWrapper.gt("NOTICE_SEND_TIME",formatStartTime);
  613. gcNoticeandfileQueryWrapper.le("NOTICE_SEND_TIME",formatDateEnd);
  614. int countGcNoticeandfile = gcNoticeandfileService.count(gcNoticeandfileQueryWrapper);
  615. QueryWrapper<GcNoticeandfile> gcNoticeandfileQueryWrapperPlatformCode = new QueryWrapper<GcNoticeandfile>();
  616. gcNoticeandfileQueryWrapperPlatformCode.eq("PLATFORM_CODE",platformCode);
  617. gcNoticeandfileQueryWrapperPlatformCode.gt("NOTICE_SEND_TIME",formatStartTime);
  618. gcNoticeandfileQueryWrapperPlatformCode.le("NOTICE_SEND_TIME",formatDateEnd);
  619. int countGcNoticeandfileSelf = gcNoticeandfileService.count(gcNoticeandfileQueryWrapperPlatformCode);
  620. categoryDataGc.setTotalAssemble(countGcNoticeandfile);
  621. categoryDataGc.setTotalSelf(countGcNoticeandfileSelf);
  622. categoryData.setCategoryDataGc(categoryDataGc);
  623. /*
  624. * 工程建设-结束
  625. */
  626. /*
  627. * 政府采购-开始
  628. */
  629. CategoryDataZf categoryDataZf = new CategoryDataZf();
  630. QueryWrapper<ZcProject> zcPurchaseBulletinQueryWrapper = new QueryWrapper<ZcProject>();
  631. zcPurchaseBulletinQueryWrapper.gt("CREATE_TIME",formatStartTime);
  632. zcPurchaseBulletinQueryWrapper.le("CREATE_TIME",formatDateEnd);
  633. int countZcPurchaseBulletin = zcProjectService.count(zcPurchaseBulletinQueryWrapper);
  634. QueryWrapper<ZcProject> zcPurchaseBulletinQueryWrapperSelf = new QueryWrapper<ZcProject>();
  635. zcPurchaseBulletinQueryWrapperSelf.gt("CREATE_TIME",formatStartTime);
  636. zcPurchaseBulletinQueryWrapperSelf.le("CREATE_TIME",formatDateEnd);
  637. zcPurchaseBulletinQueryWrapperSelf.eq("PLATFORM_CODE",platformCode);
  638. int countZcPurchaseBulletinSelf = zcProjectService.count(zcPurchaseBulletinQueryWrapperSelf);
  639. categoryDataZf.setTotalAssemble(countZcPurchaseBulletin);
  640. categoryDataZf.setTotalSelf(countZcPurchaseBulletinSelf);
  641. categoryData.setCategoryDataZf(categoryDataZf);
  642. /*
  643. * 政府采购-结束
  644. */
  645. /*
  646. * 土地矿权-开始
  647. */
  648. CategoryDataTd categoryDataTd= new CategoryDataTd();
  649. QueryWrapper<ZrzyTdCedeNotice> zrzyTdCedeNoticeQueryWrapper = new QueryWrapper<ZrzyTdCedeNotice>();
  650. zrzyTdCedeNoticeQueryWrapper.gt("PUBLISHING_TIME",formatStartTime);
  651. zrzyTdCedeNoticeQueryWrapper.le("PUBLISHING_TIME",formatDateEnd);
  652. int countZrzyTdCedeNotice = zrzyTdCedeNoticeService.count(zrzyTdCedeNoticeQueryWrapper);
  653. try {
  654. /*Zrzy_Tkq_Notice*/
  655. QueryWrapper<ZrzyTkqNotice> zrzyTkqNoticeQueryWrapper = new QueryWrapper<ZrzyTkqNotice>();
  656. zrzyTkqNoticeQueryWrapper.gt("NOTICE_SEND_TIME",formatStartTime);
  657. zrzyTkqNoticeQueryWrapper.le("NOTICE_SEND_TIME",formatDateEnd);
  658. int countZrzyTkqNotice = zrzyTkqNoticeService.count(zrzyTkqNoticeQueryWrapper);
  659. countZrzyTdCedeNotice = countZrzyTdCedeNotice + countZrzyTkqNotice;
  660. }catch (Exception e){
  661. e.printStackTrace();
  662. }
  663. try {
  664. /*ZRZY_CKQ_NOTICE*/
  665. QueryWrapper<ZrzyCkqNotice> zrzyCkqNoticeQueryWrapper = new QueryWrapper<ZrzyCkqNotice>();
  666. zrzyCkqNoticeQueryWrapper.gt("NOTICE_SEND_TIME",formatStartTime);
  667. zrzyCkqNoticeQueryWrapper.le("NOTICE_SEND_TIME",formatDateEnd);
  668. int countZrzyCkqNotice = zrzyCkqNoticeService.count(zrzyCkqNoticeQueryWrapper);
  669. countZrzyTdCedeNotice = countZrzyTdCedeNotice + countZrzyCkqNotice;
  670. }catch (Exception e){
  671. e.printStackTrace();
  672. }
  673. try {
  674. /*ZRZY_DK_NOTICE*/
  675. QueryWrapper<ZrzyDkNotice> zrzyDkNoticeQueryWrapper = new QueryWrapper<ZrzyDkNotice>();
  676. zrzyDkNoticeQueryWrapper.gt("NOTICE_SEND_TIME",formatStartTime);
  677. zrzyDkNoticeQueryWrapper.le("NOTICE_SEND_TIME",formatDateEnd);
  678. int countZrzyCkqNotice = zrzyDkNoticeService.count(zrzyDkNoticeQueryWrapper);
  679. countZrzyTdCedeNotice = countZrzyTdCedeNotice + countZrzyCkqNotice;
  680. }catch (Exception e){
  681. e.printStackTrace();
  682. }
  683. try {
  684. /*ZRZY_BG_NOTICE*/
  685. QueryWrapper<ZrzyBgNotice> zrzyBgNoticeQueryWrapper = new QueryWrapper<ZrzyBgNotice>();
  686. zrzyBgNoticeQueryWrapper.gt("ISSUE_TIME",formatStartTime);
  687. zrzyBgNoticeQueryWrapper.le("ISSUE_TIME",formatDateEnd);
  688. int countZrzyCkqNotice = zrzyBgNoticeService.count(zrzyBgNoticeQueryWrapper);
  689. countZrzyTdCedeNotice = countZrzyTdCedeNotice + countZrzyCkqNotice;
  690. }catch (Exception e){
  691. e.printStackTrace();
  692. }
  693. try {
  694. /*ZRZY_JYZB_NOTICE*/
  695. QueryWrapper<ZrzyJyzbNotice> zrzyJyzbNoticeQueryWrapper = new QueryWrapper<ZrzyJyzbNotice>();
  696. zrzyJyzbNoticeQueryWrapper.gt("ISSUE_TIME",formatStartTime);
  697. zrzyJyzbNoticeQueryWrapper.le("ISSUE_TIME",formatDateEnd);
  698. int countZrzyCkqNotice = zrzyJyzbNoticeService.count(zrzyJyzbNoticeQueryWrapper);
  699. countZrzyTdCedeNotice = countZrzyTdCedeNotice + countZrzyCkqNotice;
  700. }catch (Exception e){
  701. e.printStackTrace();
  702. }
  703. QueryWrapper<ZrzyTdCedeNotice> zrzyTdCedeNoticeQueryWrapperSelf = new QueryWrapper<ZrzyTdCedeNotice>();
  704. zrzyTdCedeNoticeQueryWrapperSelf.gt("PUBLISHING_TIME",formatStartTime);
  705. zrzyTdCedeNoticeQueryWrapperSelf.le("PUBLISHING_TIME",formatDateEnd);
  706. zrzyTdCedeNoticeQueryWrapperSelf.likeRight("LAND_DISTRICT",regionCode);
  707. int countZrzyTdCedeNoticeSelf = zrzyTdCedeNoticeService.count(zrzyTdCedeNoticeQueryWrapperSelf);
  708. try {
  709. /*Zrzy_Tkq_Notice*/
  710. QueryWrapper<ZrzyTkqNotice> zrzyTkqNoticeQueryWrapper = new QueryWrapper<ZrzyTkqNotice>();
  711. zrzyTkqNoticeQueryWrapper.gt("NOTICE_SEND_TIME",formatStartTime);
  712. zrzyTkqNoticeQueryWrapper.le("NOTICE_SEND_TIME",formatDateEnd);
  713. zrzyTkqNoticeQueryWrapper.likeRight("region_code",regionCode);
  714. int countZrzyTkqNotice = zrzyTkqNoticeService.count(zrzyTkqNoticeQueryWrapper);
  715. countZrzyTdCedeNoticeSelf = countZrzyTdCedeNoticeSelf + countZrzyTkqNotice;
  716. }catch (Exception e){
  717. e.printStackTrace();
  718. }
  719. try {
  720. /*ZRZY_CKQ_NOTICE*/
  721. QueryWrapper<ZrzyCkqNotice> zrzyCkqNoticeQueryWrapper = new QueryWrapper<ZrzyCkqNotice>();
  722. zrzyCkqNoticeQueryWrapper.gt("NOTICE_SEND_TIME",formatStartTime);
  723. zrzyCkqNoticeQueryWrapper.le("NOTICE_SEND_TIME",formatDateEnd);
  724. zrzyCkqNoticeQueryWrapper.likeRight("region_code",regionCode);
  725. int countZrzyCkqNotice = zrzyCkqNoticeService.count(zrzyCkqNoticeQueryWrapper);
  726. countZrzyTdCedeNoticeSelf = countZrzyTdCedeNoticeSelf + countZrzyCkqNotice;
  727. }catch (Exception e){
  728. e.printStackTrace();
  729. }
  730. try {
  731. /*ZRZY_DK_NOTICE*/
  732. QueryWrapper<ZrzyDkNotice> zrzyDkNoticeQueryWrapper = new QueryWrapper<ZrzyDkNotice>();
  733. zrzyDkNoticeQueryWrapper.gt("NOTICE_SEND_TIME",formatStartTime);
  734. zrzyDkNoticeQueryWrapper.le("NOTICE_SEND_TIME",formatDateEnd);
  735. zrzyDkNoticeQueryWrapper.likeRight("zone",regionCode);
  736. int countZrzyCkqNotice = zrzyDkNoticeService.count(zrzyDkNoticeQueryWrapper);
  737. countZrzyTdCedeNoticeSelf = countZrzyTdCedeNoticeSelf + countZrzyCkqNotice;
  738. }catch (Exception e){
  739. e.printStackTrace();
  740. }
  741. try {
  742. /*ZRZY_BG_NOTICE*/
  743. QueryWrapper<ZrzyBgNotice> zrzyBgNoticeQueryWrapper = new QueryWrapper<ZrzyBgNotice>();
  744. zrzyBgNoticeQueryWrapper.gt("ISSUE_TIME",formatStartTime);
  745. zrzyBgNoticeQueryWrapper.le("ISSUE_TIME",formatDateEnd);
  746. zrzyBgNoticeQueryWrapper.likeRight("zone",regionCode);
  747. int countZrzyCkqNotice = zrzyBgNoticeService.count(zrzyBgNoticeQueryWrapper);
  748. countZrzyTdCedeNoticeSelf = countZrzyTdCedeNoticeSelf + countZrzyCkqNotice;
  749. }catch (Exception e){
  750. e.printStackTrace();
  751. }
  752. try {
  753. /*ZRZY_JYZB_NOTICE*/
  754. QueryWrapper<ZrzyJyzbNotice> zrzyJyzbNoticeQueryWrapper = new QueryWrapper<ZrzyJyzbNotice>();
  755. zrzyJyzbNoticeQueryWrapper.gt("ISSUE_TIME",formatStartTime);
  756. zrzyJyzbNoticeQueryWrapper.le("ISSUE_TIME",formatDateEnd);
  757. zrzyJyzbNoticeQueryWrapper.likeRight("zone",regionCode);
  758. int countZrzyCkqNotice = zrzyJyzbNoticeService.count(zrzyJyzbNoticeQueryWrapper);
  759. countZrzyTdCedeNoticeSelf = countZrzyTdCedeNoticeSelf + countZrzyCkqNotice;
  760. }catch (Exception e){
  761. e.printStackTrace();
  762. }
  763. categoryDataTd.setTotalAssemble(countZrzyTdCedeNotice);
  764. categoryDataTd.setTotalSelf(countZrzyTdCedeNoticeSelf);
  765. categoryData.setCategoryDataTd(categoryDataTd);
  766. /*
  767. * 土地矿权-结束
  768. * */
  769. /*
  770. * 国有资产-开始
  771. * */
  772. CategoryDataGy categoryDataGy = new CategoryDataGy();
  773. QueryWrapper<CqSwIssueBulletin> cqSwIssueBulletinQueryWrapper = new QueryWrapper<CqSwIssueBulletin>();
  774. cqSwIssueBulletinQueryWrapper.gt("PUBLISH_DATE",formatStartTime.substring(0,8));
  775. cqSwIssueBulletinQueryWrapper.le("PUBLISH_DATE",formatDateEnd.substring(0,8));
  776. int countSwIssueBulletin = cqSwIssueBulletinService.count(cqSwIssueBulletinQueryWrapper);
  777. QueryWrapper<CqSwIssueBulletin> cqSwIssueBulletinQueryWrapperSelf = new QueryWrapper<CqSwIssueBulletin>();
  778. cqSwIssueBulletinQueryWrapperSelf.gt("PUBLISH_DATE",formatStartTime.substring(0,8));
  779. cqSwIssueBulletinQueryWrapperSelf.le("PUBLISH_DATE",formatDateEnd.substring(0,8));
  780. cqSwIssueBulletinQueryWrapperSelf.likeRight("region_code",regionCode);
  781. int countSwIssueBulletinSelf = cqSwIssueBulletinService.count(cqSwIssueBulletinQueryWrapperSelf);
  782. QueryWrapper<CqGqIssueBulletin> cqGqIssueBulletinQueryWrapper = new QueryWrapper<CqGqIssueBulletin>();
  783. cqGqIssueBulletinQueryWrapper.gt("PUBLISH_DATE",formatStartTime.substring(0,8));
  784. cqGqIssueBulletinQueryWrapper.le("PUBLISH_DATE",formatDateEnd.substring(0,8));
  785. int countSwIssueBulletGQin = cqGqIssueBulletinService.count(cqGqIssueBulletinQueryWrapper);
  786. QueryWrapper<CqGqIssueBulletin> cqGqIssueBulletinQueryWrapperSelf = new QueryWrapper<CqGqIssueBulletin>();
  787. cqGqIssueBulletinQueryWrapperSelf.gt("PUBLISH_DATE",formatStartTime.substring(0,8));
  788. cqGqIssueBulletinQueryWrapperSelf.le("PUBLISH_DATE",formatDateEnd.substring(0,8));
  789. cqGqIssueBulletinQueryWrapperSelf.likeRight("region_code",regionCode);
  790. int countSwIssueBulletGQinSelf = cqGqIssueBulletinService.count(cqGqIssueBulletinQueryWrapper);
  791. categoryDataGy.setTotalAssemble(countSwIssueBulletin+countSwIssueBulletGQin);
  792. categoryDataGy.setTotalSelf(countSwIssueBulletinSelf+countSwIssueBulletGQinSelf);
  793. categoryData.setCategoryDataGy(categoryDataGy);
  794. /*
  795. * 国有资产-结束
  796. * */
  797. /*
  798. * 疫苗交易-开始
  799. * */
  800. CategoryDataYm categoryDataYm = new CategoryDataYm();
  801. categoryData.setCategoryDataYm(categoryDataYm);
  802. /*
  803. * 疫苗交易-结束
  804. * */
  805. /*
  806. 药采交易-开始
  807. * */
  808. /* int countYc = ycNoticeService.count();
  809. CategoryDataYc categoryDataYc = new CategoryDataYc();
  810. categoryDataYc.setTotalAssemble(countYc);
  811. categoryData.setCategoryDataYc(categoryDataYc);
  812. */
  813. /*
  814. 药采交易-结束
  815. * */
  816. /*
  817. * 其他交易-开始
  818. * */
  819. CategoryDataQt categoryDataQt = new CategoryDataQt();
  820. QueryWrapper<QtjyNotice> categoryDataQtQueryWrapper = new QueryWrapper<QtjyNotice>();
  821. categoryDataQtQueryWrapper.gt("PUBLISHING_TIME",formatStartTime);
  822. categoryDataQtQueryWrapper.le("PUBLISHING_TIME",formatDateEnd);
  823. int countQtjyNotice = qtjyNoticeService.count(categoryDataQtQueryWrapper);
  824. QueryWrapper<OtherTradePubInfo> otherTradePubInfoQueryWrapper = new QueryWrapper<OtherTradePubInfo>();
  825. otherTradePubInfoQueryWrapper.ge("PUBLISHING_TIME",formatStartTime);
  826. otherTradePubInfoQueryWrapper.le("PUBLISHING_TIME",formatDateEnd);
  827. int countOtherTrade = otherTradePubInfoService.count(otherTradePubInfoQueryWrapper);
  828. QueryWrapper<QtjyNotice> categoryDataQtQueryWrapperSelf = new QueryWrapper<QtjyNotice>();
  829. categoryDataQtQueryWrapperSelf.gt("PUBLISHING_TIME",formatStartTime);
  830. categoryDataQtQueryWrapperSelf.le("PUBLISHING_TIME",formatDateEnd);
  831. categoryDataQtQueryWrapperSelf.likeRight("region_code",regionCode);
  832. QueryWrapper<OtherTradePubInfo> otherTradePubInfoQueryWrapperSelf = new QueryWrapper<OtherTradePubInfo>();
  833. otherTradePubInfoQueryWrapperSelf.ge("PUBLISHING_TIME",formatStartTime);
  834. otherTradePubInfoQueryWrapperSelf.le("PUBLISHING_TIME",formatDateEnd);
  835. otherTradePubInfoQueryWrapperSelf.likeRight("region_code",regionCode);
  836. int countotherTradeSelf = otherTradePubInfoService.count(otherTradePubInfoQueryWrapperSelf);
  837. int countQtjyNoticeSelf = qtjyNoticeService.count(categoryDataQtQueryWrapperSelf);
  838. categoryDataQt.setTotalAssemble(countQtjyNotice+countOtherTrade);
  839. categoryDataQt.setTotalSelf(countQtjyNoticeSelf+countotherTradeSelf);
  840. categoryData.setCategoryDataQt(categoryDataQt);
  841. /*
  842. * 其他交易-结束
  843. * */
  844. return Result.OK(categoryData);
  845. }catch (Exception e){
  846. e.printStackTrace();
  847. return Result.error("传入参数错误");
  848. }
  849. }
  850. //各交易类别发布类别数据:交易宗数
  851. @GetMapping(value = "/publishingCategoryDataList")
  852. public Result<List<QuantityStatisticsAssemble>> publishingCategoryDataList(
  853. @RequestParam(name="platformCode", defaultValue="121500004600236091") String platformCode
  854. ) throws ParseException {
  855. List<QuantityStatisticsAssemble> statisticsAssembles = null;
  856. Object firstPageDataObj = redisUtil.get(CommonConstant.PUBLISHING_CATEGORY_DATA_LIST+platformCode);
  857. if(!ObjectUtils.isEmpty(firstPageDataObj)){
  858. statisticsAssembles = JSONArray.parseArray(firstPageDataObj.toString(),QuantityStatisticsAssemble.class);
  859. return Result.OK(statisticsAssembles);
  860. }else{
  861. statisticsAssembles = new ArrayList<QuantityStatisticsAssemble>();
  862. }
  863. //获取区域编码对应的国标编码
  864. AreaPlatform areaPlatform = null;
  865. try {
  866. QueryWrapper<AreaPlatform> platformQueryWrapper = new QueryWrapper<AreaPlatform>();
  867. platformQueryWrapper.eq("PLATFORM_CODE",platformCode);
  868. areaPlatform = areaPlatformService.getOne(platformQueryWrapper);
  869. if(ObjectUtils.isEmpty(areaPlatform)){
  870. return Result.error("传入参数错误");
  871. }
  872. }catch (Exception e){
  873. e.printStackTrace();
  874. return Result.error("传入参数错误");
  875. }
  876. String areaCode = areaPlatform.getAreaCode();
  877. log.info("区域编码:"+platformCode);
  878. try {
  879. areaCode = areaCode.substring(0,4);
  880. log.info("区域国标编码:"+areaCode);
  881. }catch (Exception e){
  882. e.printStackTrace();
  883. areaCode = "";
  884. log.info("区域国标编码:"+areaCode);
  885. }
  886. /*工程建设开始*/
  887. String regionCode = areaCode;
  888. QuantityStatisticsAssemble quantityStatisticsEngineeringConstruction = new QuantityStatisticsAssemble();
  889. QueryWrapper<GcBidpublicity> gcBidpublicityQueryWrapper = new QueryWrapper<GcBidpublicity>();
  890. gcBidpublicityQueryWrapper.eq("PLATFORM_CODE",platformCode);
  891. int countGcBidpublicity = gcBidpublicityService.count(gcBidpublicityQueryWrapper);
  892. quantityStatisticsEngineeringConstruction.setTotalAssemble(countGcBidpublicity);
  893. quantityStatisticsEngineeringConstruction.setTitle("工程建设");
  894. statisticsAssembles.add(quantityStatisticsEngineeringConstruction);
  895. /*工程建设结束*/
  896. /*政府采购-开始*/
  897. QuantityStatisticsAssemble quantityStatisticsGovernmentProcurement = new QuantityStatisticsAssemble();
  898. QueryWrapper<ZcBidpublicity> zcBidpublicityQueryWrapper = new QueryWrapper<ZcBidpublicity>();
  899. zcBidpublicityQueryWrapper.eq("PLATFORM_CODE",platformCode);
  900. int countZcBidpublicity = zcBidpublicityService.count(zcBidpublicityQueryWrapper);
  901. quantityStatisticsGovernmentProcurement.setTitle("政府采购");
  902. quantityStatisticsGovernmentProcurement.setTotalAssemble(countZcBidpublicity);
  903. statisticsAssembles.add(quantityStatisticsGovernmentProcurement);
  904. /*政府采购-结束*/
  905. /*土地矿业开始*/
  906. QuantityStatisticsAssemble quantityStatisticsLandMineral = new QuantityStatisticsAssemble();
  907. quantityStatisticsLandMineral.setTitle("土地矿权");
  908. QueryWrapper<ZrzyTdBidwinnotice> zrzyTdBidwinnoticeQueryWrapper = new QueryWrapper<ZrzyTdBidwinnotice>();
  909. zrzyTdBidwinnoticeQueryWrapper.eq("PLATFORM_CODE",platformCode);
  910. int countZrzyTdBidwinnotice = zrzyTdBidwinnoticeService.count(zrzyTdBidwinnoticeQueryWrapper);
  911. try {
  912. /*Zrzy_Tkq_Notice*/
  913. QueryWrapper<ZrzyTkqNotice> zrzyTkqNoticeQueryWrapper = new QueryWrapper<ZrzyTkqNotice>();
  914. zrzyTkqNoticeQueryWrapper.likeRight("region_code",regionCode);
  915. int countZrzyTkqNotice = zrzyTkqNoticeService.count(zrzyTkqNoticeQueryWrapper);
  916. countZrzyTdBidwinnotice = countZrzyTdBidwinnotice + countZrzyTkqNotice;
  917. }catch (Exception e){
  918. e.printStackTrace();
  919. }
  920. try {
  921. /*ZRZY_CKQ_NOTICE*/
  922. QueryWrapper<ZrzyCkqNotice> zrzyCkqNoticeQueryWrapper = new QueryWrapper<ZrzyCkqNotice>();
  923. zrzyCkqNoticeQueryWrapper.likeRight("region_code",regionCode);
  924. int countZrzyCkqNotice = zrzyCkqNoticeService.count(zrzyCkqNoticeQueryWrapper);
  925. countZrzyTdBidwinnotice = countZrzyTdBidwinnotice + countZrzyCkqNotice;
  926. }catch (Exception e){
  927. e.printStackTrace();
  928. }
  929. try {
  930. /*ZRZY_DK_NOTICE*/
  931. QueryWrapper<ZrzyDkNotice> zrzyDkNoticeQueryWrapper = new QueryWrapper<ZrzyDkNotice>();
  932. zrzyDkNoticeQueryWrapper.likeRight("zone",regionCode);
  933. int countZrzyCkqNotice = zrzyDkNoticeService.count(zrzyDkNoticeQueryWrapper);
  934. countZrzyTdBidwinnotice = countZrzyTdBidwinnotice + countZrzyCkqNotice;
  935. }catch (Exception e){
  936. e.printStackTrace();
  937. }
  938. try {
  939. /*ZRZY_BG_NOTICE*/
  940. QueryWrapper<ZrzyBgNotice> zrzyBgNoticeQueryWrapper = new QueryWrapper<ZrzyBgNotice>();
  941. zrzyBgNoticeQueryWrapper.likeRight("zone",regionCode);
  942. int countZrzyCkqNotice = zrzyBgNoticeService.count(zrzyBgNoticeQueryWrapper);
  943. countZrzyTdBidwinnotice = countZrzyTdBidwinnotice + countZrzyCkqNotice;
  944. }catch (Exception e){
  945. e.printStackTrace();
  946. }
  947. try {
  948. /*ZRZY_JYZB_NOTICE*/
  949. QueryWrapper<ZrzyJyzbNotice> zrzyJyzbNoticeQueryWrapper = new QueryWrapper<ZrzyJyzbNotice>();
  950. zrzyJyzbNoticeQueryWrapper.likeRight("zone",regionCode);
  951. int countZrzyCkqNotice = zrzyJyzbNoticeService.count(zrzyJyzbNoticeQueryWrapper);
  952. countZrzyTdBidwinnotice = countZrzyTdBidwinnotice + countZrzyCkqNotice;
  953. }catch (Exception e){
  954. e.printStackTrace();
  955. }
  956. quantityStatisticsLandMineral.setTotalAssemble(countZrzyTdBidwinnotice);
  957. statisticsAssembles.add(quantityStatisticsLandMineral);
  958. /*土地矿业结束*/
  959. /*国有资产-开始*/
  960. QuantityStatisticsAssemble quantityStatisticsStateOwnedProperty = new QuantityStatisticsAssemble();
  961. quantityStatisticsStateOwnedProperty.setTitle("国有产权");
  962. int countCqSwBargainResult = cqSwBargainResultService.countByRegionCode(regionCode);
  963. QueryWrapper<CqGqBargainResult> cqGqBargainResultQueryWrapper = new QueryWrapper<CqGqBargainResult>();
  964. cqGqBargainResultQueryWrapper.likeRight("REGION_CODE",regionCode);
  965. int countCqGqBargainResult = cqGqBargainResultService.count(cqGqBargainResultQueryWrapper);
  966. quantityStatisticsStateOwnedProperty.setTotalAssemble(countCqSwBargainResult+countCqGqBargainResult);
  967. statisticsAssembles.add(quantityStatisticsStateOwnedProperty);
  968. /*国有资产-结束*/
  969. QuantityStatisticsAssemble quantityStatisticsVaccineTrading = new QuantityStatisticsAssemble();
  970. quantityStatisticsVaccineTrading.setTitle("疫苗交易");
  971. quantityStatisticsVaccineTrading.setTotalSelf(0);
  972. statisticsAssembles.add(quantityStatisticsVaccineTrading);
  973. /*其他交易-开始*/
  974. QuantityStatisticsAssemble quantityStatisticsGovernmentOrther = new QuantityStatisticsAssemble();
  975. quantityStatisticsGovernmentOrther.setTitle("其他交易");
  976. QueryWrapper<OtherTradePubInfo> tradePubInfoQueryWrapper = new QueryWrapper<OtherTradePubInfo>();
  977. tradePubInfoQueryWrapper.likeRight("REGION_CODE",regionCode);
  978. int count = otherTradePubInfoService.count(tradePubInfoQueryWrapper);
  979. quantityStatisticsGovernmentOrther.setTotalAssemble(count);
  980. statisticsAssembles.add(quantityStatisticsGovernmentOrther);
  981. /*其他交易-结束*/
  982. redisUtil.set(CommonConstant.PUBLISHING_CATEGORY_DATA_LIST, JSONArray.toJSONString(statisticsAssembles),CommonConstant.REDIS_SAVE_TIME);
  983. return Result.OK(statisticsAssembles);
  984. }
  985. //各交易类别发布类别数据:交易金额
  986. @GetMapping(value = "/publishingCategoryMoneyList")
  987. public Result<List<QuantityStatisticsAssemble>> publishingCategoryMoneyList(
  988. @RequestParam(name="platformCode", defaultValue="121500004600236091") String platformCode
  989. ) throws ParseException {
  990. List<QuantityStatisticsAssemble> statisticsAssembles = null;
  991. Object firstPageDataObj = redisUtil.get(CommonConstant.PUBLISHING_CATEGORY_MONEY_LIST+platformCode);
  992. if(!ObjectUtils.isEmpty(firstPageDataObj)){
  993. statisticsAssembles = JSONArray.parseArray(firstPageDataObj.toString(),QuantityStatisticsAssemble.class);
  994. return Result.OK(statisticsAssembles);
  995. }else{
  996. statisticsAssembles = new ArrayList<QuantityStatisticsAssemble>();
  997. }
  998. //获取区域编码对应的国标编码
  999. AreaPlatform areaPlatform = null;
  1000. try {
  1001. QueryWrapper<AreaPlatform> platformQueryWrapper = new QueryWrapper<AreaPlatform>();
  1002. platformQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1003. areaPlatform = areaPlatformService.getOne(platformQueryWrapper);
  1004. if(ObjectUtils.isEmpty(areaPlatform)){
  1005. return Result.error("传入参数错误");
  1006. }
  1007. }catch (Exception e){
  1008. e.printStackTrace();
  1009. return Result.error("传入参数错误");
  1010. }
  1011. String areaCode = areaPlatform.getAreaCode();
  1012. log.info("区域编码:"+platformCode);
  1013. try {
  1014. areaCode = areaCode.substring(0,4);
  1015. log.info("区域国标编码:"+areaCode);
  1016. }catch (Exception e){
  1017. e.printStackTrace();
  1018. areaCode = "";
  1019. log.info("区域国标编码:"+areaCode);
  1020. }
  1021. String regionCode = areaCode;
  1022. /*工程建设开始*/
  1023. QuantityStatisticsAssemble quantityStatisticsEngineeringConstruction = new QuantityStatisticsAssemble();
  1024. QueryWrapper<GcBidpublicity> gcBidpublicityQueryWrapper = new QueryWrapper<GcBidpublicity>();
  1025. gcBidpublicityQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1026. gcBidpublicityQueryWrapper.select("sum( case when PRICE_UNIT = 0 then BID_AMOUNT when PRICE_UNIT = 1 then BID_AMOUNT*10000 else BID_AMOUNT end) as sumAll");
  1027. GcBidpublicity gcBidpublicityServiceOne = gcBidpublicityService.getOne(gcBidpublicityQueryWrapper);
  1028. if(!ObjectUtils.isEmpty(gcBidpublicityServiceOne)){
  1029. quantityStatisticsEngineeringConstruction.setMoney(new BigDecimal(gcBidpublicityServiceOne.getSumAll()));
  1030. }else{
  1031. quantityStatisticsEngineeringConstruction.setMoney(new BigDecimal(0));
  1032. }
  1033. quantityStatisticsEngineeringConstruction.setTitle("工程建设");
  1034. statisticsAssembles.add(quantityStatisticsEngineeringConstruction);
  1035. /*工程建设结束*/
  1036. /*政府采购-开始*/
  1037. QuantityStatisticsAssemble quantityStatisticsGovernmentProcurement = new QuantityStatisticsAssemble();
  1038. QueryWrapper<ZcBidpublicity> zcBidpublicityQueryWrapper = new QueryWrapper<ZcBidpublicity>();
  1039. zcBidpublicityQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1040. zcBidpublicityQueryWrapper.select("sum( case when PRICE_UNIT = 0 then WIN_BID_PRICE when PRICE_UNIT = 1 then WIN_BID_PRICE*10000 else WIN_BID_PRICE end) as sumAll");
  1041. ZcBidpublicity zcBidpublicityOne = zcBidpublicityService.getOne(zcBidpublicityQueryWrapper);
  1042. if(!ObjectUtils.isEmpty(zcBidpublicityOne)){
  1043. quantityStatisticsGovernmentProcurement.setMoney(new BigDecimal(zcBidpublicityOne.getSumAll()));
  1044. }else{
  1045. quantityStatisticsGovernmentProcurement.setMoney(new BigDecimal(0));
  1046. }
  1047. quantityStatisticsGovernmentProcurement.setTitle("政府采购");
  1048. statisticsAssembles.add(quantityStatisticsGovernmentProcurement);
  1049. /*政府采购-结束*/
  1050. /*土地矿业开始*/
  1051. QuantityStatisticsAssemble quantityStatisticsLandMineral = new QuantityStatisticsAssemble();
  1052. quantityStatisticsLandMineral.setTitle("自然资源");
  1053. BigDecimal quantityStatisticsLandMineralTotal = new BigDecimal(0);
  1054. QueryWrapper<ZrzyTdBidwinnotice> zrzyTdBidwinnoticeQueryWrapper = new QueryWrapper<ZrzyTdBidwinnotice>();
  1055. zrzyTdBidwinnoticeQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1056. zrzyTdBidwinnoticeQueryWrapper.select("sum( case when PRICE_UNIT = 0 then DEAL_PRICE when PRICE_UNIT = 1 then DEAL_PRICE*10000 else DEAL_PRICE end) as sumAll");
  1057. ZrzyTdBidwinnotice zrzyTdBidwinnoticeServiceOne = zrzyTdBidwinnoticeService.getOne(zrzyTdBidwinnoticeQueryWrapper);
  1058. if(!ObjectUtils.isEmpty(zrzyTdBidwinnoticeServiceOne)){
  1059. String sumAll = zrzyTdBidwinnoticeServiceOne.getSumAll();
  1060. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1061. quantityStatisticsLandMineralTotal = quantityStatisticsLandMineralTotal.add(new BigDecimal(sumAll));
  1062. }
  1063. }
  1064. /*ZRZY_TKQ_BIDWINNOTICE*/
  1065. QueryWrapper<ZrzyTkqBidwinnotice> zrzyTdBidwinnoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyTkqBidwinnotice>();
  1066. zrzyTdBidwinnoticeQueryWrapperSumInIn.select("sum(cast(QT_PUBLIC_PRICE as decimal(9,2)) * 10000) as sumAll");
  1067. zrzyTdBidwinnoticeQueryWrapperSumInIn.likeRight("region_code",regionCode);
  1068. ZrzyTkqBidwinnotice zrzyTkqBidwinnoticeSumInIn = zrzyTkqBidwinnoticeService.getOne(zrzyTdBidwinnoticeQueryWrapperSumInIn);
  1069. if(!ObjectUtils.isEmpty(zrzyTkqBidwinnoticeSumInIn)){
  1070. String sumAll = zrzyTkqBidwinnoticeSumInIn.getSumAll();
  1071. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1072. quantityStatisticsLandMineralTotal =quantityStatisticsLandMineralTotal.add(new BigDecimal(sumAll));
  1073. }
  1074. }
  1075. /*ZRZY_CKQ_BIDWINNOTICE*/
  1076. QueryWrapper<ZrzyCkqBidwinnotice> zrzyCkqBidwinnoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyCkqBidwinnotice>();
  1077. zrzyCkqBidwinnoticeQueryWrapperSumInIn.select("sum(cast(QT_PUBLIC_PRICE as decimal(9,2)) * 10000) as sumAll");
  1078. zrzyCkqBidwinnoticeQueryWrapperSumInIn.likeRight("region_code",regionCode);
  1079. ZrzyCkqBidwinnotice zrzyCkqBidwinnoticeSumInIn = zrzyCkqBidwinnoticeService.getOne(zrzyCkqBidwinnoticeQueryWrapperSumInIn);
  1080. if(!ObjectUtils.isEmpty(zrzyCkqBidwinnoticeSumInIn)){
  1081. String sumAll = zrzyCkqBidwinnoticeSumInIn.getSumAll();
  1082. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1083. quantityStatisticsLandMineralTotal = quantityStatisticsLandMineralTotal.add(new BigDecimal(sumAll));
  1084. }
  1085. }
  1086. /*ZRZY_DK_BINWIN_NOTICE*/
  1087. QueryWrapper<ZrzyDkBinwinNotice> zrzyDkBinwinNoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyDkBinwinNotice>();
  1088. zrzyDkBinwinNoticeQueryWrapperSumInIn.select("sum(cast(ZB_PRICE as decimal(9,2)) * 10000) as sumAll");
  1089. zrzyDkBinwinNoticeQueryWrapperSumInIn.likeRight("zone",regionCode);
  1090. ZrzyDkBinwinNotice zrzyDkBinwinNoticeSumInIn = zrzyDkBinwinNoticeService.getOne(zrzyDkBinwinNoticeQueryWrapperSumInIn);
  1091. if(!ObjectUtils.isEmpty(zrzyDkBinwinNoticeSumInIn)){
  1092. String sumAll = zrzyDkBinwinNoticeSumInIn.getSumAll();
  1093. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1094. quantityStatisticsLandMineralTotal = quantityStatisticsLandMineralTotal.add(new BigDecimal(sumAll));
  1095. }
  1096. }
  1097. /*ZRZY_BG_BIDWIN_NOTICE*/
  1098. ZrzyBgBidwinNotice zrzyBgBidwinNoticeSumInIn = zrzyBgBidwinNoticeService.getSumMoneyByRegionCode(regionCode);
  1099. if(!ObjectUtils.isEmpty(zrzyBgBidwinNoticeSumInIn)){
  1100. String sumAll = zrzyBgBidwinNoticeSumInIn.getSumAll();
  1101. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1102. quantityStatisticsLandMineralTotal = quantityStatisticsLandMineralTotal.add(new BigDecimal(sumAll));
  1103. }
  1104. }
  1105. /*ZRZY_JYZB_BIDWIN_NOTICE*/
  1106. ZrzyJyzbBidwinNotice zrzyJyzbBidwinNoticeSumInIn = zrzyJyzbBidwinNoticeService.getSumMoneyByRegionCode(regionCode);
  1107. if(!ObjectUtils.isEmpty(zrzyJyzbBidwinNoticeSumInIn)){
  1108. String sumAll = zrzyJyzbBidwinNoticeSumInIn.getSumAll();
  1109. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1110. quantityStatisticsLandMineralTotal = quantityStatisticsLandMineralTotal.add(new BigDecimal(sumAll));
  1111. }
  1112. }
  1113. quantityStatisticsLandMineral.setMoney(quantityStatisticsLandMineralTotal);
  1114. statisticsAssembles.add(quantityStatisticsLandMineral);
  1115. /*土地矿业结束*/
  1116. /*国有资产-开始*/
  1117. QuantityStatisticsAssemble quantityStatisticsStateOwnedProperty = new QuantityStatisticsAssemble();
  1118. quantityStatisticsStateOwnedProperty.setTitle("国有产权");
  1119. CqSwBargainResult countCqSwBargainResult = cqSwBargainResultService.getSumMoneyByRegionCode(regionCode);
  1120. QueryWrapper<CqGqBargainResult> cqGqBargainResultQueryWrapper = new QueryWrapper<CqGqBargainResult>();
  1121. cqGqBargainResultQueryWrapper.likeRight("REGION_CODE",regionCode);
  1122. cqGqBargainResultQueryWrapper.select("sum( case when PRICE_UNIT = 0 then TRADE_VALUE when PRICE_UNIT = 1 then TRADE_VALUE*10000 else TRADE_VALUE end) as sumAll");
  1123. CqGqBargainResult cqGqBargainResult = cqGqBargainResultService.getOne(cqGqBargainResultQueryWrapper);
  1124. BigDecimal bigDecimal = new BigDecimal("0");
  1125. if(!ObjectUtils.isEmpty(countCqSwBargainResult)){
  1126. bigDecimal = bigDecimal.add(new BigDecimal(countCqSwBargainResult.getSumAll()));
  1127. }
  1128. if(!ObjectUtils.isEmpty(cqGqBargainResult)){
  1129. bigDecimal = bigDecimal.add(new BigDecimal(cqGqBargainResult.getSumAll()));
  1130. }
  1131. quantityStatisticsStateOwnedProperty.setMoney(
  1132. bigDecimal
  1133. );
  1134. statisticsAssembles.add(quantityStatisticsStateOwnedProperty);
  1135. /*国有资产-结束*/
  1136. /*疫苗交易-开始*/
  1137. QuantityStatisticsAssemble quantityStatisticsVaccineTrading = new QuantityStatisticsAssemble();
  1138. quantityStatisticsVaccineTrading.setTitle("疫苗交易");
  1139. quantityStatisticsVaccineTrading.setMoney(new BigDecimal(0));
  1140. statisticsAssembles.add(quantityStatisticsVaccineTrading);
  1141. /*疫苗交易-结束*/
  1142. /*其他交易-开始*/
  1143. QuantityStatisticsAssemble quantityStatisticsGovernmentOrther = new QuantityStatisticsAssemble();
  1144. quantityStatisticsGovernmentOrther.setTitle("其他交易");
  1145. QueryWrapper<QtjyBidpublicity> bidpublicityQueryWrapper = new QueryWrapper<QtjyBidpublicity>();
  1146. bidpublicityQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1147. bidpublicityQueryWrapper.select("sum(BID_AMOUNT) as sumAll");
  1148. QtjyBidpublicity qtjyBidpublicity = qtjyBidpublicityService.getOne(bidpublicityQueryWrapper);
  1149. if(!ObjectUtils.isEmpty(qtjyBidpublicity)){
  1150. String sumAll = qtjyBidpublicity.getSumAll();
  1151. if(!ObjectUtils.isEmpty(sumAll)){
  1152. BigDecimal bigDecimal1 = new BigDecimal(sumAll);
  1153. try {
  1154. QueryWrapper<OtherTradeResultInfo> otherTradeResultInfoQueryWrapperIn = new QueryWrapper<OtherTradeResultInfo>();
  1155. otherTradeResultInfoQueryWrapperIn.select("sum(BID_AMOUNT) as sumAll");
  1156. otherTradeResultInfoQueryWrapperIn.likeRight("REGION_CODE",areaCode);
  1157. OtherTradeResultInfo otherTradeResultInfoIn = otherTradeResultInfoService.getOne(otherTradeResultInfoQueryWrapperIn);
  1158. if(!ObjectUtils.isEmpty(otherTradeResultInfoIn)){
  1159. String sumAll1 = otherTradeResultInfoIn.getSumAll();
  1160. if(!ObjectUtils.isEmpty(sumAll1)){
  1161. BigDecimal bigDecimalsum = new BigDecimal(sumAll1);
  1162. bigDecimal1 = bigDecimal1.add(bigDecimalsum);
  1163. }
  1164. }
  1165. }catch (Exception e){
  1166. e.printStackTrace();
  1167. }
  1168. quantityStatisticsGovernmentOrther.setMoney(bigDecimal1);
  1169. }else{
  1170. quantityStatisticsGovernmentOrther.setMoney(new BigDecimal(0));
  1171. }
  1172. }else{
  1173. quantityStatisticsGovernmentOrther.setMoney(new BigDecimal(0));
  1174. }
  1175. statisticsAssembles.add(quantityStatisticsGovernmentOrther);
  1176. /*其他交易-结束*/
  1177. redisUtil.set(CommonConstant.PUBLISHING_CATEGORY_MONEY_LIST, JSONArray.toJSONString(statisticsAssembles),CommonConstant.REDIS_SAVE_TIME);
  1178. return Result.OK(statisticsAssembles);
  1179. }
  1180. //各交易类别发布类别数据:折线图
  1181. @GetMapping(value = "/publishingCategoryMoneyYueList")
  1182. public Result<List<LineChartData>> publishingCategoryMoneyYueList(
  1183. @RequestParam(name="platformCode", defaultValue="121500004600236091") String platformCode
  1184. ) throws ParseException {
  1185. List<LineChartData> dataDataDataList = null;
  1186. Object firstPageDataObj = redisUtil.get(CommonConstant.PUBLISHING_CATEGORY_MONEY_YUE_LIST+platformCode);
  1187. if(!ObjectUtils.isEmpty(firstPageDataObj)){
  1188. dataDataDataList = JSONArray.parseArray(firstPageDataObj.toString(),LineChartData.class);
  1189. return Result.OK(dataDataDataList);
  1190. }else{
  1191. dataDataDataList = new ArrayList<LineChartData>();
  1192. }
  1193. //获取区域编码对应的国标编码
  1194. AreaPlatform areaPlatform = null;
  1195. try {
  1196. QueryWrapper<AreaPlatform> platformQueryWrapper = new QueryWrapper<AreaPlatform>();
  1197. platformQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1198. areaPlatform = areaPlatformService.getOne(platformQueryWrapper);
  1199. if(ObjectUtils.isEmpty(areaPlatform)){
  1200. return Result.error("传入参数错误");
  1201. }
  1202. }catch (Exception e){
  1203. e.printStackTrace();
  1204. return Result.error("传入参数错误");
  1205. }
  1206. String areaCode = areaPlatform.getAreaCode();
  1207. ;
  1208. log.info("区域编码:"+platformCode);
  1209. try {
  1210. areaCode = areaCode.substring(0,4);
  1211. log.info("区域国标编码:"+areaCode);
  1212. }catch (Exception e){
  1213. e.printStackTrace();
  1214. areaCode = "";
  1215. log.info("区域国标编码:"+areaCode);
  1216. }
  1217. String regionCode = areaCode;
  1218. /*工程建设开始*/
  1219. //获取当前时间前6 个月的时间
  1220. LineChartData lineChartDataGc = new LineChartData();
  1221. lineChartDataGc.setName("工程建设");
  1222. lineChartDataGc.setDate(get6Month());
  1223. String lineChartDataGcValue[] = new String[7];
  1224. int iValue = 0;
  1225. for (String date : lineChartDataGc.getDate()) {
  1226. //开始时间
  1227. SimpleDateFormat formatyyyylMM = new SimpleDateFormat("yyyy-MM");
  1228. SimpleDateFormat formatyyyyMMddHHmmss = new SimpleDateFormat("yyyyMMddHHmmss");
  1229. Date parse = formatyyyylMM.parse(date);
  1230. Date startTimeOfCurrentMonth = DateUtils.getStartTimeOfCurrentMonth(parse);
  1231. String formatStart = formatyyyyMMddHHmmss.format(startTimeOfCurrentMonth);
  1232. Date endTimeOfCurrentMonth = DateUtils.getEndTimeOfCurrentMonth(parse);
  1233. String formatEnd = formatyyyyMMddHHmmss.format(endTimeOfCurrentMonth);
  1234. //结束时间
  1235. QueryWrapper<GcBidpublicity> gcBidpublicityQueryWrapper = new QueryWrapper<GcBidpublicity>();
  1236. gcBidpublicityQueryWrapper.gt("NOTICE_SEND_TIME",formatStart);
  1237. gcBidpublicityQueryWrapper.le("NOTICE_SEND_TIME",formatEnd);
  1238. gcBidpublicityQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1239. gcBidpublicityQueryWrapper.select("sum( case when PRICE_UNIT = 0 then BID_AMOUNT when PRICE_UNIT = 1 then BID_AMOUNT*10000 else BID_AMOUNT end) as sumAll");
  1240. GcBidpublicity gcBidpublicityServiceOne = gcBidpublicityService.getOne(gcBidpublicityQueryWrapper);
  1241. if(!ObjectUtils.isEmpty(gcBidpublicityServiceOne)){
  1242. String sumAll = gcBidpublicityServiceOne.getSumAll();
  1243. lineChartDataGcValue[iValue] = sumAll;
  1244. }else{
  1245. lineChartDataGcValue[iValue] = "0";
  1246. }
  1247. iValue++;
  1248. }
  1249. lineChartDataGc.setValue(lineChartDataGcValue);
  1250. dataDataDataList.add(lineChartDataGc);
  1251. /*工程建设结束*/
  1252. /*政府采购,开始*/
  1253. LineChartData lineChartDataZc = new LineChartData();
  1254. lineChartDataZc.setName("政府采购");
  1255. lineChartDataZc.setDate(get6Month());
  1256. String lineChartDataZcValue[] = new String[7];
  1257. int ilineChartDataZcValue = 0;
  1258. for (String date : lineChartDataZc.getDate()) {
  1259. //开始时间
  1260. SimpleDateFormat formatyyyylMM = new SimpleDateFormat("yyyy-MM");
  1261. SimpleDateFormat formatyyyyMMddHHmmss = new SimpleDateFormat("yyyyMMddHHmmss");
  1262. Date parse = formatyyyylMM.parse(date);
  1263. Date startTimeOfCurrentMonth = DateUtils.getStartTimeOfCurrentMonth(parse);
  1264. String formatStart = formatyyyyMMddHHmmss.format(startTimeOfCurrentMonth);
  1265. Date endTimeOfCurrentMonth = DateUtils.getEndTimeOfCurrentMonth(parse);
  1266. String formatEnd = formatyyyyMMddHHmmss.format(endTimeOfCurrentMonth);
  1267. QueryWrapper<ZcBidpublicity> zcBidpublicityQueryWrapper = new QueryWrapper<ZcBidpublicity>();
  1268. zcBidpublicityQueryWrapper.gt("WIN_BID_BULLETIN_START_TIME",formatStart);
  1269. zcBidpublicityQueryWrapper.le("WIN_BID_BULLETIN_START_TIME",formatEnd);
  1270. zcBidpublicityQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1271. zcBidpublicityQueryWrapper.select("sum( case when PRICE_UNIT = 0 then WIN_BID_PRICE when PRICE_UNIT = 1 then WIN_BID_PRICE*10000 else WIN_BID_PRICE end) as sumAll");
  1272. ZcBidpublicity zcBidpublicity = zcBidpublicityService.getOne(zcBidpublicityQueryWrapper);
  1273. if(!ObjectUtils.isEmpty(zcBidpublicity)){
  1274. String sumAll = zcBidpublicity.getSumAll();
  1275. lineChartDataZcValue[ilineChartDataZcValue] = sumAll;
  1276. }else{
  1277. lineChartDataZcValue[ilineChartDataZcValue] = "0";
  1278. }
  1279. ilineChartDataZcValue++;
  1280. }
  1281. lineChartDataZc.setValue(lineChartDataZcValue);
  1282. dataDataDataList.add(lineChartDataZc);
  1283. /*政府采购,结束*/
  1284. /*土地矿权开始*/
  1285. LineChartData lineChartDataTd = new LineChartData();
  1286. lineChartDataTd.setName("自然资源");
  1287. lineChartDataTd.setDate(get6Month());
  1288. String lineChartDataTdValue[] = new String[7];
  1289. int ilineChartDataTdValue = 0;
  1290. for (String date : lineChartDataTd.getDate()) {
  1291. //开始时间
  1292. SimpleDateFormat formatyyyylMM = new SimpleDateFormat("yyyy-MM");
  1293. SimpleDateFormat formatyyyyMMddHHmmss = new SimpleDateFormat("yyyyMMddHHmmss");
  1294. Date parse = formatyyyylMM.parse(date);
  1295. Date startTimeOfCurrentMonth = DateUtils.getStartTimeOfCurrentMonth(parse);
  1296. String formatStart = formatyyyyMMddHHmmss.format(startTimeOfCurrentMonth);
  1297. Date endTimeOfCurrentMonth = DateUtils.getEndTimeOfCurrentMonth(parse);
  1298. String formatEnd = formatyyyyMMddHHmmss.format(endTimeOfCurrentMonth);
  1299. BigDecimal zrzyTdTotal = new BigDecimal(0);
  1300. QueryWrapper<ZrzyTdBidwinnotice> zrzyTdBidwinnoticeQueryWrapper = new QueryWrapper<ZrzyTdBidwinnotice>();
  1301. zrzyTdBidwinnoticeQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1302. zrzyTdBidwinnoticeQueryWrapper.gt("PUBLISHING_TIME",formatStart);
  1303. zrzyTdBidwinnoticeQueryWrapper.le("PUBLISHING_TIME",formatEnd);
  1304. zrzyTdBidwinnoticeQueryWrapper.select("sum( case when PRICE_UNIT = 0 then DEAL_PRICE when PRICE_UNIT = 1 then DEAL_PRICE*10000 else DEAL_PRICE end) as sumAll");
  1305. ZrzyTdBidwinnotice zrzyTdBidwinnoticeServiceOne = zrzyTdBidwinnoticeService.getOne(zrzyTdBidwinnoticeQueryWrapper);
  1306. if(!ObjectUtils.isEmpty(zrzyTdBidwinnoticeServiceOne)){
  1307. String sumAll = zrzyTdBidwinnoticeServiceOne.getSumAll();
  1308. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1309. zrzyTdTotal = zrzyTdTotal.add(new BigDecimal(sumAll));
  1310. }
  1311. }
  1312. /*ZRZY_TKQ_BIDWINNOTICE*/
  1313. QueryWrapper<ZrzyTkqBidwinnotice> zrzyTdBidwinnoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyTkqBidwinnotice>();
  1314. zrzyTdBidwinnoticeQueryWrapperSumInIn.select("sum(cast(QT_PUBLIC_PRICE as decimal(9,2)) * 10000) as sumAll");
  1315. zrzyTdBidwinnoticeQueryWrapperSumInIn.likeRight("region_code",regionCode);
  1316. zrzyTdBidwinnoticeQueryWrapperSumInIn.gt("PUBLISHING_TIME",formatStart);
  1317. zrzyTdBidwinnoticeQueryWrapperSumInIn.le("PUBLISHING_TIME",formatEnd);
  1318. ZrzyTkqBidwinnotice zrzyTkqBidwinnoticeSumInIn = zrzyTkqBidwinnoticeService.getOne(zrzyTdBidwinnoticeQueryWrapperSumInIn);
  1319. if(!ObjectUtils.isEmpty(zrzyTkqBidwinnoticeSumInIn)){
  1320. String sumAll = zrzyTkqBidwinnoticeSumInIn.getSumAll();
  1321. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1322. zrzyTdTotal = zrzyTdTotal.add(new BigDecimal(sumAll));
  1323. }
  1324. }
  1325. /*ZRZY_CKQ_BIDWINNOTICE*/
  1326. QueryWrapper<ZrzyCkqBidwinnotice> zrzyCkqBidwinnoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyCkqBidwinnotice>();
  1327. zrzyCkqBidwinnoticeQueryWrapperSumInIn.select("sum(cast(QT_PUBLIC_PRICE as decimal(9,2)) * 10000) as sumAll");
  1328. zrzyCkqBidwinnoticeQueryWrapperSumInIn.likeRight("region_code",regionCode);
  1329. zrzyCkqBidwinnoticeQueryWrapperSumInIn.gt("PUBLISHING_TIME",formatStart);
  1330. zrzyCkqBidwinnoticeQueryWrapperSumInIn.le("PUBLISHING_TIME",formatEnd);
  1331. ZrzyCkqBidwinnotice zrzyCkqBidwinnoticeSumInIn = zrzyCkqBidwinnoticeService.getOne(zrzyCkqBidwinnoticeQueryWrapperSumInIn);
  1332. if(!ObjectUtils.isEmpty(zrzyCkqBidwinnoticeSumInIn)){
  1333. String sumAll = zrzyCkqBidwinnoticeSumInIn.getSumAll();
  1334. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1335. zrzyTdTotal = zrzyTdTotal.add(new BigDecimal(sumAll));
  1336. }
  1337. }
  1338. /*ZRZY_DK_BINWIN_NOTICE*/
  1339. QueryWrapper<ZrzyDkBinwinNotice> zrzyDkBinwinNoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyDkBinwinNotice>();
  1340. zrzyDkBinwinNoticeQueryWrapperSumInIn.select("sum(cast(ZB_PRICE as decimal(9,2)) * 10000) as sumAll");
  1341. zrzyDkBinwinNoticeQueryWrapperSumInIn.likeRight("zone",regionCode);
  1342. zrzyDkBinwinNoticeQueryWrapperSumInIn.gt("SUBMITS_TIME",formatStart);
  1343. zrzyDkBinwinNoticeQueryWrapperSumInIn.le("SUBMITS_TIME",formatEnd);
  1344. ZrzyDkBinwinNotice zrzyDkBinwinNoticeSumInIn = zrzyDkBinwinNoticeService.getOne(zrzyDkBinwinNoticeQueryWrapperSumInIn);
  1345. if(!ObjectUtils.isEmpty(zrzyDkBinwinNoticeSumInIn)){
  1346. String sumAll = zrzyDkBinwinNoticeSumInIn.getSumAll();
  1347. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1348. zrzyTdTotal = zrzyTdTotal.add(new BigDecimal(sumAll));
  1349. }
  1350. }
  1351. /*ZRZY_BG_BIDWIN_NOTICE*/
  1352. QueryWrapper<ZrzyBgBidwinNotice> zrzyBgBidwinNoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyBgBidwinNotice>();
  1353. zrzyBgBidwinNoticeQueryWrapperSumInIn.select("sum(cast(WIN_BID_PRICE as decimal(9,2)) * 10000) as sumAll");
  1354. zrzyBgBidwinNoticeQueryWrapperSumInIn.gt("ISSUE_TIME",formatStart);
  1355. zrzyBgBidwinNoticeQueryWrapperSumInIn.le("ISSUE_TIME",formatEnd);
  1356. ZrzyBgBidwinNotice zrzyBgBidwinNoticeSumInIn = zrzyBgBidwinNoticeService.getOne(zrzyBgBidwinNoticeQueryWrapperSumInIn);
  1357. if(!ObjectUtils.isEmpty(zrzyBgBidwinNoticeSumInIn)){
  1358. String sumAll = zrzyBgBidwinNoticeSumInIn.getSumAll();
  1359. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1360. zrzyTdTotal = zrzyTdTotal.add(new BigDecimal(sumAll));
  1361. }
  1362. }
  1363. /*ZRZY_JYZB_BIDWIN_NOTICE*/
  1364. QueryWrapper<ZrzyJyzbBidwinNotice> zrzyJyzbBidwinNoticeQueryWrapperSumInIn = new QueryWrapper<ZrzyJyzbBidwinNotice>();
  1365. zrzyJyzbBidwinNoticeQueryWrapperSumInIn.select("sum(WIN_BID_PRICE) as sumAll ");
  1366. zrzyJyzbBidwinNoticeQueryWrapperSumInIn.gt("ISSUE_TIME",formatStart);
  1367. zrzyJyzbBidwinNoticeQueryWrapperSumInIn.le("ISSUE_TIME",formatEnd);
  1368. ZrzyJyzbBidwinNotice zrzyJyzbBidwinNoticeSumInIn = zrzyJyzbBidwinNoticeService.getOne(zrzyJyzbBidwinNoticeQueryWrapperSumInIn);
  1369. if(!ObjectUtils.isEmpty(zrzyJyzbBidwinNoticeSumInIn)){
  1370. String sumAll = zrzyJyzbBidwinNoticeSumInIn.getSumAll();
  1371. if(!ObjectUtils.isEmpty(sumAll) && sumAll != ""){
  1372. zrzyTdTotal = zrzyTdTotal.add(new BigDecimal(sumAll));
  1373. }
  1374. }
  1375. if(!ObjectUtils.isEmpty(zrzyTdTotal)){
  1376. lineChartDataTdValue[ilineChartDataTdValue] = zrzyTdTotal.toString();
  1377. }
  1378. ilineChartDataTdValue++;
  1379. }
  1380. lineChartDataTd.setValue(lineChartDataTdValue);
  1381. dataDataDataList.add(lineChartDataTd);
  1382. /*土地矿权结束*/
  1383. LineChartData lineChartDataGy = new LineChartData();
  1384. lineChartDataGy.setName("国有产权");
  1385. lineChartDataGy.setDate(get6Month());
  1386. String lineChartDataGyValue[] = new String[7];
  1387. int ilineChartDataGyValue = 0;
  1388. for (String date : lineChartDataGy.getDate()) {
  1389. //开始时间
  1390. SimpleDateFormat formatyyyylMM = new SimpleDateFormat("yyyy-MM");
  1391. SimpleDateFormat formatyyyyMMddHHmmss = new SimpleDateFormat("yyyyMMddHHmmss");
  1392. Date parse = formatyyyylMM.parse(date);
  1393. Date startTimeOfCurrentMonth = DateUtils.getStartTimeOfCurrentMonth(parse);
  1394. String formatStart = formatyyyyMMddHHmmss.format(startTimeOfCurrentMonth);
  1395. Date endTimeOfCurrentMonth = DateUtils.getEndTimeOfCurrentMonth(parse);
  1396. String formatEnd = formatyyyyMMddHHmmss.format(endTimeOfCurrentMonth);
  1397. /*CQ_SW_BARGAIN_RESULT*/
  1398. CqSwBargainResult cqSwBargainResultSumInIn = null;
  1399. try {
  1400. cqSwBargainResultSumInIn = cqSwBargainResultService.getSumMoneyByRegionCodeAndTime(regionCode,formatStart.substring(0,8),formatEnd.substring(0,8));
  1401. }catch (Exception e){
  1402. e.printStackTrace();
  1403. }
  1404. /*CQ_GQ_BARGAIN_RESULT*/
  1405. QueryWrapper<CqGqBargainResult> cqGqBargainResultQueryWrapperSumInIn = new QueryWrapper<CqGqBargainResult>();
  1406. cqGqBargainResultQueryWrapperSumInIn.gt("TRADE_DATE",formatStart.substring(0,8));
  1407. cqGqBargainResultQueryWrapperSumInIn.le("TRADE_DATE",formatEnd.substring(0,8));
  1408. cqGqBargainResultQueryWrapperSumInIn.select("sum( case when PRICE_UNIT = 0 then TRADE_VALUE when PRICE_UNIT = 1 then TRADE_VALUE*10000 else TRADE_VALUE end) as sumAll");
  1409. cqGqBargainResultQueryWrapperSumInIn.likeRight("region_code",regionCode);
  1410. CqGqBargainResult cqGqBargainResultSumInIn = cqGqBargainResultService.getOne(cqGqBargainResultQueryWrapperSumInIn);
  1411. BigDecimal cqSwBargainTotal = new BigDecimal(0);
  1412. if(!ObjectUtils.isEmpty(cqSwBargainResultSumInIn)){
  1413. String sumAll = cqSwBargainResultSumInIn.getSumAll();
  1414. BigDecimal bigDecimalSumAllValue = new BigDecimal(sumAll);
  1415. cqSwBargainTotal = cqSwBargainTotal.add(bigDecimalSumAllValue);
  1416. }
  1417. if(!ObjectUtils.isEmpty(cqGqBargainResultSumInIn)){
  1418. String sumAllValue = cqGqBargainResultSumInIn.getSumAll();
  1419. BigDecimal bigDecimalSumAllValue = new BigDecimal(sumAllValue);
  1420. cqSwBargainTotal = cqSwBargainTotal.add(bigDecimalSumAllValue);
  1421. }
  1422. lineChartDataGyValue[ilineChartDataGyValue] = cqSwBargainTotal.toString();
  1423. ilineChartDataGyValue++;
  1424. }
  1425. lineChartDataGy.setValue(lineChartDataGyValue);
  1426. dataDataDataList.add(lineChartDataGy);
  1427. LineChartData lineChartDataYm = new LineChartData();
  1428. lineChartDataYm.setName("疫苗交易");
  1429. lineChartDataYm.setDate(get6Month());
  1430. dataDataDataList.add(lineChartDataYm);
  1431. LineChartData lineChartDataQt = new LineChartData();
  1432. lineChartDataQt.setDate(get6Month());
  1433. String lineChartDataQtValue[] = new String[7];
  1434. int ilineChartDataQtValue = 0;
  1435. for (String date : lineChartDataQt.getDate()) {
  1436. //开始时间
  1437. SimpleDateFormat formatyyyylMM = new SimpleDateFormat("yyyy-MM");
  1438. SimpleDateFormat formatyyyyMMddHHmmss = new SimpleDateFormat("yyyyMMddHHmmss");
  1439. Date parse = formatyyyylMM.parse(date);
  1440. Date startTimeOfCurrentMonth = DateUtils.getStartTimeOfCurrentMonth(parse);
  1441. String formatStart = formatyyyyMMddHHmmss.format(startTimeOfCurrentMonth);
  1442. Date endTimeOfCurrentMonth = DateUtils.getEndTimeOfCurrentMonth(parse);
  1443. String formatEnd = formatyyyyMMddHHmmss.format(endTimeOfCurrentMonth);
  1444. QueryWrapper<QtjyBidpublicity> qtjyBidpublicityQueryWrapper = new QueryWrapper<QtjyBidpublicity>();
  1445. qtjyBidpublicityQueryWrapper.gt("PUBLISHING_TIME",formatStart);
  1446. qtjyBidpublicityQueryWrapper.le("PUBLISHING_TIME",formatEnd);
  1447. qtjyBidpublicityQueryWrapper.eq("PLATFORM_CODE",platformCode);
  1448. qtjyBidpublicityQueryWrapper.select("sum(BID_AMOUNT) as sumAll");
  1449. QtjyBidpublicity qtjyBidpublicity = qtjyBidpublicityService.getOne(qtjyBidpublicityQueryWrapper);
  1450. if(!ObjectUtils.isEmpty(qtjyBidpublicity)){
  1451. String sumAll = qtjyBidpublicity.getSumAll();
  1452. if(!ObjectUtils.isEmpty(sumAll)){
  1453. BigDecimal bigDecimalsumAll = new BigDecimal(sumAll);
  1454. try {
  1455. QueryWrapper<OtherTradeResultInfo> otherTradeResultInfoQueryWrapperIn = new QueryWrapper<OtherTradeResultInfo>();
  1456. otherTradeResultInfoQueryWrapperIn.gt("PUBLISHING_TIME",formatStart);
  1457. otherTradeResultInfoQueryWrapperIn.le("PUBLISHING_TIME",formatEnd);
  1458. otherTradeResultInfoQueryWrapperIn.select("sum(BID_AMOUNT) as sumAll");
  1459. otherTradeResultInfoQueryWrapperIn.eq("PLATFORM_CODE",platformCode);
  1460. OtherTradeResultInfo otherTradeResultInfoIn = otherTradeResultInfoService.getOne(otherTradeResultInfoQueryWrapperIn);
  1461. if(!ObjectUtils.isEmpty(otherTradeResultInfoIn)){
  1462. String sumAll1 = otherTradeResultInfoIn.getSumAll();
  1463. if(!ObjectUtils.isEmpty(sumAll1)){
  1464. BigDecimal bigDecimalsum = new BigDecimal(sumAll1);
  1465. bigDecimalsumAll = bigDecimalsumAll.add(bigDecimalsum);
  1466. }
  1467. }
  1468. }catch (Exception e){
  1469. e.printStackTrace();
  1470. }
  1471. if(!ObjectUtils.isEmpty(bigDecimalsumAll)){
  1472. sumAll = bigDecimalsumAll.toString();
  1473. }
  1474. }
  1475. lineChartDataQtValue[ilineChartDataQtValue] = sumAll;
  1476. }else{
  1477. lineChartDataQtValue[ilineChartDataQtValue] = "0";
  1478. }
  1479. ilineChartDataQtValue++;
  1480. }
  1481. lineChartDataQt.setValue(lineChartDataQtValue);
  1482. lineChartDataQt.setName("其他交易");
  1483. dataDataDataList.add(lineChartDataQt);
  1484. redisUtil.set(CommonConstant.PUBLISHING_CATEGORY_MONEY_YUE_LIST, JSONArray.toJSONString(dataDataDataList),CommonConstant.REDIS_SAVE_TIME);
  1485. return Result.OK(dataDataDataList);
  1486. }
  1487. public String[] get6Month() throws ParseException {
  1488. Calendar c = Calendar.getInstance();
  1489. c.add(Calendar.MONTH, -5);
  1490. String before_six = c.get(Calendar.YEAR) + "-" + c.get(Calendar.MONTH);//六个月前
  1491. ArrayList<String> result = new ArrayList<String>();
  1492. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");// 格式化为年月
  1493. Calendar min = Calendar.getInstance();
  1494. Calendar max = Calendar.getInstance();
  1495. min.setTime(sdf.parse(before_six));
  1496. min.set(min.get(Calendar.YEAR), min.get(Calendar.MONTH), 1);
  1497. max.setTime(sdf.parse(sdf.format(new Date())));
  1498. max.set(max.get(Calendar.YEAR), max.get(Calendar.MONTH), 2);
  1499. Calendar curr = min;
  1500. while (curr.before(max)) {
  1501. result.add(sdf.format(curr.getTime()));
  1502. curr.add(Calendar.MONTH, 1);
  1503. }
  1504. String date[] = new String[7];
  1505. int i = 0;
  1506. for (String sDate : result) {
  1507. date[i] = sDate;
  1508. i++;
  1509. }
  1510. return date;
  1511. }
  1512. public Integer getGcProjectTotal(Date startTime, Date endTime){
  1513. String strDateFormat = "yyyyMMddHHmmss";
  1514. Long resultStartTime = Long.parseLong(DateFormatUtils.format(startTime,strDateFormat));
  1515. Long resultEndTime = Long.parseLong(DateFormatUtils.format(endTime,strDateFormat));
  1516. Integer total = 0;
  1517. try {
  1518. QueryWrapper<GcPackage> gcPackageQueryWrapper = new QueryWrapper<GcPackage>();
  1519. gcPackageQueryWrapper.ge("CREATE_TIME",resultStartTime);
  1520. gcPackageQueryWrapper.le("CREATE_TIME",resultEndTime);
  1521. int countGcProject = gcPackageService.count(gcPackageQueryWrapper);
  1522. total = total + countGcProject;
  1523. }catch (Exception e){
  1524. e.printStackTrace();
  1525. }
  1526. /*政府采购*/
  1527. try {
  1528. QueryWrapper<ZcProject> zcPurchaseBulletinQueryWrapper = new QueryWrapper<ZcProject>();
  1529. zcPurchaseBulletinQueryWrapper.ge("CREATE_TIME",resultStartTime);
  1530. zcPurchaseBulletinQueryWrapper.le("CREATE_TIME",resultEndTime);
  1531. int countZcPurchaseBulletin = zcProjectService.count(zcPurchaseBulletinQueryWrapper);
  1532. total = total + countZcPurchaseBulletin;
  1533. }catch (Exception e){
  1534. e.printStackTrace();
  1535. }
  1536. /*土地矿权*/
  1537. /*ZRZY_TD_CEDE_INFO*/
  1538. try {
  1539. QueryWrapper<ZrzyTdCedeInfo> zrzyTdCedeInfoQueryWrapper = new QueryWrapper<ZrzyTdCedeInfo>();
  1540. zrzyTdCedeInfoQueryWrapper.ge("LISTING_START_TIME",resultStartTime);
  1541. zrzyTdCedeInfoQueryWrapper.le("LISTING_START_TIME",resultEndTime);
  1542. int countZrzyTdCedeNoticeSelf = zrzyTdCedeInfoService.count(zrzyTdCedeInfoQueryWrapper);
  1543. total = total + countZrzyTdCedeNoticeSelf;
  1544. }catch (Exception e){
  1545. e.printStackTrace();
  1546. }
  1547. /*ZRZY_TKQ_PROJECT_INFO*/
  1548. try {
  1549. QueryWrapper<ZrzyTkqProjectInfo> zrzyTkqProjectInfoQueryWrapper = new QueryWrapper<ZrzyTkqProjectInfo>();
  1550. zrzyTkqProjectInfoQueryWrapper.ge("LISTING_START_TIME",resultStartTime);
  1551. zrzyTkqProjectInfoQueryWrapper.le("LISTING_START_TIME",resultEndTime);
  1552. int countZrzyTdCedeNoticeSelf = zrzyTkqProjectInfoService.count(zrzyTkqProjectInfoQueryWrapper);
  1553. total = total + countZrzyTdCedeNoticeSelf;
  1554. }catch (Exception e){
  1555. e.printStackTrace();
  1556. }
  1557. /*ZRZY_CKQ_PROJECT_INFO*/
  1558. try {
  1559. QueryWrapper<ZrzyCkqProjectInfo> zrzyTkqProjectInfoQueryWrapper = new QueryWrapper<ZrzyCkqProjectInfo>();
  1560. zrzyTkqProjectInfoQueryWrapper.ge("LISTING_START_TIME",resultStartTime);
  1561. zrzyTkqProjectInfoQueryWrapper.le("LISTING_START_TIME",resultEndTime);
  1562. int countZrzyTdCedeNoticeSelf = zrzyCkqProjectInfoService.count(zrzyTkqProjectInfoQueryWrapper);
  1563. total = total + countZrzyTdCedeNoticeSelf;
  1564. }catch (Exception e){
  1565. e.printStackTrace();
  1566. }
  1567. /*ZRZY_DK_PROJECT*/
  1568. try {
  1569. QueryWrapper<ZrzyDkProject> zrzyTkqProjectInfoQueryWrapper = new QueryWrapper<ZrzyDkProject>();
  1570. zrzyTkqProjectInfoQueryWrapper.ge("NOTICE_SEND_TIME",resultStartTime);
  1571. zrzyTkqProjectInfoQueryWrapper.le("NOTICE_SEND_TIME",resultEndTime);
  1572. int countZrzyTdCedeNoticeSelf = zrzyDkProjectService.count(zrzyTkqProjectInfoQueryWrapper);
  1573. total = total + countZrzyTdCedeNoticeSelf;
  1574. }catch (Exception e){
  1575. e.printStackTrace();
  1576. }
  1577. /*ZRZY_BG_STOCK_INDEX*/
  1578. try {
  1579. QueryWrapper<ZrzyBgStockIndex> zrzyTkqProjectInfoQueryWrapper = new QueryWrapper<ZrzyBgStockIndex>();
  1580. zrzyTkqProjectInfoQueryWrapper.ge("IN_TIME",resultStartTime);
  1581. zrzyTkqProjectInfoQueryWrapper.le("IN_TIME",resultEndTime);
  1582. int countZrzyTdCedeNoticeSelf = zrzyBgStockIndexService.count(zrzyTkqProjectInfoQueryWrapper);
  1583. total = total + countZrzyTdCedeNoticeSelf;
  1584. }catch (Exception e){
  1585. e.printStackTrace();
  1586. }
  1587. /*ZRZY_JYZB_STOCK_INDEX*/
  1588. try {
  1589. QueryWrapper<ZrzyJyzbStockIndex> zrzyTkqProjectInfoQueryWrapper = new QueryWrapper<ZrzyJyzbStockIndex>();
  1590. zrzyTkqProjectInfoQueryWrapper.ge("DATA_TIMESTAMP",resultStartTime);
  1591. zrzyTkqProjectInfoQueryWrapper.le("DATA_TIMESTAMP",resultEndTime);
  1592. int countZrzyTdCedeNoticeSelf = zrzyJyzbStockIndexService.count(zrzyTkqProjectInfoQueryWrapper);
  1593. total = total + countZrzyTdCedeNoticeSelf;
  1594. }catch (Exception e){
  1595. e.printStackTrace();
  1596. }
  1597. /*CQ_SW_BARGAIN_RESULT*/
  1598. try {
  1599. String strDateFormatYyyyMMdd = "yyyyMMdd";
  1600. Long resultStartTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(startTime,strDateFormatYyyyMMdd));
  1601. Long resultEndTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(endTime,strDateFormatYyyyMMdd));
  1602. QueryWrapper<CqSwBargainResult> gcProjectQueryWrapper = new QueryWrapper<CqSwBargainResult>();
  1603. gcProjectQueryWrapper.ge("TRADE_DATE",resultStartTimeYyyyMMdd);
  1604. gcProjectQueryWrapper.le("TRADE_DATE",resultEndTimeYyyyMMdd);
  1605. int countGcProject = cqSwBargainResultService.count(gcProjectQueryWrapper);
  1606. total = total + countGcProject;
  1607. }catch (Exception e){
  1608. e.printStackTrace();
  1609. }
  1610. /*CQ_GQ_BARGAIN_RESULT*/
  1611. try {
  1612. String strDateFormatYyyyMMdd = "yyyyMMdd";
  1613. Long resultStartTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(startTime,strDateFormatYyyyMMdd));
  1614. Long resultEndTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(endTime,strDateFormatYyyyMMdd));
  1615. QueryWrapper<CqGqBargainResult> gcProjectQueryWrapper = new QueryWrapper<CqGqBargainResult>();
  1616. gcProjectQueryWrapper.ge("TRADE_DATE",resultStartTimeYyyyMMdd);
  1617. gcProjectQueryWrapper.le("TRADE_DATE",resultEndTimeYyyyMMdd);
  1618. int countGcProject = cqGqBargainResultService.count(gcProjectQueryWrapper);
  1619. total = total + countGcProject;
  1620. }catch (Exception e){
  1621. e.printStackTrace();
  1622. }
  1623. return total;
  1624. }
  1625. public Integer getFieldApplyByTime(Date startTime, Date endTime){
  1626. String strDateFormat = "yyyyMMddHHmmss";
  1627. Long resultStartTime = Long.parseLong(DateFormatUtils.format(startTime,strDateFormat));
  1628. Long resultEndTime = Long.parseLong(DateFormatUtils.format(endTime,strDateFormat));
  1629. QueryWrapper<JgFieldApply> gcProjectQueryWrapper = new QueryWrapper<JgFieldApply>();
  1630. gcProjectQueryWrapper.ge("BID_OPENING_TIME",resultStartTime);
  1631. gcProjectQueryWrapper.le("BID_OPENING_TIME",resultEndTime);
  1632. int count = jgFieldApplyService.count(gcProjectQueryWrapper);
  1633. return count;
  1634. }
  1635. public Integer getGcNoticeandfileTotalByNoticeSendTime(Date startTime,Date endTime){
  1636. String strDateFormat = "yyyyMMddHHmmss";
  1637. Long resultStartTime = Long.parseLong(DateFormatUtils.format(startTime,strDateFormat));
  1638. Long resultEndTime = Long.parseLong(DateFormatUtils.format(endTime,strDateFormat));
  1639. int totalTransaction = 0;
  1640. try {
  1641. QueryWrapper<GcNoticeandfile> gcProjectQueryWrapper = new QueryWrapper<GcNoticeandfile>();
  1642. gcProjectQueryWrapper.ge("NOTICE_SEND_TIME",resultStartTime);
  1643. gcProjectQueryWrapper.le("NOTICE_SEND_TIME",resultEndTime);
  1644. int countGcProject = gcNoticeandfileService.count(gcProjectQueryWrapper);
  1645. totalTransaction = totalTransaction + countGcProject;
  1646. }catch (Exception e){
  1647. e.printStackTrace();
  1648. }
  1649. try {
  1650. QueryWrapper<ZcBidpublicity> zcBidpublicityQueryWrapper = new QueryWrapper<ZcBidpublicity>();
  1651. zcBidpublicityQueryWrapper.ge("WIN_BID_BULLETIN_START_TIME",resultStartTime);
  1652. zcBidpublicityQueryWrapper.le("WIN_BID_BULLETIN_START_TIME",resultEndTime);
  1653. int countGcProject = zcBidpublicityService.count(zcBidpublicityQueryWrapper);
  1654. totalTransaction = totalTransaction + countGcProject;
  1655. }catch (Exception e){
  1656. e.printStackTrace();
  1657. }
  1658. /*政府采购*/
  1659. try {
  1660. QueryWrapper<ZcProject> zcPurchaseBulletinQueryWrapper = new QueryWrapper<ZcProject>();
  1661. zcPurchaseBulletinQueryWrapper.ge("CREATE_TIME",resultStartTime);
  1662. zcPurchaseBulletinQueryWrapper.le("CREATE_TIME",resultEndTime);
  1663. int countZcPurchaseBulletin = zcProjectService.count(zcPurchaseBulletinQueryWrapper);
  1664. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1665. }catch (Exception e){
  1666. e.printStackTrace();
  1667. }
  1668. try {
  1669. /*ZRZY_TD_CEDE_NOTIC*/
  1670. QueryWrapper<ZrzyTdCedeNotice> zrzyTdCedeNoticeQueryWrapper = new QueryWrapper<ZrzyTdCedeNotice>();
  1671. zrzyTdCedeNoticeQueryWrapper.ge("PUBLISHING_TIME",resultStartTime);
  1672. zrzyTdCedeNoticeQueryWrapper.le("PUBLISHING_TIME",resultEndTime);
  1673. int countZcPurchaseBulletin = zrzyTdCedeNoticeService.count(zrzyTdCedeNoticeQueryWrapper);
  1674. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1675. }catch (Exception e){
  1676. e.printStackTrace();
  1677. }
  1678. try {
  1679. /*ZRZY_TKQ_NOTICE*/
  1680. QueryWrapper<ZrzyTkqNotice> zrzyTkqNoticeQueryWrapper = new QueryWrapper<ZrzyTkqNotice>();
  1681. zrzyTkqNoticeQueryWrapper.ge("NOTICE_SEND_TIME",resultStartTime);
  1682. zrzyTkqNoticeQueryWrapper.le("NOTICE_SEND_TIME",resultEndTime);
  1683. int countZcPurchaseBulletin = zrzyTkqNoticeService.count(zrzyTkqNoticeQueryWrapper);
  1684. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1685. }catch (Exception e){
  1686. e.printStackTrace();
  1687. }
  1688. try {
  1689. /*ZRZY_CKQ_NOTICE*/
  1690. QueryWrapper<ZrzyCkqNotice> zrzyTkqNoticeQueryWrapper = new QueryWrapper<ZrzyCkqNotice>();
  1691. zrzyTkqNoticeQueryWrapper.ge("NOTICE_SEND_TIME",resultStartTime);
  1692. zrzyTkqNoticeQueryWrapper.le("NOTICE_SEND_TIME",resultEndTime);
  1693. int countZcPurchaseBulletin = zrzyCkqNoticeService.count(zrzyTkqNoticeQueryWrapper);
  1694. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1695. }catch (Exception e){
  1696. e.printStackTrace();
  1697. }
  1698. try {
  1699. /*ZRZY_DK_NOTICE*/
  1700. QueryWrapper<ZrzyDkNotice> zrzyTkqNoticeQueryWrapper = new QueryWrapper<ZrzyDkNotice>();
  1701. zrzyTkqNoticeQueryWrapper.ge("NOTICE_SEND_TIME",resultStartTime);
  1702. zrzyTkqNoticeQueryWrapper.le("NOTICE_SEND_TIME",resultEndTime);
  1703. int countZcPurchaseBulletin = zrzyDkNoticeService.count(zrzyTkqNoticeQueryWrapper);
  1704. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1705. }catch (Exception e){
  1706. e.printStackTrace();
  1707. }
  1708. try {
  1709. /*ZRZY_BG_NOTICE*/
  1710. QueryWrapper<ZrzyBgNotice> zrzyBgNoticeQueryWrapper = new QueryWrapper<ZrzyBgNotice>();
  1711. zrzyBgNoticeQueryWrapper.ge("ISSUE_TIME",resultStartTime);
  1712. zrzyBgNoticeQueryWrapper.le("ISSUE_TIME",resultEndTime);
  1713. int countZcPurchaseBulletin = zrzyBgNoticeService.count(zrzyBgNoticeQueryWrapper);
  1714. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1715. }catch (Exception e){
  1716. e.printStackTrace();
  1717. }
  1718. try {
  1719. /*ZRZY_JYZB_NOTICE*/
  1720. QueryWrapper<ZrzyJyzbNotice> zrzyBgNoticeQueryWrapper = new QueryWrapper<ZrzyJyzbNotice>();
  1721. zrzyBgNoticeQueryWrapper.ge("ISSUE_TIME",resultStartTime);
  1722. zrzyBgNoticeQueryWrapper.le("ISSUE_TIME",resultEndTime);
  1723. int countZcPurchaseBulletin = zrzyJyzbNoticeService.count(zrzyBgNoticeQueryWrapper);
  1724. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1725. }catch (Exception e){
  1726. e.printStackTrace();
  1727. }
  1728. try {
  1729. String strDateFormatYyyyMMdd = "yyyyMMdd";
  1730. Long resultStartTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(startTime,strDateFormatYyyyMMdd));
  1731. Long resultEndTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(endTime,strDateFormatYyyyMMdd));
  1732. QueryWrapper<CqSwIssueBulletin> cqSwIssueBulletinQueryWrapper = new QueryWrapper<CqSwIssueBulletin>();
  1733. cqSwIssueBulletinQueryWrapper.ge("PUBLISH_DATE",resultStartTimeYyyyMMdd);
  1734. cqSwIssueBulletinQueryWrapper.le("PUBLISH_DATE",resultEndTimeYyyyMMdd);
  1735. int countZcPurchaseBulletin = cqSwIssueBulletinService.count(cqSwIssueBulletinQueryWrapper);
  1736. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1737. }catch (Exception e){
  1738. e.printStackTrace();
  1739. }
  1740. try {
  1741. String strDateFormatYyyyMMdd = "yyyyMMdd";
  1742. Long resultStartTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(startTime,strDateFormatYyyyMMdd));
  1743. Long resultEndTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(endTime,strDateFormatYyyyMMdd));
  1744. QueryWrapper<CqGqIssueBulletin> cqSwIssueBulletinQueryWrapper = new QueryWrapper<CqGqIssueBulletin>();
  1745. cqSwIssueBulletinQueryWrapper.ge("PUBLISH_DATE",resultStartTimeYyyyMMdd);
  1746. cqSwIssueBulletinQueryWrapper.le("PUBLISH_DATE",resultEndTimeYyyyMMdd);
  1747. int countZcPurchaseBulletin = cqGqIssueBulletinService.count(cqSwIssueBulletinQueryWrapper);
  1748. totalTransaction = totalTransaction + countZcPurchaseBulletin;
  1749. }catch (Exception e){
  1750. e.printStackTrace();
  1751. }
  1752. return totalTransaction;
  1753. }
  1754. public Integer getGcBidpublicityTotal(Date startTime,Date endTime){
  1755. String strDateFormat = "yyyyMMddHHmmss";
  1756. Long resultStartTime = Long.parseLong(DateFormatUtils.format(startTime,strDateFormat));
  1757. Long resultEndTime = Long.parseLong(DateFormatUtils.format(endTime,strDateFormat));
  1758. int totalTransaction = 0;
  1759. /*GC_BIDPUBLICITY*/
  1760. try {
  1761. QueryWrapper<GcBidpublicity> gcProjectQueryWrapper = new QueryWrapper<GcBidpublicity>();
  1762. gcProjectQueryWrapper.ge("NOTICE_SEND_TIME",resultStartTime);
  1763. gcProjectQueryWrapper.le("NOTICE_SEND_TIME",resultEndTime);
  1764. int countGcProject = gcBidpublicityService.count(gcProjectQueryWrapper);
  1765. totalTransaction = totalTransaction + countGcProject;
  1766. }catch (Exception e){
  1767. e.printStackTrace();
  1768. }
  1769. try {
  1770. QueryWrapper<ZcBidpublicity> zcBidpublicityQueryWrapper = new QueryWrapper<ZcBidpublicity>();
  1771. zcBidpublicityQueryWrapper.ge("WIN_BID_BULLETIN_START_TIME",resultStartTime);
  1772. zcBidpublicityQueryWrapper.le("WIN_BID_BULLETIN_START_TIME",resultEndTime);
  1773. int countGcProject = zcBidpublicityService.count(zcBidpublicityQueryWrapper);
  1774. totalTransaction = totalTransaction + countGcProject;
  1775. }catch (Exception e){
  1776. e.printStackTrace();
  1777. }
  1778. /*ZRZY_TD_BIDWINNOTICE*/
  1779. try {
  1780. QueryWrapper<ZrzyTdBidwinnotice> zcBidpublicityQueryWrapper = new QueryWrapper<ZrzyTdBidwinnotice>();
  1781. zcBidpublicityQueryWrapper.ge("PUBLISHING_TIME",resultStartTime);
  1782. zcBidpublicityQueryWrapper.le("PUBLISHING_TIME",resultEndTime);
  1783. int countGcProject = zrzyTdBidwinnoticeService.count(zcBidpublicityQueryWrapper);
  1784. totalTransaction = totalTransaction + countGcProject;
  1785. }catch (Exception e){
  1786. e.printStackTrace();
  1787. }
  1788. /*ZRZY_TKQ_BIDWINNOTICE*/
  1789. try {
  1790. QueryWrapper<ZrzyTkqBidwinnotice> zcBidpublicityQueryWrapper = new QueryWrapper<ZrzyTkqBidwinnotice>();
  1791. zcBidpublicityQueryWrapper.ge("PUBLISHING_TIME",resultStartTime);
  1792. zcBidpublicityQueryWrapper.le("PUBLISHING_TIME",resultEndTime);
  1793. int countGcProject = zrzyTkqBidwinnoticeService.count(zcBidpublicityQueryWrapper);
  1794. totalTransaction = totalTransaction + countGcProject;
  1795. }catch (Exception e){
  1796. e.printStackTrace();
  1797. }
  1798. /*ZRZY_CKQ_BIDWINNOTICE*/
  1799. try {
  1800. QueryWrapper<ZrzyCkqBidwinnotice> zcBidpublicityQueryWrapper = new QueryWrapper<ZrzyCkqBidwinnotice>();
  1801. zcBidpublicityQueryWrapper.ge("PUBLISHING_TIME",resultStartTime);
  1802. zcBidpublicityQueryWrapper.le("PUBLISHING_TIME",resultEndTime);
  1803. int countGcProject = zrzyCkqBidwinnoticeService.count(zcBidpublicityQueryWrapper);
  1804. totalTransaction = totalTransaction + countGcProject;
  1805. }catch (Exception e){
  1806. e.printStackTrace();
  1807. }
  1808. /*ZRZY_DK_BIDWIN_NOTICE*/
  1809. try {
  1810. QueryWrapper<ZrzyDkBinwinNotice> zcBidpublicityQueryWrapper = new QueryWrapper<ZrzyDkBinwinNotice>();
  1811. zcBidpublicityQueryWrapper.ge("SUBMITS_TIME",resultStartTime);
  1812. zcBidpublicityQueryWrapper.le("SUBMITS_TIME",resultEndTime);
  1813. int countGcProject = zrzyDkBinwinNoticeService.count(zcBidpublicityQueryWrapper);
  1814. totalTransaction = totalTransaction + countGcProject;
  1815. }catch (Exception e){
  1816. e.printStackTrace();
  1817. }
  1818. /*ZRZY_BG_BIDWIN_NOTICE*/
  1819. try {
  1820. QueryWrapper<ZrzyBgBidwinNotice> zcBidpublicityQueryWrapper = new QueryWrapper<ZrzyBgBidwinNotice>();
  1821. zcBidpublicityQueryWrapper.ge("ISSUE_TIME",resultStartTime);
  1822. zcBidpublicityQueryWrapper.le("ISSUE_TIME",resultEndTime);
  1823. int countGcProject = zrzyBgBidwinNoticeService.count(zcBidpublicityQueryWrapper);
  1824. totalTransaction = totalTransaction + countGcProject;
  1825. }catch (Exception e){
  1826. e.printStackTrace();
  1827. }
  1828. /*ZRZY_JYZB_BIDWIN_NOTICE*/
  1829. try {
  1830. QueryWrapper<ZrzyJyzbBidwinNotice> zcBidpublicityQueryWrapper = new QueryWrapper<ZrzyJyzbBidwinNotice>();
  1831. zcBidpublicityQueryWrapper.ge("ISSUE_TIME",resultStartTime);
  1832. zcBidpublicityQueryWrapper.le("ISSUE_TIME",resultEndTime);
  1833. int countGcProject = zrzyJyzbBidwinNoticeService.count(zcBidpublicityQueryWrapper);
  1834. totalTransaction = totalTransaction + countGcProject;
  1835. }catch (Exception e){
  1836. e.printStackTrace();
  1837. }
  1838. /*CQ_SW_BARGAIN_RESULT*/
  1839. try {
  1840. String strDateFormatYyyyMMdd = "yyyyMMdd";
  1841. Long resultStartTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(startTime,strDateFormatYyyyMMdd));
  1842. Long resultEndTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(endTime,strDateFormatYyyyMMdd));
  1843. QueryWrapper<CqSwBargainResult> gcProjectQueryWrapper = new QueryWrapper<CqSwBargainResult>();
  1844. gcProjectQueryWrapper.ge("TRADE_DATE",resultStartTimeYyyyMMdd);
  1845. gcProjectQueryWrapper.le("TRADE_DATE",resultEndTimeYyyyMMdd);
  1846. int countGcProject = cqSwBargainResultService.count(gcProjectQueryWrapper);
  1847. totalTransaction = totalTransaction + countGcProject;
  1848. }catch (Exception e){
  1849. e.printStackTrace();
  1850. }
  1851. /*CQ_GQ_BARGAIN_RESULT*/
  1852. try {
  1853. String strDateFormatYyyyMMdd = "yyyyMMdd";
  1854. Long resultStartTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(startTime,strDateFormatYyyyMMdd));
  1855. Long resultEndTimeYyyyMMdd = Long.parseLong(DateFormatUtils.format(endTime,strDateFormatYyyyMMdd));
  1856. QueryWrapper<CqGqBargainResult> gcProjectQueryWrapper = new QueryWrapper<CqGqBargainResult>();
  1857. gcProjectQueryWrapper.ge("TRADE_DATE",resultStartTimeYyyyMMdd);
  1858. gcProjectQueryWrapper.le("TRADE_DATE",resultEndTimeYyyyMMdd);
  1859. int countGcProject = cqGqBargainResultService.count(gcProjectQueryWrapper);
  1860. totalTransaction = totalTransaction + countGcProject;
  1861. }catch (Exception e){
  1862. e.printStackTrace();
  1863. }
  1864. return totalTransaction;
  1865. }
  1866. }