Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.web.controller;import java.io.File;import java.util.List;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.transaction.annotation.Transactional;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import com.spice.profitmandi.common.web.util.ResponseSender;import com.spice.profitmandi.dao.entity.catalog.StateGstRate;import com.spice.profitmandi.dao.entity.dtr.Document;import com.spice.profitmandi.dao.repository.dtr.DocumentRepository;import com.spice.profitmandi.web.util.MVCResponseSender;import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;@Controller@Transactional(rollbackFor = Throwable.class)public class TaxationController {@Autowiredprivate DocumentRepository documentRepository;@Autowiredprivate StateGstRateRepository StateGstRateRepository;@Autowiredprivate MVCResponseSender mvcResponseSender;@Autowiredprivate ResponseSender<?> responseSender;private static final Logger LOGGER = LogManager.getLogger(SellerController.class);@RequestMapping(value = "/csvFileUploader", method = RequestMethod.POST)public String getFileUploader(HttpServletRequest request, Model model ,HttpServletResponse response,@PathVariable(value = "fileName") String fileName) throws Throwable {List<StateGstRate> sgtFileName = documentRepository.csvFileUploaderStateGstRate(fileName);LOGGER.info("sgtFileName"+sgtFileName);model.addAttribute("responseSTG", mvcResponseSender.createResponseString(true));return "response";}}