| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package com.uas.eis.controller;
- import com.uas.eis.service.SynaService;
- import io.xlate.edi.schema.EDISchemaException;
- import io.xlate.edi.stream.EDIStreamException;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.ResponseBody;
- import org.springframework.web.bind.annotation.RestController;
- import java.io.IOException;
- import java.util.HashMap;
- import java.util.Map;
- @RestController
- public class ERPController {
- @Autowired
- private SynaService synaService;
- @RequestMapping(value="/erp/sendPurchase")
- @ResponseBody
- public Map<String, Object> sendPurchase(String master,Integer id) throws EDISchemaException, EDIStreamException, IOException {
- return synaService.sendPurchaseToSyna(master,id);
- }
- @RequestMapping(value="/erp/sendPurchaseChange")
- @ResponseBody
- public Map<String, Object> sendPurchaseChange(String master,Integer id) throws EDISchemaException, EDIStreamException, IOException {
- return synaService.sendPurchaseChangeToSyna(master,id);
- }
- @RequestMapping(value="/erp/sendPOS")
- @ResponseBody
- public Map<String, Object> sendPOS(String master,Integer id) throws EDISchemaException, EDIStreamException, IOException {
- return synaService.sendPosToSyna(master,id);
- }
- @RequestMapping(value="/erp/sendINV")
- @ResponseBody
- public Map<String, Object> sendINV(String master,Integer id) throws EDISchemaException, EDIStreamException, IOException {
- return synaService.sendInvToSyna(master,id);
- }
- @RequestMapping(value="/erp/testEIS")
- @ResponseBody
- public Map<String, Object> testEIS(String master,Integer id) throws EDISchemaException, EDIStreamException, IOException {
- Map<String, Object> modelMap = new HashMap<String, Object>();
- modelMap.put("master", master);
- modelMap.put("success", true);
- return modelMap;
- }
- }
|