| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.io.IOException; |
| | | import java.net.URLDecoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.entity.EquipmentUnseal; |
| | | import org.jeecg.modules.eam.entity.EquipmentUnsealDetail; |
| | | import org.jeecg.modules.eam.entity.EquipmentUnseal; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.IEquipmentUnsealDetailService; |
| | | import org.jeecg.modules.eam.service.IEquipmentUnsealService; |
| | |
| | | |
| | | @Autowired |
| | | private IEamEquipmentService equipmentService; |
| | | |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | | * |
| | |
| | | @ApiOperation(value="设备启封-分页列表查询", notes="设备启封-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<EquipmentUnseal>> queryPageList(EquipmentUnseal equipmentUnseal, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | //QueryWrapper<EquipmentUnseal> queryWrapper = QueryGenerator.initQueryWrapper(equipmentUnseal, req.getParameterMap()); |
| | | //Page<EquipmentUnseal> page = new Page<EquipmentUnseal>(pageNo, pageSize); |
| | | QueryWrapper<EquipmentUnseal> queryWrapper = new QueryWrapper<>(); |
| | |
| | | for (EquipmentUnsealDetail record : pageList.getRecords()) { |
| | | String equipmentId = record.getEquipmentId(); |
| | | Equipment equipment = equipmentService.getById(equipmentId); |
| | | record.setEquipmentPhoto(equipment.getEquipmentPhoto()); |
| | | if(ObjectUtils.isNotNull(equipment)&&StringUtils.isNotBlank(equipment.getEquipmentPhoto())){ |
| | | record.setEquipmentPhoto(equipment.getEquipmentPhoto()); |
| | | } |
| | | |
| | | } |
| | | return Result.OK(pageList); |
| | | } |