合同退款管理系统 - 高效管理合同退款流程
/**
-
合同退款管理
-
@author ThinkGem
-
@version 2016-03-15 */ @Controller @RequestMapping(value = "${adminPath}/contract/contractRefund") public class ContractRefundController extends BaseController {
@Autowired private ContractRefundService contractRefundService;
@Autowired private ContractPurchaseService contractPurchaseService;
@Autowired private ContractSaleService contractSaleService;
@ModelAttribute public ContractRefund get(@RequestParam(required=false) String id) { ContractRefund entity = null; if (StringUtils.isNotBlank(id)){ entity = contractRefundService.get(id); } if (entity == null){ entity = new ContractRefund(); } return entity; }
@RequiresPermissions("contract:contractRefund:view") @RequestMapping(value = {"list",""}) public String list(ContractRefund contractRefund, HttpServletRequest request, HttpServletResponse response, Model model) { List
contractPurchaseList=contractPurchaseService.findList(new ContractPurchase()); List contractPurchaseList2=new ArrayList (); for (ContractPurchase contractPurchase : contractPurchaseList) { if(contractPurchase.getStatus()==1){ contractPurchaseList2.add(contractPurchase); } } //物品销售合同 List contractSaleList=contractSaleService.findList(new ContractSale()); List contractSaleList2=new ArrayList (); for (ContractSale contractSale : contractSaleList) { if(contractSale.getStatus()==1){ contractSaleList2.add(contractSale); } } List<Contract>contractList=new ArrayList<Contract>(); for (ContractPurchase contractPurchase : contractPurchaseList2) { contractList.add(contractPurchase); } for (ContractSale contractSale : contractSaleList2) { contractList.add(contractSale); } model.addAttribute("contractList", contractList); model.addAttribute("contractPurchase", contractPurchase); model.addAttribute("contractSale", contractSale); return "modules/contract/contractRefundForm";}
/**
- 合同退款保存
- @param contractRefund
- @param model
- @param redirectAttributes
- @return */ @RequiresPermissions("contract:contractRefund:edit") @RequestMapping(value = "save") public String save(ContractRefund contractRefund, Model model, RedirectAttributes redirectAttributes) { if (!beanValidator(model, contractRefund)){ return form(contractRefund,model); } contractRefundService.save(contractRefund); addMessage(redirectAttributes, "保存合同退款成功"); return "redirect:"+Global.getAdminPath()+"/contract/contractRefund/?repage"; }
/**
- 合同退款删除
- @param contractRefund
- @param redirectAttributes
- @return */ @RequiresPermissions("contract:contractRefund:edit") @RequestMapping(value = "delete") public String delete(ContractRefund contractRefund, RedirectAttributes redirectAttributes) { contractRefundService.delete(contractRefund); addMessage(redirectAttributes, "删除合同退款成功"); return "redirect:"+Global.getAdminPath()+"/contract/contractRefund/?repage"; }
}
原文地址: https://www.cveoy.top/t/topic/licN 著作权归作者所有。请勿转载和采集!