自测问题修改
This commit is contained in:
parent
9732ebeaa9
commit
4ab67cfd6a
|
|
@ -107,6 +107,16 @@ public class BusinessConstants {
|
||||||
*/
|
*/
|
||||||
public final static String WD_CODE = "温度";
|
public final static String WD_CODE = "温度";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前记录起始索引
|
||||||
|
*/
|
||||||
|
public static final String PAGE_NUM = "pageNum";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每页显示记录数
|
||||||
|
*/
|
||||||
|
public static final String PAGE_SIZE = "pageSize";
|
||||||
|
|
||||||
public final static Integer CELL_1 = 1;
|
public final static Integer CELL_1 = 1;
|
||||||
public final static Integer CELL_2 = 2;
|
public final static Integer CELL_2 = 2;
|
||||||
public final static Integer CELL_3 = 3;
|
public final static Integer CELL_3 = 3;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
package com.bonus.app.controller;
|
package com.bonus.app.controller;
|
||||||
|
|
||||||
import com.bonus.app.service.IAppEquipmentReqService;
|
import com.bonus.app.service.IAppEquipmentReqService;
|
||||||
|
import com.bonus.common.core.constant.BusinessConstants;
|
||||||
|
import com.bonus.common.core.text.Convert;
|
||||||
|
import com.bonus.common.core.utils.ServletUtils;
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.core.web.page.TableDataInfo;
|
import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
|
|
@ -10,6 +13,8 @@ import com.bonus.common.entity.bracelet.vo.EquipmentReqDataVo;
|
||||||
import com.bonus.common.entity.bracelet.vo.EquipmentReqVo;
|
import com.bonus.common.entity.bracelet.vo.EquipmentReqVo;
|
||||||
import com.bonus.common.log.annotation.SysLog;
|
import com.bonus.common.log.annotation.SysLog;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -35,10 +40,12 @@ public class AppEquipmentReqController extends BaseController {
|
||||||
// @RequiresPermissions("app:equipmentReq:list")
|
// @RequiresPermissions("app:equipmentReq:list")
|
||||||
@GetMapping("list")
|
@GetMapping("list")
|
||||||
@SysLog(title = "设备领用", businessType = OperaType.QUERY,logType = 0,module = "设备领用->设备领用列表",details ="查询设备领用列表")
|
@SysLog(title = "设备领用", businessType = OperaType.QUERY,logType = 0,module = "设备领用->设备领用列表",details ="查询设备领用列表")
|
||||||
public TableDataInfo list(AppParamsDto dto) {
|
public AjaxResult list(AppParamsDto dto) {
|
||||||
startPage();
|
Integer pageNum = Convert.toInt(ServletUtils.getParameter(BusinessConstants.PAGE_NUM), 1);
|
||||||
List<EquipmentReqVo> list = service.getEquipmentReqLists(dto);
|
Integer pageSize = Convert.toInt(ServletUtils.getParameter(BusinessConstants.PAGE_SIZE), 10);
|
||||||
return getDataTable(list);
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
|
PageInfo<EquipmentReqVo> pageInfo = service.getEquipmentReqLists(dto);
|
||||||
|
return AjaxResult.success(pageInfo.getList());
|
||||||
}
|
}
|
||||||
|
|
||||||
// @RequiresPermissions("app:equipmentReq:addData")
|
// @RequiresPermissions("app:equipmentReq:addData")
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.bonus.common.entity.app.AppParamsDto;
|
||||||
import com.bonus.common.entity.bracelet.BraceletParamsDto;
|
import com.bonus.common.entity.bracelet.BraceletParamsDto;
|
||||||
import com.bonus.common.entity.bracelet.vo.EquipmentReqDataVo;
|
import com.bonus.common.entity.bracelet.vo.EquipmentReqDataVo;
|
||||||
import com.bonus.common.entity.bracelet.vo.EquipmentReqVo;
|
import com.bonus.common.entity.bracelet.vo.EquipmentReqVo;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -24,7 +25,7 @@ public interface IAppEquipmentReqService {
|
||||||
* @author cwchen
|
* @author cwchen
|
||||||
* @date 2024/8/6 16:09
|
* @date 2024/8/6 16:09
|
||||||
*/
|
*/
|
||||||
List<EquipmentReqVo> getEquipmentReqLists(AppParamsDto dto);
|
PageInfo<EquipmentReqVo> getEquipmentReqLists(AppParamsDto dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备领用
|
* 设备领用
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bonus.common.entity.bracelet.BraceletParamsDto;
|
||||||
import com.bonus.common.entity.bracelet.vo.EquipmentReqDataVo;
|
import com.bonus.common.entity.bracelet.vo.EquipmentReqDataVo;
|
||||||
import com.bonus.common.entity.bracelet.vo.EquipmentReqVo;
|
import com.bonus.common.entity.bracelet.vo.EquipmentReqVo;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
@ -35,7 +36,7 @@ public class AppEquipmentReqServiceImpl implements IAppEquipmentReqService {
|
||||||
private AppEquipmentReqMapper mapper;
|
private AppEquipmentReqMapper mapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<EquipmentReqVo> getEquipmentReqLists(AppParamsDto dto) {
|
public PageInfo<EquipmentReqVo> getEquipmentReqLists(AppParamsDto dto) {
|
||||||
List<EquipmentReqVo> list = new ArrayList<>();
|
List<EquipmentReqVo> list = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
list = mapper.getEquipmentReqLists(dto);
|
list = mapper.getEquipmentReqLists(dto);
|
||||||
|
|
@ -45,7 +46,8 @@ public class AppEquipmentReqServiceImpl implements IAppEquipmentReqService {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
}
|
}
|
||||||
return list;
|
PageInfo<EquipmentReqVo> pageInfo = new PageInfo<>(list);
|
||||||
|
return pageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -135,4 +135,16 @@ public class SelectController {
|
||||||
public AjaxResult getVoltageLevelByLineStats(SysParamsDto dto) {
|
public AjaxResult getVoltageLevelByLineStats(SysParamsDto dto) {
|
||||||
return service.getVoltageLevelByLineStats(dto);
|
return service.getVoltageLevelByLineStats(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典编码获取下拉选 app-使用
|
||||||
|
* @param dto
|
||||||
|
* @return AjaxResult
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2024/8/13 10:30
|
||||||
|
*/
|
||||||
|
@GetMapping("/getDicts")
|
||||||
|
public AjaxResult getDicts(SysParamsDto dto) {
|
||||||
|
return service.getDicts(dto);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,4 +99,13 @@ public interface SelectMapper {
|
||||||
* @date 2024/8/13 10:33
|
* @date 2024/8/13 10:33
|
||||||
*/
|
*/
|
||||||
List<SysSelectVo> getVoltageLevelByLineStats(SysParamsDto dto);
|
List<SysSelectVo> getVoltageLevelByLineStats(SysParamsDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典编码获取下拉选
|
||||||
|
* @param dto
|
||||||
|
* @return List<SysSelectVo>
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2024/8/19 17:27
|
||||||
|
*/
|
||||||
|
List<SysSelectVo> getDicts(SysParamsDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,4 +92,13 @@ public interface ISelectService {
|
||||||
* @date 2024/8/13 10:31
|
* @date 2024/8/13 10:31
|
||||||
*/
|
*/
|
||||||
AjaxResult getVoltageLevelByLineStats(SysParamsDto dto);
|
AjaxResult getVoltageLevelByLineStats(SysParamsDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典编码获取下拉选
|
||||||
|
* @param dto
|
||||||
|
* @return AjaxResult
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2024/8/19 17:27
|
||||||
|
*/
|
||||||
|
AjaxResult getDicts(SysParamsDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -135,4 +135,15 @@ public class SelectServiceImpl implements ISelectService {
|
||||||
}
|
}
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getDicts(SysParamsDto dto) {
|
||||||
|
List<SysSelectVo> list = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
list = mapper.getDicts(dto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
}
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,4 +82,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
dict_value AS id
|
dict_value AS id
|
||||||
FROM sys_dict_data WHERE dict_type = #{id}
|
FROM sys_dict_data WHERE dict_type = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<!--根据字典编码获取下拉选-->
|
||||||
|
<select id="getDicts" resultType="com.bonus.system.domain.vo.SysSelectVo">
|
||||||
|
SELECT dict_label AS name,
|
||||||
|
dict_value AS id
|
||||||
|
FROM sys_dict_data WHERE dict_type = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue