You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					
					
						
							45 lines
						
					
					
						
							1.4 KiB
						
					
					
				
			
		
		
	
	
							45 lines
						
					
					
						
							1.4 KiB
						
					
					
				/*
 | 
						|
 * *
 | 
						|
 *  * @Project 微信公众号
 | 
						|
 *  * @Author 张剑峰
 | 
						|
 *  * @Date 2021/1/12 下午11:08
 | 
						|
 *  * @Description
 | 
						|
 *  * @Version v1.0.0
 | 
						|
 *  * @Copyright @ 2020 云南新八达科技有限公司 All rights reserved.
 | 
						|
 *
 | 
						|
 */
 | 
						|
 | 
						|
package com.ynxbd.common.action;
 | 
						|
 | 
						|
import com.ynxbd.common.action.base.BaseAction;
 | 
						|
import com.ynxbd.common.bean.Accounts;
 | 
						|
import com.ynxbd.common.dao.AccountsDao;
 | 
						|
import com.ynxbd.common.helper.common.DateHelper;
 | 
						|
import com.ynxbd.common.result.Result;
 | 
						|
import com.ynxbd.common.result.ResultEnum;
 | 
						|
import lombok.extern.slf4j.Slf4j;
 | 
						|
import org.apache.struts2.convention.annotation.Action;
 | 
						|
import org.apache.struts2.convention.annotation.Namespace;
 | 
						|
import java.util.List;
 | 
						|
 | 
						|
 | 
						|
@Slf4j
 | 
						|
@Namespace("/service")
 | 
						|
public class ServiceAction extends BaseAction {
 | 
						|
 | 
						|
    @Action("accounts")
 | 
						|
    public Result accounts(String begDate, String endDate ) {
 | 
						|
        log.info("笔次、费用统计:" + begDate + " 至 " + endDate);
 | 
						|
 | 
						|
        if (begDate == null || endDate == null){
 | 
						|
            return Result.error(ResultEnum.PARAM_IS_BLANK);
 | 
						|
        }
 | 
						|
 | 
						|
        if (DateHelper.parseDate(begDate) == null || DateHelper.parseDate(endDate) == null) {
 | 
						|
            return Result.error(ResultEnum.PARAM_TYPE_ERROR);
 | 
						|
        }
 | 
						|
 | 
						|
        List<Accounts> items = new AccountsDao().getAccounts(begDate, endDate);
 | 
						|
        return Result.success(items);
 | 
						|
    }
 | 
						|
}
 | 
						|
 |