ApplyUseMoneyController.java 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. package com.idea.oa.apply.controller;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.github.pagehelper.PageInfo;
  5. import com.rockstar.flow.exception.FlowException;
  6. import com.idea.oa.apply.model.ApplyUseMoney;
  7. import com.idea.oa.apply.model.ApplyUseMoneyDetail;
  8. import com.idea.oa.apply.model.ApplyUseMoneyDetailExample;
  9. import com.idea.oa.apply.model.inout.AddConfirmResultUseMoney;
  10. import com.idea.oa.apply.model.inout.ApplyUseMoneyIn;
  11. import com.idea.oa.apply.service.ApplyUseMoneyDetailService;
  12. import com.idea.oa.apply.service.ApplyUseMoneyService;
  13. import com.idea.oa.apply.util.constant.ConstantFlowType;
  14. import com.idea.oa.costManage.model.ExpenseLedger;
  15. import com.idea.oa.costManage.service.ExpenseLedgerService;
  16. import com.idea.oa.flow2.model.*;
  17. import com.idea.oa.flow2.model.in.FlowMainCcVo;
  18. import com.idea.oa.flow2.service.FlowMainCcService;
  19. import com.idea.oa.flow2.service.FlowMainPushService;
  20. import com.idea.oa.flow2.service.FlowMainService;
  21. import com.rockstar.common.base.BaseController;
  22. import com.rockstar.common.domain.AjaxResult;
  23. import com.rockstar.frame.model.extend.DateTrans;
  24. import com.rockstar.frame.model.extend.TableSplitResult;
  25. import com.rockstar.frame.model.extend.Tablepar;
  26. import com.rockstar.shiro.util.ShiroUtils;
  27. import com.rockstar.util.UUIDUtils;
  28. import io.swagger.annotations.Api;
  29. import org.apache.commons.collections.CollectionUtils;
  30. import org.springframework.beans.factory.annotation.Autowired;
  31. import org.springframework.stereotype.Controller;
  32. import org.springframework.transaction.annotation.Transactional;
  33. import org.springframework.util.StringUtils;
  34. import org.springframework.web.bind.annotation.PathVariable;
  35. import org.springframework.web.bind.annotation.PostMapping;
  36. import org.springframework.web.bind.annotation.RequestMapping;
  37. import org.springframework.web.bind.annotation.ResponseBody;
  38. import java.math.BigDecimal;
  39. import java.math.MathContext;
  40. import java.util.Date;
  41. import java.util.HashMap;
  42. import java.util.List;
  43. import java.util.Map;
  44. /**
  45. * Created by zt
  46. */
  47. @Controller
  48. @RequestMapping(value = "/ApplyUseMoneyController")
  49. @Api(value = "申请流程/分表_申请费用报支表")
  50. public class ApplyUseMoneyController extends BaseController {
  51. // @Autowired
  52. // private TaskService taskService;
  53. // @Autowired
  54. // private FlowService flowService;
  55. @Autowired
  56. private FlowMainCcService flowMainCcService;
  57. //主表
  58. @Autowired
  59. private ApplyUseMoneyService modelService;
  60. // @Autowired
  61. // private FlowMainLogService flowMainLogService;
  62. @Autowired
  63. private ApplyUseMoneyDetailService applyUseMoneyDetailService;
  64. @Autowired
  65. private FlowMainService flowMainService;
  66. @Autowired
  67. private FlowMainPushService flowMainPushService;
  68. @Autowired
  69. private ExpenseLedgerService expenseLedgerService;
  70. // @Autowired
  71. // private ProActiService proActiService;
  72. @PostMapping(value = "findApplyUseMoneyListByInfo", produces = {"application/json;charset=UTF-8"})
  73. @ResponseBody
  74. public TableSplitResult findApplyUseMoneyListByInfo(Tablepar tablepar, String name,String startTime,String endTime) {
  75. PageInfo<Map> page=modelService.findApplyUseMoneyListByInfo(tablepar, name, startTime, endTime);
  76. TableSplitResult<Map> result=new TableSplitResult<>(page.getPageNum(), page.getTotal(), page.getList());
  77. return result;
  78. }
  79. @PostMapping(value = "findAllApplyUseMoneyListByInfo", produces = {"application/json;charset=UTF-8"})
  80. @ResponseBody
  81. public List<Map> findAllApplyUseMoneyListByInfo(String name,String startTime,String endTime) {
  82. List<Map> result=modelService.findAllApplyUseMoneyListByInfo(name, startTime, endTime);
  83. return result;
  84. }
  85. /**
  86. * 添加审核结果
  87. * 根据不同的状态值confirmResult判断是 1:审核通过,转下一步;2:退回发起人;3:退回上节点;4:结束流程;
  88. *
  89. * @param addConfirmResult
  90. * @return
  91. */
  92. @PostMapping(value = "AddConfirmResultUseMoney", produces = {"application/json;charset=UTF-8"})
  93. @ResponseBody
  94. @Transactional
  95. public AjaxResult AddConfirmResultUseMoney(AddConfirmResultUseMoney addConfirmResult) throws FlowException {
  96. System.out.println("AddConfirmResultUseMoney");
  97. System.out.println(addConfirmResult);
  98. if (addConfirmResult.getConfirmResult() == null) {
  99. return result(-1);
  100. }
  101. String deploymentid = ConstantFlowType.USE_MONEY_DEPLOYMENTID;
  102. String constantFlowType = ConstantFlowType.USE_MONEY;
  103. FlowMainPush flowMainPush = flowMainPushService.selectByPrimaryKey(addConfirmResult.getFlowMainPushId());
  104. String isOkString=null;
  105. {//进行审核判断
  106. ApplyUseMoneyDetailExample example = new ApplyUseMoneyDetailExample();
  107. example.createCriteria().andUseMoneyIdEqualTo(flowMainPush.getFormId());
  108. List<ApplyUseMoneyDetail> applyUseMoneyDetails = applyUseMoneyDetailService.selectByExample(example);
  109. // 付款总金额
  110. BigDecimal feeMoneyTotal = new BigDecimal(0);
  111. for (ApplyUseMoneyDetail applyUseMoneyDetail : applyUseMoneyDetails) {
  112. BigDecimal feeMoney = applyUseMoneyDetail.getFeeMoney() == null ? new BigDecimal(0) : applyUseMoneyDetail.getFeeMoney();
  113. feeMoneyTotal = feeMoneyTotal.add(feeMoney, MathContext.DECIMAL32);
  114. }
  115. double feeMoneyTotalDouble = feeMoneyTotal.doubleValue();
  116. //添加判断条件
  117. HashMap<String, Object> conditionMap = new HashMap<>();
  118. conditionMap.put("billMoney", feeMoneyTotalDouble);
  119. isOkString = flowMainService.doConfirmResult(addConfirmResult, deploymentid, constantFlowType, flowMainPush, conditionMap);
  120. if (!"ok_end".equals(isOkString) && !"ok_noEnd".equals(isOkString)) {
  121. return AjaxResult.error(isOkString);
  122. }
  123. }
  124. Boolean isEnd = false;//是否结束
  125. Boolean isAgree = false;//是否同意
  126. if (addConfirmResult.getConfirmResult().equals("4")) {//结束流程
  127. isEnd = true;
  128. isAgree = false;
  129. } else if (addConfirmResult.getConfirmResult().equals("1")) {//1:审核通过,转下一步
  130. if ("ok_end".equals(isOkString)) {
  131. isEnd = true;
  132. isAgree = true;
  133. }
  134. }
  135. //添加业务信息
  136. if (!StringUtils.isEmpty(addConfirmResult.getMakeNum())||!StringUtils.isEmpty(addConfirmResult.getPayType())||!StringUtils.isEmpty(addConfirmResult.getPayRemark())||addConfirmResult.getPayTime()!=null) {
  137. ApplyUseMoney updateApplyUseMoney = new ApplyUseMoney();
  138. updateApplyUseMoney.setId(flowMainPush.getFormId());
  139. updateApplyUseMoney.setMakeNum(addConfirmResult.getMakeNum());
  140. updateApplyUseMoney.setMakeDate(addConfirmResult.getMakeDate());
  141. updateApplyUseMoney.setPayType(addConfirmResult.getPayType());
  142. updateApplyUseMoney.setPayTime(addConfirmResult.getPayTime());
  143. updateApplyUseMoney.setPayRemark(addConfirmResult.getPayRemark());
  144. updateApplyUseMoney.setUpdatedAt(new Date());
  145. updateApplyUseMoney.setUpdatedBy(ShiroUtils.getUser().getId());
  146. modelService.updateByPrimaryKeySelective(updateApplyUseMoney);
  147. }
  148. //增加判断,费用明细能够进行修改(目前只允许修改类型fee_type费用类型)
  149. if (!StringUtils.isEmpty(addConfirmResult.getApplyUseMoneyDetailListString())) {
  150. JSONArray jsonArray = JSONArray.parseArray(addConfirmResult.getApplyUseMoneyDetailListString());
  151. for (int i = 0; i < jsonArray.size(); i++) {
  152. JSONObject object = jsonArray.getJSONObject(i);
  153. ApplyUseMoneyDetail applyUseMoneyDetail = JSONObject.parseObject(object.toJSONString(), ApplyUseMoneyDetail.class);// 将string类型直接封装成对象
  154. if (StringUtils.isEmpty(applyUseMoneyDetail.getId())) {
  155. continue;
  156. }
  157. ApplyUseMoneyDetail updateapplyUseMoneyDetail = new ApplyUseMoneyDetail();
  158. updateapplyUseMoneyDetail.setId(applyUseMoneyDetail.getId());
  159. updateapplyUseMoneyDetail.setFeeType(applyUseMoneyDetail.getFeeType());
  160. applyUseMoneyDetail.setUpdatedBy(ShiroUtils.getUser().getId());
  161. applyUseMoneyDetail.setUpdatedAt(new Date());
  162. applyUseMoneyDetailService.updateByPrimaryKeySelective(updateapplyUseMoneyDetail);
  163. }
  164. }
  165. //添加业务信息(将请假信息中的修改掉,剩余年假,剩余调休,冻结年假,冻结调休都修改掉)
  166. if (isEnd&&isAgree) {
  167. // 添加费用报支台账
  168. List<ExpenseLedger> expenseLedgers = modelService.getUserMoneyByMoneyId(flowMainPush.getFormId());
  169. if(CollectionUtils.isNotEmpty(expenseLedgers)){
  170. for(ExpenseLedger expenseLedger:expenseLedgers){
  171. expenseLedger.setId(UUIDUtils.middleUUID());
  172. expenseLedger.setSource("2");
  173. expenseLedgerService.insert(expenseLedger);
  174. }
  175. }
  176. }
  177. return result(1);
  178. }
  179. /**
  180. * 发起付款申请流程
  181. *
  182. * @param record
  183. * @return
  184. */
  185. @PostMapping(value = "addApplyUseMoney", produces = {"application/json;charset=UTF-8"})
  186. @ResponseBody
  187. @Transactional
  188. public AjaxResult addApplyUseMoney(ApplyUseMoneyIn record) throws FlowException {
  189. System.out.println("addApplyUseMoney");
  190. System.out.println(record);
  191. if (false) {
  192. return AjaxResult.error("这是一个错误测试信息");
  193. }
  194. return myaddApplyPayment(record, null);
  195. }
  196. /**
  197. * 申请人重新发起申请
  198. *
  199. * @param record
  200. * @return
  201. */
  202. @PostMapping(value = "addApplyUseMoneyAgain", produces = {"application/json;charset=UTF-8"})
  203. @ResponseBody
  204. @Transactional
  205. public AjaxResult addApplyUseMoneyAgain(ApplyUseMoneyIn record) throws FlowException {
  206. System.out.println("addApplyUseMoneyAgain");
  207. if (StringUtils.isEmpty(record.getFlowMainId())) {
  208. return AjaxResult.error("没有传入flowMainId的值");
  209. }
  210. System.out.println(record);
  211. // record.setRemark("重新发起申请[" + record.getFlowMainId() + "],");
  212. {//修改重新发起前的表状态
  213. FlowMain flowMain1 = new FlowMain();
  214. flowMain1.setId(record.getFlowMainId());
  215. flowMain1.setReturnStatus(1);//0/null无状态,1已撤回并且已重新发起
  216. flowMain1.setUpdatedAt(new Date());
  217. flowMain1.setUpdatedBy(ShiroUtils.getUser().getId());
  218. flowMainService.updateByPrimaryKeySelective(flowMain1);
  219. }
  220. return myaddApplyPayment(record, "重新发起申请[" + record.getFlowMainId() + "],");
  221. }
  222. /**
  223. * 根据推送表的FlowMainPushId获取信息
  224. *
  225. * @param flowMainPushId
  226. * @return
  227. */
  228. @PostMapping(value = "getInfoByFlowMainPushId", produces = {"application/json;charset=UTF-8"})
  229. @ResponseBody
  230. public ApplyUseMoneyIn getInfoByFlowMainPushId(String flowMainPushId) {
  231. ApplyUseMoneyIn myApplyUseMoneyIn = modelService.getInfoByFlowMainPushId(flowMainPushId);
  232. if (myApplyUseMoneyIn != null) {
  233. {//获取抄送人
  234. // FlowMainCcExample example = new FlowMainCcExample();
  235. // example.createCriteria().andFlowMainIdEqualTo(myApplyUseMoneyIn.getFlowMainId());
  236. // List<FlowMainCc> flowMainCcList = flowMainCcService.selectByExample(example);
  237. List<FlowMainCcVo> flowMainCcList = flowMainCcService.selectVoByFlowMainId(myApplyUseMoneyIn.getFlowMainId());
  238. // HashSet<String> set = new HashSet<>();
  239. // for (FlowMainCc flowMainCc : flowMainCcList) {
  240. // set.add(flowMainCc.getCcUser());
  241. // }
  242. // StringBuilder stringBuilder = new StringBuilder();
  243. // if (!set.isEmpty()) {
  244. // for (String s : set) {
  245. // stringBuilder.append(s + ",");
  246. // }
  247. // }
  248. // myApplyUseMoneyIn.setCcList(stringBuilder.toString());
  249. myApplyUseMoneyIn.setFlowMainCcList(flowMainCcList);
  250. }
  251. // 付款总金额
  252. BigDecimal feeMoneyTotal = new BigDecimal(0);
  253. {//获取apply_use_money_detail数据
  254. ApplyUseMoneyDetailExample example = new ApplyUseMoneyDetailExample();
  255. example.createCriteria().andUseMoneyIdEqualTo(myApplyUseMoneyIn.getId());
  256. List<ApplyUseMoneyDetail> applyUseMoneyDetails = applyUseMoneyDetailService.selectByExample(example);
  257. for (ApplyUseMoneyDetail applyUseMoneyDetail : applyUseMoneyDetails) {
  258. BigDecimal feeMoney = applyUseMoneyDetail.getFeeMoney();
  259. feeMoneyTotal = feeMoneyTotal.add(feeMoney, MathContext.DECIMAL32);
  260. }
  261. myApplyUseMoneyIn.setFeeMoneyTotal(feeMoneyTotal.doubleValue());
  262. myApplyUseMoneyIn.setApplyUseMoneyDetailList(applyUseMoneyDetails);
  263. }
  264. }
  265. return myApplyUseMoneyIn;
  266. }
  267. /**
  268. * 根据主表的FlowMainId获取信息
  269. *
  270. * @param flowMainId
  271. * @return
  272. */
  273. @PostMapping(value = "getInfoByFlowMainId", produces = {"application/json;charset=UTF-8"})
  274. @ResponseBody
  275. public ApplyUseMoneyIn getInfoByFlowMainId(String flowMainId) {
  276. ApplyUseMoneyIn myApplyUseMoneyIn = modelService.getInfoByFlowMainId(flowMainId);
  277. if (myApplyUseMoneyIn != null) {
  278. {//获取抄送人
  279. // FlowMainCcExample example = new FlowMainCcExample();
  280. // example.createCriteria().andFlowMainIdEqualTo(myApplyUseMoneyIn.getFlowMainId());
  281. // List<FlowMainCc> flowMainCcList = flowMainCcService.selectByExample(example);
  282. List<FlowMainCcVo> flowMainCcList = flowMainCcService.selectVoByFlowMainId(myApplyUseMoneyIn.getFlowMainId());
  283. // HashSet<String> set = new HashSet<>();
  284. // for (FlowMainCc flowMainCc : flowMainCcList) {
  285. // set.add(flowMainCc.getCcUser());
  286. // }
  287. // StringBuilder stringBuilder = new StringBuilder();
  288. // if (!set.isEmpty()) {
  289. // for (String s : set) {
  290. // stringBuilder.append(s + ",");
  291. // }
  292. // }
  293. // myApplyUseMoneyIn.setCcList(stringBuilder.toString());
  294. myApplyUseMoneyIn.setFlowMainCcList(flowMainCcList);
  295. }
  296. {//获取apply_use_money_detail数据
  297. ApplyUseMoneyDetailExample example = new ApplyUseMoneyDetailExample();
  298. example.createCriteria().andUseMoneyIdEqualTo(myApplyUseMoneyIn.getId());
  299. List<ApplyUseMoneyDetail> applyUseMoneyDetails = applyUseMoneyDetailService.selectByExample(example);
  300. myApplyUseMoneyIn.setApplyUseMoneyDetailList(applyUseMoneyDetails);
  301. }
  302. }
  303. return myApplyUseMoneyIn;
  304. }
  305. // public static void main(String[] args) {
  306. //
  307. // String applyUseMoneyDetailListString = "[{\"fileDataIds\":\"\",\"feeMoney\":\"1请3惹太呀u8i9o0\",\"feeType\":\"差旅费\"}]";
  308. // JSONArray jsonArray = JSONArray.parseArray(applyUseMoneyDetailListString);
  309. //
  310. // for (int i = 0; i < jsonArray.size(); i++) {
  311. // JSONObject object = jsonArray.getJSONObject(i);
  312. // ApplyUseMoneyDetail applyUseMoneyDetail = JSONObject.parseObject(object.toJSONString(), ApplyUseMoneyDetail.class);// 将string类型直接封装成对象
  313. // System.out.println(applyUseMoneyDetail);
  314. // }
  315. //
  316. // // BigDecimal feeMoneyTotal=new BigDecimal(1.1);
  317. //// System.out.println(feeMoneyTotal.toString());
  318. //// BigDecimal bigDecimal = new BigDecimal(2.3);
  319. //// System.out.println(bigDecimal.toString());
  320. //// feeMoneyTotal=feeMoneyTotal.add(bigDecimal, MathContext.DECIMAL32);
  321. //// System.out.println(feeMoneyTotal.doubleValue());
  322. ////
  323. //// HashMap<String, Object> feeMoneyTotalMap = new HashMap<>();
  324. //// feeMoneyTotalMap.put("billMoney",feeMoneyTotal.doubleValue());
  325. //// Object conditionMapString = JSONObject.toJSON(feeMoneyTotalMap);
  326. //// System.out.println(conditionMapString);
  327. //// Map<String, Object> Mapmaps=(Map) JSON.parse(conditionMapString.toString());
  328. //// System.out.println(Mapmaps);
  329. // }
  330. /**
  331. * 发起付款申请流程
  332. *
  333. * @param record
  334. * @return
  335. */
  336. public AjaxResult myaddApplyPayment(ApplyUseMoneyIn record, String addSystemRemark) throws FlowException {
  337. if (StringUtils.isEmpty(record.getApplyUseMoneyDetailListString())) {
  338. return AjaxResult.error("没有获取到金额信息,请重新确认");
  339. }
  340. // 存入付款申请
  341. // record
  342. // 付款总金额
  343. BigDecimal feeMoneyTotal = new BigDecimal(0);
  344. {
  345. record.setUpdatedAt(new Date());
  346. record.setCreatedAt(record.getUpdatedAt());
  347. record.setCreatedBy(ShiroUtils.getUser().getId());
  348. record.setUpdatedBy(record.getCreatedBy());
  349. record.setStatus(0);
  350. modelService.insert(record);
  351. String applyUseMoneyDetailListString = record.getApplyUseMoneyDetailListString();
  352. JSONArray jsonArray = JSONArray.parseArray(applyUseMoneyDetailListString);
  353. for (int i = 0; i < jsonArray.size(); i++) {
  354. JSONObject object = jsonArray.getJSONObject(i);
  355. ApplyUseMoneyDetail applyUseMoneyDetail = JSONObject.parseObject(object.toJSONString(), ApplyUseMoneyDetail.class);// 将string类型直接封装成对象
  356. applyUseMoneyDetail.setUseMoneyId(record.getId());
  357. applyUseMoneyDetail.setUpdatedAt(new Date());
  358. applyUseMoneyDetail.setCreatedAt(applyUseMoneyDetail.getUpdatedAt());
  359. applyUseMoneyDetail.setCreatedBy(ShiroUtils.getUser().getId());
  360. applyUseMoneyDetail.setUpdatedBy(applyUseMoneyDetail.getCreatedBy());
  361. applyUseMoneyDetail.setStatus(0);
  362. applyUseMoneyDetailService.insert(applyUseMoneyDetail);
  363. BigDecimal feeMoney = applyUseMoneyDetail.getFeeMoney() == null ? new BigDecimal(0) : applyUseMoneyDetail.getFeeMoney();
  364. feeMoneyTotal = feeMoneyTotal.add(feeMoney, MathContext.DECIMAL32);
  365. }
  366. }
  367. double feeMoneyTotalDouble = feeMoneyTotal.doubleValue();
  368. HashMap<String, Object> feeMoneyTotalMap = new HashMap<>();
  369. feeMoneyTotalMap.put("billMoney", feeMoneyTotalDouble);
  370. String applyTheme = "" + ShiroUtils.getUser().getTruename() + "的报支申请单";
  371. AjaxResult ajaxResult = flowMainService.doFlowMain(applyTheme, record.getId(), addSystemRemark, record.getCcList(), ConstantFlowType.USE_MONEY_PROCESSDEFINE, ConstantFlowType.USE_MONEY_DEPLOYMENTID, feeMoneyTotalMap, ConstantFlowType.USE_MONEY_NAME, ConstantFlowType.USE_MONEY,ShiroUtils.getUser());
  372. if (ajaxResult.get("code").equals(1688)) {
  373. return AjaxResult.success();
  374. }
  375. return ajaxResult;
  376. }
  377. @PostMapping(value = "list", produces = {"application/json;charset=UTF-8"})
  378. @ResponseBody
  379. public Object list(Tablepar tablepar, ApplyUseMoney model, DateTrans dt) {
  380. PageInfo<ApplyUseMoney> page = modelService.list(tablepar, model, dt);
  381. TableSplitResult<ApplyUseMoney> result = new TableSplitResult<ApplyUseMoney>(page.getPageNum(), page.getTotal(), page.getList());
  382. return result;
  383. }
  384. @PostMapping(value = "listAll", produces = {"application/json;charset=UTF-8"})
  385. @ResponseBody
  386. public Object listAll(ApplyUseMoney model, DateTrans dt) {
  387. return modelService.listAll(model, dt);
  388. }
  389. @PostMapping(value = "add", produces = {"application/json;charset=UTF-8"})
  390. @ResponseBody
  391. public AjaxResult add(ApplyUseMoney record) {
  392. record.setCreatedAt(new Date());
  393. int result = modelService.insert(record);
  394. return result(result);
  395. }
  396. @PostMapping(value = "remove/{id}", produces = {"application/json;charset=UTF-8"})
  397. @ResponseBody
  398. public AjaxResult remove(@PathVariable("id") String id) {
  399. int result = modelService.deleteByPrimaryKey(id);
  400. return result(result);
  401. }
  402. @PostMapping(value = "edit", produces = {"application/json;charset=UTF-8"})
  403. @ResponseBody
  404. public AjaxResult editSave(ApplyUseMoney model) {
  405. int result = modelService.updateByPrimaryKeySelective(model);
  406. return result(result);
  407. }
  408. @PostMapping(value = "getById", produces = {"application/json;charset=UTF-8"})
  409. @ResponseBody
  410. public ApplyUseMoney getById(String id) {
  411. return modelService.selectByPrimaryKey(id);
  412. }
  413. }