NoCarController.java 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. package com.jkcredit.invoice.controller.localBussiness;
  2. import cn.afterturn.easypoi.excel.ExcelImportUtil;
  3. import cn.afterturn.easypoi.excel.entity.ImportParams;
  4. import com.alibaba.fastjson.JSON;
  5. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  6. import com.jkcredit.invoice.annotation.LoginRequired;
  7. import com.jkcredit.invoice.mapper.waybill.NoCarWaybillMapper;
  8. import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
  9. import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
  10. import com.jkcredit.invoice.model.entity.customer.CustomerOper;
  11. import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
  12. import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
  13. import com.jkcredit.invoice.service.CalculateInfor.NoCarCalculateInfoService;
  14. import com.jkcredit.invoice.service.customer.CustomerOperService;
  15. import com.jkcredit.invoice.service.lowerService.NoCarService;
  16. import com.jkcredit.invoice.service.nocar.NoCarBillWayImportService;
  17. import com.jkcredit.invoice.service.nocar.NoCarBillWayService;
  18. import com.jkcredit.invoice.service.nocar.NoCarRecService;
  19. import com.jkcredit.invoice.service.nocar.NocarInvoiceService;
  20. import com.jkcredit.invoice.util.RespR;
  21. import io.swagger.annotations.Api;
  22. import io.swagger.annotations.ApiOperation;
  23. import lombok.extern.slf4j.Slf4j;
  24. import org.apache.poi.util.IOUtils;
  25. import org.springframework.beans.factory.annotation.Autowired;
  26. import org.springframework.util.StringUtils;
  27. import org.springframework.web.bind.annotation.*;
  28. import org.springframework.web.multipart.MultipartFile;
  29. import javax.servlet.http.HttpServletResponse;
  30. import java.io.*;
  31. import java.net.URLEncoder;
  32. import java.text.DateFormat;
  33. import java.text.SimpleDateFormat;
  34. import java.util.List;
  35. @Api(tags = "无车操作")
  36. @RestController
  37. @RequestMapping(value = {"/noCar"})
  38. @Slf4j
  39. public class NoCarController {
  40. @Autowired
  41. NoCarRecService noCarRecService;
  42. @Autowired
  43. NoCarBillWayService noCarBillWayService;
  44. @Autowired
  45. NoCarBillWayImportService noCarBillWayImportService;
  46. @Autowired
  47. NocarInvoiceService nocarInvoiceService;
  48. @Autowired
  49. NoCarCalculateInfoService noCarCalculateInfoService;
  50. @Autowired
  51. NoCarWaybillMapper noCarWaybillMapper;
  52. @Autowired
  53. NoCarService noCarService;
  54. @Autowired
  55. CustomerOperService customerOperService;
  56. /**
  57. * 分页查询无车备案信息
  58. *
  59. * @param page 参数集
  60. * @return 用户集合
  61. */
  62. @PostMapping("/findCarRec")
  63. @ApiOperation(value="分页查询无车/自有车备案信息", notes="分页查询无车/自有车备案信息")
  64. @LoginRequired
  65. public RespR getCustomersByPage(Page page, CustomerCarRec customerCarRec) {
  66. try {
  67. if(!StringUtils.isEmpty(customerCarRec.getStartTime()) && !"null".equals(customerCarRec.getStartTime())){
  68. String [] res = customerCarRec.getStartTime().split(",");
  69. customerCarRec.setStartTime(res[0]);
  70. customerCarRec.setEndTime(res[1].replace("00:00:00","23:59:59"));
  71. }else{
  72. customerCarRec.setStartTime(null);
  73. }
  74. RespR respR = new RespR(noCarRecService.findByPageAndCarRec(page, customerCarRec));
  75. return respR;
  76. }catch (Exception e){
  77. e.printStackTrace();
  78. return new RespR(false,e.getMessage());
  79. }
  80. }
  81. public void setTimeDue(NoCarWayBill noCarWayBill){
  82. if(!StringUtils.isEmpty(noCarWayBill.getStartBegin()) && !"null".equals(noCarWayBill.getStartBegin())){
  83. String [] res = noCarWayBill.getStartBegin().split(",");
  84. noCarWayBill.setStartBegin(res[0]);
  85. noCarWayBill.setStartEnd(res[1].replace("00:00:00","23:59:59"));
  86. }else{
  87. noCarWayBill.setStartBegin(null);
  88. }
  89. if(!StringUtils.isEmpty(noCarWayBill.getEndBegin()) && !"null".equals(noCarWayBill.getEndBegin())){
  90. String [] res = noCarWayBill.getEndBegin().split(",");
  91. noCarWayBill.setEndBegin(res[0]);
  92. noCarWayBill.setEndEnd(res[1].replace("00:00:00","23:59:59"));
  93. }else{
  94. noCarWayBill.setEndBegin(null);
  95. }
  96. }
  97. public void setTimeDue2(NoCarWayBill noCarWayBill){
  98. if("null".equals(noCarWayBill.getStartBegin())){
  99. noCarWayBill.setStartBegin(null);
  100. }
  101. if("null".equals(noCarWayBill.getStartEnd())){
  102. noCarWayBill.setStartEnd(null);
  103. }
  104. if("null".equals(noCarWayBill.getEndBegin())){
  105. noCarWayBill.setEndBegin(null);
  106. }
  107. if("null".equals(noCarWayBill.getEndEnd())){
  108. noCarWayBill.setEndEnd(null);
  109. }
  110. }
  111. /**
  112. * 分页查询运单信息
  113. *
  114. * @param page 参数集
  115. * @return 用户集合
  116. */
  117. @PostMapping("/findBillWay")
  118. @ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
  119. @LoginRequired
  120. public RespR findBillWay(Page page, NoCarWayBill noCarWayBill) {
  121. try {
  122. setTimeDue(noCarWayBill);
  123. RespR respR = new RespR(noCarBillWayService.findByPageAndWayBill(page, noCarWayBill));
  124. return respR;
  125. }catch (Exception e){
  126. e.printStackTrace();
  127. return new RespR(false,e.getMessage());
  128. }
  129. }
  130. /**
  131. * 分页查询客户运单信息
  132. *
  133. * @param page 参数集
  134. * @return 用户集合
  135. */
  136. @PostMapping("/findBillWayCust")
  137. @ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
  138. @LoginRequired
  139. public RespR findBillWayCust(Page page, NoCarWayBill noCarWayBill) {
  140. try {
  141. setTimeDue2(noCarWayBill);
  142. noCarWayBill.setBatchNum("1");
  143. RespR respR = new RespR(noCarBillWayService.findByPageAndWayBill(page, noCarWayBill));
  144. return respR;
  145. }catch (Exception e){
  146. e.printStackTrace();
  147. return new RespR(false,e.getMessage());
  148. }
  149. }
  150. /**
  151. * 分页查询运单信息
  152. *
  153. * @param page 参数集
  154. * @return 用户集合
  155. */
  156. @PostMapping("/findImportBillWay")
  157. @ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
  158. @LoginRequired
  159. public RespR findImportBillWay(Page page, NoCarWayBill noCarWayBill) {
  160. try {
  161. setTimeDue(noCarWayBill);
  162. RespR respR = new RespR(noCarBillWayImportService.findByPageAndWayBill(page, noCarWayBill));
  163. return respR;
  164. }catch (Exception e){
  165. e.printStackTrace();
  166. return new RespR(false,e.getMessage());
  167. }
  168. }
  169. /**
  170. * 重新获取发票并更新状态
  171. *
  172. * @return 用户集合
  173. */
  174. @PostMapping("/updateStatus")
  175. @ApiOperation(value="重新获取发票并更新状态", notes="重新获取发票并更新状态")
  176. @LoginRequired
  177. public RespR updateStatus(String noCarWayBillStr) {
  178. List<NoCarWayBill> noCarWayBills = JSON.parseArray(noCarWayBillStr,NoCarWayBill.class);
  179. if(noCarWayBills!=null && noCarWayBills.size()>0){
  180. noCarWayBills.stream().forEach(noCarWayBill -> {
  181. try {
  182. noCarWayBill.setBillwayStatus(-5);
  183. noCarService.getInvoiceByWayBillNumReal(noCarWayBill,false);
  184. }catch (Exception e){
  185. e.printStackTrace();
  186. }
  187. });
  188. }
  189. return new RespR("更新成功");
  190. }
  191. /**
  192. * 分页查询异常运单信息
  193. *
  194. * @param page 参数集
  195. * @return 用户集合
  196. */
  197. @PostMapping("/findBillWayException")
  198. @ApiOperation(value="分页查询异常运单信息", notes="分页查询异常运单信息")
  199. @LoginRequired
  200. public RespR findBillWayException(Page page, NoCarWayBill noCarWayBill) {
  201. try {
  202. setTimeDue(noCarWayBill);
  203. RespR respR = new RespR(noCarBillWayService.findByPageAndWayBillException(page, noCarWayBill));
  204. return respR;
  205. }catch (Exception e){
  206. e.printStackTrace();
  207. return new RespR(false,e.getMessage());
  208. }
  209. }
  210. /**
  211. * 分页查询无车运单信息
  212. *
  213. * @param page 参数集
  214. * @return 用户集合
  215. */
  216. @PostMapping("/findNocarInvoices")
  217. @ApiOperation(value="分页查询无车发票信息", notes="分页查询无车发票信息")
  218. @LoginRequired
  219. public RespR findNocarInvoices(Page page, BillInvoice billInvoice) {
  220. try {
  221. if(!StringUtils.isEmpty(billInvoice.getInvoiceMakeTime()) && !"null".equals(billInvoice.getInvoiceMakeTime())){
  222. String [] res =billInvoice.getInvoiceMakeTime().split(",");
  223. billInvoice.setInvoiceMakeStart(res[0]);
  224. billInvoice.setInvoiceMakeEnd(res[1].replace("00:00:00","23:59:59"));
  225. }
  226. if(!StringUtils.isEmpty(billInvoice.getCalculateTime()) && !"null".equals(billInvoice.getCalculateTime())){
  227. String [] res =billInvoice.getCalculateTime().split(",");
  228. billInvoice.setCalculateTimeStart(res[0]);
  229. billInvoice.setCalculateTimeEnd(res[1].replace("00:00:00","23:59:59"));
  230. }
  231. RespR respR = new RespR(nocarInvoiceService.findByPageAndInvoice(page, billInvoice));
  232. return respR;
  233. }catch (Exception e){
  234. e.printStackTrace();
  235. return new RespR(false,e.getMessage());
  236. }
  237. }
  238. /**
  239. * 批量查询无车发票信息
  240. *
  241. * @param file 参数集
  242. * @return
  243. */
  244. @PostMapping("/batchImportNocarInvoices")
  245. @ApiOperation(value="批量查询无车发票信息", notes="批量查询无车发票信息")
  246. @LoginRequired
  247. public RespR batchImportNocarInvoices(@RequestParam("file") MultipartFile file) {
  248. try {
  249. ImportParams params = new ImportParams();
  250. params.setTitleRows(1);
  251. params.setHeadRows(1);
  252. // params.setKeyIndex(2);
  253. List<BillInvoice> list = ExcelImportUtil.importExcel(file.getInputStream(), BillInvoice.class,params) ;
  254. RespR respR = nocarInvoiceService.findImportNocarInvoices(list);
  255. return respR;
  256. }catch (Exception e){
  257. e.printStackTrace();
  258. return new RespR(false,e.getMessage());
  259. }
  260. }
  261. /**
  262. * 批量查询无车运单信息
  263. *
  264. * @param file 参数集
  265. * @return
  266. */
  267. @PostMapping("/batchImportNocarBillWay")
  268. @ApiOperation(value="批量查询无车运单信息", notes="批量查询无车运单信息")
  269. @LoginRequired
  270. public RespR batchImportNocarBillWay(@RequestParam("file") MultipartFile file) {
  271. try {
  272. ImportParams params = new ImportParams();
  273. params.setTitleRows(1);
  274. params.setHeadRows(1);
  275. // params.setKeyIndex(2);
  276. List<NoCarWayBill> list = ExcelImportUtil.importExcel(file.getInputStream(), NoCarWayBill.class,params) ;
  277. RespR respR = noCarBillWayService.findImportNocarBillWay(list);
  278. return respR;
  279. }catch (Exception e){
  280. e.printStackTrace();
  281. return new RespR(false,e.getMessage());
  282. }
  283. }
  284. /**
  285. * 分页查询无车运单统计信息
  286. *
  287. * @param billInvoice
  288. * @return 用户集合
  289. */
  290. @PostMapping("/findNocarInvoicesStatic")
  291. @ApiOperation(value="分页查询无车发票统计信息", notes="分页查询无车发票统计信息")
  292. @LoginRequired
  293. public RespR findNocarInvoicesStatic(BillInvoice billInvoice) {
  294. try {
  295. if(!StringUtils.isEmpty(billInvoice.getInvoiceMakeTime()) && !"null".equals(billInvoice.getInvoiceMakeTime())){
  296. String [] res =billInvoice.getInvoiceMakeTime().split(",");
  297. billInvoice.setInvoiceMakeStart(res[0]);
  298. billInvoice.setInvoiceMakeEnd(res[1].replace("00:00:00","23:59:59"));
  299. }
  300. if(!StringUtils.isEmpty(billInvoice.getCalculateTime()) && !"null".equals(billInvoice.getCalculateTime())){
  301. String [] res =billInvoice.getCalculateTime().split(",");
  302. billInvoice.setCalculateTimeStart(res[0]);
  303. billInvoice.setCalculateTimeEnd(res[1].replace("00:00:00","23:59:59"));
  304. }
  305. RespR respR = new RespR(nocarInvoiceService.findInvoiceStatics(billInvoice));
  306. return respR;
  307. }catch (Exception e){
  308. e.printStackTrace();
  309. return new RespR(false,e.getMessage());
  310. }
  311. }
  312. /**
  313. * 批量运单导入
  314. *
  315. * @param file 参数集
  316. * @return
  317. */
  318. @PostMapping("/batchImprotBillWay")
  319. @ApiOperation(value="批量运单导入", notes="批量运单导入")
  320. @LoginRequired
  321. public RespR batchImprotBillWay(@RequestParam("file") MultipartFile file,String customerName) {
  322. try {
  323. ImportParams params = new ImportParams();
  324. params.setTitleRows(1);
  325. params.setHeadRows(1);
  326. params.setKeyIndex(2);
  327. List<NoCarWayBill> list = ExcelImportUtil.importExcel(file.getInputStream(), NoCarWayBill.class,params) ;
  328. buildDate(list);
  329. RespR respR = noCarBillWayService.batchBillWayStart(list,customerName);
  330. return respR;
  331. }catch (Exception e){
  332. e.printStackTrace();
  333. return new RespR(false,e.getMessage());
  334. }
  335. }
  336. /**
  337. * 批量运单导入
  338. *
  339. * @param file 参数集
  340. * @return
  341. */
  342. @PostMapping("/batchImprotHistoryBillWay")
  343. @ApiOperation(value="批量历史运单导入", notes="批量历史运单导入")
  344. @LoginRequired
  345. public RespR batchImprotHistoryBillWay(@RequestParam("file") MultipartFile file,String customerName) {
  346. try {
  347. ImportParams params = new ImportParams();
  348. params.setTitleRows(1);
  349. params.setHeadRows(1);
  350. params.setKeyIndex(2);
  351. List<NoCarWayBill> list = ExcelImportUtil.importExcel(file.getInputStream(), NoCarWayBill.class,params);
  352. log.info("1111111111"+list.size());
  353. buildDate(list);
  354. RespR respR = noCarBillWayService.batchHsitoryBillWay(list,customerName);
  355. return respR;
  356. }catch (Exception e){
  357. e.printStackTrace();
  358. return new RespR(false,e.getMessage());
  359. }
  360. }
  361. /**
  362. * 批量运单导入
  363. *
  364. * @param file 参数集
  365. * @return
  366. */
  367. @PostMapping("/batchImprotEndBillWay")
  368. @ApiOperation(value="批量运单结束", notes="批量运单结束")
  369. @LoginRequired
  370. public RespR batchImprotEndBillWay(@RequestParam("file") MultipartFile file,String customerName) {
  371. try {
  372. ImportParams params = new ImportParams();
  373. params.setTitleRows(1);
  374. params.setHeadRows(1);
  375. params.setKeyIndex(2);
  376. List<NoCarWayBill> list = ExcelImportUtil.importExcel(file.getInputStream(), NoCarWayBill.class,params);
  377. buildDateEnd(list);
  378. log.info("1111111111"+list.size());
  379. RespR respR = noCarBillWayService.batchBillWayEnd(list,customerName);
  380. return respR;
  381. }catch (Exception e){
  382. e.printStackTrace();
  383. return new RespR(false,e.getMessage());
  384. }
  385. }
  386. public void buildDate(List<NoCarWayBill> list){
  387. StringBuffer sb = new StringBuffer();
  388. DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  389. int i = 0;
  390. for(NoCarWayBill noCarWayBill:list){
  391. try {
  392. noCarWayBill.setStartTime(format.format(noCarWayBill.getStartTimeDate()));
  393. noCarWayBill.setPredictEndTime(format.format(noCarWayBill.getPredictEndTimeDate()));
  394. if(noCarWayBill.getFeeD() !=null){
  395. noCarWayBill.setFee(Math.round(noCarWayBill.getFeeD()*100));
  396. }
  397. noCarWayBill.setTaxplayerCode(noCarWayBill.getTaxplayerCode().trim());
  398. noCarWayBill.setBillNum(noCarWayBill.getBillNum().trim());
  399. }catch (Exception e){
  400. sb.append(noCarWayBill.getBillNum()+"#");
  401. log.info(noCarWayBill.getBillNum());
  402. i++;
  403. }
  404. }
  405. if(i>0){
  406. throw new RuntimeException(sb.toString()+"数据存在错误,请检查文件中数据,金额是否有空的,时间是否全是时间格式");
  407. }
  408. }
  409. public void buildDateEnd(List<NoCarWayBill> list){
  410. DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  411. int i = 0;
  412. StringBuffer sb = new StringBuffer();
  413. for(NoCarWayBill noCarWayBill:list){
  414. try{
  415. noCarWayBill.setPredictEndTime(format.format(noCarWayBill.getActEndTimeDate()));
  416. }catch (Exception e){
  417. sb.append(noCarWayBill.getBillNum()+"#");
  418. log.info(noCarWayBill.getBillNum());
  419. i++;
  420. }
  421. }
  422. if(i>0){
  423. throw new RuntimeException(sb.toString()+"数据存在错误,请检查文件中数据,金额是否有空的,时间是否全是时间格式");
  424. }
  425. }
  426. /**
  427. * 分页查询无车计费信息
  428. *
  429. * @param page 参数集
  430. * @return 用户集合
  431. */
  432. @PostMapping("/findBatchList")
  433. @ApiOperation(value="运单批次号查询", notes="运单批次号查询")
  434. @LoginRequired
  435. public RespR findBatchList(Page page, CustomerOper customerOper) {
  436. try {
  437. RespR respR = new RespR(customerOperService.findAllCustomerOper(page, customerOper));
  438. return respR;
  439. }catch (Exception e){
  440. e.printStackTrace();
  441. return new RespR(false,e.getMessage());
  442. }
  443. }
  444. /**
  445. * 分页查询无车计费信息
  446. *
  447. * @param page 参数集
  448. * @return 用户集合
  449. */
  450. @PostMapping("/findNocarCalculateInfo")
  451. @ApiOperation(value="分页查询无车计费信息", notes="分页查询无车计费信息")
  452. @LoginRequired
  453. public RespR findNocarCalculateInfo(Page page, NoCarCalculateInfor carCalculateInfor) {
  454. try {
  455. setTimeDue1(carCalculateInfor);
  456. RespR respR = new RespR(noCarCalculateInfoService.findByPageAndCalculateInfor(page, carCalculateInfor));
  457. return respR;
  458. }catch (Exception e){
  459. e.printStackTrace();
  460. return new RespR(false,e.getMessage());
  461. }
  462. }
  463. /**
  464. * 分页查询无车计费统计信息
  465. *
  466. * @param carCalculateInfor 参数集
  467. * @return 用户集合
  468. */
  469. @PostMapping("/findNocarCalculateInfoStatis")
  470. @ApiOperation(value="分页查询无车计费统计信息", notes="分页查询无车计费统计信息")
  471. @LoginRequired
  472. public RespR findNocarCalculateInfoStatis(NoCarCalculateInfor carCalculateInfor) {
  473. try {
  474. setTimeDue1(carCalculateInfor);
  475. RespR respR = new RespR(noCarCalculateInfoService.findNocarCalculateInfoStatis(carCalculateInfor));
  476. return respR;
  477. }catch (Exception e){
  478. e.printStackTrace();
  479. return new RespR(false,e.getMessage());
  480. }
  481. }
  482. @GetMapping("/templateDownload")
  483. @ApiOperation(value="模板下载", notes="模板下载")
  484. public RespR contractDownload(String fileName,HttpServletResponse response){
  485. if("1".equals(fileName)){
  486. fileName = "运单模板.xlsx";
  487. }else if("2".equals(fileName)){
  488. fileName = "运单结束模板.xlsx";
  489. }else if("3".equals(fileName)){
  490. fileName = "历史运单模板.xlsx";
  491. }else if("4".equals(fileName)){
  492. fileName = "无车发票查询模板.xlsx";
  493. }else if("5".equals(fileName)){
  494. fileName = "无车运单查询模板.xlsx";
  495. }else if("6".equals(fileName)){
  496. fileName = "自有车交易查询模板.xlsx";
  497. }else if("7".equals(fileName)){
  498. fileName = "自有车发票查询模板.xlsx";
  499. }
  500. OutputStream outputStream = null;
  501. InputStream inputStream = null;
  502. try {
  503. File file = new File("/home/app/excel/"+fileName);
  504. inputStream = new FileInputStream(file);
  505. response.setHeader("Content-Disposition", "attachment;filename="+ URLEncoder.encode(fileName, "UTF-8"));
  506. outputStream = response.getOutputStream();
  507. IOUtils.copy(inputStream, outputStream);
  508. response.flushBuffer();
  509. return new RespR(true);
  510. } catch (IOException e) {
  511. } finally {
  512. IOUtils.closeQuietly(inputStream);
  513. IOUtils.closeQuietly(outputStream);
  514. }
  515. return new RespR(false);
  516. }
  517. public void setTimeDue1(NoCarCalculateInfor carCalculateInfor){
  518. if(!StringUtils.isEmpty(carCalculateInfor.getInvoiceMakeTime()) && !"null".equals(carCalculateInfor.getInvoiceMakeTime())){
  519. String [] res = carCalculateInfor.getInvoiceMakeTime().split(",");
  520. carCalculateInfor.setInvoiceMakeStart(res[0]);
  521. carCalculateInfor.setInvoiceMakeEnd(res[1].replace("00:00:00","23:59:59"));
  522. }else{
  523. carCalculateInfor.setInvoiceMakeTime(null);
  524. }
  525. if(!StringUtils.isEmpty(carCalculateInfor.getCalculateTime()) && !"null".equals(carCalculateInfor.getCalculateTime())){
  526. String [] res = carCalculateInfor.getCalculateTime().split(",");
  527. carCalculateInfor.setCalculateStart(res[0]);
  528. carCalculateInfor.setCalculateEnd(res[1].replace("00:00:00","23:59:59"));
  529. }else{
  530. carCalculateInfor.setCalculateTime(null);
  531. }
  532. }
  533. }