zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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<Account> 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);
    }
 
}