package org.jeecg.modules.warning.controller;

import org.jeecg.modules.warning.mapper.GingerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.*;

@RestController
@RequestMapping("/ginger")
public class GingerController {

    @Autowired
    private GingerMapper gingerMapper;

    @PostMapping(value = "/newParameterWarning")
    public List<Map<Object, Object>> newParameterWarning(@RequestBody HashMap<String, Object> params) {
        System.out.println("接收的井号数据:"+params.get("jhs").toString());
        String jhs= (String) params.get("jhs");
        List<String> jhList =new ArrayList<>();
        if(!"".equals(jhs)){
            String[] split = jhs.split(",");
            jhList.addAll(Arrays.asList(split));
        }
        params.put("jhs",jhList);
        return gingerMapper.newParameterWarning(params);
    }

}
