package com.saye.hospitalgd.controller;

import com.saye.hospitalgd.commons.date.DateDUtil;
import com.saye.hospitalgd.model.Dicinfo;
import com.saye.hospitalgd.service.CashUnilateralService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * @author thuang
 * @version 1.0
 * @description: 现金单边账 废弃
 * @date 2021/11/8 14:34
 */
@Controller
@RequestMapping("/cashUnilateral")
public class CashUnilateralController_delete {

    @Autowired
    private CashUnilateralService cashUnilateralService;

    /**
     * @description: 到单边账页面
     * @author thuang
     * @date 2021/11/8 14:40
     * @version 1.0
     */
    @RequestMapping("/toCashUnilateral")
    public String toCashUnilateral(ModelMap modelMap){

        Calendar calendar=Calendar.getInstance();
        calendar.setTime(new Date());

        calendar.add(Calendar.DATE,-1);
        Date startDate = calendar.getTime();

        String startTime= DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd,startDate);
        String endTime= DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd);

        modelMap.addAttribute("startTime",startTime);
        modelMap.addAttribute("endTime",endTime);

        return "financialReconciliation/cashUnilateral";
    }
}
