| | |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.KeypointEquipmentInfoDto; |
| | | import com.gkhy.safePlatform.equipment.service.KeypointEquipmentInfoService; |
| | | import com.google.common.collect.Lists; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.KeypointEquipmentInfoImportExcel; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.KeypointEquipmentInfoQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.KeypointEquipmentInfoDto; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.KeypointEquipmentInfoExcel; |
| | | import com.gkhy.safePlatform.equipment.service.KeypointEquipmentInfoService; |
| | | import com.gkhy.safePlatform.equipment.utils.DateUtils; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelUtil; |
| | | import com.google.common.collect.Lists; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.net.URLEncoder; |
| | | import java.sql.Timestamp; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 重点监管装置/设备 详细信息(KeypointEquipmentInfo)表控制层 |
| | |
| | | @Resource |
| | | private KeypointEquipmentInfoService keypointEquipmentInfoService; |
| | | |
| | | |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.keypointEquipmentInfoService.queryAll(pageQuery); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | this.keypointEquipmentInfoService.removeByIds(idList); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | this.keypointEquipmentInfoService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 下载模板 |
| | | * |
| | | */ |
| | | @GetMapping(value = "/exportTemplate") |
| | | public void exportTemplate() throws IOException { |
| | | keypointEquipmentInfoService.exportTemplate(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导入数据 |
| | | * |
| | | */ |
| | | @RequestMapping(value = "/importData") |
| | | public ResultVO importData(MultipartFile file) throws IOException { |
| | | keypointEquipmentInfoService.importData(file); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 导出一览数据 |
| | | * |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(KeypointEquipmentInfoQueryCriteria queryCriteria) throws IOException { |
| | | keypointEquipmentInfoService.exportData(queryCriteria); |
| | | } |
| | | |
| | | |
| | |
| | | repairDetail.setRepairEndDate(new Timestamp(new java.util.Date().getTime())); |
| | | repairDetail.setRepairPersonDepartmentId(0L); |
| | | repairDetail.setRepairMemo(""); |
| | | repairDetail.setRepairStatus(0); |
| | | repairDetail.setRepairStatus((byte)0); |
| | | repairDetail.setExceptionInfo(""); |
| | | repairDetails.add(repairDetail); |
| | | infoDto.setRepaireDetailList(repairDetails); |
| | |
| | | infoDto.setConnectPersonId(0L); |
| | | infoDto.setInputPersonId(0L); |
| | | infoDto.setResponsibilityPersonId(0L); |
| | | infoDto.setPartType(0); |
| | | infoDto.setPartType((byte)0); |
| | | infoDto.setCheckCycle(""); |
| | | infoDto.setEmergencePlanId(0L); |
| | | infoDto.setDangerousElement(""); |
| | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |