无关风月
2 天以前 ee7af3674e44001aafbe24bcf10f87ef2344a84f
ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSpecialAreaBillingController.java
@@ -24,6 +24,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -62,6 +63,8 @@
     */
    @RequestMapping("/add")
    public String add(Model model) {
        SpecialAreaBilling specialAreaBilling = new SpecialAreaBilling();
        model.addAttribute("data",specialAreaBilling);
        return PREFIX + "specialAreaBilling_add.html";
    }
    /**
@@ -97,6 +100,9 @@
    @RequestMapping(value = "/addSpecialAreaBilling")
    @ResponseBody
    public Object addSpecialAreaBilling(String areaName,String priceCoefficient,String remark,Integer state,String coordinate) {
        if(!StringUtils.hasLength(coordinate)){
            return ResultUtil. error("特殊区域不能为空");
        }
        SpecialAreaBilling specialAreaBilling = new SpecialAreaBilling();
        specialAreaBilling.setAreaName(areaName);
        specialAreaBilling.setPriceCoefficient(Double.parseDouble(priceCoefficient));
@@ -110,6 +116,9 @@
    @RequestMapping(value = "/editSpecialAreaBilling")
    @ResponseBody
    public Object editSpecialAreaBilling(Integer id,String areaName,String priceCoefficient,String remark,Integer state,String coordinate) {
        if(!StringUtils.hasLength(coordinate)){
            return ResultUtil. error("特殊区域不能为空");
        }
        SpecialAreaBilling specialAreaBilling = specialAreaBillingService.selectById(id);
        specialAreaBilling.setAreaName(areaName);
        specialAreaBilling.setPriceCoefficient(Double.parseDouble(priceCoefficient));