OtherSubsidyController.java 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. package cn.com.lzt.othersubsidy.controller;
  2. import java.io.IOException;
  3. import java.net.URI;
  4. import java.util.ArrayList;
  5. import java.util.HashMap;
  6. import java.util.List;
  7. import java.util.Map;
  8. import java.util.Set;
  9. import javax.servlet.http.HttpServletRequest;
  10. import javax.servlet.http.HttpServletResponse;
  11. import javax.validation.ConstraintViolation;
  12. import javax.validation.Validator;
  13. import org.apache.log4j.Logger;
  14. import org.jeecgframework.core.beanvalidator.BeanValidators;
  15. import org.jeecgframework.core.common.controller.BaseController;
  16. import org.jeecgframework.core.common.exception.BusinessException;
  17. import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
  18. import org.jeecgframework.core.common.model.json.AjaxJson;
  19. import org.jeecgframework.core.common.model.json.DataGrid;
  20. import org.jeecgframework.core.constant.Globals;
  21. import org.jeecgframework.core.util.ExceptionUtil;
  22. import org.jeecgframework.core.util.MyBeanUtils;
  23. import org.jeecgframework.core.util.ResourceUtil;
  24. import org.jeecgframework.core.util.StringUtil;
  25. import org.jeecgframework.poi.excel.ExcelImportUtil;
  26. import org.jeecgframework.poi.excel.entity.ExportParams;
  27. import org.jeecgframework.poi.excel.entity.ImportParams;
  28. import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
  29. import org.jeecgframework.tag.core.easyui.TagUtil;
  30. import org.jeecgframework.web.system.service.SystemService;
  31. import org.springframework.beans.factory.annotation.Autowired;
  32. import org.springframework.http.HttpHeaders;
  33. import org.springframework.http.HttpStatus;
  34. import org.springframework.http.MediaType;
  35. import org.springframework.http.ResponseEntity;
  36. import org.springframework.stereotype.Controller;
  37. import org.springframework.ui.ModelMap;
  38. import org.springframework.web.bind.annotation.PathVariable;
  39. import org.springframework.web.bind.annotation.RequestBody;
  40. import org.springframework.web.bind.annotation.RequestMapping;
  41. import org.springframework.web.bind.annotation.RequestMethod;
  42. import org.springframework.web.bind.annotation.ResponseBody;
  43. import org.springframework.web.bind.annotation.ResponseStatus;
  44. import org.springframework.web.multipart.MultipartFile;
  45. import org.springframework.web.multipart.MultipartHttpServletRequest;
  46. import org.springframework.web.servlet.ModelAndView;
  47. import org.springframework.web.util.UriComponentsBuilder;
  48. import cn.com.lzt.megathermalsubsidy.entity.MegathermalSubsidyEntity;
  49. import cn.com.lzt.othersubsidy.entity.OtherSubsidyEntity;
  50. import cn.com.lzt.othersubsidy.service.OtherSubsidyServiceI;
  51. /**
  52. * @Title: Controller
  53. * @Description: 其它补贴
  54. * @author onlineGenerator
  55. * @date 2017-10-18 18:03:42
  56. * @version V1.0
  57. *
  58. */
  59. @Controller
  60. @RequestMapping("/otherSubsidyController")
  61. public class OtherSubsidyController extends BaseController {
  62. /**
  63. * Logger for this class
  64. */
  65. private static final Logger logger = Logger.getLogger(OtherSubsidyController.class);
  66. @Autowired
  67. private OtherSubsidyServiceI otherSubsidyService;
  68. @Autowired
  69. private SystemService systemService;
  70. @Autowired
  71. private Validator validator;
  72. /**
  73. * 其它补贴列表 页面跳转
  74. *
  75. * @return
  76. */
  77. @RequestMapping(params = "list")
  78. public ModelAndView list(HttpServletRequest request) {
  79. return new ModelAndView("cn/com/lzt/othersubsidy/otherSubsidyList");
  80. }
  81. /**
  82. * easyui AJAX请求数据
  83. *
  84. * @param request
  85. * @param response
  86. * @param dataGrid
  87. * @param user
  88. */
  89. @RequestMapping(params = "datagrid")
  90. public void datagrid(OtherSubsidyEntity otherSubsidy, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
  91. CriteriaQuery cq = new CriteriaQuery(OtherSubsidyEntity.class, dataGrid);
  92. //查询条件组装器
  93. org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, otherSubsidy, request.getParameterMap());
  94. try{
  95. //自定义追加查询条件
  96. String[] status = new String[]{Globals.Enabled_Status.toString(), Globals.Disabled_Status.toString()};
  97. cq.in("status", status);
  98. cq.eq("deleteFlag", Globals.Delete_Normal.toString());
  99. Map map = new HashMap();
  100. map.put("createDate", "desc");
  101. cq.setOrder(map);
  102. }catch (Exception e) {
  103. throw new BusinessException(e.getMessage());
  104. }
  105. cq.add();
  106. this.otherSubsidyService.getDataGridReturn(cq, true);
  107. TagUtil.datagrid(response, dataGrid);
  108. }
  109. /**
  110. * 保存新增/更新的行数据
  111. * @param page
  112. * @return
  113. */
  114. @RequestMapping(params = "saveRows")
  115. @ResponseBody
  116. public AjaxJson saveRows(OtherSubsidyEntity otherSubsidy, HttpServletRequest request){
  117. String message = null;
  118. AjaxJson j = new AjaxJson();
  119. message = "";
  120. if (StringUtil.isNotEmpty(otherSubsidy.getId())) {
  121. OtherSubsidyEntity t = otherSubsidyService.get(OtherSubsidyEntity.class, otherSubsidy.getId());
  122. try {
  123. MyBeanUtils.copyBeanNotNull2Bean(otherSubsidy, t);
  124. otherSubsidyService.updateEntitie(t);
  125. systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
  126. message = "其他补贴更新成功";
  127. } catch (Exception e) {
  128. e.printStackTrace();
  129. message = "其他补贴更新失败";
  130. throw new BusinessException(e.getMessage());
  131. }
  132. } else {
  133. try{
  134. otherSubsidy.setDeleteFlag(Globals.Delete_Normal.toString());
  135. otherSubsidy.setStatus(Globals.Enabled_Status.toString());
  136. otherSubsidyService.save(otherSubsidy);
  137. systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
  138. message = "其他补贴添加成功";
  139. }catch(Exception e){
  140. e.printStackTrace();
  141. message = "其他补贴添加失败";
  142. throw new BusinessException(e.getMessage());
  143. }
  144. }
  145. j.setMsg(message);
  146. return j;
  147. }
  148. /**
  149. * 删除其它补贴
  150. *
  151. * @return
  152. */
  153. @RequestMapping(params = "doDel")
  154. @ResponseBody
  155. public AjaxJson doDel(OtherSubsidyEntity otherSubsidy, HttpServletRequest request) {
  156. String message = null;
  157. AjaxJson j = new AjaxJson();
  158. otherSubsidy = systemService.getEntity(OtherSubsidyEntity.class, otherSubsidy.getId());
  159. message = "其它补贴删除成功";
  160. try{
  161. otherSubsidyService.delete(otherSubsidy);
  162. systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
  163. }catch(Exception e){
  164. e.printStackTrace();
  165. message = "其它补贴删除失败";
  166. throw new BusinessException(e.getMessage());
  167. }
  168. j.setMsg(message);
  169. return j;
  170. }
  171. /**
  172. * 批量删除其它补贴
  173. *
  174. * @return
  175. */
  176. @RequestMapping(params = "doBatchDel")
  177. @ResponseBody
  178. public AjaxJson doBatchDel(String ids,HttpServletRequest request){
  179. String message = null;
  180. AjaxJson j = new AjaxJson();
  181. message = "其它补贴删除成功";
  182. try{
  183. for(String id:ids.split(",")){
  184. OtherSubsidyEntity otherSubsidy = systemService.getEntity(OtherSubsidyEntity.class, id);
  185. otherSubsidyService.delete(otherSubsidy);
  186. systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
  187. }
  188. }catch(Exception e){
  189. e.printStackTrace();
  190. message = "其它补贴删除失败";
  191. throw new BusinessException(e.getMessage());
  192. }
  193. j.setMsg(message);
  194. return j;
  195. }
  196. /**
  197. * 批量逻辑删除其他补贴
  198. *
  199. * @return
  200. */
  201. @RequestMapping(params = "doBatchLogicDel")
  202. @ResponseBody
  203. public AjaxJson doBatchLogicDel(String ids,HttpServletRequest request){
  204. String message = null;
  205. AjaxJson j = new AjaxJson();
  206. message = "其他补贴删除成功";
  207. List<OtherSubsidyEntity> pojoList = new ArrayList<OtherSubsidyEntity>();
  208. try{
  209. for(String id:ids.split(",")){
  210. OtherSubsidyEntity otherSubsidy = systemService.getEntity(OtherSubsidyEntity.class, id);
  211. otherSubsidy.setDeleteFlag(Globals.Delete_Forbidden.toString());// 设置为1已删除
  212. pojoList.add(otherSubsidy);
  213. }
  214. otherSubsidyService.batchUpdate(pojoList);// 执行批量更新
  215. systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
  216. }catch(Exception e){
  217. e.printStackTrace();
  218. message = "其他补贴删除失败";
  219. throw new BusinessException(e.getMessage());
  220. }
  221. j.setMsg(message);
  222. return j;
  223. }
  224. /**
  225. * 启用其他补贴
  226. *
  227. * @return
  228. */
  229. @RequestMapping(params = "doEnableObj")
  230. @ResponseBody
  231. public AjaxJson doEnableObj(String ids,HttpServletRequest request){
  232. String message = null;
  233. AjaxJson j = new AjaxJson();
  234. message = "其他补贴启用成功";
  235. List<OtherSubsidyEntity> pojoList = new ArrayList<OtherSubsidyEntity>();
  236. try{
  237. for(String id:ids.split(",")){
  238. OtherSubsidyEntity otherSubsidy = systemService.getEntity(OtherSubsidyEntity.class, id);
  239. otherSubsidy.setStatus(Globals.Enabled_Status.toString());// 设置为0启用
  240. pojoList.add(otherSubsidy);
  241. }
  242. otherSubsidyService.batchUpdate(pojoList);// 执行批量更新
  243. systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
  244. }catch(Exception e){
  245. e.printStackTrace();
  246. message = "其他补贴启用失败";
  247. throw new BusinessException(e.getMessage());
  248. }
  249. j.setMsg(message);
  250. return j;
  251. }
  252. /**
  253. * 停用其他补贴
  254. *
  255. * @return
  256. */
  257. @RequestMapping(params = "doDisableObj")
  258. @ResponseBody
  259. public AjaxJson doDisableObj(String ids,HttpServletRequest request){
  260. String message = null;
  261. AjaxJson j = new AjaxJson();
  262. message = "其他补贴停用成功";
  263. List<OtherSubsidyEntity> pojoList = new ArrayList<OtherSubsidyEntity>();
  264. try{
  265. for(String id:ids.split(",")){
  266. OtherSubsidyEntity otherSubsidy = systemService.getEntity(OtherSubsidyEntity.class, id);
  267. otherSubsidy.setStatus(Globals.Disabled_Status.toString());// 设置为1停用
  268. pojoList.add(otherSubsidy);
  269. }
  270. otherSubsidyService.batchUpdate(pojoList);// 执行批量更新
  271. systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
  272. }catch(Exception e){
  273. e.printStackTrace();
  274. message = "其他补贴停用失败";
  275. throw new BusinessException(e.getMessage());
  276. }
  277. j.setMsg(message);
  278. return j;
  279. }
  280. /**
  281. * 补贴名称重复校验
  282. *
  283. * @param ids
  284. * @return
  285. */
  286. @RequestMapping(params = "checkName")
  287. @ResponseBody
  288. public Map<String,Object> checkName(OtherSubsidyEntity otherSubsidy, HttpServletRequest request) {
  289. Boolean flag = otherSubsidyService.findByName(otherSubsidy);
  290. Map<String,Object> res = new HashMap<String, Object>();
  291. res.put("flag",flag);
  292. return res;
  293. }
  294. /**
  295. * 添加其它补贴
  296. *
  297. * @param ids
  298. * @return
  299. */
  300. @RequestMapping(params = "doAdd")
  301. @ResponseBody
  302. public AjaxJson doAdd(OtherSubsidyEntity otherSubsidy, HttpServletRequest request) {
  303. String message = null;
  304. AjaxJson j = new AjaxJson();
  305. message = "其它补贴添加成功";
  306. try{
  307. otherSubsidy.setDeleteFlag(Globals.Delete_Normal.toString());
  308. otherSubsidy.setStatus(Globals.Enabled_Status.toString());
  309. otherSubsidyService.save(otherSubsidy);
  310. systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
  311. }catch(Exception e){
  312. e.printStackTrace();
  313. message = "其它补贴添加失败";
  314. throw new BusinessException(e.getMessage());
  315. }
  316. j.setMsg(message);
  317. return j;
  318. }
  319. /**
  320. * 更新其它补贴
  321. *
  322. * @param ids
  323. * @return
  324. */
  325. @RequestMapping(params = "doUpdate")
  326. @ResponseBody
  327. public AjaxJson doUpdate(OtherSubsidyEntity otherSubsidy, HttpServletRequest request) {
  328. String message = null;
  329. AjaxJson j = new AjaxJson();
  330. message = "其它补贴更新成功";
  331. OtherSubsidyEntity t = otherSubsidyService.get(OtherSubsidyEntity.class, otherSubsidy.getId());
  332. try {
  333. MyBeanUtils.copyBeanNotNull2Bean(otherSubsidy, t);
  334. otherSubsidyService.saveOrUpdate(t);
  335. systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
  336. } catch (Exception e) {
  337. e.printStackTrace();
  338. message = "其它补贴更新失败";
  339. throw new BusinessException(e.getMessage());
  340. }
  341. j.setMsg(message);
  342. return j;
  343. }
  344. /**
  345. * 其它补贴新增页面跳转
  346. *
  347. * @return
  348. */
  349. @RequestMapping(params = "goAdd")
  350. public ModelAndView goAdd(OtherSubsidyEntity otherSubsidy, HttpServletRequest req) {
  351. if (StringUtil.isNotEmpty(otherSubsidy.getId())) {
  352. otherSubsidy = otherSubsidyService.getEntity(OtherSubsidyEntity.class, otherSubsidy.getId());
  353. req.setAttribute("otherSubsidyPage", otherSubsidy);
  354. }
  355. return new ModelAndView("cn/com/lzt/othersubsidy/otherSubsidy-add");
  356. }
  357. /**
  358. * 其它补贴编辑页面跳转
  359. *
  360. * @return
  361. */
  362. @RequestMapping(params = "goUpdate")
  363. public ModelAndView goUpdate(OtherSubsidyEntity otherSubsidy, HttpServletRequest req) {
  364. if (StringUtil.isNotEmpty(otherSubsidy.getId())) {
  365. otherSubsidy = otherSubsidyService.getEntity(OtherSubsidyEntity.class, otherSubsidy.getId());
  366. req.setAttribute("otherSubsidyPage", otherSubsidy);
  367. }
  368. return new ModelAndView("cn/com/lzt/othersubsidy/otherSubsidy-update");
  369. }
  370. /**
  371. * 导入功能跳转
  372. *
  373. * @return
  374. */
  375. @RequestMapping(params = "upload")
  376. public ModelAndView upload(HttpServletRequest req) {
  377. req.setAttribute("controller_name","otherSubsidyController");
  378. return new ModelAndView("common/upload/pub_excel_upload");
  379. }
  380. /**
  381. * 导出excel
  382. *
  383. * @param request
  384. * @param response
  385. */
  386. @RequestMapping(params = "exportXls")
  387. public String exportXls(OtherSubsidyEntity otherSubsidy,HttpServletRequest request,HttpServletResponse response
  388. , DataGrid dataGrid,ModelMap modelMap) {
  389. CriteriaQuery cq = new CriteriaQuery(OtherSubsidyEntity.class, dataGrid);
  390. org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, otherSubsidy, request.getParameterMap());
  391. List<OtherSubsidyEntity> otherSubsidys = this.otherSubsidyService.getListByCriteriaQuery(cq,false);
  392. modelMap.put(NormalExcelConstants.FILE_NAME,"其它补贴");
  393. modelMap.put(NormalExcelConstants.CLASS,OtherSubsidyEntity.class);
  394. modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("其它补贴列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(),
  395. "导出信息"));
  396. modelMap.put(NormalExcelConstants.DATA_LIST,otherSubsidys);
  397. return NormalExcelConstants.JEECG_EXCEL_VIEW;
  398. }
  399. /**
  400. * 导出excel 使模板
  401. *
  402. * @param request
  403. * @param response
  404. */
  405. @RequestMapping(params = "exportXlsByT")
  406. public String exportXlsByT(OtherSubsidyEntity otherSubsidy,HttpServletRequest request,HttpServletResponse response
  407. , DataGrid dataGrid,ModelMap modelMap) {
  408. modelMap.put(NormalExcelConstants.FILE_NAME,"其它补贴");
  409. modelMap.put(NormalExcelConstants.CLASS,OtherSubsidyEntity.class);
  410. modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("其它补贴列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(),
  411. "导出信息"));
  412. modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList());
  413. return NormalExcelConstants.JEECG_EXCEL_VIEW;
  414. }
  415. @SuppressWarnings("unchecked")
  416. @RequestMapping(params = "importExcel", method = RequestMethod.POST)
  417. @ResponseBody
  418. public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
  419. AjaxJson j = new AjaxJson();
  420. MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
  421. Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
  422. for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
  423. MultipartFile file = entity.getValue();// 获取上传文件对象
  424. ImportParams params = new ImportParams();
  425. params.setTitleRows(2);
  426. params.setHeadRows(1);
  427. params.setNeedSave(true);
  428. try {
  429. List<OtherSubsidyEntity> listOtherSubsidyEntitys = ExcelImportUtil.importExcel(file.getInputStream(),OtherSubsidyEntity.class,params);
  430. for (OtherSubsidyEntity otherSubsidy : listOtherSubsidyEntitys) {
  431. otherSubsidyService.save(otherSubsidy);
  432. }
  433. j.setMsg("文件导入成功!");
  434. } catch (Exception e) {
  435. j.setMsg("文件导入失败!");
  436. logger.error(ExceptionUtil.getExceptionMessage(e));
  437. }finally{
  438. try {
  439. file.getInputStream().close();
  440. } catch (IOException e) {
  441. e.printStackTrace();
  442. }
  443. }
  444. }
  445. return j;
  446. }
  447. @RequestMapping(method = RequestMethod.GET)
  448. @ResponseBody
  449. public List<OtherSubsidyEntity> list() {
  450. List<OtherSubsidyEntity> listOtherSubsidys=otherSubsidyService.getList(OtherSubsidyEntity.class);
  451. return listOtherSubsidys;
  452. }
  453. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  454. @ResponseBody
  455. public ResponseEntity<?> get(@PathVariable("id") String id) {
  456. OtherSubsidyEntity task = otherSubsidyService.get(OtherSubsidyEntity.class, id);
  457. if (task == null) {
  458. return new ResponseEntity(HttpStatus.NOT_FOUND);
  459. }
  460. return new ResponseEntity(task, HttpStatus.OK);
  461. }
  462. @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
  463. @ResponseBody
  464. public ResponseEntity<?> create(@RequestBody OtherSubsidyEntity otherSubsidy, UriComponentsBuilder uriBuilder) {
  465. //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
  466. Set<ConstraintViolation<OtherSubsidyEntity>> failures = validator.validate(otherSubsidy);
  467. if (!failures.isEmpty()) {
  468. return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
  469. }
  470. //保存
  471. try{
  472. otherSubsidyService.save(otherSubsidy);
  473. } catch (Exception e) {
  474. e.printStackTrace();
  475. return new ResponseEntity(HttpStatus.NO_CONTENT);
  476. }
  477. //按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象.
  478. String id = otherSubsidy.getId();
  479. URI uri = uriBuilder.path("/rest/otherSubsidyController/" + id).build().toUri();
  480. HttpHeaders headers = new HttpHeaders();
  481. headers.setLocation(uri);
  482. return new ResponseEntity(headers, HttpStatus.CREATED);
  483. }
  484. @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
  485. public ResponseEntity<?> update(@RequestBody OtherSubsidyEntity otherSubsidy) {
  486. //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
  487. Set<ConstraintViolation<OtherSubsidyEntity>> failures = validator.validate(otherSubsidy);
  488. if (!failures.isEmpty()) {
  489. return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
  490. }
  491. //保存
  492. try{
  493. otherSubsidyService.saveOrUpdate(otherSubsidy);
  494. } catch (Exception e) {
  495. e.printStackTrace();
  496. return new ResponseEntity(HttpStatus.NO_CONTENT);
  497. }
  498. //按Restful约定,返回204状态码, 无内容. 也可以返回200状态码.
  499. return new ResponseEntity(HttpStatus.NO_CONTENT);
  500. }
  501. @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
  502. @ResponseStatus(HttpStatus.NO_CONTENT)
  503. public void delete(@PathVariable("id") String id) {
  504. otherSubsidyService.deleteEntityById(OtherSubsidyEntity.class, id);
  505. }
  506. }