package com.changhong.epc.form.rest.budget; import javax.annotation.Resource; import com.changhong.epc.form.service.budget.tool.impl.ContractInfoUpdate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import com.changhong.autoform.entity.ProcessBudget; import com.changhong.epc.constter.form.utf.FormUrlConst; import com.changhong.epc.form.service.budget.IBudgetMoney; import com.changhong.epc.form.service.budget.department.model.BudgetExtend; @RestController @RequestMapping(method=RequestMethod.POST) public class BudgetDimensionExtendRes implements FormUrlConst{ @Resource private IBudgetMoney budgetMoney; @Autowired private ContractInfoUpdate contractInfoUpdate; /** * 追加预算 * @param * @return */ @RequestMapping(value = BUDGET_MONEY_EXTEND, method={RequestMethod.OPTIONS, RequestMethod.POST}) public int addMoney(@RequestBody ProcessBudget processBudget){ // System.out.println(JSONTool.toJson(processBudget)); return budgetMoney.addMoney(processBudget); } /** * 还款 * @param budgetExtend * @return */ @RequestMapping(value = REPAYMENT_MONEY, method={RequestMethod.OPTIONS, RequestMethod.POST}) public boolean repaymentMoney(@RequestBody BudgetExtend budgetExtend){ return budgetMoney.repaymentMoney(budgetExtend); } /** * 扩展预算单时间 * @param budgetExtend * @return */ @RequestMapping(value=BUDGET_TIME_EXTEND, method={RequestMethod.OPTIONS, RequestMethod.POST}) public boolean extendTime(@RequestBody BudgetExtend budgetExtend){ return budgetMoney.extendTime(budgetExtend); } // /** // * 扩展预算单金额 // * @param budgetExtend // * @return // */ // @RequestMapping(value=BUDGET_MONEY_EXTEND, method={RequestMethod.OPTIONS, RequestMethod.POST}) // public boolean extendMoney(@RequestBody BudgetExtend budgetExtend){ // return budgetMoney.extendMoney(budgetExtend); // } // @RequestMapping(value=BUGET_RECYCLE_MONEY, method={RequestMethod.OPTIONS, RequestMethod.POST}) public boolean recycleMoney(@RequestBody BudgetExtend budgetExtend){ return budgetMoney.extendMoney(budgetExtend); } /** * 合同信息回写预算 */ @PostMapping(BUGET_CONTRACT_WRITEBACK) public Integer budgetWirteBack(@RequestBody BudgetExtend budgetExtend){ return contractInfoUpdate.budgetWirteBack(budgetExtend); } }