AdminReleaseApiController.java 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. package com.goafanti.weChat.controller;
  2. import com.goafanti.common.bo.Error;
  3. import com.goafanti.common.bo.Result;
  4. import com.goafanti.common.constant.ErrorConstants;
  5. import com.goafanti.common.controller.CertifyApiController;
  6. import com.goafanti.common.error.BusinessException;
  7. import com.goafanti.common.model.OrderPublicReleaseLog;
  8. import com.goafanti.common.model.PublicConfig;
  9. import com.goafanti.common.utils.StringUtils;
  10. import com.goafanti.common.utils.excel.NewExcelUtil;
  11. import com.goafanti.weChat.bo.*;
  12. import com.goafanti.weChat.service.PublicReleaseService;
  13. import org.apache.commons.beanutils.BeanUtils;
  14. import org.springframework.beans.factory.annotation.Value;
  15. import org.springframework.web.bind.annotation.RequestMapping;
  16. import org.springframework.web.bind.annotation.RequestMethod;
  17. import org.springframework.web.bind.annotation.RestController;
  18. import javax.annotation.Resource;
  19. import javax.servlet.http.HttpServletRequest;
  20. import javax.servlet.http.HttpServletResponse;
  21. import java.util.ArrayList;
  22. import java.util.List;
  23. @RestController
  24. @RequestMapping(value = "/api/admin/release")
  25. public class AdminReleaseApiController extends CertifyApiController{
  26. @Resource
  27. private PublicReleaseService publicReleaseService;
  28. @Value(value = "${upload.path}")
  29. private String uploadPath = null;
  30. /**
  31. * 发起外出申请、发起公出
  32. */
  33. @RequestMapping(value = "/addPublicRelease", method = RequestMethod.POST)
  34. public Result addPublicRelease(InputPublicRelease in){
  35. Result res = new Result();
  36. if (StringUtils.isBlank(in.getUids())) {
  37. res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"用户编号"));
  38. return res;
  39. }
  40. if (StringUtils.isBlank(in.getReleaseStarts())) {
  41. res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"公出时间"));
  42. return res;
  43. }
  44. if (StringUtils.isBlank(in.getDistrictName())) {
  45. res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"公出地点"));
  46. return res;
  47. }
  48. //新增5和6非公出协单,不用判断公出时间
  49. if (in.getType()<4){
  50. int i = publicReleaseService.checkTime(in);
  51. if (i==1) {
  52. res.getError().add(buildError("发起人公出时段已经被使用!","发起人公出时段已经被使用!"));
  53. return res;
  54. }
  55. if (i==2) {
  56. res.getError().add(buildError("协单人公出时段已经被使用!","协单人公出时段已经被使用!"));
  57. return res;
  58. }
  59. }else{
  60. if (in.getAssistType()==null){
  61. res.getError().add(buildError("请选择协单类型!"));
  62. return res;
  63. }
  64. if (in.getAssistContentType()==null){
  65. res.getError().add(buildError("请选择协单内容"));
  66. }
  67. }
  68. if(in.getAssist()==null)in.setAssist(0);
  69. if (in.getAssist()==1&&in.getAssistAid()==null) {
  70. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"协单人员"));
  71. return res;
  72. }
  73. if (publicReleaseService.checkPublicReviewer(in)){
  74. res.getError().add(buildError("请让管理员先设置公出审核人。"));
  75. return res;
  76. }
  77. res.setData(publicReleaseService.addPublicRelease(in));
  78. return res;
  79. }
  80. /**
  81. * 判定客户是否完成了客户档案
  82. */
  83. @RequestMapping(value = "/checkUserArchives", method = RequestMethod.GET)
  84. public Result checkUserArchives(String uid){
  85. Result res = new Result();
  86. if (StringUtils.isBlank(uid)) {
  87. res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"用户编号"));
  88. return res;
  89. }
  90. //小程序去掉判定,先改接口
  91. // res.setData(publicReleaseService.checkUserArchives(uid));
  92. res.setData(true);
  93. return res;
  94. }
  95. /**
  96. * 修改外出申请、修改公出
  97. */
  98. @RequestMapping(value = "/updatePublicRelease", method = RequestMethod.POST)
  99. public Result updatePublicRelease(InputPublicRelease in){
  100. Result res = new Result();
  101. if (in.getId()==null){
  102. res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"编号"));
  103. return res;
  104. }
  105. if (in.getStatus()!=3) {
  106. int i = publicReleaseService.checkTime(in);
  107. if (i==1) {
  108. res.getError().add(buildError("发起人公出时段已经被使用!","发起人公出时段已经被使用!"));
  109. return res;
  110. }
  111. if (i==2) {
  112. res.getError().add(buildError("协单人公出时段已经被使用!","协单人公出时段已经被使用!"));
  113. return res;
  114. }
  115. }
  116. res.setData(publicReleaseService.updatePublicRelease(in));
  117. return res;
  118. }
  119. /**
  120. * 修改打卡地址
  121. */
  122. @RequestMapping(value = "/updateLocation", method = RequestMethod.POST)
  123. public Result updateLocation(InputPublicRelease in){
  124. Result res = new Result();
  125. if (in.getId()==null||in.getUid()==null){
  126. res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"编号"));
  127. return res;
  128. }
  129. if (in.getLatitude()==null||in.getLongitude()==null||in.getDistrictName()==null){
  130. res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"位置"));
  131. return res;
  132. }
  133. res.setData(publicReleaseService.updateLocation(in));
  134. return res;
  135. }
  136. /**
  137. * 外出打卡、公出打卡
  138. */
  139. @RequestMapping(value = "/publicReleaseClockIn", method = RequestMethod.POST)
  140. public Result publicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks,String uid ){
  141. Result res =new Result();
  142. int x=publicReleaseService.pushPublicReleaseClockIn(id,photoUrl,clockIn,clockInRemarks,uid);
  143. if (x==-1){
  144. res.getError().add(buildError("公出他人企业!需通过审核,才可以打卡!"));
  145. return res;
  146. }
  147. // 取消打卡限制
  148. if (x==-2){
  149. res.getError().add(buildError("公出审核中,不可打卡!"));
  150. return res;
  151. }
  152. if (x==-3){
  153. res.getError().add(buildError("技术协单,必须先写协单意见,才可打卡!"));
  154. return res;
  155. }
  156. res.setData(x);
  157. return res;
  158. }
  159. /**
  160. * 外出申请详情、公出详情
  161. */
  162. @RequestMapping(value = "/dtails", method = RequestMethod.GET)
  163. public Result details(Integer id){
  164. Result res =new Result();
  165. res.setData(publicReleaseService.dtails(id));
  166. return res;
  167. }
  168. /**
  169. * 外出申请详情
  170. */
  171. @RequestMapping(value = "/followDtails", method = RequestMethod.GET)
  172. public Result followDetails(String id){
  173. Result res =new Result();
  174. res.setData(publicReleaseService.followDtails(id));
  175. return res;
  176. }
  177. /**
  178. * 外出申请列表.公出列表,我的协单列表,协单审核,
  179. */
  180. @RequestMapping(value = "/listPublicRelease", method = RequestMethod.GET)
  181. public Result listPublicRelease(InputPublicReleaseList in){
  182. Result res =new Result();
  183. res.setData(publicReleaseService.listPublicRelease(in));
  184. return res;
  185. }
  186. /**
  187. * 公出审核、外出审核 上级
  188. */
  189. @RequestMapping(value = "/examinePublicRelease", method = RequestMethod.POST)
  190. public Result examinePublicRelease(Integer id ,Integer status,String remarks,Integer evaluateType){
  191. Result res =new Result();
  192. if (id==null) {
  193. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
  194. return res;
  195. }
  196. if (status!=0&&status!=2) {
  197. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"审核状态"));
  198. return res;
  199. }
  200. // if (remarks.length()>20) {
  201. // res.getError().add(buildError("备注长度不能超过20个字符。"));
  202. // return res;
  203. // }
  204. res.setData(publicReleaseService.pushExaminePublicRelease(id,status,remarks,0,evaluateType));
  205. return res;
  206. }
  207. /**
  208. * 公出审核、外出审核 客户归属人
  209. */
  210. @RequestMapping(value = "/marketersExamine", method = RequestMethod.POST)
  211. public Result marketersExamine(Integer id ,Integer status,String remarks,Integer evaluateType){
  212. Result res =new Result();
  213. if (id==null) {
  214. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
  215. return res;
  216. }
  217. if (status!=0&&status!=2) {
  218. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"审核状态"));
  219. return res;
  220. }
  221. if (remarks.length()>20) {
  222. res.getError().add(buildError("备注长度不能超过20个字符。"));
  223. return res;
  224. }
  225. res.setData(publicReleaseService.pushExaminePublicRelease(id,status,remarks,1, evaluateType));
  226. return res;
  227. }
  228. /**
  229. * 公出审核、外出审核 协单审核
  230. */
  231. @RequestMapping(value = "/assistExamine", method = RequestMethod.POST)
  232. public Result assistExamine(Integer id ,Integer status,String remarks,Integer evaluateType){
  233. Result res =new Result();
  234. if (id==null) {
  235. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
  236. return res;
  237. }
  238. if (status!=0&&status!=2) {
  239. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"审核状态"));
  240. return res;
  241. }
  242. if (remarks.length()>20) {
  243. res.getError().add(buildError("备注长度不能超过20个字符。"));
  244. return res;
  245. }
  246. res.setData(publicReleaseService.updateAssistExamine(id,status,remarks,evaluateType));
  247. return res;
  248. }
  249. /**
  250. * 技术公出审核 公出他人企业
  251. */
  252. @RequestMapping(value = "/techExamine", method = RequestMethod.POST)
  253. public Result techExamine(Integer id ,Integer status,String remarks,Integer evaluateType){
  254. Result res =new Result();
  255. if (id==null) {
  256. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
  257. return res;
  258. }
  259. if (status!=0&&status!=2) {
  260. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"审核状态"));
  261. return res;
  262. }
  263. if (remarks.length()>20) {
  264. res.getError().add(buildError("备注长度不能超过20个字符。"));
  265. return res;
  266. }
  267. res.setData(publicReleaseService.pushExaminePublicRelease(id,status,remarks,2,evaluateType));
  268. return res;
  269. }
  270. /**
  271. * 咨询驳回
  272. */
  273. @RequestMapping(value = "/techReject", method = RequestMethod.POST)
  274. public Result techReject(Integer id ,String remarks){
  275. Result res =new Result();
  276. if (id==null) {
  277. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
  278. return res;
  279. }
  280. if (remarks.length()>20) {
  281. res.getError().add(buildError("备注长度不能超过20个字符。"));
  282. return res;
  283. }
  284. res.setData(publicReleaseService.pushTechReject( id , remarks));
  285. return res;
  286. }
  287. /**
  288. * 外出审核日志列表
  289. */
  290. @RequestMapping(value = "/listPublicReleaseLog", method = RequestMethod.GET)
  291. public Result listPublicReleaseLog(Integer id,String ufid){
  292. Result res =new Result();
  293. res.data(publicReleaseService.listPublicReleaseLog(id,ufid));
  294. return res;
  295. }
  296. /**
  297. * 公出统计
  298. */
  299. @RequestMapping(value = "/publicReleaseStatistics", method = RequestMethod.GET)
  300. public Result publicReleaseStatistics(InputPublicStatistics in){
  301. Result res =new Result();
  302. res.data(publicReleaseService.publicReleaseStatistics(in));
  303. return res;
  304. }
  305. /**
  306. * 公出统计导出
  307. */
  308. @RequestMapping(value = "/publicReleaseStatistics/export", method = RequestMethod.GET)
  309. public Result publicReleaseStatisticsExport(InputPublicStatistics in,HttpServletResponse response){
  310. List<OutPublicStatistics> list =publicReleaseService.publicReleaseStatisticsList(in);
  311. NewExcelUtil<OutPublicStatistics>excel=new NewExcelUtil<>(OutPublicStatistics.class);
  312. return excel.exportExcel(list,"公出统计列表",response);
  313. }
  314. /**
  315. * 公出详情列表
  316. */
  317. @RequestMapping(value = "/publicReleaseDtails", method = RequestMethod.GET)
  318. public Result publicReleaseListDtails(InputPublicDtails in){
  319. Result res =new Result();
  320. res.data(publicReleaseService.publicReleaseListDtails(in));
  321. return res;
  322. }
  323. @RequestMapping(value = "/publicReleaseAndCount", method = RequestMethod.GET)
  324. public Result publicReleaseAndCount(InputPublicDtails in){
  325. Result res =new Result();
  326. res.data(publicReleaseService.publicReleaseAndCount(in));
  327. return res;
  328. }
  329. /**
  330. * 公出详情列表
  331. */
  332. @RequestMapping(value = "/publicReleaseDtails/export", method = RequestMethod.GET)
  333. public Result publicReleaseListDtailsExport(InputPublicDtails in ,Integer exportType){
  334. if (exportType==null)exportType=0;
  335. List<OutPublicDtails> outList=publicReleaseService.publicReleaseListDtailsList(in);
  336. publicReleaseService.pushOutPublicDtails(outList);
  337. if (exportType==0){
  338. NewExcelUtil<OutPublicDtails>excel=new NewExcelUtil<>(OutPublicDtails.class);
  339. return excel.exportExcel(outList,"公出详细列表",uploadPath);
  340. }else if (exportType==1){
  341. List<OutPublicDtailsFinance> list = new ArrayList<>();
  342. for (OutPublicDtails outPublicDtails : outList) {
  343. OutPublicDtailsFinance of= new OutPublicDtailsFinance();
  344. try {
  345. BeanUtils.copyProperties( of,outPublicDtails);
  346. } catch (Exception e) {
  347. throw new BusinessException("数据转换异常");
  348. }
  349. list.add(of);
  350. }
  351. NewExcelUtil<OutPublicDtailsFinance>excel=new NewExcelUtil<>(OutPublicDtailsFinance.class);
  352. return excel.exportExcel(list,"公出详细列表",uploadPath);
  353. }
  354. return null;
  355. }
  356. /** 上传图片 **/
  357. @RequestMapping(value = "/upload", method = RequestMethod.POST)
  358. public Result uploadOrderInvoiceFile(HttpServletRequest req){
  359. Result res = new Result();
  360. res.setData(handleFile(res, "/publicRelease/", false, req, "publicRelease"));
  361. return res;
  362. }
  363. /**
  364. * 搜索
  365. */
  366. @RequestMapping(value = "/addSupplement", method = RequestMethod.POST)
  367. public Result addSupplement(Integer id,String supplement,String nextPlan){
  368. Result res =new Result();
  369. if (id==null) {
  370. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
  371. return res;
  372. }
  373. res.setData(publicReleaseService.addSupplement( id ,supplement,nextPlan));
  374. return res;
  375. }
  376. /**
  377. * 根据客户返回订单
  378. */
  379. @RequestMapping(value = "/selectOrderByUid",method =RequestMethod.GET)
  380. public Result selectOrderByUid(String uid){
  381. Result res = new Result();
  382. if (uid==null){
  383. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"客户编号"));
  384. return res;
  385. }
  386. res.data(publicReleaseService.selectOrderByUid(uid));
  387. return res;
  388. }
  389. /**
  390. * 查看上门记录
  391. */
  392. @RequestMapping(value = "/publicByOrder",method =RequestMethod.GET)
  393. public Result publicByOrder(String orderNo){
  394. Result res = new Result();
  395. if (orderNo==null){
  396. res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"订单编号"));
  397. return res;
  398. }
  399. res.data(publicReleaseService.publicByOrder(orderNo));
  400. return res;
  401. }
  402. /**
  403. * 打卡页面获取自己最新的打卡
  404. */
  405. @RequestMapping(value = "/getMyNewPublic",method = RequestMethod.GET)
  406. public Result getMyNewPublic (){
  407. Result res =new Result();
  408. res.data(publicReleaseService.getMyNewPublic());
  409. return res;
  410. }
  411. /**
  412. * 新增协单助手
  413. * @param id 公出编号
  414. * @param aid 协单助手编号
  415. */
  416. @RequestMapping(value = "/addAssistant",method = RequestMethod.POST)
  417. public Result addAssistant (Integer id,String aid){
  418. Result res =new Result();
  419. if (id==null||aid==null){
  420. res.getError().add(new Error(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号与人员编号"));
  421. return res;
  422. }
  423. if (publicReleaseService.checkaddAssistant(id,aid)){
  424. res.getError().add(new Error("协单助手已经存在"));
  425. return res;
  426. }
  427. res.data(publicReleaseService.addAssistant(id,aid));
  428. return res;
  429. }
  430. /**
  431. * 删除协单助手
  432. * @param id 公出编号
  433. * @param aid 协单助手编号
  434. */
  435. @RequestMapping(value = "/deleteAssistant",method = RequestMethod.POST)
  436. public Result deleteAssistant (Integer id,String aid){
  437. Result res =new Result();
  438. if (id==null||aid==null){
  439. res.getError().add(new Error(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号与人员编号"));
  440. return res;
  441. }
  442. if (publicReleaseService.checkdeleteAssistant(id,aid)){
  443. res.getError().add(new Error("协单助手已经打卡,无法删除"));
  444. return res;
  445. }
  446. res.data(publicReleaseService.deleteAssistant(id,aid));
  447. return res;
  448. }
  449. /**
  450. * 技术发起公出查询发起情况
  451. */
  452. @RequestMapping(value = "/checkOrderNoDuration",method = RequestMethod.GET)
  453. public Result checkOrderNoDuration (InputPublicRelease in){
  454. Result res =new Result();
  455. return res.data(publicReleaseService.checkOrderNoDuration(in));
  456. }
  457. /**
  458. * 技术发起公出查询发起情况
  459. */
  460. @RequestMapping(value = "/pushDateClock",method = RequestMethod.POST)
  461. public Result pushDateClock (){
  462. Result res =new Result();
  463. return res.data(publicReleaseService.pushDateClock());
  464. }
  465. /**
  466. * 公出&报销表
  467. */
  468. @RequestMapping(value = "/releaseAndExpenseCount",method = RequestMethod.GET)
  469. public Result releaseAndExpenseCount (InputreleaseAndExpenseCount in){
  470. Result res =new Result();
  471. return res.data(publicReleaseService.releaseAndExpenseCount(in));
  472. }/**
  473. * 公出&报销缓存清除
  474. */
  475. @RequestMapping(value = "/releaseAndExpenseCountClear",method = RequestMethod.GET)
  476. public Result releaseAndExpenseCountClear (){
  477. Result res =new Result();
  478. return res.data(publicReleaseService.releaseAndExpenseCountClear());
  479. }
  480. /**
  481. * 公出&报销表导出
  482. */
  483. @RequestMapping(value = "/releaseAndExpenseCount/Export",method = RequestMethod.GET)
  484. public Result releaseAndExpenseCountExport (InputreleaseAndExpenseCount in){
  485. List<releaseAndExpenseCountOut> list = publicReleaseService.releaseAndExpenseCount(in);
  486. NewExcelUtil<releaseAndExpenseCountOut> excelUtil=new NewExcelUtil<>(releaseAndExpenseCountOut.class);
  487. return excelUtil.exportExcel(list,"公出与报销表",uploadPath);
  488. }
  489. /**
  490. * 协单审核是否有未审核查询
  491. */
  492. @RequestMapping(value = "/unaudited",method = RequestMethod.GET)
  493. public Result assistUnaudited (){
  494. Result res =new Result();
  495. return res.data(publicReleaseService.assistUnaudited());
  496. }
  497. /**
  498. * 分享限时查询
  499. */
  500. @RequestMapping(value = "/limitUser",method = RequestMethod.POST)
  501. public Result limitUser (String uid,Integer hours){
  502. Result res =new Result();
  503. int i = publicReleaseService.pushLimitUser(uid,hours);
  504. if (i==0){
  505. return res().error(buildError(ErrorConstants.PARAM_ERROR,"只有客户归属人可以分享"));
  506. }
  507. return res.data(i);
  508. }
  509. /**
  510. * 修改最大公出
  511. */
  512. @RequestMapping(value = "/updateMaxDuration",method = RequestMethod.POST)
  513. public Result updateMaxDuration (String orderNo, Double maxDuration, String remarks){
  514. Result res =new Result();
  515. if (StringUtils.isEmpty(orderNo)){
  516. return res().error(buildError(ErrorConstants.PARAM_ERROR,"订单编号"));
  517. }
  518. if (maxDuration.isNaN()){
  519. return res().error(buildError(ErrorConstants.PARAM_ERROR,"最大公出"));
  520. }
  521. return res.data(publicReleaseService.updateMaxDuration(orderNo,maxDuration,remarks));
  522. }
  523. /**
  524. * 审核最大公出
  525. */
  526. @RequestMapping(value = "/examineMaxDuration",method = RequestMethod.POST)
  527. public Result examineMaxDuration (String orderNo,Integer status,String remarks){
  528. Result res =new Result();
  529. if (StringUtils.isEmpty(orderNo)){
  530. return res().error(buildError(ErrorConstants.PARAM_ERROR,"订单编号"));
  531. }
  532. return res.data(publicReleaseService.pushExamineMaxDuration(orderNo,status,remarks));
  533. }
  534. /**
  535. * 最大公出日志
  536. */
  537. @RequestMapping(value = "/maxDurationLog",method = RequestMethod.GET)
  538. public Result<List<OrderPublicReleaseLog>> maxDurationLog (String orderNo){
  539. Result res =new Result();
  540. if (StringUtils.isEmpty(orderNo)){
  541. return res().error(buildError(ErrorConstants.PARAM_ERROR,"订单编号"));
  542. }
  543. return res.data(publicReleaseService.maxDurationLog(orderNo));
  544. }
  545. /**
  546. * 修改最大公出审核配置
  547. */
  548. @RequestMapping(value = "/updatePublicConfig",method = RequestMethod.POST)
  549. public Result updatePublicConfig (PublicConfig in){
  550. Result res =new Result();
  551. return res.data(publicReleaseService.updatePublicConfig(in));
  552. }
  553. /**
  554. * 获取最大公出审核配置
  555. */
  556. @RequestMapping(value = "/getPublicConfig",method = RequestMethod.GET)
  557. public Result<OutPublicConfig> getPublicConfig (){
  558. Result res =new Result();
  559. return res.data(publicReleaseService.getPublicConfig());
  560. }
  561. }