策略配置-策略详情信息

This commit is contained in:
2025-07-11 19:47:15 +08:00
parent 84757ab358
commit 3b55f3d053
19 changed files with 1731 additions and 1 deletions

View File

@ -0,0 +1,102 @@
package com.xzzn.web.controller.ems;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xzzn.common.annotation.Log;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.enums.BusinessType;
import com.xzzn.ems.domain.EmsStrategyCurve;
import com.xzzn.ems.service.IEmsStrategyCurveService;
import com.xzzn.common.utils.poi.ExcelUtil;
import com.xzzn.common.core.page.TableDataInfo;
/**
* 策曲线Controller
*
* @author xzzn
* @date 2025-07-11
*/
@RestController
@RequestMapping("/strategy/curve")
public class EmsStrategyCurveController extends BaseController
{
@Autowired
private IEmsStrategyCurveService emsStrategyCurveService;
/**
* 查询策曲线列表
*/
@PreAuthorize("@ss.hasPermi('system:curve:list')")
@GetMapping("/list")
public AjaxResult list(EmsStrategyCurve emsStrategyCurve)
{
return success(emsStrategyCurveService.selectEmsStrategyCurveList(emsStrategyCurve));
}
/**
* 导出策曲线列表
*/
@PreAuthorize("@ss.hasPermi('system:curve:export')")
@Log(title = "策曲线", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmsStrategyCurve emsStrategyCurve)
{
List<EmsStrategyCurve> list = emsStrategyCurveService.selectEmsStrategyCurveList(emsStrategyCurve);
ExcelUtil<EmsStrategyCurve> util = new ExcelUtil<EmsStrategyCurve>(EmsStrategyCurve.class);
util.exportExcel(response, list, "策曲线数据");
}
/**
* 获取策曲线详细信息
*/
@PreAuthorize("@ss.hasPermi('system:curve:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(emsStrategyCurveService.selectEmsStrategyCurveById(id));
}
/**
* 新增策曲线
*/
@PreAuthorize("@ss.hasPermi('system:curve:add')")
@Log(title = "策曲线", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmsStrategyCurve emsStrategyCurve)
{
return toAjax(emsStrategyCurveService.insertEmsStrategyCurve(emsStrategyCurve));
}
/**
* 修改策曲线
*/
@PreAuthorize("@ss.hasPermi('system:curve:edit')")
@Log(title = "策曲线", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmsStrategyCurve emsStrategyCurve)
{
return toAjax(emsStrategyCurveService.updateEmsStrategyCurve(emsStrategyCurve));
}
/**
* 删除策曲线
*/
@PreAuthorize("@ss.hasPermi('system:curve:remove')")
@Log(title = "策曲线", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emsStrategyCurveService.deleteEmsStrategyCurveByIds(ids));
}
}

View File

@ -0,0 +1,110 @@
package com.xzzn.web.controller.ems;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xzzn.common.annotation.Log;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.enums.BusinessType;
import com.xzzn.ems.domain.EmsStrategyTemp;
import com.xzzn.ems.service.IEmsStrategyTempService;
import com.xzzn.common.utils.poi.ExcelUtil;
/**
* 模板Controller
*
* @author xzzn
* @date 2025-07-11
*/
@RestController
@RequestMapping("/strategy/temp")
public class EmsStrategyTempController extends BaseController
{
@Autowired
private IEmsStrategyTempService emsStrategyTempService;
/**
* 查询模板列表
*/
@PreAuthorize("@ss.hasPermi('system:temp:list')")
@GetMapping("/list")
public AjaxResult list(EmsStrategyTemp emsStrategyTemp)
{
return success(emsStrategyTempService.selectEmsStrategyTempList(emsStrategyTemp));
}
/**
* 导出模板列表
*/
@PreAuthorize("@ss.hasPermi('system:temp:export')")
@Log(title = "模板", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmsStrategyTemp emsStrategyTemp)
{
List<EmsStrategyTemp> list = emsStrategyTempService.selectEmsStrategyTempList(emsStrategyTemp);
ExcelUtil<EmsStrategyTemp> util = new ExcelUtil<EmsStrategyTemp>(EmsStrategyTemp.class);
util.exportExcel(response, list, "模板数据");
}
/**
* 获取模板详细信息
*/
@PreAuthorize("@ss.hasPermi('system:temp:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(emsStrategyTempService.selectEmsStrategyTempById(id));
}
/**
* 新增模板
*/
@PreAuthorize("@ss.hasPermi('system:temp:add')")
@Log(title = "模板", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmsStrategyTemp emsStrategyTemp)
{
return toAjax(emsStrategyTempService.insertEmsStrategyTemp(emsStrategyTemp));
}
/**
* 修改模板
*/
@PreAuthorize("@ss.hasPermi('system:temp:edit')")
@Log(title = "模板", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmsStrategyTemp emsStrategyTemp)
{
return toAjax(emsStrategyTempService.updateEmsStrategyTemp(emsStrategyTemp));
}
/**
* 删除模板
*/
@PreAuthorize("@ss.hasPermi('system:temp:remove')")
@Log(title = "模板", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emsStrategyTempService.deleteEmsStrategyTempByIds(ids));
}
/**
* 根据策略id站点id获取所有模板名称
*/
@GetMapping("/getTempNameList")
public AjaxResult getTempNameList(Long strategyId, String siteId)
{
return success(emsStrategyTempService.getTempNameList(strategyId, siteId));
}
}

View File

@ -0,0 +1,101 @@
package com.xzzn.web.controller.ems;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xzzn.common.annotation.Log;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.enums.BusinessType;
import com.xzzn.ems.domain.EmsStrategyTimeConfig;
import com.xzzn.ems.service.IEmsStrategyTimeConfigService;
import com.xzzn.common.utils.poi.ExcelUtil;
/**
* 时间配置Controller
*
* @author xzzn
* @date 2025-07-11
*/
@RestController
@RequestMapping("/strategy/timeConfig")
public class EmsStrategyTimeConfigController extends BaseController
{
@Autowired
private IEmsStrategyTimeConfigService emsStrategyTimeConfigService;
/**
* 查询时间配置列表
*/
@PreAuthorize("@ss.hasPermi('system:config:list')")
@GetMapping("/list")
public AjaxResult list(EmsStrategyTimeConfig emsStrategyTimeConfig)
{
return success(emsStrategyTimeConfigService.selectEmsStrategyTimeConfigList(emsStrategyTimeConfig));
}
/**
* 导出时间配置列表
*/
@PreAuthorize("@ss.hasPermi('system:config:export')")
@Log(title = "时间配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmsStrategyTimeConfig emsStrategyTimeConfig)
{
List<EmsStrategyTimeConfig> list = emsStrategyTimeConfigService.selectEmsStrategyTimeConfigList(emsStrategyTimeConfig);
ExcelUtil<EmsStrategyTimeConfig> util = new ExcelUtil<EmsStrategyTimeConfig>(EmsStrategyTimeConfig.class);
util.exportExcel(response, list, "时间配置数据");
}
/**
* 获取时间配置详细信息
*/
@PreAuthorize("@ss.hasPermi('system:config:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(emsStrategyTimeConfigService.selectEmsStrategyTimeConfigById(id));
}
/**
* 新增时间配置
*/
@PreAuthorize("@ss.hasPermi('system:config:add')")
@Log(title = "时间配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmsStrategyTimeConfig emsStrategyTimeConfig)
{
return toAjax(emsStrategyTimeConfigService.insertEmsStrategyTimeConfig(emsStrategyTimeConfig));
}
/**
* 修改时间配置
*/
@PreAuthorize("@ss.hasPermi('system:config:edit')")
@Log(title = "时间配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmsStrategyTimeConfig emsStrategyTimeConfig)
{
return toAjax(emsStrategyTimeConfigService.updateEmsStrategyTimeConfig(emsStrategyTimeConfig));
}
/**
* 删除时间配置
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "时间配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emsStrategyTimeConfigService.deleteEmsStrategyTimeConfigByIds(ids));
}
}

View File

@ -112,6 +112,6 @@ public class EmsTicketController extends BaseController
@PostMapping("/drop")
public AjaxResult drop(@RequestBody EmsTicket emsTicket)
{
return toAjax(emsTicketService.dropEmsTicketById(emsTicket.getTicketNo()));
return toAjax(emsTicketService.dropEmsTicketById(emsTicket.getId()));
}
}