| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- package com.style24.admin.biz.web;
- import java.util.Collection;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.ResponseBody;
- import org.springframework.web.servlet.ModelAndView;
- import com.style24.admin.biz.service.TsaBusinessService;
- import com.style24.admin.biz.service.TsaRendererService;
- import com.style24.admin.support.controller.TsaBaseController;
- import com.style24.admin.support.security.session.TsaSession;
- import com.style24.core.support.message.TscMessageByLocale;
- import com.style24.persistence.domain.SupplyCompany;
- import lombok.extern.slf4j.Slf4j;
- import com.gagaframework.web.rest.server.GagaResponse;
- /**
- * 영업관리 Controller
- *
- * @author jaewonHo
- * @since 2020. 10. 14
- */
- @Controller
- @RequestMapping("/business")
- @Slf4j
- public class TsaBusinessController extends TsaBaseController {
- @Autowired
- private TscMessageByLocale message;
- @Autowired
- private TsaBusinessService businessService;
- @Autowired
- private TsaRendererService rendererService;
- /**
- * 공급업체관리 화면
- * @return
- * @author gagamel
- * @since 2020. 10. 14
- */
- @GetMapping("/supply/company/form")
- public ModelAndView supplyCompanyForm() {
- ModelAndView mav = new ModelAndView();
- // 입점상태
- mav.addObject("supplyStatList", rendererService.getCommonCodeList("G010"));
- // 유통구분
- mav.addObject("distributionGbList", rendererService.getCommonCodeList("G065"));
- // 은행
- mav.addObject("bankList", rendererService.getCommonCodeList("G940"));
- mav.setViewName("business/SupplyCompanyForm");
- return mav;
- }
- /**
- * 공급업체관리 목록
- * @return
- * @author gagamel
- * @since 2020. 10. 14
- */
- @PostMapping("/supply/company/list")
- @ResponseBody
- public Collection<SupplyCompany> getCompanyList(@RequestBody SupplyCompany supplyComp) {
- return businessService.getSupplyCompanyList(supplyComp);
- }
- /**
- * 공급업체관리 저장 처리
- * @param supplyComp - 공급업체 정보
- * @return
- * @author gagamel
- * @since 2020. 10. 14
- */
- @PostMapping("/supply/company/save")
- @ResponseBody
- public GagaResponse saveSupplyInfo(@RequestBody SupplyCompany supplyComp) {
- supplyComp.setRegNo(TsaSession.getInfo().getUserNo());
- supplyComp.setUpdNo(TsaSession.getInfo().getUserNo());
- log.info("supplyComp: {}", supplyComp);
- businessService.saveSupplyCompany(supplyComp);
- return super.ok(message.getMessage("SUCC_0001"));
- }
- }
|