CreateftlxController.java 2.0 KB
package com.sunyo.wlpt.message.builder.controller;

import com.sunyo.wlpt.message.builder.service.MT1201Service;
import com.sunyo.wlpt.message.builder.service.MT3201Service;
import com.sunyo.wlpt.message.builder.service.MT4201Service;
import com.sunyo.wlpt.message.builder.service.MT520XService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/mtcreate")
public class CreateftlxController {

    @Autowired
    MT520XService mt520XService;

    @Autowired
    MT1201Service mt1201Service;

    @Autowired
    MT3201Service mt3201Service;

    @Autowired
    MT4201Service mt4201Service;

    /**
     * 进出港理货
     * @param map
     * @return
     */
    @RequestMapping("/520xcreate")
    public Boolean create(@RequestBody Map<String, Object> map){

        try {

            return mt520XService.create(map);

        }catch (Exception e){
            e.printStackTrace();
            return false;
        }

    }

    /**
     * 原始 FFm
     * @param map
     * @return
     */
    @RequestMapping("/1201create")
    public Boolean ffmcreate(@RequestBody Map<String, Object> map){

        try {

            return true;
        }catch (Exception e){
            e.printStackTrace();
            return false;
        }
    }

    @RequestMapping("/3201create")
    public Boolean fohcreate(@RequestBody Map<String, Object> map){

        try {

            return mt3201Service.fohcreate(map);
        }catch (Exception e){
            e.printStackTrace();
            return false;
        }

    }

    @RequestMapping("/4201create")
    public Boolean pffmcreate(@RequestBody Map<String, Object> map){

        try {

            return mt4201Service.pffmcreate(map);
        }catch (Exception e){
            e.printStackTrace();
            return false;
        }

    }

}