zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
commit | author | age
a18bfa 1 package com.changhong.epc.admin.controller.account;
Z 2
3 import com.changhong.epc.admin.service.account.AccountService;
4 import com.changhong.epc.bean.admin.Account;
5 import com.changhong.epc.constter.admin.AdminUrlConst;
6 import org.springframework.web.bind.annotation.PostMapping;
7 import org.springframework.web.bind.annotation.RequestBody;
8 import org.springframework.web.bind.annotation.RestController;
9
10 import javax.annotation.Resource;
11 import java.util.List;
12
13 @RestController
14 public class AccountController implements AdminUrlConst {
15
16     @Resource
17     private AccountService accountServiceImpl;
18
19     @PostMapping(ACCOUNT_SELECTBYDATA)
20     public List<Account> selectByDataStart(){
21         return accountServiceImpl.selectByDataStart();
22     }
23
24     @PostMapping(ACCOUNT_ADD)
25     public int addAccount(@RequestBody Account list){
26         return accountServiceImpl.addAccount(list);
27     }
28
29     @PostMapping(ACCOUNT_UPDATESTATE)
30     public int updateState(@RequestBody Account account){
31         return accountServiceImpl.updateState(account);
32     }
33
34     @PostMapping(ACCOUNT_DELETE)
35     public int delete(@RequestBody Account account){
36         return accountServiceImpl.delete(account);
37     }
38
39     @PostMapping(ACCOUNT_SELECTORDERCODE)
40     public Account selectCode(@RequestBody Account code){
41         return accountServiceImpl.selectAccount(code.getOrderCode());
42     }
43     
44     /**
45      * 重新记账
46      */
47     @PostMapping(ACCOUNT_REPETITIONACCOUNT)
48     public int repetitionAccount(@RequestBody Account code){
49         return accountServiceImpl.repetitionAccount(code);
50     }
51
52
53     /**
54      * 回写记账凭证号
55      */
56     @PostMapping(ACCOUNT_UPDATEVOUCHERCODE)
57     public Integer updateVoucherCode(@RequestBody Account account){
58         return accountServiceImpl.updateVoucherCode(account);
59     }
60
61 }