|
@@ -9,6 +9,9 @@ import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import org.apache.ibatis.mapping.ParameterMap;
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
@@ -20,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
+import org.jeecg.modules.system.entity.SysUser;
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
@@ -37,12 +41,12 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
|
|
|
/**
|
|
|
- * @Description: tpm_equipment_onoff_section
|
|
|
+ * @Description: 设备运行情况
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2024-02-16
|
|
|
* @Version: V1.0
|
|
|
*/
|
|
|
-@Api(tags="tpm_equipment_onoff_section")
|
|
|
+@Api(tags="设备运行情况")
|
|
|
@RestController
|
|
|
@RequestMapping("/equipmentOnoffSection/equipmentOnoffSection")
|
|
|
@Slf4j
|
|
@@ -59,8 +63,8 @@ public class EquipmentOnoffSectionController extends JeecgController<EquipmentOn
|
|
|
* @param req
|
|
|
* @return
|
|
|
*/
|
|
|
- //@AutoLog(value = "tpm_equipment_onoff_section-分页列表查询")
|
|
|
- @ApiOperation(value="tpm_equipment_onoff_section-分页列表查询", notes="tpm_equipment_onoff_section-分页列表查询")
|
|
|
+ //@AutoLog(value = "设备运行情况-分页列表查询")
|
|
|
+ @ApiOperation(value="设备运行情况-分页列表查询", notes="设备运行情况-分页列表查询")
|
|
|
@GetMapping(value = "/list")
|
|
|
public Result<IPage<EquipmentOnoffSection>> queryPageList(EquipmentOnoffSection equipmentOnoffSection,
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
@@ -78,8 +82,8 @@ public class EquipmentOnoffSectionController extends JeecgController<EquipmentOn
|
|
|
* @param equipmentOnoffSection
|
|
|
* @return
|
|
|
*/
|
|
|
- @AutoLog(value = "tpm_equipment_onoff_section-添加")
|
|
|
- @ApiOperation(value="tpm_equipment_onoff_section-添加", notes="tpm_equipment_onoff_section-添加")
|
|
|
+ @AutoLog(value = "设备运行情况-添加")
|
|
|
+ @ApiOperation(value="设备运行情况-添加", notes="设备运行情况-添加")
|
|
|
//@RequiresPermissions("org.jeecg.modules:tpm_equipment_onoff_section:add")
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<String> add(@RequestBody EquipmentOnoffSection equipmentOnoffSection) {
|
|
@@ -93,8 +97,8 @@ public class EquipmentOnoffSectionController extends JeecgController<EquipmentOn
|
|
|
* @param equipmentOnoffSection
|
|
|
* @return
|
|
|
*/
|
|
|
- @AutoLog(value = "tpm_equipment_onoff_section-编辑")
|
|
|
- @ApiOperation(value="tpm_equipment_onoff_section-编辑", notes="tpm_equipment_onoff_section-编辑")
|
|
|
+ @AutoLog(value = "设备运行情况-编辑")
|
|
|
+ @ApiOperation(value="设备运行情况-编辑", notes="设备运行情况-编辑")
|
|
|
//@RequiresPermissions("org.jeecg.modules:tpm_equipment_onoff_section:edit")
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
|
public Result<String> edit(@RequestBody EquipmentOnoffSection equipmentOnoffSection) {
|
|
@@ -108,8 +112,8 @@ public class EquipmentOnoffSectionController extends JeecgController<EquipmentOn
|
|
|
* @param id
|
|
|
* @return
|
|
|
*/
|
|
|
- @AutoLog(value = "tpm_equipment_onoff_section-通过id删除")
|
|
|
- @ApiOperation(value="tpm_equipment_onoff_section-通过id删除", notes="tpm_equipment_onoff_section-通过id删除")
|
|
|
+ @AutoLog(value = "设备运行情况-通过id删除")
|
|
|
+ @ApiOperation(value="设备运行情况-通过id删除", notes="设备运行情况-通过id删除")
|
|
|
//@RequiresPermissions("org.jeecg.modules:tpm_equipment_onoff_section:delete")
|
|
|
@DeleteMapping(value = "/delete")
|
|
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
|
@@ -123,8 +127,8 @@ public class EquipmentOnoffSectionController extends JeecgController<EquipmentOn
|
|
|
* @param ids
|
|
|
* @return
|
|
|
*/
|
|
|
- @AutoLog(value = "tpm_equipment_onoff_section-批量删除")
|
|
|
- @ApiOperation(value="tpm_equipment_onoff_section-批量删除", notes="tpm_equipment_onoff_section-批量删除")
|
|
|
+ @AutoLog(value = "设备运行情况-批量删除")
|
|
|
+ @ApiOperation(value="设备运行情况-批量删除", notes="设备运行情况-批量删除")
|
|
|
//@RequiresPermissions("org.jeecg.modules:tpm_equipment_onoff_section:deleteBatch")
|
|
|
@DeleteMapping(value = "/deleteBatch")
|
|
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
@@ -138,8 +142,8 @@ public class EquipmentOnoffSectionController extends JeecgController<EquipmentOn
|
|
|
* @param id
|
|
|
* @return
|
|
|
*/
|
|
|
- //@AutoLog(value = "tpm_equipment_onoff_section-通过id查询")
|
|
|
- @ApiOperation(value="tpm_equipment_onoff_section-通过id查询", notes="tpm_equipment_onoff_section-通过id查询")
|
|
|
+ //@AutoLog(value = "设备运行情况-通过id查询")
|
|
|
+ @ApiOperation(value="设备运行情况-通过id查询", notes="设备运行情况-通过id查询")
|
|
|
@GetMapping(value = "/queryById")
|
|
|
public Result<EquipmentOnoffSection> queryById(@RequestParam(name="id",required=true) String id) {
|
|
|
EquipmentOnoffSection equipmentOnoffSection = equipmentOnoffSectionService.getById(id);
|
|
@@ -174,4 +178,31 @@ public class EquipmentOnoffSectionController extends JeecgController<EquipmentOn
|
|
|
return super.importExcel(request, response, EquipmentOnoffSection.class);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取设备运行时间段信息(状态横向)
|
|
|
+ */
|
|
|
+// @RequiresPermissions("@ss.hasPermi('tpm:tpmequipmentonoffsection:list')")
|
|
|
+ @GetMapping("/listtransverse")
|
|
|
+ public Result<IPage<EquipmentOnoffSection>> listtransverse(EquipmentOnoffSection equipmentOnoffSection,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ HttpServletRequest req) {
|
|
|
+ java.util.Map<java.lang.String,java.lang.String[]> params = req.getParameterMap();
|
|
|
+ Page<EquipmentOnoffSection> page = new Page<EquipmentOnoffSection>(pageNo, pageSize);
|
|
|
+
|
|
|
+ IPage<EquipmentOnoffSection> pageList = equipmentOnoffSectionService.selectOnoffTransverseList(page, params.get("equipmentid")[0], params.get("day_begin")[0], params.get("day_end")[0]);
|
|
|
+ return Result.OK(pageList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取设备运行时间段信息(状态横向)
|
|
|
+ */
|
|
|
+// @RequiresPermissions("@ss.hasPermi('tpm:tpmequipmentonoffsection:list')")
|
|
|
+ @GetMapping("/gettransverse")
|
|
|
+ public Result getTransverse(EquipmentOnoffSection equipmentOnoffSection, HttpServletRequest req) {
|
|
|
+ java.util.Map<java.lang.String,java.lang.String[]> params = req.getParameterMap();
|
|
|
+ List<EquipmentOnoffSection> list = equipmentOnoffSectionService.selectOnoffTransverse(params.get("day_begin")[0], params.get("day_end")[0]);
|
|
|
+ return Result.OK(list);
|
|
|
+ }
|
|
|
}
|