From 2827b60f19e417cc0d425542e007ba7089b18591 Mon Sep 17 00:00:00 2001 From: guo Date: Fri, 3 Nov 2023 17:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B4=E7=A8=B3=E6=8B=8C=E5=90=88=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HiddenDangerInspectRecordController.java | 3 + .../xml/HiddenDangerInspectRecordMapper.xml | 14 + ...vationMeasurePointThresholdController.java | 2 +- .../StableWaterMixStationDataController.java | 184 ++++++++++ .../StableWaterMixStationDevController.java | 184 ++++++++++ ...leWaterMixStationExceedDataController.java | 184 ++++++++++ .../entity/StableWaterMixStationData.java | 337 ++++++++++++++++++ .../entity/StableWaterMixStationDev.java | 117 ++++++ .../StableWaterMixStationDataMapper.java | 26 ++ .../StableWaterMixStationDevMapper.java | 16 + ...StableWaterMixStationExceedDataMapper.java | 16 + .../xml/StableWaterMixStationDataMapper.xml | 9 + .../xml/StableWaterMixStationDevMapper.xml | 4 + .../StableWaterMixStationExceedDataMapper.xml | 4 + .../IStableWaterMixStationDataService.java | 21 ++ .../IStableWaterMixStationDevService.java | 21 ++ ...tableWaterMixStationExceedDataService.java | 21 ++ .../StableWaterMixStationDataServiceImpl.java | 50 +++ .../StableWaterMixStationDevServiceImpl.java | 50 +++ ...eWaterMixStationExceedDataServiceImpl.java | 50 +++ .../impl/${entityName}ServiceImpl.javai | 1 + 21 files changed, 1313 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationDataController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationDevController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationExceedDataController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/entity/StableWaterMixStationData.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/entity/StableWaterMixStationDev.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationDataMapper.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationDevMapper.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationExceedDataMapper.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationDataMapper.xml create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationDevMapper.xml create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationExceedDataMapper.xml create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationDataService.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationDevService.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationExceedDataService.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationDataServiceImpl.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationDevServiceImpl.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationExceedDataServiceImpl.java diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/HiddenDangerInspectRecordController.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/HiddenDangerInspectRecordController.java index 646c38c9c..a092a8e63 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/HiddenDangerInspectRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/HiddenDangerInspectRecordController.java @@ -293,6 +293,9 @@ public class HiddenDangerInspectRecordController { @ApiOperation(value = "事故隐患等级统计", notes = "事故隐患等级统计", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "type", value = "1近7天,2近30天,3指定开始结束时间", paramType = "body", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "inspectTime_begin", value = "检查开始时间", paramType = "body", required = false, dataType = "String"), + @ApiImplicitParam(name = "inspectTime_end", value = "检查结束时间", paramType = "body", required = false, dataType = "String"), }) @PostMapping(value = "/countFaultLevel") public Result countFaultLevel(@RequestBody Map map) { diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/HiddenDangerInspectRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/HiddenDangerInspectRecordMapper.xml index f0e1d89cc..29e60c165 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/HiddenDangerInspectRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/HiddenDangerInspectRecordMapper.xml @@ -490,6 +490,20 @@ and project_sn = #{projectSn} + + and inspect_time >= date_sub(current_date, interval 7 day) + + + and inspect_time >= date_sub(current_date, interval 30 day) + + + and inspect_time >= #{inspectTime_begin} + + + and inspect_time + if(LENGTH(#{inspectTime_end}) = 10, CONCAT(DATE_FORMAT(#{inspectTime_end}, '%Y-%m-%d'), ' 23:59:59'), + #{inspectTime_end}) + group by fault_level diff --git a/src/main/java/com/zhgd/xmgl/modules/foundation/controller/DeepExcavationMeasurePointThresholdController.java b/src/main/java/com/zhgd/xmgl/modules/foundation/controller/DeepExcavationMeasurePointThresholdController.java index 69dd5a024..14ff3a302 100644 --- a/src/main/java/com/zhgd/xmgl/modules/foundation/controller/DeepExcavationMeasurePointThresholdController.java +++ b/src/main/java/com/zhgd/xmgl/modules/foundation/controller/DeepExcavationMeasurePointThresholdController.java @@ -32,7 +32,7 @@ public class DeepExcavationMeasurePointThresholdController { // @ApiOperation(value = "分页列表查询深基坑-测点警情设置信息", notes = "分页列表查询深基坑-测点警情设置信息", httpMethod = "GET") // @GetMapping(value = "/list") // -// public Result> queryPageList(DeepExcavationMeasurePointThreshold deepExcavationMeasurePointThreshold, +// public Result> queryList(DeepExcavationMeasurePointThreshold deepExcavationMeasurePointThreshold, // @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, // @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, // HttpServletRequest req) { diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationDataController.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationDataController.java new file mode 100644 index 000000000..13490c102 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationDataController.java @@ -0,0 +1,184 @@ +package com.zhgd.xmgl.modules.stablewater.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiImplicitParams; + +import java.util.HashMap; + +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.oConvertUtils; +import org.apache.commons.collections.MapUtils; +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationData; +import com.zhgd.xmgl.modules.stablewater.service.IStableWaterMixStationDataService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; + + +/** + * @Title: Controller + * @Description: 水稳拌合站数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/stableWaterMixStationData") +@Slf4j +@Api(tags = "水稳拌合站数据相关Api") +public class StableWaterMixStationDataController { + @Autowired + private IStableWaterMixStationDataService stableWaterMixStationDataService; + + /** + * 分页列表查询 + * + * @return + */ + @ApiOperation(value = "分页列表查询水稳拌合站数据信息", notes = "分页列表查询水稳拌合站数据信息", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + }) + @GetMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(stableWaterMixStationDataService.queryPageList(paramMap)); + } + + /** + * 列表查询 + * + * @return + */ + @ApiOperation(value = "列表查询水稳拌合站数据信息", notes = "列表查询水稳拌合站数据信息", httpMethod = "GET") + @GetMapping(value = "/list") + public Result> queryList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(stableWaterMixStationDataService.queryList(paramMap)); + } + + /** + * 添加 + * + * @param stableWaterMixStationData + * @return + */ + @ApiOperation(value = "添加水稳拌合站数据信息", notes = "添加水稳拌合站数据信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody StableWaterMixStationData stableWaterMixStationData) { + stableWaterMixStationDataService.save(stableWaterMixStationData); + return Result.ok(); + } + + /** + * 编辑 + * + * @param stableWaterMixStationData + * @return + */ + @ApiOperation(value = "编辑水稳拌合站数据信息", notes = "编辑水稳拌合站数据信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody StableWaterMixStationData stableWaterMixStationData) { + stableWaterMixStationDataService.updateById(stableWaterMixStationData); + return Result.ok(); + } + + /** + * 通过id删除 + * + * @return + */ + @ApiOperation(value = "删除水稳拌合站数据信息", notes = "删除水稳拌合站数据信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "水稳拌合站数据ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") + @PostMapping(value = "/delete") + public Result delete(@ApiIgnore @RequestBody HashMap map) { + String id = MapUtils.getString(map, "id"); + Result result = new Result(); + StableWaterMixStationData stableWaterMixStationData = stableWaterMixStationDataService.getById(id); + if (stableWaterMixStationData == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = stableWaterMixStationDataService.removeById(id); + if (ok) { + result.success("删除成功!"); + } + } + + return result; + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @ApiOperation(value = "通过id查询水稳拌合站数据信息", notes = "通过id查询水稳拌合站数据信息", httpMethod = "GET") + @ApiImplicitParam(name = "id", value = "水稳拌合站数据ID", paramType = "query", required = true, dataType = "Integer") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + Result result = new Result(); + StableWaterMixStationData stableWaterMixStationData = stableWaterMixStationDataService.getById(id); + if (stableWaterMixStationData == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(stableWaterMixStationData); + result.setSuccess(true); + } + return result; + } + + /** + * 导出excel + * + * @param request + * @param response + */ + @ApiOperation(value = "导出excel水稳拌合站数据信息", notes = "导出excel水稳拌合站数据信息", httpMethod = "POST") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { + // Step.1 组装查询条件 + QueryWrapper queryWrapper = null; + try { + String paramsStr = request.getParameter("paramsStr"); + if (oConvertUtils.isNotEmpty(paramsStr)) { + String deString = URLDecoder.decode(paramsStr, "UTF-8"); + StableWaterMixStationData stableWaterMixStationData = JSON.parseObject(deString, StableWaterMixStationData.class); + queryWrapper = QueryGenerator.initQueryWrapper(stableWaterMixStationData, request.getParameterMap()); + } + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + + //Step.2 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + List pageList = stableWaterMixStationDataService.list(queryWrapper); + //导出文件名称 + mv.addObject(NormalExcelConstants.FILE_NAME, "水稳拌合站数据列表"); + mv.addObject(NormalExcelConstants.CLASS, StableWaterMixStationData.class); + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("水稳拌合站数据列表数据", "导出人:Jeecg", "导出信息")); + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); + return mv; + } + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationDevController.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationDevController.java new file mode 100644 index 000000000..33d21c235 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationDevController.java @@ -0,0 +1,184 @@ +package com.zhgd.xmgl.modules.stablewater.controller; + +import com.zhgd.xmgl.modules.stablewater.service.IStableWaterMixStationDevService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiImplicitParams; + +import java.util.HashMap; + +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.oConvertUtils; +import org.apache.commons.collections.MapUtils; +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationDev; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; + + +/** + * @Title: Controller + * @Description: 水稳拌合站设备 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/stableWaterMixStationDev") +@Slf4j +@Api(tags = "水稳拌合站设备相关Api") +public class StableWaterMixStationDevController { + @Autowired + private IStableWaterMixStationDevService stableWaterMixStationDevService; + + /** + * 分页列表查询 + * + * @return + */ + @ApiOperation(value = "分页列表查询水稳拌合站设备信息", notes = "分页列表查询水稳拌合站设备信息", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + }) + @GetMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(stableWaterMixStationDevService.queryPageList(paramMap)); + } + + /** + * 列表查询 + * + * @return + */ + @ApiOperation(value = "列表查询水稳拌合站设备信息", notes = "列表查询水稳拌合站设备信息", httpMethod = "GET") + @GetMapping(value = "/list") + public Result> queryList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(stableWaterMixStationDevService.queryList(paramMap)); + } + + /** + * 添加 + * + * @param stableWaterMixStationDev + * @return + */ + @ApiOperation(value = "添加水稳拌合站设备信息", notes = "添加水稳拌合站设备信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody StableWaterMixStationDev stableWaterMixStationDev) { + stableWaterMixStationDevService.save(stableWaterMixStationDev); + return Result.ok(); + } + + /** + * 编辑 + * + * @param stableWaterMixStationDev + * @return + */ + @ApiOperation(value = "编辑水稳拌合站设备信息", notes = "编辑水稳拌合站设备信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody StableWaterMixStationDev stableWaterMixStationDev) { + stableWaterMixStationDevService.updateById(stableWaterMixStationDev); + return Result.ok(); + } + + /** + * 通过id删除 + * + * @return + */ + @ApiOperation(value = "删除水稳拌合站设备信息", notes = "删除水稳拌合站设备信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "水稳拌合站设备ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") + @PostMapping(value = "/delete") + public Result delete(@ApiIgnore @RequestBody HashMap map) { + String id = MapUtils.getString(map, "id"); + Result result = new Result(); + StableWaterMixStationDev stableWaterMixStationDev = stableWaterMixStationDevService.getById(id); + if (stableWaterMixStationDev == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = stableWaterMixStationDevService.removeById(id); + if (ok) { + result.success("删除成功!"); + } + } + + return result; + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @ApiOperation(value = "通过id查询水稳拌合站设备信息", notes = "通过id查询水稳拌合站设备信息", httpMethod = "GET") + @ApiImplicitParam(name = "id", value = "水稳拌合站设备ID", paramType = "query", required = true, dataType = "Integer") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + Result result = new Result(); + StableWaterMixStationDev stableWaterMixStationDev = stableWaterMixStationDevService.getById(id); + if (stableWaterMixStationDev == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(stableWaterMixStationDev); + result.setSuccess(true); + } + return result; + } + + /** + * 导出excel + * + * @param request + * @param response + */ + @ApiOperation(value = "导出excel水稳拌合站设备信息", notes = "导出excel水稳拌合站设备信息", httpMethod = "POST") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { + // Step.1 组装查询条件 + QueryWrapper queryWrapper = null; + try { + String paramsStr = request.getParameter("paramsStr"); + if (oConvertUtils.isNotEmpty(paramsStr)) { + String deString = URLDecoder.decode(paramsStr, "UTF-8"); + StableWaterMixStationDev stableWaterMixStationDev = JSON.parseObject(deString, StableWaterMixStationDev.class); + queryWrapper = QueryGenerator.initQueryWrapper(stableWaterMixStationDev, request.getParameterMap()); + } + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + + //Step.2 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + List pageList = stableWaterMixStationDevService.list(queryWrapper); + //导出文件名称 + mv.addObject(NormalExcelConstants.FILE_NAME, "水稳拌合站设备列表"); + mv.addObject(NormalExcelConstants.CLASS, StableWaterMixStationDev.class); + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("水稳拌合站设备列表数据", "导出人:Jeecg", "导出信息")); + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); + return mv; + } + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationExceedDataController.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationExceedDataController.java new file mode 100644 index 000000000..90c919b0b --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/controller/StableWaterMixStationExceedDataController.java @@ -0,0 +1,184 @@ +package com.zhgd.xmgl.modules.stablewater.controller; + +import com.zhgd.xmgl.modules.stablewater.service.IStableWaterMixStationExceedDataService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiImplicitParams; + +import java.util.HashMap; + +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.oConvertUtils; +import org.apache.commons.collections.MapUtils; +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationExceedData; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; + + +/** + * @Title: Controller + * @Description: 水稳拌合站超标数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/stableWaterMixStationExceedData") +@Slf4j +@Api(tags = "水稳拌合站超标数据相关Api") +public class StableWaterMixStationExceedDataController { + @Autowired + private IStableWaterMixStationExceedDataService stableWaterMixStationExceedDataService; + + /** + * 分页列表查询 + * + * @return + */ + @ApiOperation(value = "分页列表查询水稳拌合站超标数据信息", notes = "分页列表查询水稳拌合站超标数据信息", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + }) + @GetMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(stableWaterMixStationExceedDataService.queryPageList(paramMap)); + } + + /** + * 列表查询 + * + * @return + */ + @ApiOperation(value = "列表查询水稳拌合站超标数据信息", notes = "列表查询水稳拌合站超标数据信息", httpMethod = "GET") + @GetMapping(value = "/list") + public Result> queryList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(stableWaterMixStationExceedDataService.queryList(paramMap)); + } + + /** + * 添加 + * + * @param stableWaterMixStationExceedData + * @return + */ + @ApiOperation(value = "添加水稳拌合站超标数据信息", notes = "添加水稳拌合站超标数据信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody StableWaterMixStationExceedData stableWaterMixStationExceedData) { + stableWaterMixStationExceedDataService.save(stableWaterMixStationExceedData); + return Result.ok(); + } + + /** + * 编辑 + * + * @param stableWaterMixStationExceedData + * @return + */ + @ApiOperation(value = "编辑水稳拌合站超标数据信息", notes = "编辑水稳拌合站超标数据信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody StableWaterMixStationExceedData stableWaterMixStationExceedData) { + stableWaterMixStationExceedDataService.updateById(stableWaterMixStationExceedData); + return Result.ok(); + } + + /** + * 通过id删除 + * + * @return + */ + @ApiOperation(value = "删除水稳拌合站超标数据信息", notes = "删除水稳拌合站超标数据信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "水稳拌合站超标数据ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") + @PostMapping(value = "/delete") + public Result delete(@ApiIgnore @RequestBody HashMap map) { + String id = MapUtils.getString(map, "id"); + Result result = new Result(); + StableWaterMixStationExceedData stableWaterMixStationExceedData = stableWaterMixStationExceedDataService.getById(id); + if (stableWaterMixStationExceedData == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = stableWaterMixStationExceedDataService.removeById(id); + if (ok) { + result.success("删除成功!"); + } + } + + return result; + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @ApiOperation(value = "通过id查询水稳拌合站超标数据信息", notes = "通过id查询水稳拌合站超标数据信息", httpMethod = "GET") + @ApiImplicitParam(name = "id", value = "水稳拌合站超标数据ID", paramType = "query", required = true, dataType = "Integer") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + Result result = new Result(); + StableWaterMixStationExceedData stableWaterMixStationExceedData = stableWaterMixStationExceedDataService.getById(id); + if (stableWaterMixStationExceedData == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(stableWaterMixStationExceedData); + result.setSuccess(true); + } + return result; + } + + /** + * 导出excel + * + * @param request + * @param response + */ + @ApiOperation(value = "导出excel水稳拌合站超标数据信息", notes = "导出excel水稳拌合站超标数据信息", httpMethod = "POST") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { + // Step.1 组装查询条件 + QueryWrapper queryWrapper = null; + try { + String paramsStr = request.getParameter("paramsStr"); + if (oConvertUtils.isNotEmpty(paramsStr)) { + String deString = URLDecoder.decode(paramsStr, "UTF-8"); + StableWaterMixStationExceedData stableWaterMixStationExceedData = JSON.parseObject(deString, StableWaterMixStationExceedData.class); + queryWrapper = QueryGenerator.initQueryWrapper(stableWaterMixStationExceedData, request.getParameterMap()); + } + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + + //Step.2 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + List pageList = stableWaterMixStationExceedDataService.list(queryWrapper); + //导出文件名称 + mv.addObject(NormalExcelConstants.FILE_NAME, "水稳拌合站超标数据列表"); + mv.addObject(NormalExcelConstants.CLASS, StableWaterMixStationExceedData.class); + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("水稳拌合站超标数据列表数据", "导出人:Jeecg", "导出信息")); + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); + return mv; + } + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/entity/StableWaterMixStationData.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/entity/StableWaterMixStationData.java new file mode 100644 index 000000000..e7fbc498b --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/entity/StableWaterMixStationData.java @@ -0,0 +1,337 @@ +package com.zhgd.xmgl.modules.stablewater.entity; + +import java.io.Serializable; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 水稳拌合站数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@Data +@TableName("stable_water_mix_station_data") +@ApiModel(value = "StableWaterMixStationData实体类", description = "StableWaterMixStationData") +public class StableWaterMixStationData implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键id") + private java.lang.Long id; + /** + * 设备sn + */ + @Excel(name = "设备sn", width = 15) + @ApiModelProperty(value = "设备sn") + private java.lang.String devSn; + /** + * 实际骨料 1(单位 kg) + */ + @Excel(name = "实际骨料 1(单位 kg)", width = 15) + @ApiModelProperty(value = "实际骨料 1(单位 kg)") + private java.lang.String actualAggregate1; + /** + * 实际骨料 2(单位 kg) + */ + @Excel(name = "实际骨料 2(单位 kg)", width = 15) + @ApiModelProperty(value = "实际骨料 2(单位 kg)") + private java.lang.String actualAggregate2; + /** + * 实际骨料 3(单位 kg) + */ + @Excel(name = "实际骨料 3(单位 kg)", width = 15) + @ApiModelProperty(value = "实际骨料 3(单位 kg)") + private java.lang.String actualAggregate3; + /** + * 实际骨料 4(单位 kg) + */ + @Excel(name = "实际骨料 4(单位 kg)", width = 15) + @ApiModelProperty(value = "实际骨料 4(单位 kg)") + private java.lang.String actualAggregate4; + /** + * 实际骨料 5(单位 kg) + */ + @Excel(name = "实际骨料 5(单位 kg)", width = 15) + @ApiModelProperty(value = "实际骨料 5(单位 kg)") + private java.lang.String actualAggregate5; + /** + * 实际粉料 1(单位 kg) + */ + @Excel(name = "实际粉料 1(单位 kg)", width = 15) + @ApiModelProperty(value = "实际粉料 1(单位 kg)") + private java.lang.String actualPowder1; + /** + * 实际粉料 2(单位 kg) + */ + @Excel(name = "实际粉料 2(单位 kg)", width = 15) + @ApiModelProperty(value = "实际粉料 2(单位 kg)") + private java.lang.String actualPowder2; + /** + * 实际水 + */ + @Excel(name = "实际水", width = 15) + @ApiModelProperty(value = "实际水") + private java.lang.String actualWater; + /** + * 开始时间 + */ + @Excel(name = "开始时间", width = 15) + @ApiModelProperty(value = "开始时间") + private java.lang.String startDate; + /** + * 结束时间 + */ + @Excel(name = "结束时间", width = 15) + @ApiModelProperty(value = "结束时间") + private java.lang.String endDate; + /** + * 粗总产量 (单位 kg) + */ + @Excel(name = "粗总产量 (单位 kg)", width = 15) + @ApiModelProperty(value = "粗总产量 (单位 kg)") + private java.lang.String roughTotalOutput; + /** + * 理论骨料 1(单位 kg) + */ + @Excel(name = "理论骨料 1(单位 kg)", width = 15) + @ApiModelProperty(value = "理论骨料 1(单位 kg)") + private java.lang.String theoryAggregate1; + /** + * 理论骨料 2(单位 kg) + */ + @Excel(name = "理论骨料 2(单位 kg)", width = 15) + @ApiModelProperty(value = "理论骨料 2(单位 kg)") + private java.lang.String theoryAggregate2; + /** + * 理论骨料 3(单位 kg) + */ + @Excel(name = "理论骨料 3(单位 kg)", width = 15) + @ApiModelProperty(value = "理论骨料 3(单位 kg)") + private java.lang.String theoryAggregate3; + /** + * 理论骨料 4(单位 kg) + */ + @Excel(name = "理论骨料 4(单位 kg)", width = 15) + @ApiModelProperty(value = "理论骨料 4(单位 kg)") + private java.lang.String theoryAggregate4; + /** + * 理论骨料 5(单位 kg) + */ + @Excel(name = "理论骨料 5(单位 kg)", width = 15) + @ApiModelProperty(value = "理论骨料 5(单位 kg)") + private java.lang.String theoryAggregate5; + /** + * 理论粉料 1(单位 kg) + */ + @Excel(name = "理论粉料 1(单位 kg)", width = 15) + @ApiModelProperty(value = "理论粉料 1(单位 kg)") + private java.lang.String theoryPowder1; + /** + * 理论粉料 2(单位 kg) + */ + @Excel(name = "理论粉料 2(单位 kg)", width = 15) + @ApiModelProperty(value = "理论粉料 2(单位 kg)") + private java.lang.String theoryPowder2; + /** + * 理论水 + */ + @Excel(name = "理论水", width = 15) + @ApiModelProperty(value = "理论水") + private java.lang.String theoryWater; + /** + * 骨料比率 1(单位 kg) + */ + @Excel(name = "骨料比率 1(单位 kg)", width = 15) + @ApiModelProperty(value = "骨料比率 1(单位 kg)") + private java.lang.String aggregateRatio1; + /** + * 骨料比率 2(单位 kg) + */ + @Excel(name = "骨料比率 2(单位 kg)", width = 15) + @ApiModelProperty(value = "骨料比率 2(单位 kg)") + private java.lang.String aggregateRatio2; + /** + * 骨料比率 3(单位 kg) + */ + @Excel(name = "骨料比率 3(单位 kg)", width = 15) + @ApiModelProperty(value = "骨料比率 3(单位 kg)") + private java.lang.String aggregateRatio3; + /** + * 骨料比率 4(单位 kg) + */ + @Excel(name = "骨料比率 4(单位 kg)", width = 15) + @ApiModelProperty(value = "骨料比率 4(单位 kg)") + private java.lang.String aggregateRatio4; + /** + * 骨料比率 5(单位 kg) + */ + @Excel(name = "骨料比率 5(单位 kg)", width = 15) + @ApiModelProperty(value = "骨料比率 5(单位 kg)") + private java.lang.String aggregateRatio5; + /** + * 粉料比率 1(单位 kg) + */ + @Excel(name = "粉料比率 1(单位 kg)", width = 15) + @ApiModelProperty(value = "粉料比率 1(单位 kg)") + private java.lang.String powderRatio1; + /** + * 粉料比率 2(单位 kg) + */ + @Excel(name = "粉料比率 2(单位 kg)", width = 15) + @ApiModelProperty(value = "粉料比率 2(单位 kg)") + private java.lang.String powderRatio2; + /** + * 水比率 (单位 kg) + */ + @Excel(name = "水比率 (单位 kg)", width = 15) + @ApiModelProperty(value = "水比率 (单位 kg)") + private java.lang.String waterRatio; + /** + * 备用 1 + */ + @Excel(name = "备用 1", width = 15) + @ApiModelProperty(value = "备用 1") + private java.lang.String backupField1; + /** + * 备用 2 + */ + @Excel(name = "备用 2", width = 15) + @ApiModelProperty(value = "备用 2") + private java.lang.String backupField2; + /** + * 备用 3 + */ + @Excel(name = "备用 3", width = 15) + @ApiModelProperty(value = "备用 3") + private java.lang.String backupField3; + /** + * 保存时间 + */ + @Excel(name = "保存时间", width = 15) + @ApiModelProperty(value = "保存时间") + private java.lang.String saveDate; + /** + * 采集时间 + */ + @Excel(name = "采集时间", width = 15) + @ApiModelProperty(value = "采集时间") + private java.lang.String gatherDate; + /** + * 是否计算级配 + */ + @Excel(name = "是否计算级配", width = 15) + @ApiModelProperty(value = "是否计算级配") + private java.lang.String isCalculatedGradation; + /** + * 实际骨料 1筛分 + */ + @Excel(name = "实际骨料 1筛分", width = 15) + @ApiModelProperty(value = "实际骨料 1筛分") + private java.lang.String actualAggregateSieving1; + /** + * 实际骨料 2筛分 + */ + @Excel(name = "实际骨料 2筛分", width = 15) + @ApiModelProperty(value = "实际骨料 2筛分") + private java.lang.String actualAggregateSieving2; + /** + * 实际骨料 3筛分 + */ + @Excel(name = "实际骨料 3筛分", width = 15) + @ApiModelProperty(value = "实际骨料 3筛分") + private java.lang.String actualAggregateSieving3; + /** + * 实际骨料 4筛分 + */ + @Excel(name = "实际骨料 4筛分", width = 15) + @ApiModelProperty(value = "实际骨料 4筛分") + private java.lang.String actualAggregateSieving4; + /** + * 实际骨料 5筛分 + */ + @Excel(name = "实际骨料 5筛分", width = 15) + @ApiModelProperty(value = "实际骨料 5筛分") + private java.lang.String actualAggregateSieving5; + /** + * 实际粉料 1筛分 + */ + @Excel(name = "实际粉料 1筛分", width = 15) + @ApiModelProperty(value = "实际粉料 1筛分") + private java.lang.String actualPowderSieving1; + /** + * 实际粉料 2筛分 + */ + @Excel(name = "实际粉料 2筛分", width = 15) + @ApiModelProperty(value = "实际粉料 2筛分") + private java.lang.String actualPowderSieving2; + /** + * 配方号 + */ + @Excel(name = "配方号", width = 15) + @ApiModelProperty(value = "配方号") + private java.lang.String recipeCode; + /** + * 配方名称 + */ + @Excel(name = "配方名称", width = 15) + @ApiModelProperty(value = "配方名称") + private java.lang.String recipeName; + /** + * 水泥品种 (生产数据唯一码 ) + */ + @Excel(name = "水泥品种 (生产数据唯一码 )", width = 15) + @ApiModelProperty(value = "水泥品种 (生产数据唯一码 )") + private java.lang.String ukey; + /** + * 实际骨料 6(单位 kg) + */ + @Excel(name = "实际骨料 6(单位 kg)", width = 15) + @ApiModelProperty(value = "实际骨料 6(单位 kg)") + private java.lang.String actualAggregate6; + /** + * 理论骨料 6(单位 kg) + */ + @Excel(name = "理论骨料 6(单位 kg)", width = 15) + @ApiModelProperty(value = "理论骨料 6(单位 kg)") + private java.lang.String theoryAggregate6; + /** + * 骨料比率 6(单位 kg) + */ + @Excel(name = "骨料比率 6(单位 kg)", width = 15) + @ApiModelProperty(value = "骨料比率 6(单位 kg)") + private java.lang.String aggregateRatio6; + /** + * 项目sn + */ + @Excel(name = "项目sn", width = 15) + @ApiModelProperty(value = "项目sn") + private java.lang.String projectSn; + /** + * 创建时间 yyyy-MM-dd HH:mm:ss + */ + @Excel(name = "创建时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date createDate; + /** + * 更新时间 yyyy-MM-dd HH:mm:ss + */ + @Excel(name = "更新时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date updateDate; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/entity/StableWaterMixStationDev.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/entity/StableWaterMixStationDev.java new file mode 100644 index 000000000..cc8f3b45b --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/entity/StableWaterMixStationDev.java @@ -0,0 +1,117 @@ +package com.zhgd.xmgl.modules.stablewater.entity; + +import java.io.Serializable; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 水稳拌合站设备 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@Data +@TableName("stable_water_mix_station_dev") +@ApiModel(value = "StableWaterMixStationDev实体类", description = "StableWaterMixStationDev") +public class StableWaterMixStationDev implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键id") + private java.lang.Long id; + /** + * 设备sn + */ + @Excel(name = "设备sn", width = 15) + @ApiModelProperty(value = "设备sn") + private java.lang.String devSn; + /** + * 设备名称 + */ + @Excel(name = "设备名称", width = 15) + @ApiModelProperty(value = "设备名称") + private java.lang.String devName; + /** + * 备注 + */ + @Excel(name = "备注", width = 15) + @ApiModelProperty(value = "备注") + private java.lang.String remark; + /** + * 图片 + */ + @Excel(name = "图片", width = 15) + @ApiModelProperty(value = "图片") + private java.lang.Object image; + /** + * 上传时间 + */ + @Excel(name = "上传时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "上传时间") + private java.util.Date uploadDate; + /** + * 所属拌合站 + */ + @Excel(name = "所属拌合站", width = 15) + @ApiModelProperty(value = "所属拌合站") + private java.lang.String belongingMixingStation; + /** + * 拌合站型号 + */ + @Excel(name = "拌合站型号", width = 15) + @ApiModelProperty(value = "拌合站型号") + private java.lang.String mixingPlantModel; + /** + * 拌合站位置 + */ + @Excel(name = "拌合站位置", width = 15) + @ApiModelProperty(value = "拌合站位置") + private java.lang.String mixingStationLocation; + /** + * 负责人 + */ + @Excel(name = "负责人", width = 15) + @ApiModelProperty(value = "负责人") + private java.lang.String personInCharge; + /** + * 负责人电话 + */ + @Excel(name = "负责人电话", width = 15) + @ApiModelProperty(value = "负责人电话") + private java.lang.String phoneNumber; + /** + * 项目sn + */ + @Excel(name = "项目sn", width = 15) + @ApiModelProperty(value = "项目sn") + private java.lang.String projectSn; + /** + * 创建时间 yyyy-MM-dd HH:mm:ss + */ + @Excel(name = "创建时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date createDate; + /** + * 更新时间 yyyy-MM-dd HH:mm:ss + */ + @Excel(name = "更新时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date updateDate; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationDataMapper.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationDataMapper.java new file mode 100644 index 000000000..6fabead7f --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationDataMapper.java @@ -0,0 +1,26 @@ +package com.zhgd.xmgl.modules.stablewater.mapper; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationData; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Description: 水稳拌合站数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@Mapper +public interface StableWaterMixStationDataMapper extends BaseMapper { + + IPage queryList(Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + + List queryList(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationDevMapper.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationDevMapper.java new file mode 100644 index 000000000..45e33edf5 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationDevMapper.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.stablewater.mapper; + +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationDev; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 水稳拌合站设备 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@Mapper +public interface StableWaterMixStationDevMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationExceedDataMapper.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationExceedDataMapper.java new file mode 100644 index 000000000..c46979dad --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/StableWaterMixStationExceedDataMapper.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.stablewater.mapper; + +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationExceedData; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 水稳拌合站超标数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@Mapper +public interface StableWaterMixStationExceedDataMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationDataMapper.xml b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationDataMapper.xml new file mode 100644 index 000000000..cba08526a --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationDataMapper.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationDevMapper.xml b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationDevMapper.xml new file mode 100644 index 000000000..f51b92149 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationDevMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationExceedDataMapper.xml b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationExceedDataMapper.xml new file mode 100644 index 000000000..12b0ea820 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/mapper/xml/StableWaterMixStationExceedDataMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationDataService.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationDataService.java new file mode 100644 index 000000000..c4f24fa7f --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationDataService.java @@ -0,0 +1,21 @@ +package com.zhgd.xmgl.modules.stablewater.service; + +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationData; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.HashMap; +import java.util.List; + +/** + * @Description: 水稳拌合站数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +public interface IStableWaterMixStationDataService extends IService { + + IPage queryPageList(HashMap paramMap); + + List queryList(HashMap paramMap); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationDevService.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationDevService.java new file mode 100644 index 000000000..c4fd0a09c --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationDevService.java @@ -0,0 +1,21 @@ +package com.zhgd.xmgl.modules.stablewater.service; + +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationDev; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.HashMap; +import java.util.List; + +/** + * @Description: 水稳拌合站设备 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +public interface IStableWaterMixStationDevService extends IService { + + IPage queryPageList(HashMap paramMap); + + List queryList(HashMap paramMap); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationExceedDataService.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationExceedDataService.java new file mode 100644 index 000000000..136cdfb3b --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/IStableWaterMixStationExceedDataService.java @@ -0,0 +1,21 @@ +package com.zhgd.xmgl.modules.stablewater.service; + +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationExceedData; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.HashMap; +import java.util.List; + +/** + * @Description: 水稳拌合站超标数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +public interface IStableWaterMixStationExceedDataService extends IService { + + IPage queryPageList(HashMap paramMap); + + List queryList(HashMap paramMap); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationDataServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationDataServiceImpl.java new file mode 100644 index 000000000..f548829c0 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationDataServiceImpl.java @@ -0,0 +1,50 @@ +package com.zhgd.xmgl.modules.stablewater.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationData; +import com.zhgd.xmgl.modules.stablewater.mapper.StableWaterMixStationDataMapper; +import com.zhgd.xmgl.modules.stablewater.service.IStableWaterMixStationDataService; +import com.zhgd.xmgl.util.PageUtil; +import com.zhgd.xmgl.util.RefUtil; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; + +/** + * @Description: 水稳拌合站数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@Service +public class StableWaterMixStationDataServiceImpl extends ServiceImpl implements IStableWaterMixStationDataService { + @Override + public IPage queryPageList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + Page page = PageUtil.getPage(paramMap); + IPage pageList = baseMapper.queryList(page, queryWrapper); + pageList.setRecords(dealList(pageList.getRecords())); + return pageList; + } + + @Override + public List queryList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + return dealList(baseMapper.queryList(queryWrapper)); + } + + private QueryWrapper getQueryWrapper(HashMap paramMap) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(StableWaterMixStationData.class, paramMap, "data."); + queryWrapper.orderByDesc("data." + RefUtil.fieldNameUlc(StableWaterMixStationData::getId)); + return queryWrapper; + } + + private List dealList(List list) { + return list; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationDevServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationDevServiceImpl.java new file mode 100644 index 000000000..073f82e71 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationDevServiceImpl.java @@ -0,0 +1,50 @@ +package com.zhgd.xmgl.modules.stablewater.service.impl; + +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationDev; +import com.zhgd.xmgl.modules.stablewater.mapper.StableWaterMixStationDevMapper; +import com.zhgd.xmgl.modules.stablewater.service.IStableWaterMixStationDevService; +import com.zhgd.xmgl.util.RefUtil; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.util.PageUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.HashMap; +import java.util.List; + +/** + * @Description: 水稳拌合站设备 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@Service +public class StableWaterMixStationDevServiceImpl extends ServiceImpl implements IStableWaterMixStationDevService { + @Override + public IPage queryPageList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + Page page = PageUtil.getPage(paramMap); + IPage pageList = this.page(page, queryWrapper); + pageList.setRecords(dealList(pageList.getRecords())); + return pageList; + } + + @Override + public List queryList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + return dealList(this.list(queryWrapper)); + } + + private QueryWrapper getQueryWrapper(HashMap paramMap) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(StableWaterMixStationDev.class, paramMap); + queryWrapper.orderByDesc(RefUtil.fieldNameUlc(StableWaterMixStationDev::getId)); + return queryWrapper; + } + + private List dealList(List list) { + return list; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationExceedDataServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationExceedDataServiceImpl.java new file mode 100644 index 000000000..2bfb8db11 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/stablewater/service/impl/StableWaterMixStationExceedDataServiceImpl.java @@ -0,0 +1,50 @@ +package com.zhgd.xmgl.modules.stablewater.service.impl; + +import com.zhgd.xmgl.modules.stablewater.entity.StableWaterMixStationExceedData; +import com.zhgd.xmgl.modules.stablewater.mapper.StableWaterMixStationExceedDataMapper; +import com.zhgd.xmgl.modules.stablewater.service.IStableWaterMixStationExceedDataService; +import com.zhgd.xmgl.util.RefUtil; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.util.PageUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.HashMap; +import java.util.List; + +/** + * @Description: 水稳拌合站超标数据 + * @author: pds + * @date: 2023-11-03 + * @version: V1.0 + */ +@Service +public class StableWaterMixStationExceedDataServiceImpl extends ServiceImpl implements IStableWaterMixStationExceedDataService { + @Override + public IPage queryPageList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + Page page = PageUtil.getPage(paramMap); + IPage pageList = this.page(page, queryWrapper); + pageList.setRecords(dealList(pageList.getRecords())); + return pageList; + } + + @Override + public List queryList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + return dealList(this.list(queryWrapper)); + } + + private QueryWrapper getQueryWrapper(HashMap paramMap) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(StableWaterMixStationExceedData.class, paramMap); + queryWrapper.orderByDesc(RefUtil.fieldNameUlc(StableWaterMixStationExceedData::getId)); + return queryWrapper; + } + + private List dealList(List list) { + return list; + } +} diff --git a/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai b/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai index 9149a169b..a819bd05a 100644 --- a/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai +++ b/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai @@ -12,6 +12,7 @@ import com.zhgd.xmgl.util.PageUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import java.util.HashMap; import java.util.List; +import com.zhgd.xmgl.util.RefUtil; /** * @Description: ${tableVo.ftlDescription}