package com.changhong.epc.admin.controller.account; import com.changhong.epc.admin.service.account.AccountService; import com.changhong.epc.bean.admin.Account; import com.changhong.epc.constter.admin.AdminUrlConst; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; @RestController public class AccountController implements AdminUrlConst { @Resource private AccountService accountServiceImpl; @PostMapping(ACCOUNT_SELECTBYDATA) public List selectByDataStart(){ return accountServiceImpl.selectByDataStart(); } @PostMapping(ACCOUNT_ADD) public int addAccount(@RequestBody Account list){ return accountServiceImpl.addAccount(list); } @PostMapping(ACCOUNT_UPDATESTATE) public int updateState(@RequestBody Account account){ return accountServiceImpl.updateState(account); } @PostMapping(ACCOUNT_DELETE) public int delete(@RequestBody Account account){ return accountServiceImpl.delete(account); } @PostMapping(ACCOUNT_SELECTORDERCODE) public Account selectCode(@RequestBody Account code){ return accountServiceImpl.selectAccount(code.getOrderCode()); } /** * 重新记账 */ @PostMapping(ACCOUNT_REPETITIONACCOUNT) public int repetitionAccount(@RequestBody Account code){ return accountServiceImpl.repetitionAccount(code); } /** * 回写记账凭证号 */ @PostMapping(ACCOUNT_UPDATEVOUCHERCODE) public Integer updateVoucherCode(@RequestBody Account account){ return accountServiceImpl.updateVoucherCode(account); } }